summaryrefslogtreecommitdiffstats
path: root/lib/libarchive/test/test_read_format_ar.c
diff options
context:
space:
mode:
authorkientzle <kientzle@FreeBSD.org>2008-09-01 05:38:33 +0000
committerkientzle <kientzle@FreeBSD.org>2008-09-01 05:38:33 +0000
commitda7b4a0824397b1c724cdf9a9b03b642ef8610ae (patch)
tree33ffbad3b60850d7aaaa2e6c79990403e110b2c2 /lib/libarchive/test/test_read_format_ar.c
parent4f7f14505ade23cf1713dac8e039845e724b1326 (diff)
downloadFreeBSD-src-da7b4a0824397b1c724cdf9a9b03b642ef8610ae.zip
FreeBSD-src-da7b4a0824397b1c724cdf9a9b03b642ef8610ae.tar.gz
Style: Use ARCHIVE_VERSION_NUMBER to conditionalize tests on
the particular libarchive version being tested instead of the deprecated ARCHIVE_API_VERSION and ARCHIVE_VERSION_STAMP macros.
Diffstat (limited to 'lib/libarchive/test/test_read_format_ar.c')
-rw-r--r--lib/libarchive/test/test_read_format_ar.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/libarchive/test/test_read_format_ar.c b/lib/libarchive/test/test_read_format_ar.c
index 95e8b3f..f4b31de 100644
--- a/lib/libarchive/test/test_read_format_ar.c
+++ b/lib/libarchive/test/test_read_format_ar.c
@@ -28,7 +28,7 @@
#include "test.h"
__FBSDID("$FreeBSD$");
-#if ARCHIVE_VERSION_STAMP >= 1009000
+#if ARCHIVE_VERSION_NUMBER >= 1009000
/*
* This "archive" is created by "GNU ar". Here we try to verify
* our GNU format handling functionality.
@@ -59,7 +59,7 @@ char buff[64];
DEFINE_TEST(test_read_format_ar)
{
-#if ARCHIVE_VERSION_STAMP < 1009000
+#if ARCHIVE_VERSION_NUMBER < 1009000
skipping("test_read_support_format_ar()");
#else
struct archive_entry *ae;
@@ -110,10 +110,10 @@ DEFINE_TEST(test_read_format_ar)
/* Test EOF */
assertA(1 == archive_read_next_header(a, &ae));
assert(0 == archive_read_close(a));
-#if ARCHIVE_API_VERSION > 1
- assert(0 == archive_read_finish(a));
-#else
+#if ARCHIVE_VERSION_NUMBER < 2000000
archive_read_finish(a);
+#else
+ assert(0 == archive_read_finish(a));
#endif
#endif
}
OpenPOWER on IntegriCloud