From: Ronnie Sahlberg Date: Sun, 14 Apr 2013 16:02:23 +0000 (-0700) Subject: WIN32: More ifdef cleanups X-Git-Tag: upstream/1.9.6^2~217 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=2142af5d472ae35afca3b6b2c0da26974e8b11b3;p=deb_libnfs.git WIN32: More ifdef cleanups --- diff --git a/lib/init.c b/lib/init.c index ecfdcf5..e1d4980 100644 --- a/lib/init.c +++ b/lib/init.c @@ -14,7 +14,6 @@ #ifdef WIN32 #include "win32_compat.h" -#define close closesocket #else #include #include diff --git a/lib/libnfs-sync.c b/lib/libnfs-sync.c index 2fe5ed5..fe711ac 100644 --- a/lib/libnfs-sync.c +++ b/lib/libnfs-sync.c @@ -19,8 +19,6 @@ */ #ifdef WIN32 #include "win32_compat.h" -#define DllExport -#define HAVE_POLL_H #else #include #include diff --git a/lib/libnfs.c b/lib/libnfs.c index cd5a629..d7b5075 100644 --- a/lib/libnfs.c +++ b/lib/libnfs.c @@ -19,7 +19,6 @@ */ #ifdef WIN32 #include "win32_compat.h" -#define DllExport #else #include diff --git a/lib/pdu.c b/lib/pdu.c index 6efd355..e4f296b 100644 --- a/lib/pdu.c +++ b/lib/pdu.c @@ -16,9 +16,6 @@ */ #ifdef WIN32 #include "win32_compat.h" -#ifndef MSG_DONTWAIT -#define MSG_DONTWAIT 0 -#endif #else #include #endif/*WIN32*/ diff --git a/lib/socket.c b/lib/socket.c index 66e1021..384ba13 100644 --- a/lib/socket.c +++ b/lib/socket.c @@ -16,8 +16,6 @@ */ #ifdef WIN32 #include "win32_compat.h" -#define ioctl ioctlsocket -#define close closesocket #else #include #include diff --git a/win32/win32_compat.h b/win32/win32_compat.h index f15a606..abdf1db 100644 --- a/win32/win32_compat.h +++ b/win32/win32_compat.h @@ -22,7 +22,6 @@ THE SOFTWARE. */ /*Adaptions by memphiz@xbmc.org*/ -#ifdef WIN32 #ifndef win32_COMPAT_H_ #define win32_COMPAT_H_ #define NO_IPv6 1 @@ -95,6 +94,9 @@ struct pollfd { }; #endif +#define close closesocket +#define ioctl ioctlsocket + /* Wrapper macros to call misc. functions win32 is missing */ #define poll(x, y, z) win32_poll(x, y, z) #define inet_pton(x,y,z) win32_inet_pton(x,y,z) @@ -102,5 +104,7 @@ int win32_inet_pton(int af, const char * src, void * dst); int win32_poll(struct pollfd *fds, unsigned int nfsd, int timeout); int win32_gettimeofday(struct timeval *tv, struct timezone *tz); +#define DllExport +#define HAVE_POLL_H + #endif//win32_COMPAT_H_ -#endif//WIN32