X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fio-layer%2Fio-layer.h;h=a3cbe2abfee3419be56e504891aa2e749f9ed3cf;hb=1916e353584062904f0da84b31ee8b321052e387;hp=72d24f45c2bb33bf135479df44fab9e15bd22647;hpb=af90548a08ef5effc93b083b7eec44daa178b141;p=mono.git diff --git a/mono/io-layer/io-layer.h b/mono/io-layer/io-layer.h old mode 100644 new mode 100755 index 72d24f45c2b..a3cbe2abfee --- a/mono/io-layer/io-layer.h +++ b/mono/io-layer/io-layer.h @@ -11,20 +11,40 @@ #ifndef _MONO_IOLAYER_IOLAYER_H_ #define _MONO_IOLAYER_IOLAYER_H_ -#if defined(__WIN32__) +#if defined(__WIN32__) || defined(_WIN32) /* Native win32 */ -#define UNICODE -#define _UNICODE #define __USE_W32_SOCKETS #include #include #include +/* + * The mingw version says: + * /usr/i686-pc-mingw32/sys-root/mingw/include/ws2tcpip.h:38:2: error: #error "ws2tcpip.h is not compatible with winsock.h. Include winsock2.h instead." + */ +#ifdef _MSC_VER #include +#endif #include #include +/* + * Workaround for missing WSAPOLLFD typedef in mingw's winsock2.h that is required for mswsock.h below. + * Remove once http://sourceforge.net/p/mingw/bugs/1980/ is fixed. + */ +#if defined(__MINGW_MAJOR_VERSION) && __MINGW_MAJOR_VERSION == 4 +typedef struct pollfd { + SOCKET fd; + short events; + short revents; +} WSAPOLLFD, *PWSAPOLLFD, *LPWSAPOLLFD; +#endif +#include #else /* EVERYONE ELSE */ #include "mono/io-layer/wapi.h" #include "mono/io-layer/uglify.h" -#endif /* PLATFORM_WIN32 */ +#endif /* HOST_WIN32 */ + +#ifdef __native_client__ +#include "mono/metadata/nacl-stub.h" +#endif #endif /* _MONO_IOLAYER_IOLAYER_H_ */