Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2018-11-06 06:44:29 +0000
committerAlexander Kurtakov2018-11-06 06:44:29 +0000
commit21cc4b9088d9ec48d3f6a7daed6e914dc2964aec (patch)
tree93513649bff37528113fa70f91d9b61fdccdc966
parent2360e7ec5d02cab9352bed5f0b5e3970f5c2eab9 (diff)
downloadeclipse.platform.swt-21cc4b9088d9ec48d3f6a7daed6e914dc2964aec.tar.gz
eclipse.platform.swt-21cc4b9088d9ec48d3f6a7daed6e914dc2964aec.tar.xz
eclipse.platform.swt-21cc4b9088d9ec48d3f6a7daed6e914dc2964aec.zip
Remove AIX leftovers.
Hacks for it was just multiplied for work on Bug 540692 so we would better stop that. It has never gained GTK3 support and the fragment is long gone. Change-Id: If9e400c93fc1d05661b200274a90b9ccc35ad31a Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo_custom.h4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/common/org/eclipse/swt/internal/Library.java1
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java7
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/library/swt.h4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java9
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DirectoryDialog.java39
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FileDialog.java49
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/SwtTestUtil.java1
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Control.java12
-rw-r--r--tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Text.java18
10 files changed, 37 insertions, 107 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo_custom.h b/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo_custom.h
index 5aa2f1ae13..3d314e2588 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo_custom.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cairo/library/cairo_custom.h
@@ -20,9 +20,7 @@
* ***** END LICENSE BLOCK ***** */
/* Libraries for dynamic loaded functions */
-#ifdef AIX
-#define LIB_CAIRO "libcairo.a(libcairo.so.2)"
-#elif _WIN32
+#ifdef _WIN32
#define LIB_CAIRO "libcairo-2.dll"
#else
#define LIB_CAIRO "libcairo.so.2"
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 fa4ac6ff92..a2227a1615 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
@@ -75,7 +75,6 @@ static String arch() {
static String os() {
String osName = System.getProperty("os.name"); //$NON-NLS-1$
if (osName.equals ("Linux")) return "linux"; //$NON-NLS-1$ $NON-NLS-2$
- if (osName.equals ("AIX")) return "aix"; //$NON-NLS-1$ $NON-NLS-2$
if (osName.equals ("Mac OS X")) return "macosx"; //$NON-NLS-1$ $NON-NLS-2$
if (osName.startsWith ("Win")) return "win32"; //$NON-NLS-1$ $NON-NLS-2$
return osName;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java
index f130389298..85105b674c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java
@@ -53,16 +53,15 @@ import org.eclipse.swt.internal.*;
*/
public class OS extends C {
/** OS Constants */
- public static final boolean IsAIX, IsLinux, IsWin32, BIG_ENDIAN;
+ public static final boolean IsLinux, IsWin32, BIG_ENDIAN;
static {
/* Initialize the OS flags and locale constants */
String osName = System.getProperty ("os.name");
- boolean isAIX = false, isLinux = false, isWin32 = false;
+ boolean isLinux = false, isWin32 = false;
if (osName.equals ("Linux")) isLinux = true;
- if (osName.equals ("AIX")) isAIX = true;
if (osName.startsWith("Windows")) isWin32 = true;
- IsAIX = isAIX; IsLinux = isLinux; IsWin32 = isWin32;
+ IsLinux = isLinux; IsWin32 = isWin32;
byte[] buffer = new byte[4];
long /*int*/ ptr = C.malloc(4);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/library/swt.h b/bundles/org.eclipse.swt/Eclipse SWT/common/library/swt.h
index ff490b6586..61122b8e36 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/common/library/swt.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT/common/library/swt.h
@@ -135,11 +135,7 @@ extern int IS_JNI_1_2;
}
#else
#define CALLING_CONVENTION
-#ifdef AIX
-#define LOAD_FLAGS RTLD_LAZY | RTLD_MEMBER
-#else
#define LOAD_FLAGS RTLD_LAZY
-#endif
#define LOAD_FUNCTION(var, name) \
static int initialized = 0; \
static void *var = NULL; \
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java
index 0327fd653c..7dc8600165 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java
@@ -583,10 +583,7 @@ protected void init () {
this.scaleFactor = getDeviceZoom ();
DPIUtil.setDeviceZoom (scaleFactor);
- //TODO: Remove; temporary code only
- boolean fixAIX = OS.IsAIX && C.PTR_SIZEOF == 8;
-
- if (debug || fixAIX) {
+ if (debug) {
if (xDisplay != 0) {
/* Create the warning and error callbacks */
Class<?> clazz = getClass ();
@@ -1013,9 +1010,7 @@ static long /*int*/ XErrorProc (long /*int*/ xDisplay, long /*int*/ xErrorEvent)
if (DEBUG || device.debug) {
new SWTError ().printStackTrace ();
}
- //TODO: Remove; temporary code only
- boolean fixAIX = OS.IsAIX && C.PTR_SIZEOF == 8;
- if (!fixAIX) OS.Call (XErrorProc, xDisplay, xErrorEvent);
+ OS.Call (XErrorProc, xDisplay, xErrorEvent);
}
} else {
if (DEBUG) new SWTError ().printStackTrace ();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DirectoryDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DirectoryDialog.java
index b5aa7bf88d..f8fc0242d0 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DirectoryDialog.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DirectoryDialog.java
@@ -41,7 +41,6 @@ import org.eclipse.swt.internal.gtk.*;
public class DirectoryDialog extends Dialog {
String message = "", filterPath = "";
static final String SEPARATOR = File.separator;
- private static final int PATH_MAX = 1024;
/**
* Constructs a new instance of this class given only its parent.
@@ -156,21 +155,10 @@ String openNativeChooserDialog () {
* to be true canonical path. So using realpath to convert the path to
* true canonical path.
*/
- if (OS.IsAIX) {
- byte [] outputBuffer = new byte [PATH_MAX];
- long /*int*/ ptr = OS.realpath (buffer, outputBuffer);
- if (ptr != 0) {
- GTK.gtk_file_chooser_set_current_folder (handle, ptr);
- }
- /* We are not doing free here because realpath returns the address of outputBuffer
- * which is created in this code and we let the garbage collector to take care of this
- */
- } else {
- long /*int*/ ptr = OS.realpath (buffer, null);
- if (ptr != 0) {
- GTK.gtk_file_chooser_set_current_folder (handle, ptr);
- OS.g_free (ptr);
- }
+ long /*int*/ ptr = OS.realpath (buffer, null);
+ if (ptr != 0) {
+ GTK.gtk_file_chooser_set_current_folder (handle, ptr);
+ OS.g_free (ptr);
}
}
if (message.length () > 0) {
@@ -263,21 +251,10 @@ String openChooserDialog () {
* to be true canonical path. So using realpath to convert the path to
* true canonical path.
*/
- if (OS.IsAIX) {
- byte [] outputBuffer = new byte [PATH_MAX];
- long /*int*/ ptr = OS.realpath (buffer, outputBuffer);
- if (ptr != 0) {
- GTK.gtk_file_chooser_set_current_folder (handle, ptr);
- }
- /* We are not doing free here because realpath returns the address of outputBuffer
- * which is created in this code and we let the garbage collector to take care of this
- */
- } else {
- long /*int*/ ptr = OS.realpath (buffer, null);
- if (ptr != 0) {
- GTK.gtk_file_chooser_set_current_folder (handle, ptr);
- OS.g_free (ptr);
- }
+ long /*int*/ ptr = OS.realpath (buffer, null);
+ if (ptr != 0) {
+ GTK.gtk_file_chooser_set_current_folder (handle, ptr);
+ OS.g_free (ptr);
}
}
if (message.length () > 0) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FileDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FileDialog.java
index e5fb1bfc44..915408415a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FileDialog.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FileDialog.java
@@ -54,7 +54,6 @@ public class FileDialog extends Dialog {
static final char SEPARATOR = File.separatorChar;
static final char EXTENSION_SEPARATOR = ';';
static final char FILE_EXTENSION_SEPARATOR = '.';
- private static final int PATH_MAX = 1024;
/**
* Constructs a new instance of this class given only its parent.
@@ -441,21 +440,10 @@ void presetChooserDialog () {
* to be true canonical path. So using realpath to convert the path to
* true canonical path.
*/
- if (OS.IsAIX) {
- byte [] outputBuffer = new byte [PATH_MAX];
- long /*int*/ ptr = OS.realpath (buffer, outputBuffer);
- if (ptr != 0) {
- GTK.gtk_file_chooser_set_current_folder (handle, ptr);
- }
- /* We are not doing free here because realpath returns the address of outputBuffer
- * which is created in this code and we let the garbage collector to take care of this
- */
- } else {
- long /*int*/ ptr = OS.realpath (buffer, null);
- if (ptr != 0) {
- GTK.gtk_file_chooser_set_current_folder (handle, ptr);
- OS.g_free (ptr);
- }
+ long /*int*/ ptr = OS.realpath (buffer, null);
+ if (ptr != 0) {
+ GTK.gtk_file_chooser_set_current_folder (handle, ptr);
+ OS.g_free (ptr);
}
}
}
@@ -510,29 +498,14 @@ void presetChooserDialog () {
* to be true canonical path. So using realpath to convert the path to
* true canonical path.
*/
- if (OS.IsAIX) {
- byte [] outputBuffer = new byte [PATH_MAX];
- long /*int*/ ptr = OS.realpath (buffer, outputBuffer);
- if (ptr != 0) {
- if (fileName.length() > 0) {
- GTK.gtk_file_chooser_set_filename (handle, ptr);
- } else {
- GTK.gtk_file_chooser_set_current_folder (handle, ptr);
- }
- /* We are not doing free here because realpath returns the address of outputBuffer
- * which is created in this code and we let the garbage collector to take care of this
- */
- }
- } else {
- long /*int*/ ptr = OS.realpath (buffer, null);
- if (ptr != 0) {
- if (fileName.length() > 0) {
- GTK.gtk_file_chooser_set_filename (handle, ptr);
- } else {
- GTK.gtk_file_chooser_set_current_folder (handle, ptr);
- }
- OS.g_free (ptr);
+ long /*int*/ ptr = OS.realpath (buffer, null);
+ if (ptr != 0) {
+ if (fileName.length() > 0) {
+ GTK.gtk_file_chooser_set_filename (handle, ptr);
+ } else {
+ GTK.gtk_file_chooser_set_current_folder (handle, ptr);
}
+ OS.g_free (ptr);
}
}
}
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/SwtTestUtil.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/SwtTestUtil.java
index 5fabf71e22..24d62cd985 100644
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/SwtTestUtil.java
+++ b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/SwtTestUtil.java
@@ -70,7 +70,6 @@ public class SwtTestUtil {
public final static boolean isGTK = SWT.getPlatform().equals("gtk");
public final static boolean isWindowsOS = System.getProperty("os.name").startsWith("Windows");
public final static boolean isLinux = System.getProperty("os.name").equals("Linux");
- public final static boolean isAIX = System.getProperty("os.name").equals("AIX");
/** Useful if you want some tests not to run on Jenkins with user "genie.platform" */
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Control.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Control.java
index ecc6ef3e91..0c1459c130 100644
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Control.java
+++ b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Control.java
@@ -535,13 +535,11 @@ public void test_isVisible() {
control.setVisible(false);
assertFalse(control.isVisible());
- if (!SwtTestUtil.isAIX) {
- control.setVisible(true);
- shell.setVisible(true);
- assertTrue("Window should be visible", control.isVisible());
- shell.setVisible(false);
- assertFalse("Window should not be visible", control.isVisible());
- }
+ control.setVisible(true);
+ shell.setVisible(true);
+ assertTrue("Window should be visible", control.isVisible());
+ shell.setVisible(false);
+ assertFalse("Window should not be visible", control.isVisible());
}
@Test
public void test_moveAboveLorg_eclipse_swt_widgets_Control() {
diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Text.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Text.java
index c289f8672e..361b41b4f1 100644
--- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Text.java
+++ b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Text.java
@@ -489,10 +489,8 @@ public void test_getCharCount() {
}
text.setText("");
assertEquals(0, text.getCharCount());
- if (!SwtTestUtil.isAIX) {
- text.setText("01234\t567890");
- assertEquals(12, text.getCharCount());
- }
+ text.setText("01234\t567890");
+ assertEquals(12, text.getCharCount());
}
@Test
@@ -970,13 +968,11 @@ public void test_isVisible() {
control.setVisible(false);
assertTrue(!control.isVisible());
- if (!SwtTestUtil.isAIX) {
- control.setVisible(true);
- shell.setVisible(true);
- assertTrue("Window should be visible", control.isVisible());
- shell.setVisible(false);
- assertFalse("Window should not be visible", control.isVisible());
- }
+ control.setVisible(true);
+ shell.setVisible(true);
+ assertTrue("Window should be visible", control.isVisible());
+ shell.setVisible(false);
+ assertFalse("Window should not be visible", control.isVisible());
}
@Test

Back to the top