prims.cc (_Jv_PrependVersionedLibdir): Use _Jv_platform_path_separator.
authorTom Tromey <tromey@redhat.com>
Tue, 10 Oct 2006 18:46:41 +0000 (18:46 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Tue, 10 Oct 2006 18:46:41 +0000 (18:46 +0000)
* prims.cc (_Jv_PrependVersionedLibdir): Use
_Jv_platform_path_separator.

From-SVN: r117611

libjava/ChangeLog
libjava/prims.cc

index 8fbeb584bcd92ed8631ba3d1b34c7077ad2bf26c..b1853f4400600f531aeec31538718e749ad5aa30 100644 (file)
@@ -1,3 +1,8 @@
+2006-10-10  Tom Tromey  <tromey@redhat.com>
+
+       * prims.cc (_Jv_PrependVersionedLibdir): Use
+       _Jv_platform_path_separator.
+
 2006-10-10  Tom Tromey  <tromey@redhat.com>
 
        PR libgcj/29205:
index 3db82c19fa7fa481cb0966a7c0ab044fcc18a18b..dfeb95766afa2887217699b79fc8e469ac89bbf3 100644 (file)
@@ -1788,11 +1788,14 @@ _Jv_PrependVersionedLibdir (char* libpath)
         {
           // LD_LIBRARY_PATH is not prefixed with
           // GCJ_VERSIONED_LIBDIR.
-          jsize total = (sizeof (GCJ_VERSIONED_LIBDIR) - 1)
-            + (sizeof (PATH_SEPARATOR) - 1) + strlen (libpath) + 1;
+         char path_sep[2];
+         path_sep[0] = (char) _Jv_platform_path_separator;
+         path_sep[1] = '\0';
+          jsize total = ((sizeof (GCJ_VERSIONED_LIBDIR) - 1)
+                        + 1 /* path separator */ + strlen (libpath) + 1);
           retval = (char*) _Jv_Malloc (total);
           strcpy (retval, GCJ_VERSIONED_LIBDIR);
-          strcat (retval, PATH_SEPARATOR);
+          strcat (retval, path_sep);
           strcat (retval, libpath);
         }
     }