AC_SUBST(TORGROUP)
-dnl If WIN32 is defined and non-zero, we are building for win32
+dnl If _WIN32 is defined and non-zero, we are building for win32
AC_MSG_CHECKING([for win32])
AC_RUN_IFELSE([AC_LANG_SOURCE([
int main(int c, char **v) {
-#ifdef WIN32
-#if WIN32
+#ifdef _WIN32
+#if _WIN32
return 0;
#else
return 1;
if test "$bwin32" = cross; then
AC_MSG_CHECKING([for win32 (cross)])
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
-#ifdef WIN32
+#ifdef _WIN32
int main(int c, char **v) {return 0;}
#else
#error
fi
TOR_SEARCH_LIBRARY(libevent, $trylibeventdir, [-levent $STATIC_LIBEVENT_FLAGS $TOR_LIB_WS32], [
-#ifdef WIN32
+#ifdef _WIN32
#include <winsock2.h>
#endif
#include <stdlib.h>
#include <sys/time.h>
#include <sys/types.h>
#include <event.h>], [
-#ifdef WIN32
+#ifdef _WIN32
#include <winsock2.h>
#endif
void exit(int); void *event_init(void);],
[
-#ifdef WIN32
+#ifdef _WIN32
{WSADATA d; WSAStartup(0x101,&d); }
#endif
event_init(); exit(0);