glib/tests: Clean up inclusion of unistd.h
authorChun-wei Fan <fanchunwei@src.gnome.org>
Mon, 4 Nov 2013 05:07:52 +0000 (13:07 +0800)
committerChun-wei Fan <fanchunwei@src.gnome.org>
Mon, 4 Nov 2013 14:52:02 +0000 (22:52 +0800)
commitd262b6fe0ca851a47fede2e624cec4aa041f2f14
treeb6d1f14d9810cccff6e86cee9aa768c9fd3a6f68
parent1079d30e1b5b9002ca5d4e5bef398e855a7c115f
glib/tests: Clean up inclusion of unistd.h

Include unistd.h only when G_OS_UNIX is defined (or when G_OS_WIN32 is not
defined).  This will avoid including unistd.h unconditionally and/or
unecessarily, which may cause problems in certain scenarios, such as when
building the tests on Visual C++, which does not come with a unistd.h and
MinGW, where unistd.h is essentially a wrapper for io.h and process.h.

https://bugzilla.gnome.org/show_bug.cgi?id=711047
glib/tests/base64.c
glib/tests/checksum.c
glib/tests/gwakeuptest.c
glib/tests/hmac.c
glib/tests/mappedfile.c
glib/tests/node.c
glib/tests/protocol.c
glib/tests/thread.c
glib/tests/timeout.c