aboutsummaryrefslogtreecommitdiff
path: root/tests/server/util.h
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2006-10-18 21:05:40 +0000
committerYang Tse <yangsita@gmail.com>2006-10-18 21:05:40 +0000
commit5df4be11657fc49d74e1e6b39c0003f7cf2f3772 (patch)
tree93d2ef65b7accbd9a6572dbfca634dc69e95ffce /tests/server/util.h
parent96445f1b7da2013c294c541530f0160e248b430e (diff)
Check for USE_WINSOCK instead of WIN32 where the check was done
to verify winsock API availability.
Diffstat (limited to 'tests/server/util.h')
-rw-r--r--tests/server/util.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/tests/server/util.h b/tests/server/util.h
index acda12159..17d82f156 100644
--- a/tests/server/util.h
+++ b/tests/server/util.h
@@ -23,7 +23,7 @@
* $Id$
***************************************************************************/
-int ourerrno(void);
+int our_sockerrno(void);
void logmsg(const char *msg, ...);
#ifndef FALSE
@@ -44,19 +44,21 @@ extern const char *path;
#define sleep(sec) Sleep ((sec)*1000)
+#undef perror
+#define perror(m) win32_perror(m)
+void win32_perror (const char *msg);
+#endif /* WIN32 */
+
+#ifdef USE_WINSOCK
#define EINPROGRESS WSAEINPROGRESS
#define EWOULDBLOCK WSAEWOULDBLOCK
#define EISCONN WSAEISCONN
#define ENOTSOCK WSAENOTSOCK
#define ECONNREFUSED WSAECONNREFUSED
-#undef perror
-#define perror(m) win32_perror(m)
-void win32_perror (const char *msg);
-
void win32_init(void);
void win32_cleanup(void);
-#endif /* WIN32 */
+#endif /* USE_WINSOCK */
/* returns the path name to the test case file */
char *test2file(long testno);