Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'features')
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/eclipse.c7
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/gtk/eclipseGtkInit.c22
2 files changed, 22 insertions, 7 deletions
diff --git a/features/org.eclipse.equinox.executable.feature/library/eclipse.c b/features/org.eclipse.equinox.executable.feature/library/eclipse.c
index c7663665e..444c89b88 100644
--- a/features/org.eclipse.equinox.executable.feature/library/eclipse.c
+++ b/features/org.eclipse.equinox.executable.feature/library/eclipse.c
@@ -527,13 +527,6 @@ static int _run(int argc, _TCHAR* argv[], _TCHAR* vmArgs[])
#endif
#endif
-#ifdef LINUX
-#ifdef __ppc64le__
- /* set the swt gtk3 flag to 0 so that we use only GTK2 on ppc64le platform */
- setenv("SWT_GTK3","0",1);
-#endif
-#endif
-
/* try to open the specified file in an already running eclipse */
/* on Mac we are only registering an event handler here, always do this */
#ifndef MACOSX
diff --git a/features/org.eclipse.equinox.executable.feature/library/gtk/eclipseGtkInit.c b/features/org.eclipse.equinox.executable.feature/library/gtk/eclipseGtkInit.c
index 8abe5d615..a615316ec 100644
--- a/features/org.eclipse.equinox.executable.feature/library/gtk/eclipseGtkInit.c
+++ b/features/org.eclipse.equinox.executable.feature/library/gtk/eclipseGtkInit.c
@@ -26,6 +26,11 @@ static _TCHAR* upgradeWarning2 = _T_ECLIPSE("\nor use an older version of Eclips
static int minGtkMajorVersion = 2;
static int minGtkMinorVersion = 18;
static int minGtkMicroVersion = 0;
+#ifdef __ppc64le__
+static int minGtk3MajorVersion = 3;
+static int minGtk3MinorVersion = 10;
+static int minGtk3MicroVersion = 9;
+#endif
/* tables to help initialize the function pointers */
/* functions from libgtk-x11-2.0 or libgtk-3.so.0*/
@@ -131,6 +136,23 @@ int loadGtk() {
if (gdkCoreDeviceEvents == NULL) {
setenv("GDK_CORE_DEVICE_EVENTS", "1", 0);
}
+#ifdef __ppc64le__
+ if (gtkLib != NULL) {
+ const char * (*func)(int, int, int);
+ dlerror();
+ *(void**) (&func) = dlsym(gtkLib, "gtk_check_version");
+ if (dlerror() == NULL && func) {
+ const char *check = (*func)(minGtk3MajorVersion, minGtk3MinorVersion, minGtk3MicroVersion);
+ if (check != NULL) {
+ dlclose(gdkLib);
+ dlclose(gtkLib);
+ gdkLib = gtkLib = NULL;
+ setenv("SWT_GTK3","0",0);
+ }
+ }
+ }
+#endif
+
}
if (!gtkLib || !gdkLib) { //if GTK+ 2
gdkLib = dlopen(GDK_LIB, DLFLAGS);

Back to the top