You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Saxon Druce <sa...@blocksoftware.com> on 2003/06/03 02:10:47 UTC

[PATCH] filepath.c with Borland C++ Builder

Hi,

This is a repost of the patch below which I submitted about three weeks ago.

Thanks,
Saxon

---------------------------------------------------------------


Hi,

Borland C++ Builder 6.0 (ie bcc32 5.6) doesn't seem to like this kind of
initialiser in win32's filepath.c:

char seperator[2] = { (flags & APR_FILEPATH_NATIVE) ? '\\' : '/', 0};

The patch below fixes this.

Thanks,
Saxon


---------------------------------------------------------------

--- apr/file_io/win32/filepath.c.old    Tue May 13 14:35:32 2003
+++ apr/file_io/win32/filepath.c        Tue May 13 14:38:31 2003
@@ -156,9 +156,11 @@

 #else /* ndef(NETWARE) */

-    char seperator[2] = { (flags & APR_FILEPATH_NATIVE) ? '\\' : '/', 0};
+    char seperator[2] = {0, 0};
     const char *delim1;
     const char *delim2;
+
+    seperator[0] = (flags & APR_FILEPATH_NATIVE) ? '\\' : '/';

     if (testpath[0] == '/' || testpath[0] == '\\') {
         if (testpath[1] == '/' || testpath[1] == '\\') {