mirror of
https://gcc.gnu.org/git/gcc.git
synced 2025-01-11 13:33:52 +08:00
* java/lang/natPosixProcess.cc (startProcess): Don't use sprintf.
From-SVN: r30996
This commit is contained in:
parent
53f4a9f689
commit
ce63fdce90
@ -1,3 +1,7 @@
|
||||
1999-12-17 Tom Tromey <tromey@cygnus.com>
|
||||
|
||||
* java/lang/natPosixProcess.cc (startProcess): Don't use sprintf.
|
||||
|
||||
1999-12-16 Bryce McKinlay <bryce@albatross.co.nz>
|
||||
|
||||
* java/lang/Boolean.java (Boolean(String)): Set `value' to false on a
|
||||
|
@ -168,12 +168,13 @@ java::lang::ConcreteProcess::startProcess (jstringArray progarray,
|
||||
if (envp)
|
||||
{
|
||||
// preserve PATH unless specified explicitly
|
||||
char *path_val = getenv("PATH");
|
||||
char *path_val = getenv ("PATH");
|
||||
environ = env;
|
||||
if (getenv("PATH") == NULL)
|
||||
if (getenv ("PATH") == NULL)
|
||||
{
|
||||
char *path_env = (char *) _Jv_Malloc (strlen(path_val) + 5 + 1);
|
||||
sprintf (path_env, "PATH=%s", path_val);
|
||||
char *path_env = (char *) _Jv_Malloc (strlen (path_val) + 5 + 1);
|
||||
strcpy (path_env, "PATH=");
|
||||
strcat (path_env, path_val);
|
||||
putenv (path_env);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user