summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbnicholes <bnicholes@13f79535-47bb-0310-9956-ffa450edef68>2001-10-10 19:28:58 +0000
committerbnicholes <bnicholes@13f79535-47bb-0310-9956-ffa450edef68>2001-10-10 19:28:58 +0000
commitcaa24e808f168131983b4a9cc279e3edd0393079 (patch)
treee729ed858aa42af61c3b08aabffe53c9e74fe3f0
parent67310da361943da9305a50c28efcc2ff45c6676f (diff)
downloadlibapr-caa24e808f168131983b4a9cc279e3edd0393079.tar.gz
Fixed a compiler problem on NetWare. Metrowerks can't handle the inline
initialization git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62416 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--file_io/win32/filepath.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/file_io/win32/filepath.c b/file_io/win32/filepath.c
index 200313d92..6ea7c8ac3 100644
--- a/file_io/win32/filepath.c
+++ b/file_io/win32/filepath.c
@@ -79,14 +79,16 @@ APR_DECLARE(apr_status_t) apr_filepath_root(const char **rootpath,
{
const char *testpath = *inpath;
char *newpath;
- char seperator[2] = { (flags & APR_FILEPATH_NATIVE) ? '\\' : '/', 0};
#ifdef NETWARE
+ char seperator[2] = { 0, 0};
char server[MAX_SERVER_NAME+1];
char volume[MAX_VOLUME_NAME+1];
char path[MAX_PATH_NAME+1];
char file[MAX_FILE_NAME+1];
int elements;
+ seperator[0] = (flags & APR_FILEPATH_NATIVE) ? '\\' : '/';
+
/* Allocate and initialize each of the segment buffers
*/
server[0] = volume[0] = path[0] = file[0] = '\0';
@@ -108,7 +110,7 @@ APR_DECLARE(apr_status_t) apr_filepath_root(const char **rootpath,
/* NetWare doesn't add the root slash so we need to add it manually.
*/
- strcat(newpath, "/");
+ strcat(newpath, seperator);
*rootpath = newpath;
/* Skip the inpath pointer down to the first non-root character
@@ -141,6 +143,7 @@ APR_DECLARE(apr_status_t) apr_filepath_root(const char **rootpath,
return APR_EINCOMPLETE;
#else
+ char seperator[2] = { (flags & APR_FILEPATH_NATIVE) ? '\\' : '/', 0};
const char *delim1;
const char *delim2;