summaryrefslogtreecommitdiff
path: root/src/client/HTTP.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/HTTP.cpp')
-rw-r--r--src/client/HTTP.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/client/HTTP.cpp b/src/client/HTTP.cpp
index 686a6ee..43d5dcf 100644
--- a/src/client/HTTP.cpp
+++ b/src/client/HTTP.cpp
@@ -25,14 +25,14 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#ifndef WIN32
+#ifndef WIN
#include <sys/param.h>
#endif
#if !defined(MACOSX) && !defined(BSD)
#include <malloc.h>
#endif
#include <time.h>
-#ifdef WIN32
+#ifdef WIN
#define _WIN32_WINNT 0x0501
//#include <iphlpapi.h>
#include <winsock2.h>
@@ -52,7 +52,7 @@
#include "HTTP.h"
#include "MD5.h"
-#ifdef WIN32
+#ifdef WIN
#define PERROR SOCKET_ERROR
#define PERRNO WSAGetLastError()
#define PEAGAIN WSAEWOULDBLOCK
@@ -164,7 +164,7 @@ static int resolve(char *dns, char *srv, struct sockaddr_in *addr)
void http_init(char *proxy)
{
char *host, *port;
-#ifdef WIN32
+#ifdef WIN
WSADATA wsadata;
if (!WSAStartup(MAKEWORD(2,2), &wsadata))
http_up = 1;
@@ -196,7 +196,7 @@ void http_init(char *proxy)
void http_done(void)
{
-#ifdef WIN32
+#ifdef WIN
WSACleanup();
#endif
http_up = 0;
@@ -413,7 +413,7 @@ int http_async_req_status(void *ctx)
char *dns,*srv,buf[CHUNK];
int tmp, i;
time_t now = time(NULL);
-#ifdef WIN32
+#ifdef WIN
unsigned long tmp2;
#endif
@@ -445,7 +445,7 @@ int http_async_req_status(void *ctx)
if (cx->fd == PERROR)
goto fail;
cx->fdhost = mystrdup(cx->host);
-#ifdef WIN32
+#ifdef WIN
tmp2 = 1;
if (ioctlsocket(cx->fd, FIONBIO, &tmp2) == SOCKET_ERROR)
goto fail;
@@ -459,7 +459,7 @@ int http_async_req_status(void *ctx)
}
if (!connect(cx->fd, (struct sockaddr *)&cx->addr, sizeof(cx->addr)))
cx->state = HTS_IDLE;
-#ifdef WIN32
+#ifdef WIN
else if (PERRNO==WSAEISCONN)
cx->state = HTS_IDLE;
#endif
@@ -468,7 +468,7 @@ int http_async_req_status(void *ctx)
cx->state = HTS_IDLE;
#endif
else if (PERRNO!=PEINPROGRESS && PERRNO!=PEALREADY
-#ifdef WIN32
+#ifdef WIN
&& PERRNO!=PEAGAIN && PERRNO!=WSAEINVAL
#endif
)