diff --git a/glib/tests/base64.c b/glib/tests/base64.c index 6704c4405..e5ac5b960 100644 --- a/glib/tests/base64.c +++ b/glib/tests/base64.c @@ -1,8 +1,6 @@ -#include "config.h" - #include #include -#ifdef HAVE_UNISTD_H +#ifdef G_OS_UNIX #include #endif #include diff --git a/glib/tests/checksum.c b/glib/tests/checksum.c index 4823c9949..a5d2ea0a3 100644 --- a/glib/tests/checksum.c +++ b/glib/tests/checksum.c @@ -1,8 +1,6 @@ -#include "config.h" - #include #include -#ifdef HAVE_UNISTD_H +#ifdef G_OS_UNIX #include #endif #include diff --git a/glib/tests/gwakeuptest.c b/glib/tests/gwakeuptest.c index 5c149dad8..2ec29bdda 100644 --- a/glib/tests/gwakeuptest.c +++ b/glib/tests/gwakeuptest.c @@ -1,6 +1,8 @@ -#include #include #include +#ifdef G_OS_UNIX +#include +#endif #ifdef _WIN32 static void alarm (int sec) { } diff --git a/glib/tests/hmac.c b/glib/tests/hmac.c index 008d2938b..c8215dbe5 100644 --- a/glib/tests/hmac.c +++ b/glib/tests/hmac.c @@ -1,8 +1,6 @@ -#include "config.h" - #include #include -#ifdef HAVE_UNISTD_H +#ifdef G_OS_UNIX #include #endif #include diff --git a/glib/tests/mappedfile.c b/glib/tests/mappedfile.c index 40e0e6038..6b2210512 100644 --- a/glib/tests/mappedfile.c +++ b/glib/tests/mappedfile.c @@ -1,9 +1,8 @@ #define GLIB_DISABLE_DEPRECATION_WARNINGS -#include #include #include -#ifdef HAVE_UNISTD_H +#ifdef G_OS_UNIX #include #endif #include diff --git a/glib/tests/node.c b/glib/tests/node.c index 27b5073c0..b1994eb3c 100644 --- a/glib/tests/node.c +++ b/glib/tests/node.c @@ -27,20 +27,16 @@ #undef G_DISABLE_ASSERT #undef G_LOG_DOMAIN -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #include #include #include -#ifdef HAVE_UNISTD_H +#include "glib.h" + +#ifdef G_OS_UNIX #include #endif -#include "glib.h" - #define C2P(c) ((gpointer) ((long) (c))) #define P2C(p) ((gchar) ((long) (p))) diff --git a/glib/tests/protocol.c b/glib/tests/protocol.c index e80b610dd..28e29f9e3 100644 --- a/glib/tests/protocol.c +++ b/glib/tests/protocol.c @@ -22,9 +22,10 @@ #include /* errno */ #include -#ifndef _WIN32 +#ifdef G_OS_UNIX #include /* pipe() */ -#else +#endif +#ifdef G_OS_WIN32 #include #include #define pipe(fds) _pipe(fds, 4096, _O_BINARY) diff --git a/glib/tests/thread.c b/glib/tests/thread.c index 539782e42..a4f3976d4 100644 --- a/glib/tests/thread.c +++ b/glib/tests/thread.c @@ -26,17 +26,14 @@ #include #endif #include -#ifdef HAVE_UNISTD_H -#include -#endif #ifdef HAVE_SYS_PRCTL_H #include #endif - #include #ifndef G_OS_WIN32 +#include #include #endif diff --git a/glib/tests/timeout.c b/glib/tests/timeout.c index 445af2259..ce7dd0965 100644 --- a/glib/tests/timeout.c +++ b/glib/tests/timeout.c @@ -1,5 +1,7 @@ #include +#ifdef G_OS_UNIX #include +#endif static GMainLoop *loop;