mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-28 09:02:44 +00:00
O_BINARY for Windows.
This commit is contained in:
parent
966062dd11
commit
6f1d1a5084
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=201103
@ -32,6 +32,12 @@ __FBSDID("$FreeBSD$");
|
|||||||
#ifdef HAVE_ERRNO_H
|
#ifdef HAVE_ERRNO_H
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef HAVE_FCNTL_H
|
||||||
|
#include <fcntl.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_IO_H
|
||||||
|
#include <io.h>
|
||||||
|
#endif
|
||||||
#ifdef HAVE_STDLIB_H
|
#ifdef HAVE_STDLIB_H
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#endif
|
#endif
|
||||||
@ -95,6 +101,9 @@ archive_read_open_fd(struct archive *a, int fd, size_t block_size)
|
|||||||
mine->can_skip = 1;
|
mine->can_skip = 1;
|
||||||
} else
|
} else
|
||||||
mine->can_skip = 0;
|
mine->can_skip = 0;
|
||||||
|
#if defined(__CYGWIN__) || defined(_WIN32)
|
||||||
|
setmode(mine->fd, O_BINARY);
|
||||||
|
#endif
|
||||||
|
|
||||||
return (archive_read_open2(a, mine,
|
return (archive_read_open2(a, mine,
|
||||||
NULL, file_read, file_skip, file_close));
|
NULL, file_read, file_skip, file_close));
|
||||||
|
Loading…
Reference in New Issue
Block a user