]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Fix remaing bsdtar tests on Cygwin by treating Cygwin like Posix.
authorTim Kientzle <kientzle@gmail.com>
Thu, 1 Oct 2009 03:49:04 +0000 (23:49 -0400)
committerTim Kientzle <kientzle@gmail.com>
Thu, 1 Oct 2009 03:49:04 +0000 (23:49 -0400)
This does not (yet) implement the policies regarding path separators
that were recently hashed out on the libarchive-discuss mailing list.

SVN-Revision: 1479

tar/tree.c

index c0423dba9060c06e1dae73af255654e15d88d1f1..5fbd3c720a1f9b897e22f2bd73d80935b1fb98f6 100644 (file)
@@ -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 <unistd.h>
 #endif
-#ifdef HAVE_WINDOWS_H
+#if defined(HAVE_WINDOWS_H) && !defined(__CYGWIN__)
 #include <windows.h>
 #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)
 {