Move common definition to miniupnpc_socketdef.h
This commit is contained in:
parent
c70a646a73
commit
d8c6433c2e
|
@ -41,19 +41,6 @@
|
|||
#include <sys/select.h>
|
||||
#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
|
||||
|
|
|
@ -25,12 +25,6 @@
|
|||
/* only for malloc */
|
||||
#include <stdlib.h>
|
||||
|
||||
#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
|
||||
|
|
|
@ -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__)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue