From: Joakim Söderberg Date: Tue, 21 Jan 2014 10:30:27 +0000 (+0100) Subject: Change all uses of WIN32 to _WIN32 X-Git-Tag: release-2.1.4-alpha~42^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4e1439588f742959e0afe871c7473a78bc540cf1;p=libevent Change all uses of WIN32 to _WIN32 --- diff --git a/cmake/CheckFunctionExistsEx.c b/cmake/CheckFunctionExistsEx.c index e3e9cb0f..5ee3e591 100644 --- a/cmake/CheckFunctionExistsEx.c +++ b/cmake/CheckFunctionExistsEx.c @@ -1,6 +1,6 @@ #ifdef CHECK_FUNCTION_EXISTS -#ifndef WIN32 +#ifndef _WIN32 char CHECK_FUNCTION_EXISTS(); #endif @@ -11,7 +11,7 @@ int main(){ #else int main(int ac, char*av[]){ #endif -#ifdef WIN32 +#ifdef _WIN32 void * p = &CHECK_FUNCTION_EXISTS; #else CHECK_FUNCTION_EXISTS(); diff --git a/evutil.c b/evutil.c index e49d744f..c28caded 100644 --- a/evutil.c +++ b/evutil.c @@ -1794,7 +1794,7 @@ evutil_vsnprintf(char *buf, size_t buflen, const char *format, va_list ap) int r; if (!buflen) return 0; -#if defined(_MSC_VER) || defined(WIN32) +#if defined(_MSC_VER) || defined(_WIN32) r = _vsnprintf(buf, buflen, format, ap); if (r < 0) r = _vscprintf(format, ap); diff --git a/sample/dns-example.c b/sample/dns-example.c index c4fb64a5..15e48ce4 100644 --- a/sample/dns-example.c +++ b/sample/dns-example.c @@ -171,7 +171,7 @@ main(int c, char **v) { ++idx; } -#ifdef WIN32 +#ifdef _WIN32 { WSADATA WSAData; WSAStartup(0x101, &WSAData); diff --git a/sample/https-client.c b/sample/https-client.c index b40f92b9..6a9d1baf 100644 --- a/sample/https-client.c +++ b/sample/https-client.c @@ -21,7 +21,7 @@ #include #include -#ifdef WIN32 +#ifdef _WIN32 #include #include @@ -196,7 +196,7 @@ main(int argc, char **argv) if (argc != 2) syntax(); -#ifdef WIN32 +#ifdef _WIN32 { WORD wVersionRequested; WSADATA wsaData; @@ -210,7 +210,7 @@ main(int argc, char **argv) return 1; } } -#endif +#endif // _WIN32 url = argv[1]; http_uri = evhttp_uri_parse(url); @@ -265,7 +265,7 @@ main(int argc, char **argv) if (!ssl_ctx) die_openssl("SSL_CTX_new"); - #ifndef WIN32 + #ifndef _WIN32 /* TODO: Add certificate loading on Windows as well */ /* Attempt to use the system's trusted root certificates. @@ -298,7 +298,7 @@ main(int argc, char **argv) * "wrapping" OpenSSL's routine, not replacing it. */ SSL_CTX_set_cert_verify_callback (ssl_ctx, cert_verify_callback, (void *) host); - #endif // not WIN32 + #endif // not _WIN32 // Create event base base = event_base_new(); @@ -359,7 +359,7 @@ main(int argc, char **argv) evhttp_connection_free(evcon); event_base_free(base); -#ifdef WIN32 +#ifdef _WIN32 WSACleanup(); #endif diff --git a/test/bench.c b/test/bench.c index bdae7b1a..3700505f 100644 --- a/test/bench.c +++ b/test/bench.c @@ -57,7 +57,7 @@ #endif #include -#ifdef WIN32 +#ifdef _WIN32 #include #endif diff --git a/test/bench_cascade.c b/test/bench_cascade.c index d14af82b..2d85cc1f 100644 --- a/test/bench_cascade.c +++ b/test/bench_cascade.c @@ -146,7 +146,7 @@ main(int argc, char **argv) struct timeval *tv; int num_pipes = 100; -#ifdef WIN32 +#ifdef _WIN32 WSADATA WSAData; WSAStartup(0x101, &WSAData); #endif @@ -180,7 +180,7 @@ main(int argc, char **argv) tv->tv_sec * 1000000L + tv->tv_usec); } -#ifdef WIN32 +#ifdef _WIN32 WSACleanup(); #endif diff --git a/test/bench_http.c b/test/bench_http.c index c031f70f..255aae57 100644 --- a/test/bench_http.c +++ b/test/bench_http.c @@ -184,7 +184,7 @@ main(int argc, char **argv) } event_base_dispatch(base); -#ifdef WIN32 +#ifdef _WIN32 WSACleanup(); #endif