From: Tim Kientzle Date: Mon, 27 Jul 2009 04:19:15 +0000 (-0400) Subject: More Windows fudges. X-Git-Tag: v2.8.0~491 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=774186954f49662d4a767108334ce194d8c4c9c7;p=thirdparty%2Flibarchive.git More Windows fudges. SVN-Revision: 1292 --- diff --git a/libarchive/test/test.h b/libarchive/test/test.h index b4c0a8fa1..809cf66ce 100644 --- a/libarchive/test/test.h +++ b/libarchive/test/test.h @@ -45,21 +45,20 @@ #error Oops: No config.h and no pre-built configuration in test.h. #endif +#include /* Windows requires this before sys/stat.h */ +#include + +#ifdef USE_DMALLOC +#include +#endif #if !defined(_WIN32) || defined(__CYGWIN__) #include #else #include #endif #if defined(__CYGWIN__) -/* In cygwin-1.7.x, the .nlinks field of directories is - * deliberately inaccurate, because to populate it requires - * stat'ing every file in the directory, which is slow. - * So, as an optimization cygwin doesn't do that in newer - * releases; all correct applications on any platform should - * never rely on it being > 1, so this optimization doesn't - * impact the operation of correctly coded applications. - * Therefore, the cpio test should not check its accuracy - */ +/* Cygwin-1.7.x is lazy about populating nlinks, so don't + * expect it to be accurate. */ # define NLINKS_INACCURATE_FOR_DIRS #endif #include @@ -67,17 +66,12 @@ #include #include #include -#include /* Windows requires this before sys/stat.h */ -#include +#include #if !defined(_WIN32) || defined(__CYGWIN__) #include #endif -#include #include -#ifdef USE_DMALLOC -#include -#endif #ifdef __FreeBSD__ #include /* For __FBSDID */ @@ -96,6 +90,7 @@ #if defined(_WIN32) && !defined(__CYGWIN__) #define LOCALE_DE "deu" +#define strdup _strdup #else #define LOCALE_DE "de_DE.UTF-8" #endif