--- /dev/null
+ o Code simplifications and refactoring:
+ - Use the _WIN32 macro throughout our code to detect Windows.
+ (Previously we had used the obsolete 'WIN32' and the
+ idiosyncratic 'MS_WINDOWS'.)
bwin32=false; AC_MSG_RESULT([no]))
fi
-if test "$bwin32" = true; then
-AC_DEFINE(MS_WINDOWS, 1, [Define to 1 if we are building for Windows.])
-fi
AM_CONDITIONAL(BUILD_NT_SERVICES, test x$bwin32 = xtrue)
dnl Enable C99 when compiling with MIPSpro
AC_DEFINE(NAT_PMP, 1, [Define to 1 if we are building with nat-pmp.])
TOR_SEARCH_LIBRARY(libnatpmp, $trylibnatpmpdir, [-lnatpmp $TOR_LIB_WS32 $TOR_LIB_IPHLPAPI],
[#include <natpmp.h>],
- [#ifdef MS_WINDOWS
+ [#ifdef _WIN32
#define STATICLIB
#endif
#include <natpmp.h>],
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
-#ifdef MS_WINDOWS
+#ifdef _WIN32
#define WIN32_WINNT 0x400
#define _WIN32_WINNT 0x400
#define WIN32_LEAN_AND_MEAN
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
-#ifdef MS_WINDOWS
+#ifdef _WIN32
#define WIN32_WINNT 0x400
#define _WIN32_WINNT 0x400
#define WIN32_LEAN_AND_MEAN
#endif
#include "torint.h"
-#if defined(_WIN32) && !defined(_WIN32)
-/* How did _this_ happen? */
-#define _WIN32
-#endif
-
/* These are for debugging possible memory leaks. */
#include "util.h"
#include "compat.h"