]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Don't #define read _read before including io.h.
authorTim Kientzle <kientzle@gmail.com>
Sun, 27 Dec 2009 23:51:26 +0000 (18:51 -0500)
committerTim Kientzle <kientzle@gmail.com>
Sun, 27 Dec 2009 23:51:26 +0000 (18:51 -0500)
SVN-Revision: 1778

tar/bsdtar_windows.h
tar/util.c

index 51c0959b230f91a62732b94022963cbde6cacc93..092ea6959d837242dd798790ddee0e583b52b9dd 100644 (file)
@@ -43,7 +43,6 @@
 #if !defined(__BORLANDC__)
 #define strdup _strdup
 #endif
-#define        read _read
 #if !defined(__BORLANDC__)
 #define getcwd _getcwd
 #endif
index 5a32c361b8d277568fc1ce2088da267339ad4af6..f7232744ec0b7ef31b55a6588c1adb58858fabee 100644 (file)
@@ -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.