Bug 467991 - Enable GTK3 mode for eclipse on ppc64le platform

- Modified GTK2 version check to match the ppc64le build platform(only
on ppc64le)
- Removed the code to force GTK2 execution eventhough GTK3 is available
- Modified the code for the case where SWT_GTK3 flag is defined and no
compatible gtk3 is available
- Updated the patch based on review comments

Change-Id: I040f996ee18efdb469baf6a7383b22a6516da1d1
Signed-off-by: Sravan Kumar Lakkimsetti <sravankumarl@in.ibm.com>
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 a615316..9c937f3 100644
--- a/features/org.eclipse.equinox.executable.feature/library/gtk/eclipseGtkInit.c
+++ b/features/org.eclipse.equinox.executable.feature/library/gtk/eclipseGtkInit.c
@@ -137,17 +137,17 @@
 			setenv("GDK_CORE_DEVICE_EVENTS", "1", 0);
 		}
 #ifdef __ppc64le__
+		/* Adding a temporary version check for GTK3 till we verify with lower versions of GTK3 */
 		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) {
+				if ((check != NULL) && (gtk3 == NULL)) {
 					dlclose(gdkLib);
 					dlclose(gtkLib);
 					gdkLib = gtkLib = NULL;
-					setenv("SWT_GTK3","0",0);
 				}
 			}
 		}