This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Patch: FYI: fix PR 27892
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 05 Jun 2006 14:27:43 -0600
- Subject: Patch: FYI: fix PR 27892
- Reply-to: tromey at redhat dot com
I'm checking this in on the trunk.
This fixes PR 27892. Andreas Tobler tested it out on HP-UX and
Darwin.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
PR libgcj/27892:
* gij.cc (main): Use putenv.
Index: gij.cc
===================================================================
--- gij.cc (revision 114348)
+++ gij.cc (working copy)
@@ -101,7 +101,12 @@
if (! libpath || strcmp (libpath, newpath))
{
- setenv (LTDL_SHLIBPATH_VAR, newpath, 1);
+ char *buffer = (char *) JvMalloc (strlen (LTDL_SHLIBPATH_VAR)
+ + strlen (newpath) + 2);
+ strcpy (buffer, LTDL_SHLIBPATH_VAR);
+ strcat (buffer, "=");
+ strcat (buffer, newpath);
+ putenv (buffer);
JvFree (newpath);
int error_code = execvp (argv[0], (char* const*) argv);