From 4ee57fba0a3b0ef87ca93446a54f8b6098b4e703 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Thu, 1 Feb 2007 16:08:33 +0000 Subject: [PATCH] * Check for , too. MSVC doesn't have it. --- configure.ac | 2 +- src/debug.c | 4 +++- src/lib-fd.c | 4 +++- src/lib-mem.c | 4 +++- src/lib-stream.c | 2 +- src/libzzuf.c | 4 +++- src/zzuf.c | 4 +++- test/zzcat.c | 4 +++- 8 files changed, 20 insertions(+), 8 deletions(-) diff --git a/configure.ac b/configure.ac index ec643e8..91d2a2a 100644 --- a/configure.ac +++ b/configure.ac @@ -27,7 +27,7 @@ esac AC_SUBST(WINSOCK2_LIBS) AC_SUBST(DLL_LDFLAGS) -AC_CHECK_HEADERS(windows.h winsock2.h io.h inttypes.h stdint.h getopt.h libc.h malloc.h dlfcn.h regex.h sys/socket.h sys/uio.h aio.h sys/mman.h sys/wait.h sys/resource.h sys/time.h) +AC_CHECK_HEADERS(windows.h winsock2.h io.h unistd.h inttypes.h stdint.h getopt.h libc.h malloc.h dlfcn.h regex.h sys/socket.h sys/uio.h aio.h sys/mman.h sys/wait.h sys/resource.h sys/time.h) AC_CHECK_FUNCS(setenv waitpid setrlimit gettimeofday fork kill pipe _pipe) AC_CHECK_FUNCS(open64 lseek64 mmap64 fopen64 fseeko _IO_getc getline getdelim __getdelim fgetln __srefill map_fd memalign posix_memalign aio_read accept socket readv pread recv recvfrom recvmsg mmap valloc sigaction) diff --git a/src/debug.c b/src/debug.c index 75548e4..a7e1cca 100644 --- a/src/debug.c +++ b/src/debug.c @@ -27,7 +27,9 @@ # include #endif #include -#include +#if defined HAVE_UNISTD_H +# include +#endif #include #include diff --git a/src/lib-fd.c b/src/lib-fd.c index 38e4632..236efdf 100644 --- a/src/lib-fd.c +++ b/src/lib-fd.c @@ -45,7 +45,9 @@ #if defined HAVE_SYS_UIO_H # include #endif -#include +#if defined HAVE_UNISTD_H +# include +#endif #include #include #if defined HAVE_AIO_H diff --git a/src/lib-mem.c b/src/lib-mem.c index e58b2b8..2266c43 100644 --- a/src/lib-mem.c +++ b/src/lib-mem.c @@ -40,7 +40,9 @@ #if defined HAVE_MALLOC_H # include #endif -#include +#if defined HAVE_UNISTD_H +# include +#endif #if defined HAVE_SYS_MMAN_H # include #endif diff --git a/src/lib-stream.c b/src/lib-stream.c index 2b1e803..d2a3c08 100644 --- a/src/lib-stream.c +++ b/src/lib-stream.c @@ -29,7 +29,7 @@ #include #include -#if defined HAVE___SREFILL +#if defined HAVE___SREFILL && defined HAVE_UNISTD_H # include /* Needed for __srefill’s lseek() call */ #endif diff --git a/src/libzzuf.c b/src/libzzuf.c index 336b26f..94ffaa4 100644 --- a/src/libzzuf.c +++ b/src/libzzuf.c @@ -29,7 +29,9 @@ #endif #include #include -#include +#if defined HAVE_UNISTD_H +# include +#endif #include #include #include diff --git a/src/zzuf.c b/src/zzuf.c index 9a1d01a..c72c4c9 100644 --- a/src/zzuf.c +++ b/src/zzuf.c @@ -28,7 +28,9 @@ #endif #include #include -#include +#if defined HAVE_UNISTD_H +# include +#endif #if defined HAVE_REGEX_H # include #endif diff --git a/test/zzcat.c b/test/zzcat.c index a6206c6..3424611 100644 --- a/test/zzcat.c +++ b/test/zzcat.c @@ -19,7 +19,9 @@ #include #include #include -#include +#if defined HAVE_UNISTD_H +# include +#endif #include #include #include