bnicholes 01/10/10 12:28:58
Modified: file_io/win32 filepath.c
Log:
Fixed a compiler problem on NetWare. Metrowerks can't handle the inline
initialization
Revision Changes Path
1.18 +5 -2 apr/file_io/win32/filepath.c
Index: filepath.c
===================================================================
RCS file: /home/cvs/apr/file_io/win32/filepath.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- filepath.c 2001/10/10 18:09:41 1.17
+++ filepath.c 2001/10/10 19:28:58 1.18
@@ -79,14 +79,16 @@
{
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 @@
/* 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 @@
return APR_EINCOMPLETE;
#else
+ char seperator[2] = { (flags & APR_FILEPATH_NATIVE) ? '\\' : '/', 0};
const char *delim1;
const char *delim2;