diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/libtest/first.c | 2 | ||||
-rw-r--r-- | tests/libtest/lib518.c | 2 | ||||
-rw-r--r-- | tests/server/resolve.c | 2 | ||||
-rw-r--r-- | tests/server/sockfilt.c | 2 | ||||
-rw-r--r-- | tests/server/sws.c | 2 | ||||
-rw-r--r-- | tests/server/tftpd.c | 2 | ||||
-rw-r--r-- | tests/server/util.c | 6 | ||||
-rw-r--r-- | tests/server/util.h | 5 |
8 files changed, 11 insertions, 12 deletions
diff --git a/tests/libtest/first.c b/tests/libtest/first.c index 8050537db..fda1a7fb5 100644 --- a/tests/libtest/first.c +++ b/tests/libtest/first.c @@ -12,7 +12,7 @@ int test(char *url); int select_test (int num_fds, fd_set *rd, fd_set *wr, fd_set *exc, struct timeval *tv) { -#if defined(WIN32) && !defined(__CYGWIN__) +#ifdef WIN32 /* Winsock doesn't like no socket set in 'rd', 'wr' or 'exc'. This is * case when 'num_fds <= 0. So sleep. */ diff --git a/tests/libtest/lib518.c b/tests/libtest/lib518.c index d0c200774..1c858ee35 100644 --- a/tests/libtest/lib518.c +++ b/tests/libtest/lib518.c @@ -32,7 +32,7 @@ #define NUM_OPEN (FD_SETSIZE + 10) #define NUM_NEEDED (NUM_OPEN + 16) -#if (defined(WIN32) || defined(_WIN32) || defined(MSDOS)) && !defined(__CYGWIN__) +#if defined(WIN32) || defined(_WIN32) || defined(MSDOS) #define DEV_NULL "NUL" #else #define DEV_NULL "/dev/null" diff --git a/tests/server/resolve.c b/tests/server/resolve.c index 98a3f4e08..b579d460e 100644 --- a/tests/server/resolve.c +++ b/tests/server/resolve.c @@ -112,7 +112,7 @@ int main(int argc, char *argv[]) return 0; } -#if defined(WIN32) && !defined(__CYGWIN__) +#ifdef WIN32 win32_init(); atexit(win32_cleanup); #endif diff --git a/tests/server/sockfilt.c b/tests/server/sockfilt.c index 165ecf27a..bf60a2c64 100644 --- a/tests/server/sockfilt.c +++ b/tests/server/sockfilt.c @@ -552,7 +552,7 @@ int main(int argc, char *argv[]) } } -#if defined(WIN32) && !defined(__CYGWIN__) +#ifdef WIN32 win32_init(); atexit(win32_cleanup); #else diff --git a/tests/server/sws.c b/tests/server/sws.c index c2c681dfe..7f9091f4a 100644 --- a/tests/server/sws.c +++ b/tests/server/sws.c @@ -773,7 +773,7 @@ int main(int argc, char *argv[]) } } -#if defined(WIN32) && !defined(__CYGWIN__) +#ifdef WIN32 win32_init(); atexit(win32_cleanup); #else diff --git a/tests/server/tftpd.c b/tests/server/tftpd.c index 5c3caf4f8..c234dbf19 100644 --- a/tests/server/tftpd.c +++ b/tests/server/tftpd.c @@ -458,7 +458,7 @@ int main(int argc, char **argv) } } -#if defined(WIN32) && !defined(__CYGWIN__) +#ifdef WIN32 win32_init(); atexit(win32_cleanup); #endif diff --git a/tests/server/util.c b/tests/server/util.c index 724cb8517..7bf8bdc82 100644 --- a/tests/server/util.c +++ b/tests/server/util.c @@ -65,7 +65,7 @@ const struct in6_addr in6addr_any = {{ IN6ADDR_ANY_INIT }}; */ int ourerrno(void) { -#if defined(WIN32) && !defined(__CYGWIN__) +#ifdef WIN32 return (int)GetLastError(); #else return errno; @@ -101,7 +101,7 @@ void logmsg(const char *msg, ...) } } -#if defined(REAL_WIN32) +#ifdef WIN32 /* use instead of perror() on generic windows */ void win32_perror (const char *msg) { @@ -145,7 +145,7 @@ void win32_cleanup(void) { WSACleanup(); } -#endif /* REAL_WIN32 */ +#endif /* WIN32 */ /* set by the main code to point to where the test dir is */ const char *path="."; diff --git a/tests/server/util.h b/tests/server/util.h index 30395fc4c..acda12159 100644 --- a/tests/server/util.h +++ b/tests/server/util.h @@ -38,10 +38,9 @@ void logmsg(const char *msg, ...); /* global variable, where to find the 'data' dir */ extern const char *path; -#if defined(WIN32) && !defined(__CYGWIN__) +#ifdef WIN32 #include <process.h> #include <fcntl.h> -#define REAL_WIN32 #define sleep(sec) Sleep ((sec)*1000) @@ -57,7 +56,7 @@ void win32_perror (const char *msg); void win32_init(void); void win32_cleanup(void); -#endif /* WIN32 && !__CYGWIN__ */ +#endif /* WIN32 */ /* returns the path name to the test case file */ char *test2file(long testno); |