From: zoulasc Date: Thu, 16 Jan 2020 20:29:57 +0000 (-0500) Subject: - Add the NetBSD-specific config.h X-Git-Tag: v3.4.2~39^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7e2c2798351eaea10eaf9ebf6857a8dbd245a162;p=thirdparty%2Flibarchive.git - Add the NetBSD-specific config.h - Use --help instead of -V when -V exits with non-zero code - Double the string size to prevent truncation --- diff --git a/test_utils/test_common.h b/test_utils/test_common.h index e12c152c0..660473206 100644 --- a/test_utils/test_common.h +++ b/test_utils/test_common.h @@ -38,6 +38,9 @@ #elif defined(__FreeBSD__) /* Building as part of FreeBSD system requires a pre-built config.h. */ #include "config_freebsd.h" +#elif defined(__NetBSD__) +/* Building as part of NetBSD system requires a pre-built config.h. */ +#include "config_netbsd.h" #elif defined(_WIN32) && !defined(__CYGWIN__) /* Win32 can't run the 'configure' script. */ #include "config_windows.h" diff --git a/test_utils/test_main.c b/test_utils/test_main.c index 1b44edf17..c34c0249f 100644 --- a/test_utils/test_main.c +++ b/test_utils/test_main.c @@ -2480,7 +2480,7 @@ canBzip2(void) static int tested = 0, value = 0; if (!tested) { tested = 1; - if (systemf("bzip2 -d -V %s", redirectArgs) == 0) + if (systemf("bzip2 --help %s", redirectArgs) == 0) value = 1; } return (value); @@ -2510,7 +2510,7 @@ canGzip(void) static int tested = 0, value = 0; if (!tested) { tested = 1; - if (systemf("gzip -V %s", redirectArgs) == 0) + if (systemf("gzip --help %s", redirectArgs) == 0) value = 1; } return (value); @@ -2552,7 +2552,7 @@ canLz4(void) static int tested = 0, value = 0; if (!tested) { tested = 1; - if (systemf("lz4 -V %s", redirectArgs) == 0) + if (systemf("lz4 --help %s", redirectArgs) == 0) value = 1; } return (value); @@ -2567,7 +2567,7 @@ canZstd(void) static int tested = 0, value = 0; if (!tested) { tested = 1; - if (systemf("zstd -V %s", redirectArgs) == 0) + if (systemf("zstd --help %s", redirectArgs) == 0) value = 1; } return (value); @@ -2582,7 +2582,7 @@ canLzip(void) static int tested = 0, value = 0; if (!tested) { tested = 1; - if (systemf("lzip -V %s", redirectArgs) == 0) + if (systemf("lzip --help %s", redirectArgs) == 0) value = 1; } return (value); @@ -2597,7 +2597,7 @@ canLzma(void) static int tested = 0, value = 0; if (!tested) { tested = 1; - if (systemf("lzma -V %s", redirectArgs) == 0) + if (systemf("lzma %s", redirectArgs) == 0) value = 1; } return (value); @@ -2612,7 +2612,7 @@ canLzop(void) static int tested = 0, value = 0; if (!tested) { tested = 1; - if (systemf("lzop -V %s", redirectArgs) == 0) + if (systemf("lzop --help %s", redirectArgs) == 0) value = 1; } return (value); @@ -2627,7 +2627,7 @@ canXz(void) static int tested = 0, value = 0; if (!tested) { tested = 1; - if (systemf("xz -V %s", redirectArgs) == 0) + if (systemf("xz --help %s", redirectArgs) == 0) value = 1; } return (value); @@ -3499,9 +3499,9 @@ static int test_run(int i, const char *tmpdir) { #ifdef PATH_MAX - char workdir[PATH_MAX]; + char workdir[PATH_MAX * 2]; #else - char workdir[1024]; + char workdir[1024 * 2]; #endif char logfilename[64]; int failures_before = failures;