diff options
author | Dan Winship <danw@gnome.org> | 2013-10-19 13:04:00 -0400 |
---|---|---|
committer | Dan Winship <danw@gnome.org> | 2013-11-20 09:25:39 -0500 |
commit | 158dde050702f83a058962d14156a02234fc9685 (patch) | |
tree | 73f8f1cc846447ca50cd92b3d58144fff818febe /gio/glocalfileinputstream.c | |
parent | 3981cddbf8659458be9f863151314cd0fd1682bf (diff) | |
download | glib-158dde050702f83a058962d14156a02234fc9685.tar.gz |
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
Diffstat (limited to 'gio/glocalfileinputstream.c')
-rw-r--r-- | gio/glocalfileinputstream.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/gio/glocalfileinputstream.c b/gio/glocalfileinputstream.c index 2c32353e1..ea2cfd1f6 100644 --- a/gio/glocalfileinputstream.c +++ b/gio/glocalfileinputstream.c @@ -25,9 +25,6 @@ #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> -#ifdef HAVE_UNISTD_H -#include <unistd.h> -#endif #include <errno.h> #include <glib.h> @@ -39,6 +36,7 @@ #include "glibintl.h" #ifdef G_OS_UNIX +#include <unistd.h> #include "glib-unix.h" #include "gfiledescriptorbased.h" #endif |