From 40d637ec03335d14e98bd3e752baa304f0efbc1f Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Thu, 18 Apr 2002 11:21:21 +0000 Subject: [PATCH] gdk-pixbuf/Makefile.am (uninstall-libtool-import-lib) Fix typo, thanks to 2002-04-18 Tor Lillqvist * gdk-pixbuf/Makefile.am (uninstall-libtool-import-lib) * gdk/Makefile.am (uninstall-libtool-import-lib): Fix typo, thanks to David Sterba for noticing. * gtk/gtkmain.h * gtk/gtkmain.c (gtk_init_abi_check, gtk_init_check_abi_check): In GTK+ 2.0 the GtkWindow struct actually is the same size in gcc on Win32 whether compiled with -fnative-struct or not. Unfortunately this wan't noticed until now. So, from now on, check some other struct, too, for which the use of -fnative-struct still matters. GtkBox is one such. --- ChangeLog | 14 ++++++++++++++ ChangeLog.pre-2-10 | 14 ++++++++++++++ ChangeLog.pre-2-2 | 14 ++++++++++++++ ChangeLog.pre-2-4 | 14 ++++++++++++++ ChangeLog.pre-2-6 | 14 ++++++++++++++ ChangeLog.pre-2-8 | 14 ++++++++++++++ gdk-pixbuf/Makefile.am | 2 +- gdk/Makefile.am | 2 +- gtk/gtkmain.c | 34 +++++++++++++++++++++++++++++----- gtk/gtkmain.h | 10 ++++++---- 10 files changed, 121 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index af555d69f0..d8a1cc2244 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2002-04-18 Tor Lillqvist + + * gdk-pixbuf/Makefile.am (uninstall-libtool-import-lib) + * gdk/Makefile.am (uninstall-libtool-import-lib): Fix typo, + thanks to David Sterba for noticing. + + * gtk/gtkmain.h + * gtk/gtkmain.c (gtk_init_abi_check, gtk_init_check_abi_check): In + GTK+ 2.0 the GtkWindow struct actually is the same size in gcc on + Win32 whether compiled with -fnative-struct or not. Unfortunately + this wan't noticed until now. So, from now on, check some other + struct, too, for which the use of -fnative-struct still + matters. GtkBox is one such. + Thu Apr 18 00:23:31 2002 Kristian Rietveld * gtk/gtktreemodelsort.c diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index af555d69f0..d8a1cc2244 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,17 @@ +2002-04-18 Tor Lillqvist + + * gdk-pixbuf/Makefile.am (uninstall-libtool-import-lib) + * gdk/Makefile.am (uninstall-libtool-import-lib): Fix typo, + thanks to David Sterba for noticing. + + * gtk/gtkmain.h + * gtk/gtkmain.c (gtk_init_abi_check, gtk_init_check_abi_check): In + GTK+ 2.0 the GtkWindow struct actually is the same size in gcc on + Win32 whether compiled with -fnative-struct or not. Unfortunately + this wan't noticed until now. So, from now on, check some other + struct, too, for which the use of -fnative-struct still + matters. GtkBox is one such. + Thu Apr 18 00:23:31 2002 Kristian Rietveld * gtk/gtktreemodelsort.c diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index af555d69f0..d8a1cc2244 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,17 @@ +2002-04-18 Tor Lillqvist + + * gdk-pixbuf/Makefile.am (uninstall-libtool-import-lib) + * gdk/Makefile.am (uninstall-libtool-import-lib): Fix typo, + thanks to David Sterba for noticing. + + * gtk/gtkmain.h + * gtk/gtkmain.c (gtk_init_abi_check, gtk_init_check_abi_check): In + GTK+ 2.0 the GtkWindow struct actually is the same size in gcc on + Win32 whether compiled with -fnative-struct or not. Unfortunately + this wan't noticed until now. So, from now on, check some other + struct, too, for which the use of -fnative-struct still + matters. GtkBox is one such. + Thu Apr 18 00:23:31 2002 Kristian Rietveld * gtk/gtktreemodelsort.c diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index af555d69f0..d8a1cc2244 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,17 @@ +2002-04-18 Tor Lillqvist + + * gdk-pixbuf/Makefile.am (uninstall-libtool-import-lib) + * gdk/Makefile.am (uninstall-libtool-import-lib): Fix typo, + thanks to David Sterba for noticing. + + * gtk/gtkmain.h + * gtk/gtkmain.c (gtk_init_abi_check, gtk_init_check_abi_check): In + GTK+ 2.0 the GtkWindow struct actually is the same size in gcc on + Win32 whether compiled with -fnative-struct or not. Unfortunately + this wan't noticed until now. So, from now on, check some other + struct, too, for which the use of -fnative-struct still + matters. GtkBox is one such. + Thu Apr 18 00:23:31 2002 Kristian Rietveld * gtk/gtktreemodelsort.c diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index af555d69f0..d8a1cc2244 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,17 @@ +2002-04-18 Tor Lillqvist + + * gdk-pixbuf/Makefile.am (uninstall-libtool-import-lib) + * gdk/Makefile.am (uninstall-libtool-import-lib): Fix typo, + thanks to David Sterba for noticing. + + * gtk/gtkmain.h + * gtk/gtkmain.c (gtk_init_abi_check, gtk_init_check_abi_check): In + GTK+ 2.0 the GtkWindow struct actually is the same size in gcc on + Win32 whether compiled with -fnative-struct or not. Unfortunately + this wan't noticed until now. So, from now on, check some other + struct, too, for which the use of -fnative-struct still + matters. GtkBox is one such. + Thu Apr 18 00:23:31 2002 Kristian Rietveld * gtk/gtktreemodelsort.c diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index af555d69f0..d8a1cc2244 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,17 @@ +2002-04-18 Tor Lillqvist + + * gdk-pixbuf/Makefile.am (uninstall-libtool-import-lib) + * gdk/Makefile.am (uninstall-libtool-import-lib): Fix typo, + thanks to David Sterba for noticing. + + * gtk/gtkmain.h + * gtk/gtkmain.c (gtk_init_abi_check, gtk_init_check_abi_check): In + GTK+ 2.0 the GtkWindow struct actually is the same size in gcc on + Win32 whether compiled with -fnative-struct or not. Unfortunately + this wan't noticed until now. So, from now on, check some other + struct, too, for which the use of -fnative-struct still + matters. GtkBox is one such. + Thu Apr 18 00:23:31 2002 Kristian Rietveld * gtk/gtktreemodelsort.c diff --git a/gdk-pixbuf/Makefile.am b/gdk-pixbuf/Makefile.am index f33a3bbe04..7a6b2a2d1c 100644 --- a/gdk-pixbuf/Makefile.am +++ b/gdk-pixbuf/Makefile.am @@ -17,7 +17,7 @@ gdk_pixbuf-win32res.lo : gdk_pixbuf.rc install-libtool-import-lib: $(INSTALL) .libs/libgdk_pixbuf-$(GTK_API_VERSION).dll.a $(DESTDIR)$(libdir) uninstall-libtool-import-lib: - -rm $(DESTDIR)$(libdir)/libdk_pixbuf-$(GTK_API_VERSION).dll.a + -rm $(DESTDIR)$(libdir)/libgdk_pixbuf-$(GTK_API_VERSION).dll.a else install-libtool-import-lib: uninstall-libtool-import-lib: diff --git a/gdk/Makefile.am b/gdk/Makefile.am index 4f67d4b596..46e79e74ef 100644 --- a/gdk/Makefile.am +++ b/gdk/Makefile.am @@ -42,7 +42,7 @@ gdk_win32_symbols = -export-symbols gdk.def install-libtool-import-lib: $(INSTALL) .libs/libgdk-win32-$(GTK_API_VERSION).dll.a $(DESTDIR)$(libdir) uninstall-libtool-import-lib: - -rm $(DESTDIR)$(libdir)/libdk-win32-$(GTK_API_VERSION).dll.a + -rm $(DESTDIR)$(libdir)/libgdk-win32-$(GTK_API_VERSION).dll.a else install-libtool-import-lib: uninstall-libtool-import-lib: diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c index e1f494f78e..e3fe3400b1 100644 --- a/gtk/gtkmain.c +++ b/gtk/gtkmain.c @@ -49,6 +49,7 @@ #include /* For pango_split_file_list */ #include "gtkaccelmap.h" +#include "gtkbox.h" #include "gtkdnd.h" #include "gtkversion.h" #include "gtkmain.h" @@ -183,8 +184,6 @@ gtk_check_version (guint required_major, return NULL; } -#undef gtk_init_check - /* This checks to see if the process is running suid or sgid * at the current time. If so, we don't allow GTK+ to be initialized. * This is meant to be a mild check - we only error out if we @@ -551,6 +550,8 @@ gtk_disable_setlocale (void) do_setlocale = FALSE; } +#undef gtk_init_check + gboolean gtk_init_check (int *argc, char ***argv) @@ -790,23 +791,46 @@ check_sizeof_GtkWindow (size_t sizeof_GtkWindow) "The code using GTK+ thinks GtkWindow is of different\n" "size than it actually is in this build of GTK+.\n" "On Windows, this probably means that you have compiled\n" - "your code with gcc without the -fnative-struct switch."); + "your code with gcc without the -fnative-struct switch,\n" + "or that you are using an unsupported compiler."); +} + +/* In GTK+ 2.0 the GtkWindow struct actually is the same size in + * gcc-compiled code on Win32 whether compiled with -fnative-struct or + * not. Unfortunately this wan't noticed until after GTK+ 2.0.1. So, + * from GTK+ 2.0.2 on, check some other struct, too, where the use of + * -fnative-struct still matters. GtkBox is one such. + */ +static void +check_sizeof_GtkBox (size_t sizeof_GtkBox) +{ + if (sizeof_GtkBox != sizeof (GtkBox)) + g_error ("Incompatible build!\n" + "The code using GTK+ thinks GtkBox is of different\n" + "size than it actually is in this build of GTK+.\n" + "On Windows, this probably means that you have compiled\n" + "your code with gcc without the -fnative-struct switch,\n" + "or that you are using an unsupported compiler."); } /* These two functions might get more checks added later, thus pass * in the number of extra args. */ void -gtk_init_abi_check (int *argc, char ***argv, int num_checks, size_t sizeof_GtkWindow) +gtk_init_abi_check (int *argc, char ***argv, int num_checks, size_t sizeof_GtkWindow, size_t sizeof_GtkBox) { check_sizeof_GtkWindow (sizeof_GtkWindow); + if (num_checks >= 2) + check_sizeof_GtkBox (sizeof_GtkBox); gtk_init (argc, argv); } gboolean -gtk_init_check_abi_check (int *argc, char ***argv, int num_checks, size_t sizeof_GtkWindow) +gtk_init_check_abi_check (int *argc, char ***argv, int num_checks, size_t sizeof_GtkWindow, size_t sizeof_GtkBox) { check_sizeof_GtkWindow (sizeof_GtkWindow); + if (num_checks >= 2) + check_sizeof_GtkBox (sizeof_GtkBox); return gtk_init_check (argc, argv); } diff --git a/gtk/gtkmain.h b/gtk/gtkmain.h index 83d66de305..7ca018e586 100644 --- a/gtk/gtkmain.h +++ b/gtk/gtkmain.h @@ -98,14 +98,16 @@ gboolean gtk_init_check (int *argc, void gtk_init_abi_check (int *argc, char ***argv, int num_checks, - size_t sizeof_GtkWindow); + size_t sizeof_GtkWindow, + size_t sizeof_GtkBox); gboolean gtk_init_check_abi_check (int *argc, char ***argv, int num_checks, - size_t sizeof_GtkWindow); + size_t sizeof_GtkWindow, + size_t sizeof_GtkBox); -#define gtk_init(argc, argv) gtk_init_abi_check (argc, argv, 1, sizeof (GtkWindow)) -#define gtk_init_check(argc, argv) gtk_init_check_abi_check (argc, argv, 1, sizeof (GtkWindow)) +#define gtk_init(argc, argv) gtk_init_abi_check (argc, argv, 2, sizeof (GtkWindow), sizeof (GtkBox)) +#define gtk_init_check(argc, argv) gtk_init_check_abi_check (argc, argv, 2, sizeof (GtkWindow), sizeof (GtkBox)) #endif