Changeset 11750


Ignore:
Timestamp:
04/11/09 21:47:05 (14 years ago)
Author:
Mark Evenson
Message:

Don't die if if the Java system property 'os.arch' doesn't exist.

Google App Engine's JVM does not provide the "os.arch" system, but we
shouldn't be failing for this anyways 'cuz argubly the machine type is
Java. Still, this might be useful for determining JNI libraries to
load.

If 'os.arch' doesn't exist, use 'UNKNOWN' for machine-type.

Thanks to Vladimir V. Korablin for the patch.

Location:
trunk/abcl/src/org/armedbear/lisp
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/Lisp.java

    r11726 r11750  
    22152215  {
    22162216    String os_arch = System.getProperty("os.arch");
    2217     if (os_arch.equals("amd64"))
    2218       Symbol.FEATURES.setSymbolValue(new Cons(Keyword.X86_64,
    2219                                               Symbol.FEATURES.getSymbolValue()));
    2220     else if (os_arch.equals("x86"))
    2221       Symbol.FEATURES.setSymbolValue(new Cons(Keyword.X86,
    2222                                               Symbol.FEATURES.getSymbolValue()));
     2217    if(os_arch != null) {
     2218      if (os_arch.equals("amd64"))
     2219        Symbol.FEATURES.setSymbolValue(new Cons(Keyword.X86_64,
     2220                                                Symbol.FEATURES.getSymbolValue()));
     2221      else if (os_arch.equals("x86"))
     2222        Symbol.FEATURES.setSymbolValue(new Cons(Keyword.X86,
     2223                                                Symbol.FEATURES.getSymbolValue()));
     2224    }
    22232225  }
    22242226
  • trunk/abcl/src/org/armedbear/lisp/machine_type.java

    r11488 r11750  
    4646  {
    4747    String s = System.getProperty("os.arch");
    48     if (s.equals("amd64"))
     48    if (s == null)
     49      s = "UNKNOWN";
     50    else if (s.equals("amd64"))
    4951      s = "X86-64";
    5052    else
Note: See TracChangeset for help on using the changeset viewer.