From b6896d5c0813220a35755e8151f3d030989bc53f Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Mon, 17 Nov 2014 20:33:11 +0100 Subject: [PATCH] miniupnpc-libevent: WIN32 => _WIN32 --- miniupnpc-libevent/declspec.h | 2 +- miniupnpc-libevent/miniupnpc-libevent.c | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/miniupnpc-libevent/declspec.h b/miniupnpc-libevent/declspec.h index d47ede9..16be781 100644 --- a/miniupnpc-libevent/declspec.h +++ b/miniupnpc-libevent/declspec.h @@ -1,7 +1,7 @@ #ifndef DECLSPEC_H_DEFINED #define DECLSPEC_H_DEFINED -#if defined(WIN32) && !defined(STATICLIB) +#if defined(_WIN32) && !defined(STATICLIB) #ifdef MINIUPNP_EXPORTS #define LIBSPEC __declspec(dllexport) #else diff --git a/miniupnpc-libevent/miniupnpc-libevent.c b/miniupnpc-libevent/miniupnpc-libevent.c index aa182b8..5274a82 100644 --- a/miniupnpc-libevent/miniupnpc-libevent.c +++ b/miniupnpc-libevent/miniupnpc-libevent.c @@ -1,4 +1,4 @@ -/* $Id: miniupnpc-libevent.c,v 1.13 2014/11/17 16:12:58 nanard Exp $ */ +/* $Id: miniupnpc-libevent.c,v 1.14 2014/11/17 19:20:45 nanard Exp $ */ /* miniupnpc-libevent * Copyright (c) 2008-2014, Thomas BERNARD * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/ @@ -26,21 +26,21 @@ #include /*#include */ #include -#ifdef WIN32 +#ifdef _WIN32 #include #include #include #define PRINT_SOCKET_ERROR printf #define SOCKET_ERROR GetWSALastError() #define WOULDBLOCK(err) (err == WSAEWOULDBLOCK) -#else +#else /* _WIN32 */ #include #include #define closesocket close #define PRINT_SOCKET_ERROR perror #define SOCKET_ERROR errno #define WOULDBLOCK(err) (err == EAGAIN || err == EWOULDBLOCK) -#endif +#endif /* _WIN32 */ #include "miniupnpc-libevent.h" #include "minixml.h" #include "igd_desc_parse.h" @@ -549,11 +549,11 @@ int upnpc_init(upnpc_t * p, struct event_base * base, const char * multicastif, return UPNPC_ERR_SOCKET_FAILED; } /* set REUSEADDR */ -#ifdef WIN32 +#ifdef _WIN32 if(setsockopt(p->ssdp_socket, SOL_SOCKET, SO_REUSEADDR, (const char *)&opt, sizeof(opt)) < 0) { -#else /* WIN32 */ +#else /* _WIN32 */ if(setsockopt(p->ssdp_socket, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt)) < 0) { -#endif /* WIN32 */ +#endif /* _WIN32 */ /* non fatal error ! */ } if(evutil_make_socket_nonblocking(p->ssdp_socket) < 0) {