Mercurial > projects > dwt-win
diff dwt/internal/Library.d @ 213:36f5cb12e1a2
Update to SWT 3.4M7
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sat, 17 May 2008 17:34:28 +0200 |
parents | ab60f3309436 |
children | fd9c62a2998e |
line wrap: on
line diff
--- a/dwt/internal/Library.d Mon May 05 00:12:38 2008 +0200 +++ b/dwt/internal/Library.d Sat May 17 17:34:28 2008 +0200 @@ -34,7 +34,7 @@ /** * DWT Minor version number (must be in the range 0..999) */ - static const int MINOR_VERSION = 349; + static const int MINOR_VERSION = 442; /** * DWT revision number (must be >= 0) @@ -178,6 +178,20 @@ * @param mapName true if the name should be mapped, false otherwise */ public static void loadLibrary (String name, boolean mapName) { + String prop = System.getProperty ("sun.arch.data.model"); //$NON-NLS-1$ + if (prop is null) prop = System.getProperty ("com.ibm.vm.bitmode"); //$NON-NLS-1$ + if (prop !is null) { + if ("32".equals (prop)) { //$NON-NLS-1$ + if (0x1FFFFFFFFL is (int /*long*/)0x1FFFFFFFFL) { + throw new UnsatisfiedLinkError ("Cannot load 64-bit DWT libraries on 32-bit JVM"); //$NON-NLS-1$ + } + } + if ("64".equals (prop)) { //$NON-NLS-1$ + if (0x1FFFFFFFFL !is (int /*long*/)0x1FFFFFFFFL) { + throw new UnsatisfiedLinkError ("Cannot load 32-bit DWT libraries on 64-bit JVM"); //$NON-NLS-1$ + } + } + } /* Compute the library name and mapped name */ String libName1, libName2, mappedName1, mappedName2;