Replace #ifdef HAVE_UNISTD_H checks with #ifdef G_OS_UNIX
authorDan Winship <danw@gnome.org>
Sat, 19 Oct 2013 17:04:00 +0000 (13:04 -0400)
committerDan Winship <danw@gnome.org>
Wed, 20 Nov 2013 14:25:39 +0000 (09:25 -0500)
commit158dde050702f83a058962d14156a02234fc9685
tree73f8f1cc846447ca50cd92b3d58144fff818febe
parent3981cddbf8659458be9f863151314cd0fd1682bf
Replace #ifdef HAVE_UNISTD_H checks with #ifdef G_OS_UNIX

In Windows development environments that have it, <unistd.h> is mostly
just a wrapper around several other native headers (in particular,
<io.h>, which contains read(), close(), etc, and <process.h>, which
contains getpid()). But given that some Windows dev environments don't
have <unistd.h>, everything that uses those functions on Windows
already needed to include the correct Windows header as well, and so
there is never any point to including <unistd.h> on Windows.

Also, remove some <unistd.h> includes (and a few others) that were
unnecessary even on unix.

https://bugzilla.gnome.org/show_bug.cgi?id=710519
48 files changed:
config.h.win32.in
configure.ac
gio/gdbusauthmechanismexternal.c
gio/gdbusauthmechanismsha1.c
gio/gdbusconnection.c
gio/gdbusmessage.c
gio/gdbusprivate.c
gio/gdbusserver.c
gio/gdummyfile.c
gio/glib-compile-resources.c
gio/glib-compile-schemas.c
gio/glocalfile.c
gio/glocalfileinfo.c
gio/glocalfileinputstream.c
gio/glocalfileoutputstream.c
gio/gsimpleasyncresult.c
gio/gtestdbus.c
glib/gbookmarkfile.c
glib/gdatetime.c
glib/genviron.c
glib/gfileutils.c
glib/giochannel.c
glib/gkeyfile.c
glib/gmain.c
glib/gmappedfile.c
glib/gmessages.c
glib/gpoll.c
glib/grand.c
glib/gscanner.c
glib/gslice.c
glib/gstdio.c
glib/gstring.c
glib/gtestutils.c
glib/gthread.c
glib/gtimer.c
glib/gutils.c
glib/tests/base64.c
glib/tests/checksum.c
glib/tests/hmac.c
glib/tests/mappedfile.c
glib/tests/node.c
glib/tests/thread.c
gmodule/gmodule.c
gobject/glib-genmarshal.c
gobject/gobject-query.c
tests/env-test.c
tests/file-test.c
tests/gio-test.c