GNOME Bugzilla – Bug 91649
gtk_init_abi_check() isn't defined when compiled for cygwin
Last modified: 2004-12-22 21:47:04 UTC
condition of declaring/defining gtk_init_abi_check() and gtk_init_check_abi_check() doesn't match between gtkmain.h and gtkmain.c ie) gtkmain.h uses G_PLATFORM_WIN32 gtkmain.c uses G_OS_WIN32 This causes linking error when compiled for Cygwin. IMHO, gtkmain.c should use G_PLATFORM_WIN32 --- gtk+-2.0.6/gtk/gtkmain.c~ 2002-06-14 22:57:20.000000000 +0900 +++ gtk+-2.0.6/gtk/gtkmain.c 2002-08-24 20:14:48.000000000 +0900 @@ -781,7 +781,7 @@ } } -#ifdef G_OS_WIN32 +#ifdef G_PLATFORM_WIN32 static void check_sizeof_GtkWindow (size_t sizeof_GtkWindow)
No, gtkmain.h should use G_OS_WIN32 for the abi_check stuff. There is no other compiler than gcc that can be used for Cygwin builds anyway, so ABI compatibility is not an issue. Not so for native Win32, where gcc and MSVC differ in struct packing unless gcc is passed -fnative- struct (a.k.a. -mms-bitfields in GCC 3.x).
Hmm. On the other hand, somebody might be using a native Win32 GTK+ DLL from a Cygwin program. This is not supposed to work, but still it would be appropriate to use the abi_check versions then, too, to get an early warning. So, maybe it's best to do like the reporter says, to keep the abi_check #defines in place also for Cygwin, and compile the abi_check vesions also on Cygwin.
Patch applied to HEAD and gtk-2-0.