[io-layer] Extract file (#4255)
[mono.git] / mono / io-layer / io-layer.h
index efb6d1e101d3777b8b6b9e09fbb5be6a2bfa51c6..f1d2e05344eb2be4543ae5971b631ef84694a6d6 100755 (executable)
 #ifndef _MONO_IOLAYER_IOLAYER_H_
 #define _MONO_IOLAYER_IOLAYER_H_
 
+#include <config.h>
+#include <glib.h>
+
 #if defined(__WIN32__) || defined(_WIN32)
 /* Native win32 */
 #define __USE_W32_SOCKETS
+#include <winsock2.h>
 #include <windows.h>
 #include <winbase.h>
-#include <winsock2.h>
 /*
  * 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."
@@ -25,8 +28,8 @@
 #include <ws2tcpip.h>
 #endif
 #include <psapi.h>
-#include <shlobj.h>
-/*
+
+ /*
  * 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.
  */
@@ -37,10 +40,13 @@ typedef struct pollfd {
   short  revents;
 } WSAPOLLFD, *PWSAPOLLFD, *LPWSAPOLLFD;
 #endif
+
+#if G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
 #include <mswsock.h>
+#endif
+
 #else  /* EVERYONE ELSE */
 #include "mono/io-layer/wapi.h"
-#include "mono/io-layer/uglify.h"
 #endif /* HOST_WIN32 */
 
 #ifdef __native_client__