From: Tim Kientzle Date: Sun, 28 Jun 2009 00:05:54 +0000 (-0400) Subject: Include and to pull in setmode(), fileno(), and O_BINARY X-Git-Tag: v2.8.0~558 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=19fb37b0c8e66b37bcfcc20a276fe30b062f80f0;p=thirdparty%2Flibarchive.git Include and to pull in setmode(), fileno(), and O_BINARY for Cygwin. SVN-Revision: 1195 --- diff --git a/configure.ac b/configure.ac index 929eb2a2b..9833762d0 100644 --- a/configure.ac +++ b/configure.ac @@ -178,7 +178,7 @@ AC_HEADER_DIRENT AC_HEADER_SYS_WAIT AC_CHECK_HEADERS([acl/libacl.h attr/xattr.h ctype.h errno.h]) AC_CHECK_HEADERS([ext2fs/ext2_fs.h fcntl.h grp.h]) -AC_CHECK_HEADERS([inttypes.h langinfo.h limits.h linux/fs.h]) +AC_CHECK_HEADERS([inttypes.h io.h langinfo.h limits.h linux/fs.h]) AC_CHECK_HEADERS([locale.h paths.h poll.h pwd.h regex.h signal.h stdarg.h]) AC_CHECK_HEADERS([stdint.h stdlib.h string.h]) AC_CHECK_HEADERS([sys/acl.h sys/extattr.h sys/ioctl.h sys/mkdev.h]) diff --git a/libarchive/archive_read_open_fd.c b/libarchive/archive_read_open_fd.c index 8fa390ac6..33912a36a 100644 --- a/libarchive/archive_read_open_fd.c +++ b/libarchive/archive_read_open_fd.c @@ -32,6 +32,12 @@ __FBSDID("$FreeBSD: src/lib/libarchive/archive_read_open_fd.c,v 1.13 2007/06/26 #ifdef HAVE_ERRNO_H #include #endif +#ifdef HAVE_FCNTL_H +#include +#endif +#ifdef HAVE_IO_H +#include +#endif #ifdef HAVE_STDLIB_H #include #endif diff --git a/libarchive/archive_read_open_file.c b/libarchive/archive_read_open_file.c index e589720eb..8fb65150f 100644 --- a/libarchive/archive_read_open_file.c +++ b/libarchive/archive_read_open_file.c @@ -35,6 +35,9 @@ __FBSDID("$FreeBSD: src/lib/libarchive/archive_read_open_file.c,v 1.20 2007/06/2 #ifdef HAVE_FCNTL_H #include #endif +#ifdef HAVE_IO_H +#include +#endif #ifdef HAVE_STDLIB_H #include #endif @@ -95,7 +98,7 @@ archive_read_open_FILE(struct archive *a, FILE *f) mine->can_skip = 0; #if defined(__CYGWIN__) - setmode(_fileno(mine->f), O_BINARY); + setmode(fileno(mine->f), O_BINARY); #elif defined(_WIN32) _setmode(_fileno(mine->f), _O_BINARY); #endif diff --git a/libarchive/archive_read_open_filename.c b/libarchive/archive_read_open_filename.c index b04e579b5..375339e3c 100644 --- a/libarchive/archive_read_open_filename.c +++ b/libarchive/archive_read_open_filename.c @@ -35,6 +35,9 @@ __FBSDID("$FreeBSD: src/lib/libarchive/archive_read_open_filename.c,v 1.21 2008/ #ifdef HAVE_FCNTL_H #include #endif +#ifdef HAVE_IO_H +#include +#endif #ifdef HAVE_STDLIB_H #include #endif diff --git a/libarchive/archive_write_open_fd.c b/libarchive/archive_write_open_fd.c index 5ebac81d5..152403209 100644 --- a/libarchive/archive_write_open_fd.c +++ b/libarchive/archive_write_open_fd.c @@ -32,6 +32,12 @@ __FBSDID("$FreeBSD: src/lib/libarchive/archive_write_open_fd.c,v 1.9 2007/01/09 #ifdef HAVE_ERRNO_H #include #endif +#ifdef HAVE_FCNTL_H +#include +#endif +#ifdef HAVE_IO_H +#include +#endif #ifdef HAVE_STDLIB_H #include #endif