gij.cc (main): Formatting fixes.
* gij.cc (main): Formatting fixes. (_Jv_Compiler_Properties): Define. * java/lang/natSystem.cc (_Jv_Environment_Properties): Don't declare. (init_properties): Set properites from _Jv_Compiler_Properties. * include/java-props.h (_Jv_Compiler_Properties, _Jv_Environment_Properties): Declare. From-SVN: r30020
This commit is contained in:
parent
7cf4196339
commit
76ed0c0a4b
4 changed files with 39 additions and 6 deletions
|
@ -53,7 +53,6 @@ details. */
|
|||
#define SystemClass _CL_Q34java4lang6System
|
||||
extern java::lang::Class SystemClass;
|
||||
|
||||
extern property_pair *_Jv_Environment_Properties;
|
||||
|
||||
|
||||
#if defined (ECOS)
|
||||
|
@ -336,8 +335,8 @@ java::lang::System::init_properties (void)
|
|||
|
||||
while (buf_r != NULL)
|
||||
{
|
||||
int r = getpwuid_adaptor
|
||||
(getpwuid_r, user_id, &pwd_r, buf_r, len_r, &pwd_entry);
|
||||
int r = getpwuid_adaptor (getpwuid_r, user_id, &pwd_r,
|
||||
buf_r, len_r, &pwd_entry);
|
||||
if (r == 0)
|
||||
break;
|
||||
else if (r != ERANGE)
|
||||
|
@ -379,6 +378,19 @@ java::lang::System::init_properties (void)
|
|||
free (buffer);
|
||||
#endif
|
||||
|
||||
// Set some properties according to whatever was compiled in with
|
||||
// `-D'.
|
||||
for (int i = 0; _Jv_Compiler_Properties[i]; ++i)
|
||||
{
|
||||
const char *s, *p;
|
||||
// Find the `='.
|
||||
for (s = p = _Jv_Compiler_Properties[i]; *s && *s != '='; ++s)
|
||||
;
|
||||
jstring name = JvNewStringLatin1 (p, s - p);
|
||||
jstring val = JvNewStringLatin1 (*s == '=' ? s + 1 : s);
|
||||
properties->put (name, val);
|
||||
}
|
||||
|
||||
// Set the system properties from the user's environment.
|
||||
if (_Jv_Environment_Properties)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue