GNOME Bugzilla – Bug 394258
gthread.c: illegal include order
Last modified: 2007-01-12 20:55:52 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:
GetSystemTimeAsFileTime and FILETIME are used in gthread.c. Therefore windows.h should be included if G_OS_WIN32 is defined.
2007-01-12 Matthias Clasen <mclasen@redhat.com> * glib/gthread.c: Include windows.h and fix include order. (#394258, Kazuki Iwamoto)
This breaks the build on linux
Should be fixed now
Thanks!