diff options
author | Anthony Green <green@redhat.com> | 2005-02-18 23:29:44 +0000 |
---|---|---|
committer | Anthony Green <green@gcc.gnu.org> | 2005-02-18 23:29:44 +0000 |
commit | 95432490dbe5109141da938f66f0abf210886ac4 (patch) | |
tree | 0a2ed0255b3adc5f18989f4343824a087282b6d8 /libjava | |
parent | f36b89e08d5782feee7231fcea4616d8d4a83026 (diff) | |
download | gcc-95432490dbe5109141da938f66f0abf210886ac4.zip gcc-95432490dbe5109141da938f66f0abf210886ac4.tar.gz gcc-95432490dbe5109141da938f66f0abf210886ac4.tar.bz2 |
natRuntime.cc (insertSystemProperties): Normalize x86 architecture names to "i386" for compatibility reasons.
2005-02-18 Anthony Green <green@redhat.com>
* java/lang/natRuntime.cc (insertSystemProperties): Normalize x86
architecture names to "i386" for compatibility reasons. Win32
still uses "x86".
From-SVN: r95243
Diffstat (limited to 'libjava')
-rw-r--r-- | libjava/ChangeLog | 6 | ||||
-rw-r--r-- | libjava/java/lang/natRuntime.cc | 12 |
2 files changed, 17 insertions, 1 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index e28cc6e..6f14af2 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,5 +1,11 @@ 2005-02-18 Anthony Green <green@redhat.com> + * java/lang/natRuntime.cc (insertSystemProperties): Normalize x86 + architecture names to "i386" for compatibility reasons. Win32 + still uses "x86". + +2005-02-18 Anthony Green <green@redhat.com> + * gij.cc (version): Change year for '--version' to 2005. * gnu/gcj/convert/Convert.java: Ditto. * gnu/java/rmi/rmic/RMIC.java: Ditto. diff --git a/libjava/java/lang/natRuntime.cc b/libjava/java/lang/natRuntime.cc index 0f3b798..37d7b4b 100644 --- a/libjava/java/lang/natRuntime.cc +++ b/libjava/java/lang/natRuntime.cc @@ -436,8 +436,18 @@ java::lang::Runtime::insertSystemProperties (java::util::Properties *newprops) if (! uname (&u)) { SET ("os.name", u.sysname); - SET ("os.arch", u.machine); SET ("os.version", u.release); + + // Normalize x86 architecture names to "i386" (except on Windows, which + // is handled in win32.cc). + if (u.machine[0] == 'i' + && u.machine[1] != 0 + && u.machine[2] == '8' + && u.machine[3] == '6' + && u.machine[4] == 0) + SET ("os.arch", "i386"); + else + SET ("os.arch", u.machine); } else { |