aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2006-09-12 01:17:16 +0000
committerYang Tse <yangsita@gmail.com>2006-09-12 01:17:16 +0000
commit5a6c89661a96fa2139fa0cff07de2f2eff369127 (patch)
tree33e8ddce843f05985fdf866ef6a510c685528429
parent7c5745720aca27f38dc875a39d43cc3aba189471 (diff)
Cygwin preprocessor adjustments
-rw-r--r--tests/libtest/first.c2
-rw-r--r--tests/libtest/lib518.c2
-rw-r--r--tests/server/resolve.c2
-rw-r--r--tests/server/sockfilt.c2
-rw-r--r--tests/server/sws.c2
-rw-r--r--tests/server/tftpd.c2
-rw-r--r--tests/server/util.c2
7 files changed, 7 insertions, 7 deletions
diff --git a/tests/libtest/first.c b/tests/libtest/first.c
index fda1a7fb5..8050537db 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)
{
-#ifdef WIN32
+#if defined(WIN32) && !defined(__CYGWIN__)
/* 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 1c858ee35..d0c200774 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)
+#if (defined(WIN32) || defined(_WIN32) || defined(MSDOS)) && !defined(__CYGWIN__)
#define DEV_NULL "NUL"
#else
#define DEV_NULL "/dev/null"
diff --git a/tests/server/resolve.c b/tests/server/resolve.c
index 26486f2c5..98a3f4e08 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(__GNUC__) || defined(__MINGW32__)
+#if defined(WIN32) && !defined(__CYGWIN__)
win32_init();
atexit(win32_cleanup);
#endif
diff --git a/tests/server/sockfilt.c b/tests/server/sockfilt.c
index 2e12a03d7..165ecf27a 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(__GNUC__) || defined(__MINGW32__)
+#if defined(WIN32) && !defined(__CYGWIN__)
win32_init();
atexit(win32_cleanup);
#else
diff --git a/tests/server/sws.c b/tests/server/sws.c
index 525163f58..c2c681dfe 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(__GNUC__) || defined(__MINGW32__)
+#if defined(WIN32) && !defined(__CYGWIN__)
win32_init();
atexit(win32_cleanup);
#else
diff --git a/tests/server/tftpd.c b/tests/server/tftpd.c
index 2cb45b923..5c3caf4f8 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(__GNUC__) || defined(__MINGW32__)
+#if defined(WIN32) && !defined(__CYGWIN__)
win32_init();
atexit(win32_cleanup);
#endif
diff --git a/tests/server/util.c b/tests/server/util.c
index 7cecfe744..c8faebbb5 100644
--- a/tests/server/util.c
+++ b/tests/server/util.c
@@ -61,7 +61,7 @@
*/
int ourerrno(void)
{
-#ifdef WIN32
+#if defined(WIN32) && !defined(__CYGWIN__)
return (int)GetLastError();
#else
return errno;