From 48d48ddc13a28037978fe066464e8ca2e7450c59 Mon Sep 17 00:00:00 2001 From: Tim Kientzle Date: Sun, 27 Dec 2009 18:51:26 -0500 Subject: [PATCH] Don't #define read _read before including io.h. SVN-Revision: 1778 --- tar/bsdtar_windows.h | 1 - tar/util.c | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) 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. -- 2.47.3