diff options
Diffstat (limited to 'usr.bin/tar/test/main.c')
-rw-r--r-- | usr.bin/tar/test/main.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/usr.bin/tar/test/main.c b/usr.bin/tar/test/main.c index 968cb35f0fae9..041b7a0d9e636 100644 --- a/usr.bin/tar/test/main.c +++ b/usr.bin/tar/test/main.c @@ -56,11 +56,7 @@ __FBSDID("$FreeBSD$"); */ #undef DEFINE_TEST #define DEFINE_TEST(name) void name(void); -#ifdef LIST_H -#include LIST_H -#else #include "list.h" -#endif /* Interix doesn't define these in a standard header. */ #if __INTERIX__ @@ -754,11 +750,7 @@ slurpfile(size_t * sizep, const char *fmt, ...) #undef DEFINE_TEST #define DEFINE_TEST(n) { n, #n }, struct { void (*func)(void); const char *name; } tests[] = { -#ifdef LIST_H - #include LIST_H -#else #include "list.h" -#endif }; /* @@ -809,7 +801,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) { -#ifdef _WIN32 +#if defined(_WIN32) && !defined(__CYGWIN__) systemf("rmdir /S /Q %s", tests[i].name); #else systemf("rm -rf %s", tests[i].name); @@ -912,7 +904,7 @@ int main(int argc, char **argv) int i, tests_run = 0, tests_failed = 0, opt; time_t now; char *refdir_alloc = NULL; -#ifdef _WIN32 +#if defined(_WIN32) && !defined(__CYGWIN__) char *testprg; #endif const char *opt_arg, *progname, *p; @@ -921,8 +913,10 @@ int main(int argc, char **argv) (void)argc; /* UNUSED */ -#ifdef _WIN32 +#if defined(_WIN32) && !defined(__CYGWIN__) /* Make sure open() function will be used with a binary mode. */ + /* on cygwin, we need something similar, but instead link against */ + /* a special startup object, binmode.o */ _set_fmode(_O_BINARY); #endif /* @@ -1014,7 +1008,7 @@ int main(int argc, char **argv) if (testprog == NULL) usage(progname); #endif -#ifdef _WIN32 +#if defined(_WIN32) && !defined(__CYGWIN__) /* * command.com cannot accept the command used '/' with drive * name such as c:/xxx/command.exe when use '|' pipe handling. |