From: Tim Kientzle Date: Sun, 27 Dec 2009 23:51:26 +0000 (-0500) Subject: Don't #define read _read before including io.h. X-Git-Tag: v2.8.0~47 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=48d48ddc13a28037978fe066464e8ca2e7450c59;p=thirdparty%2Flibarchive.git Don't #define read _read before including io.h. SVN-Revision: 1778 --- diff --git a/tar/bsdtar_windows.h b/tar/bsdtar_windows.h index 51c0959b2..092ea6959 100644 --- a/tar/bsdtar_windows.h +++ b/tar/bsdtar_windows.h @@ -43,7 +43,6 @@ #if !defined(__BORLANDC__) #define strdup _strdup #endif -#define read _read #if !defined(__BORLANDC__) #define getcwd _getcwd #endif diff --git a/tar/util.c b/tar/util.c index 5a32c361b..f7232744e 100644 --- a/tar/util.c +++ b/tar/util.c @@ -65,6 +65,10 @@ __FBSDID("$FreeBSD: src/usr.bin/tar/util.c,v 1.23 2008/12/15 06:00:25 kientzle E static size_t bsdtar_expand_char(char *, size_t, char); static const char *strip_components(const char *path, int elements); +#if defined(_WIN32) && !defined(__CYGWIN__) +#define read _read +#endif + /* TODO: Hack up a version of mbtowc for platforms with no wide * character support at all. I think the following might suffice, * but it needs careful testing.