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 394258 - gthread.c: illegal include order
gthread.c: illegal include order
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: win32
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-win32 maintainers
gtk-win32 maintainers
Depends on:
Blocks:
 
 
Reported: 2007-01-08 15:21 UTC by Kazuki Iwamoto
Modified: 2007-01-12 20:55 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Kazuki Iwamoto 2007-01-08 15:21:00 UTC
Please describe the problem:
If G_OS_WIN32 is not defined, time.h and sys/time.h will be included.
But '#include <time.h>' and '#include <sys/time.h>' are before the definition of G_OS_WIN32.
So headers are always included.

Steps to reproduce:
1. compile gthread.c(Revision 5227,5232)

Actual results:
Following message is displayed.(Visual C++)
gthread.c(42) : fatal error C1083: Cannot open include file: 'sys/time.h': No such file or directory

Expected results:
These headers should be moved after '#include "glib.h"'.

Does this happen every time?
/trunk/glib/gthread.c
/branches/glib-2-12/glib/gthread.c

Other information:
Comment 1 Kazuki Iwamoto 2007-01-08 15:44:56 UTC
GetSystemTimeAsFileTime and FILETIME are used in gthread.c.
Therefore windows.h should be included if G_OS_WIN32 is defined.
Comment 2 Matthias Clasen 2007-01-12 17:34:43 UTC
2007-01-12  Matthias Clasen  <mclasen@redhat.com>

        * glib/gthread.c: Include windows.h and fix
        include order. (#394258, Kazuki Iwamoto)

Comment 3 Marco Pesenti Gritti 2007-01-12 19:26:10 UTC
This breaks the build on linux
Comment 4 Matthias Clasen 2007-01-12 20:31:49 UTC
Should be fixed now
Comment 5 Marco Pesenti Gritti 2007-01-12 20:55:52 UTC
Thanks!