From: Tim Kientzle Date: Sat, 7 Nov 2009 07:31:15 +0000 (-0500) Subject: MinGW defines a value of S_IFBLK which is both useless and wrong. X-Git-Tag: v2.8.0~230 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=56965e7a9b1d8b0d70e55d952bd16172e7738746;p=thirdparty%2Flibarchive.git MinGW defines a value of S_IFBLK which is both useless and wrong. Comment out this sanity-check on MinGW. (It already doesn't apply to VC++ because Microsoft doesn't define S_IFBLK.) test_entry sanity-checks that S_IFBLK has the expected value on every platform, even though libarchive per se doesn't depend on this. So far, MinGW is the only platform that's ever broken one of these checks, which is reassuring, since it means that clients can reasonably pass unaltered st_mode values into libarchive. Even on MinGW, it will work, since MinGW can never actually set S_IFBLK (Windows filesystems don't support it). SVN-Revision: 1585 --- diff --git a/libarchive/test/test_entry.c b/libarchive/test/test_entry.c index 1caae8405..8ed8f52c4 100644 --- a/libarchive/test/test_entry.c +++ b/libarchive/test/test_entry.c @@ -73,7 +73,9 @@ DEFINE_TEST(test_entry) #ifdef S_IFCHR assertEqualInt(S_IFCHR, AE_IFCHR); #endif -#ifdef S_IFBLK +/* Work around MinGW, which defines S_IFBLK wrong. */ +/* sourceforge.net/tracker/?func=detail&atid=102435&aid=1942809&group_id=2435 */ +#if defined(S_IFBLK) && !defined(_WIN32) assertEqualInt(S_IFBLK, AE_IFBLK); #endif #ifdef S_IFDIR