summaryrefslogtreecommitdiff
path: root/libarchive/test/test_entry.c
diff options
context:
space:
mode:
authorTim Kientzle <kientzle@gmail.com>2009-11-07 02:31:15 -0500
committerTim Kientzle <kientzle@gmail.com>2009-11-07 02:31:15 -0500
commit56965e7a9b1d8b0d70e55d952bd16172e7738746 (patch)
tree2769fc68f33eac22908e498041a49d8d57c6f105 /libarchive/test/test_entry.c
parent24dbaced15d0e63bd850cf6b72881dc8bd502e0c (diff)
downloadlibarchive-56965e7a9b1d8b0d70e55d952bd16172e7738746.tar.gz
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
Diffstat (limited to 'libarchive/test/test_entry.c')
-rw-r--r--libarchive/test/test_entry.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libarchive/test/test_entry.c b/libarchive/test/test_entry.c
index 1caae840..8ed8f52c 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