From f16b4cd1be1513696a47d5e4a812e1123cca35d9 Mon Sep 17 00:00:00 2001 From: Alexander Kurtakov Date: Tue, 28 Aug 2012 19:45:28 +0300 Subject: Remove cast in dynamic method breaking compilation. This should have been part of bug 369624. --- bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c | 4 ++-- .../Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c index 12cff6d853..16ad4e8134 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c @@ -5767,12 +5767,12 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1pango_1context_1set_1colormap) { OS_NATIVE_ENTER(env, that, _1gdk_1pango_1context_1set_1colormap_FUNC); /* - gdk_pango_context_set_colormap((PangoContext *)arg0, (GdkColormap *)arg1); + gdk_pango_context_set_colormap((PangoContext *)arg0, arg1); */ { OS_LOAD_FUNCTION(fp, gdk_pango_context_set_colormap) if (fp) { - ((void (CALLING_CONVENTION*)(PangoContext *, GdkColormap *))fp)((PangoContext *)arg0, (GdkColormap *)arg1); + ((void (CALLING_CONVENTION*)(PangoContext *, jintLong))fp)((PangoContext *)arg0, arg1); } } OS_NATIVE_EXIT(env, that, _1gdk_1pango_1context_1set_1colormap_FUNC); 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 312603a2b1..c0ae254c02 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 @@ -4349,7 +4349,6 @@ public static final int /*long*/ gdk_pango_context_get() { /** * @method flags=dynamic * @param context cast=(PangoContext *) - * @param colormap cast=(GdkColormap *) */ public static final native void _gdk_pango_context_set_colormap(int /*long*/ context, int /*long*/ colormap); public static final void gdk_pango_context_set_colormap(int /*long*/ context, int /*long*/ colormap) { -- cgit From 9298b2b5e4c70841e967d5ebec2fff49d69edcf8 Mon Sep 17 00:00:00 2001 From: Alexander Kurtakov Date: Tue, 28 Aug 2012 18:58:43 +0300 Subject: Make GTK_VERSION a variable. Allowing to try compiling against different GTK versions is really helpful while porting to newer version. As the default is set to 2.0 nothing should break unless someone manually passes 3.0 or even 4.0 so if someone sees a breakage it will be obvious. --- .../org.eclipse.swt/Eclipse SWT PI/gtk/library/make_linux.mak | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_linux.mak b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_linux.mak index 2e407471f5..2616a84548 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_linux.mak +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/make_linux.mak @@ -14,6 +14,7 @@ include make_common.mak SWT_VERSION=$(maj_ver)$(min_ver) +GTK_VERSION?=2.0 # Define the various shared libraries to be build. WS_PREFIX = gtk @@ -47,16 +48,16 @@ CAIROCFLAGS = `pkg-config --cflags cairo` CAIROLIBS = `pkg-config --libs-only-L cairo` -lcairo # Do not use pkg-config to get libs because it includes unnecessary dependencies (i.e. pangoxft-1.0) -GTKCFLAGS = `pkg-config --cflags gtk+-2.0` -GTKLIBS = `pkg-config --libs-only-L gtk+-2.0 gthread-2.0` $(XLIB64) -L/usr/X11R6/lib -lgtk-x11-2.0 -lgthread-2.0 -lXtst +GTKCFLAGS = `pkg-config --cflags gtk+-$(GTK_VERSION)` +GTKLIBS = `pkg-config --libs-only-L gtk+-$(GTK_VERSION) gthread-2.0` $(XLIB64) -L/usr/X11R6/lib -lgtk-x11-$(GTK_VERSION) -lgthread-2.0 -lXtst CDE_LIBS = -L$(CDE_HOME)/lib -R$(CDE_HOME)/lib -lXt -lX11 -lDtSvc AWT_LFLAGS = -shared ${SWT_LFLAGS} AWT_LIBS = -L$(AWT_LIB_PATH) -ljawt -ATKCFLAGS = `pkg-config --cflags atk gtk+-2.0` -ATKLIBS = `pkg-config --libs-only-L atk gtk+-2.0` -latk-1.0 -lgtk-x11-2.0 +ATKCFLAGS = `pkg-config --cflags atk gtk+-$(GTK_VERSION)` +ATKLIBS = `pkg-config --libs-only-L atk gtk+-$(GTK_VERSION)` -latk-1.0 -lgtk-x11-$(GTK_VERSION) GNOMECFLAGS = `pkg-config --cflags gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0` GNOMELIBS = `pkg-config --libs-only-L gnome-vfs-module-2.0 libgnome-2.0 libgnomeui-2.0` -lgnomevfs-2 -lgnome-2 -lgnomeui-2 -- cgit