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 378779 - G_OS_WIN32 defined when compiling only; what about other software?!
G_OS_WIN32 defined when compiling only; what about other software?!
Status: RESOLVED INVALID
Product: glib
Classification: Platform
Component: win32
2.12.x
Other All
: Normal normal
: ---
Assigned To: gtk-win32 maintainers
gtk-win32 maintainers
Depends on:
Blocks:
 
 
Reported: 2006-11-24 10:04 UTC by Alexis Wilke
Modified: 2006-11-24 10:33 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Alexis Wilke 2006-11-24 10:04:19 UTC
Please describe the problem:
When I do ./configure for glib, it generates a file called glib/glibconfig.h.

This file includes a definition of for G_OS_WIN32 (and G_PLATFORM_WIN32--not too sure what the difference?). That means the entire library is compiled with both flags #define'd.

The HUGE problem that I can see is that all the other software compiled against the glib MUST have these two flags set too or some functions, structures, macros may not be equal and the library (or Gtk... ha!) would crash, it seems to me.

Obviously, I can add that to my command line since most other packages will accept a CFLAGS=-DG_OS_WIN32 definition. But I do not think that this is the right way to proceed. Instead, I'd like to get these two flags in some gconfig.h file saved under /mingw/include/glib/*

I'd be glad to make that work for you guys, but I first need to make sure that you will accept my changes.

Thank you.
Alexis Wilke

Steps to reproduce:
1. grep G_OS_WIN32 /mingw/include/glib/*.* /mingw/include/glib/*/*.*
2. search for a #define
3. you cannot find it... try again? 8-)


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Tor Lillqvist 2006-11-24 10:18:20 UTC
If you cannot find the G_OS_WIN32 defined in your headers you have a buggy development environment.

Where did you get your GLib development environment from? Complain loudly to them. 

G_OS_WIN32 is defined in lib/glib-2.0/include/glibconfig.h in all the official glib Win32 development packages (glib-dev-*.zip files) distributed from ftp.gtk.org and ftp.gnome.org (and earlier, from www.gimp.org).
Comment 2 Tor Lillqvist 2006-11-24 10:21:05 UTC
And FYI: The difference between G_OS_WIN32 and G_PLATFORM_WIN32 is that for Cygwin, G_OS_WIN32 is not defined (but G_OS_UNIX is). G_PLATFORM_WIN32 is defined for Cygwin, though. The actual usefulness of this is not necessarily that great. Presumably, if GLib was built for something like Interix, the same would hold for it as for Cygwin.
Comment 3 Alexis Wilke 2006-11-24 10:33:49 UTC
Ah! I found it! It's hidden in the lib/glib-2.0/include folder. It works...
never mind!