diff options
author | kientzle <kientzle@FreeBSD.org> | 2009-04-12 05:33:34 +0000 |
---|---|---|
committer | kientzle <kientzle@FreeBSD.org> | 2009-04-12 05:33:34 +0000 |
commit | fc11fa5eb364f981efd4df40925c0659f0315090 (patch) | |
tree | ea7abcf2cbb02747476436a0768d0136320ece2d /lib/libarchive/test/main.c | |
parent | 0cb01ac4efbe6bb5e86d45975514931ea0d7b400 (diff) | |
download | FreeBSD-src-fc11fa5eb364f981efd4df40925c0659f0315090.zip FreeBSD-src-fc11fa5eb364f981efd4df40925c0659f0315090.tar.gz |
Merge from libarchive.googlecode.com: Mostly a bunch of
corrections to the Windows support to reconcile differences
between Visual Studio and Cygwin. Includes parts of
revisions 757, 774, 787, 815, 817, 819, 820, 844, and 886.
Of particular note, r886 overhauled the UTF-8/Unicode conversions to
work correctly regardless of whether the local system uses 16-bit
or 32-bit wchar_t. (I assume that systems with 16-bit wchar_t
use UTF-16 and those with 32-bit wchar_t use UCS-4.) This revision
also added a preference for wcrtomb() (which is thread-safe) on
platforms that support it.
Diffstat (limited to 'lib/libarchive/test/main.c')
-rw-r--r-- | lib/libarchive/test/main.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/libarchive/test/main.c b/lib/libarchive/test/main.c index 62a0a3f..01a0817 100644 --- a/lib/libarchive/test/main.c +++ b/lib/libarchive/test/main.c @@ -33,7 +33,7 @@ #include <locale.h> #include <stdarg.h> #include <time.h> -#ifdef _WIN32 +#if defined(_WIN32) && !defined(__CYGWIN__) #include <crtdbg.h> #include <windows.h> #include <winbase.h> @@ -93,7 +93,7 @@ static int assertions = 0; static const char *refdir; -#ifdef _WIN32 +#if defined(_WIN32) && !defined(__CYGWIN__) static void invalid_parameter_handler(const wchar_t * expression, @@ -798,7 +798,7 @@ static int test_run(int i, const char *tmpdir) /* If there were no failures, we can remove the work dir. */ if (failures == failures_before) { if (!keep_temp_files && chdir(tmpdir) == 0) { -#ifndef _WIN32 +#if !defined(_WIN32) || defined(__CYGWIN__) systemf("rm -rf %s", tests[i].name); #else systemf("rmdir /S /Q %s", tests[i].name); @@ -894,7 +894,7 @@ extract_reference_file(const char *name) fclose(in); } -#ifdef _WIN32 +#if defined(_WIN32) && !defined(__CYGWIN__) #define DEV_NULL "NUL" #else #define DEV_NULL "/dev/null" @@ -966,7 +966,7 @@ get_refdir(void) strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1); } -#if defined(_WIN32) && defined(_DEBUG) +#if defined(_WIN32) && !defined(__CYGWIN__) && defined(_DEBUG) DebugBreak(); #endif printf("Unable to locate known reference file %s\n", KNOWNREF); @@ -992,7 +992,7 @@ int main(int argc, char **argv) (void)argc; /* UNUSED */ -#ifdef _WIN32 +#if defined(_WIN32) && !defined(__CYGWIN__) /* To stop to run the default invalid parameter handler. */ _set_invalid_parameter_handler(invalid_parameter_handler); /* for open() to a binary mode. */ |