Return-Path: Delivered-To: apmail-apr-cvs-archive@apr.apache.org Received: (qmail 60765 invoked by uid 500); 10 Oct 2001 19:33:15 -0000 Mailing-List: contact cvs-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Reply-To: dev@apr.apache.org Delivered-To: mailing list cvs@apr.apache.org Received: (qmail 60746 invoked from network); 10 Oct 2001 19:33:14 -0000 Date: 10 Oct 2001 19:28:58 -0000 Message-ID: <20011010192858.34712.qmail@icarus.apache.org> From: bnicholes@apache.org To: apr-cvs@apache.org Subject: cvs commit: apr/file_io/win32 filepath.c X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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;