prims.cc (_Jv_PrependVersionedLibdir): Use _Jv_platform_path_separator.

* prims.cc (_Jv_PrependVersionedLibdir): Use
	_Jv_platform_path_separator.

From-SVN: r117611
This commit is contained in:
Tom Tromey 2006-10-10 18:46:41 +00:00 committed by Tom Tromey
parent 51d0a5cc30
commit ab6b9a13d0
2 changed files with 11 additions and 3 deletions

View 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:

View 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);
}
}