summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/common.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/common.h b/tests/common.h
index dc3c073..bd9730f 100644
--- a/tests/common.h
+++ b/tests/common.h
@@ -26,7 +26,13 @@
#endif
-#if HAVE_W32_SYSTEM
+#if HAVE_W64_SYSTEM
+#define SOCKET2HANDLE(s) ((void *)(s))
+#define HANDLE2SOCKET(h) ((uintptr_t)(h))
+CRITICAL_SECTION _log_critsect;
+#define _log_enter() do { EnterCriticalSection (&_log_critsect); } while (0)
+#define _log_leave() do { LeaveCriticalSection (&_log_critsect); } while (0)
+#elif HAVE_W32_SYSTEM
#define SOCKET2HANDLE(s) ((void *)(s))
#define HANDLE2SOCKET(h) ((unsigned int)(h))
CRITICAL_SECTION _log_critsect;