diff --git a/miniupnpc/connecthostport.c b/miniupnpc/connecthostport.c index 9a459e7..20a87f8 100644 --- a/miniupnpc/connecthostport.c +++ b/miniupnpc/connecthostport.c @@ -41,19 +41,6 @@ #include #endif /* #else _WIN32 */ -/* definition of PRINT_SOCKET_ERROR */ -#ifdef _WIN32 -#define PRINT_SOCKET_ERROR(x) fprintf(stderr, "Socket error: %s, %d\n", x, WSAGetLastError()); -#else -#define PRINT_SOCKET_ERROR(x) perror(x) -#endif - -#ifdef _MSC_VER -#define MSC_CAST_INT (int) -#else -#define MSC_CAST_INT -#endif - #if defined(__amigaos__) || defined(__amigaos4__) #define herror(A) printf("%s\n", A) #endif diff --git a/miniupnpc/minisoap.c b/miniupnpc/minisoap.c index e76558a..f92b36c 100644 --- a/miniupnpc/minisoap.c +++ b/miniupnpc/minisoap.c @@ -25,12 +25,6 @@ /* only for malloc */ #include -#ifdef _WIN32 -#define PRINT_SOCKET_ERROR(x) fprintf(stderr, "Socket error: %s, %d\n", x, WSAGetLastError()); -#else -#define PRINT_SOCKET_ERROR(x) perror(x) -#endif - /* httpWrite sends the headers and the body to the socket * and returns the number of bytes sent */ static int diff --git a/miniupnpc/minissdpc.c b/miniupnpc/minissdpc.c index 25ffcce..3d57e5a 100644 --- a/miniupnpc/minissdpc.c +++ b/miniupnpc/minissdpc.c @@ -60,12 +60,6 @@ struct sockaddr_un { #define closesocket close #endif -#ifdef _MSC_VER -#define MSC_CAST_INT (int) -#else -#define MSC_CAST_INT -#endif - #include "miniupnpc_socketdef.h" #if !defined(__DragonFly__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__APPLE__) && !defined(_WIN32) && !defined(__CYGWIN__) && !defined(__sun) && !defined(__GNU__) && !defined(__FreeBSD_kernel__) diff --git a/miniupnpc/miniupnpc_socketdef.h b/miniupnpc/miniupnpc_socketdef.h index 965d915..d4f79a7 100644 --- a/miniupnpc/miniupnpc_socketdef.h +++ b/miniupnpc/miniupnpc_socketdef.h @@ -28,6 +28,13 @@ #endif +#ifdef _MSC_VER +#define MSC_CAST_INT (int) +#else +#define MSC_CAST_INT +#endif + +/* definition of PRINT_SOCKET_ERROR */ #ifdef _WIN32 #define PRINT_SOCKET_ERROR(x) fprintf(stderr, "Socket error: %s, %d\n", x, WSAGetLastError()); #else