diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-12-15 22:38:56 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-12-15 22:38:56 +0000 |
commit | 932359ed16f9098413ed8c8afd489324811f3af9 (patch) | |
tree | a62a290aa80d703465c399c7618dc878d025cffd /libjava/java | |
parent | f6326164d16bbdacbf87a11b5a6b768da2502abb (diff) | |
download | ppe42-gcc-932359ed16f9098413ed8c8afd489324811f3af9.tar.gz ppe42-gcc-932359ed16f9098413ed8c8afd489324811f3af9.zip |
* java/lang/natSystem.cc (init_properties): Don't set user.name or
user.home if NO_GETUID defined. Only set user.dir if getcwd
exists.
* include/config.h.in: Rebuilt.
* acconfig.h (NO_GETUID): New define.
* configure.in: Rebuilt.
* configure.in: Define NO_GETUID in cross case. Check for getcwd
in native case.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30964 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java')
-rw-r--r-- | libjava/java/lang/natSystem.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libjava/java/lang/natSystem.cc b/libjava/java/lang/natSystem.cc index 4e4316a1ef0..1519647aebe 100644 --- a/libjava/java/lang/natSystem.cc +++ b/libjava/java/lang/natSystem.cc @@ -282,6 +282,7 @@ java::lang::System::init_properties (void) } #endif /* HAVE_UNAME */ +#ifndef NO_GETUID #ifdef HAVE_PWD_H uid_t user_id = getuid (); struct passwd *pwd_entry; @@ -315,7 +316,9 @@ java::lang::System::init_properties (void) SET ("user.home", pwd_entry->pw_dir); } #endif /* HAVE_PWD_H */ +#endif /* NO_GETUID */ +#ifdef HAVE_GETCWD #ifdef HAVE_UNISTD_H /* Use getcwd to set "user.dir". */ int buflen = 250; @@ -334,7 +337,8 @@ java::lang::System::init_properties (void) } if (buffer != NULL) free (buffer); -#endif +#endif /* HAVE_UNISTD_H */ +#endif /* HAVE_GETCWD */ // Set some properties according to whatever was compiled in with // `-D'. |