]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
MinGW defines a value of S_IFBLK which is both useless and wrong.
authorTim Kientzle <kientzle@gmail.com>
Sat, 7 Nov 2009 07:31:15 +0000 (02:31 -0500)
committerTim Kientzle <kientzle@gmail.com>
Sat, 7 Nov 2009 07:31:15 +0000 (02:31 -0500)
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

libarchive/test/test_entry.c

index 1caae8405c3b8a59e1dd5d0deebe71436087f543..8ed8f52c4fc4382d5dbf7ef67e098db08a91fc36 100644 (file)
@@ -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