After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 91649 - gtk_init_abi_check() isn't defined when compiled for cygwin
gtk_init_abi_check() isn't defined when compiled for cygwin
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Win32
2.0.x
Other Windows
: Normal normal
: ---
Assigned To: Tor Lillqvist
Tor Lillqvist
Depends on:
Blocks:
 
 
Reported: 2002-08-25 17:20 UTC by Masahiro Sakai
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Masahiro Sakai 2002-08-25 17:20:25 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)
Comment 1 Tor Lillqvist 2002-08-25 17:44:09 UTC
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).
Comment 2 Tor Lillqvist 2002-08-25 19:19:37 UTC
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.
Comment 3 Tor Lillqvist 2002-08-25 20:23:01 UTC
Patch applied to HEAD and gtk-2-0.