From: Tim Kientzle Date: Thu, 1 Oct 2009 03:49:04 +0000 (-0400) Subject: Fix remaing bsdtar tests on Cygwin by treating Cygwin like Posix. X-Git-Tag: v2.8.0~329 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=91ef6742f3c3e448c74f9580e8d19ef069238d94;p=thirdparty%2Flibarchive.git Fix remaing bsdtar tests on Cygwin by treating Cygwin like Posix. This does not (yet) implement the policies regarding path separators that were recently hashed out on the libarchive-discuss mailing list. SVN-Revision: 1479 --- diff --git a/tar/tree.c b/tar/tree.c index c0423dba9..5fbd3c720 100644 --- a/tar/tree.c +++ b/tar/tree.c @@ -70,7 +70,7 @@ __FBSDID("$FreeBSD: src/usr.bin/tar/tree.c,v 1.9 2008/11/27 05:49:52 kientzle Ex #ifdef HAVE_UNISTD_H #include #endif -#ifdef HAVE_WINDOWS_H +#if defined(HAVE_WINDOWS_H) && !defined(__CYGWIN__) #include #define DIRSEP '\\' #else @@ -127,6 +127,7 @@ struct tree { struct tree_entry *current; #if defined(HAVE_WINDOWS_H) && !defined(__CYGWIN__) HANDLE d; + BY_HANDLE_FILE_INFORMATION fileInfo; #define INVALID_DIR_HANDLE INVALID_HANDLE_VALUE WIN32_FIND_DATA _findData; WIN32_FIND_DATA *findData; @@ -151,9 +152,6 @@ struct tree { int openCount; int maxOpenCount; -#ifdef HAVE_WINDOWS_H - BY_HANDLE_FILE_INFORMATION fileInfo; -#endif struct stat lst; struct stat st; }; @@ -593,7 +591,7 @@ tree_current_stat(struct tree *t) return (&t->st); } -#if HAVE_WINDOWS_H +#if defined(HAVE_WINDOWS_H) && !defined(__CYGWIN__) const BY_HANDLE_FILE_INFORMATION * tree_current_file_information(struct tree *t) {