summaryrefslogtreecommitdiff
path: root/src/or/eventdns.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-01-31 10:59:42 -0500
committerNick Mathewson <nickm@torproject.org>2012-01-31 15:48:47 -0500
commit5cf9167f919dfef964b1d149731ed04941e25ebf (patch)
tree37668dde9fd4c68d80cb1bde90523b55fba4b226 /src/or/eventdns.c
parent23054543278a8ee5db6d8dae3b3a96e2b2fd5377 (diff)
downloadtor-5cf9167f919dfef964b1d149731ed04941e25ebf.tar.gz
tor-5cf9167f919dfef964b1d149731ed04941e25ebf.zip
Use the standard _WIN32, not the Torism MS_WINDOWS or deprecated WIN32
This commit is completely mechanical; I used this perl script to make it: #!/usr/bin/perl -w -i.bak -p if (/^\s*\#/) { s/MS_WINDOWS/_WIN32/g; s/\bWIN32\b/_WIN32/g; }
Diffstat (limited to 'src/or/eventdns.c')
-rw-r--r--src/or/eventdns.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/or/eventdns.c b/src/or/eventdns.c
index 7cd5d80afb..61a28361ab 100644
--- a/src/or/eventdns.c
+++ b/src/or/eventdns.c
@@ -96,7 +96,7 @@
#include "eventdns.h"
-#ifdef WIN32
+#ifdef _WIN32
#include <windows.h>
#include <winsock2.h>
#include <iphlpapi.h>
@@ -110,7 +110,7 @@
#include <netinet/in6.h>
#endif
-#ifdef WIN32
+#ifdef _WIN32
typedef int socklen_t;
#endif
@@ -343,7 +343,7 @@ static void server_port_ready_callback(int fd, short events, void *arg);
static int strtoint(const char *const str);
-#ifdef WIN32
+#ifdef _WIN32
static int
last_error(int sock)
{
@@ -432,7 +432,7 @@ _evdns_log(int warn, const char *fmt, ...)
if (!evdns_log_fn)
return;
va_start(args,fmt);
-#ifdef WIN32
+#ifdef _WIN32
_vsnprintf(buf, sizeof(buf), fmt, args);
#else
vsnprintf(buf, sizeof(buf), fmt, args);
@@ -2298,7 +2298,7 @@ _evdns_nameserver_add_impl(const struct sockaddr *address,
ns->socket = tor_open_socket(address->sa_family, SOCK_DGRAM, 0);
if (ns->socket < 0) { err = 1; goto out1; }
-#ifdef WIN32
+#ifdef _WIN32
{
u_long nonblocking = 1;
ioctlsocket(ns->socket, FIONBIO, &nonblocking);
@@ -3101,7 +3101,7 @@ out1:
return err;
}
-#ifdef WIN32
+#ifdef _WIN32
/* Add multiple nameservers from a space-or-comma-separated list. */
static int
evdns_nameserver_ip_add_line(const char *ips) {
@@ -3309,7 +3309,7 @@ int
evdns_init(void)
{
int res = 0;
-#ifdef WIN32
+#ifdef _WIN32
evdns_config_windows_nameservers();
#else
res = evdns_resolv_conf_parse(DNS_OPTIONS_ALL, "/etc/resolv.conf");