Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul D'Pong2020-06-01 20:32:19 +0000
committerAlexander Kurtakov2020-06-08 15:34:55 +0000
commit4f3bada57db2e015942b64071e372f34ab8fe52b (patch)
tree8f4435b0ec752031fe647928dc75867c4ae81c83
parent7adbf58e4d19cb5c46a15a64c648cad9153cd90e (diff)
downloadeclipse.platform.swt-4f3bada57db2e015942b64071e372f34ab8fe52b.tar.gz
eclipse.platform.swt-4f3bada57db2e015942b64071e372f34ab8fe52b.tar.xz
eclipse.platform.swt-4f3bada57db2e015942b64071e372f34ab8fe52b.zip
Bug 563803 - Clean up Library.java of 32-bit SWT library support
Removed IS_64 + corresponding ifs, as SWT only supports 64-bit. Removed 32-bit check/translation in arch(). Change-Id: I0117a4d32c203e0ac696c16233cd7bf8a5cc06ab Signed-off-by: Paul D'Pong <sdamrong@redhat.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/common/org/eclipse/swt/internal/Library.java15
1 files changed, 3 insertions, 12 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/common/org/eclipse/swt/internal/Library.java b/bundles/org.eclipse.swt/Eclipse SWT PI/common/org/eclipse/swt/internal/Library.java
index f5d64df0e8..8d3c33a71b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/common/org/eclipse/swt/internal/Library.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/common/org/eclipse/swt/internal/Library.java
@@ -51,9 +51,6 @@ public class Library {
static final String JAVA_LIB_PATH = "java.library.path";
static final String SWT_LIB_PATH = "swt.library.path";
-
- /* 64-bit support */
- static final boolean IS_64 = longConst() == (long /*int*/)longConst();
static final String SUFFIX_64 = "-64"; //$NON-NLS-1$
static final String SWT_LIB_DIR;
@@ -68,7 +65,6 @@ static {
static String arch() {
String osArch = System.getProperty("os.arch"); //$NON-NLS-1$
- if (osArch.equals ("i386") || osArch.equals ("i686")) return "x86"; //$NON-NLS-1$ $NON-NLS-2$ $NON-NLS-3$
if (osArch.equals ("amd64")) return "x86_64"; //$NON-NLS-1$ $NON-NLS-2$
return osArch;
}
@@ -272,12 +268,9 @@ public static void loadLibrary (String name, boolean mapName) {
String prop = System.getProperty ("sun.arch.data.model"); //$NON-NLS-1$
if (prop == null) prop = System.getProperty ("com.ibm.vm.bitmode"); //$NON-NLS-1$
if (prop != null) {
- if ("32".equals (prop) && IS_64) { //$NON-NLS-1$
+ if ("32".equals (prop)) { //$NON-NLS-1$
throw new UnsatisfiedLinkError ("Cannot load 64-bit SWT libraries on 32-bit JVM"); //$NON-NLS-1$
}
- if ("64".equals (prop) && !IS_64) { //$NON-NLS-1$
- throw new UnsatisfiedLinkError ("Cannot load 32-bit SWT libraries on 64-bit JVM"); //$NON-NLS-1$
- }
}
/* Compute the library name and mapped name */
@@ -319,10 +312,8 @@ public static void loadLibrary (String name, boolean mapName) {
path = dir.getAbsolutePath ();
} else {
/* fall back to using the home dir directory */
- if (IS_64) {
- fileName1 = mapLibraryName (libName1 + SUFFIX_64);
- fileName2 = mapLibraryName (libName2 + SUFFIX_64);
- }
+ fileName1 = mapLibraryName (libName1 + SUFFIX_64);
+ fileName2 = mapLibraryName (libName2 + SUFFIX_64);
}
if (load (path + SEPARATOR + fileName1, message)) return;
if (mapName && load (path + SEPARATOR + fileName2, message)) return;

Back to the top