aboutsummaryrefslogtreecommitdiff
path: root/tests/server/util.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-05-17 10:22:22 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-05-17 10:22:22 +0000
commit84fd4686e2fa9dfed265cdd7a941bc0df1ce4821 (patch)
treea972d893f0fb0d5b72f6a66f4bdd3f3da210a0cc /tests/server/util.h
parentede9fb4fcc600ae19d38a8b1b8833250e84801b7 (diff)
Moved more generic functions to util.[ch]
Added resolve.c to simply resolve a given host name
Diffstat (limited to 'tests/server/util.h')
-rw-r--r--tests/server/util.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/server/util.h b/tests/server/util.h
index a56c5c445..2bcce5c4c 100644
--- a/tests/server/util.h
+++ b/tests/server/util.h
@@ -26,5 +26,39 @@
int ourerrno(void);
void logmsg(const char *msg, ...);
+#ifndef FALSE
+#define FALSE 0
+#endif
+#ifndef TRUE
+#define TRUE 1
+#endif
+
+#if defined(WIN32) && !defined(__CYGWIN__)
+#include <windows.h>
+#include <winsock2.h>
+#include <process.h>
+
+#define sleep(sec) Sleep ((sec)*1000)
+
+#define EINPROGRESS WSAEINPROGRESS
+#define EWOULDBLOCK WSAEWOULDBLOCK
+#define EISCONN WSAEISCONN
+#define ENOTSOCK WSAENOTSOCK
+#define ECONNREFUSED WSAECONNREFUSED
+
+static void win32_cleanup(void);
+#if defined(ENABLE_IPV6) && defined(__MINGW32__)
+const struct in6_addr in6addr_any = {{ IN6ADDR_ANY_INIT }};
#endif
+#endif
+
+#endif
+
+#if defined(WIN32) && !defined(__CYGWIN__)
+#undef perror
+#define perror(m) win32_perror(m)
+#endif
+
+void win32_init(void);
+void win32_cleanup(void);