Change all uses of WIN32 to _WIN32

This commit is contained in:
Joakim Söderberg 2014-01-21 11:30:27 +01:00
parent 20244671cd
commit 4e1439588f
7 changed files with 14 additions and 14 deletions

View File

@ -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();

View File

@ -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);

View File

@ -171,7 +171,7 @@ main(int c, char **v) {
++idx;
}
#ifdef WIN32
#ifdef _WIN32
{
WSADATA WSAData;
WSAStartup(0x101, &WSAData);

View File

@ -21,7 +21,7 @@
#include <string.h>
#include <errno.h>
#ifdef WIN32
#ifdef _WIN32
#include <winsock2.h>
#include <ws2tcpip.h>
@ -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

View File

@ -57,7 +57,7 @@
#endif
#include <errno.h>
#ifdef WIN32
#ifdef _WIN32
#include <getopt.h>
#endif

View File

@ -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

View File

@ -184,7 +184,7 @@ main(int argc, char **argv)
}
event_base_dispatch(base);
#ifdef WIN32
#ifdef _WIN32
WSACleanup();
#endif