Merge pull request #524 from pruiz/mvc-allowhtml-fix
[mono.git] / mono / io-layer / io-layer.h
index 35d20e70025b290bc588e707d404601f5f8f7e56..2c62d7183d675f24483b8fde9260add76c37164d 100644 (file)
@@ -1,28 +1,39 @@
+/*
+ * io-layer.h: Include the right files depending on platform.  This
+ * file is the only entry point into the io-layer library.
+ *
+ * Author:
+ *     Dick Porter (dick@ximian.com)
+ *
+ * (C) 2002 Ximian, Inc.
+ */
+
 #ifndef _MONO_IOLAYER_IOLAYER_H_
 #define _MONO_IOLAYER_IOLAYER_H_
 
-#include <config.h>
-
-#if defined(PLATFORM_WIN32_NATIVE)
+#if defined(__WIN32__) || defined(_WIN32)
 /* Native win32 */
-#define UNICODE
-#define _UNICODE
+#define __USE_W32_SOCKETS
+#if (_WIN32_WINNT < 0x0502)
+/* GetProcessId is available on Windows XP SP1 and later.
+ * Windows SDK declares it unconditionally.
+ * MinGW declares for Windows XP and later.
+ * Declare as __GetProcessId for unsupported targets. */
+#define GetProcessId __GetProcessId
+#endif
+#include <winsock2.h>
 #include <windows.h>
-#elif defined(PLATFORM_WIN32)
-/* Cygwin */
-#define UNICODE
-#define _UNICODE
-#include <w32api/windows.h>
+#include <winbase.h>
+#include <ws2tcpip.h>
+#include <psapi.h>
+#include <shlobj.h>
+#include <mswsock.h>
+#if (_WIN32_WINNT < 0x0502)
+#undef GetProcessId
+#endif
 #else  /* EVERYONE ELSE */
 #include "mono/io-layer/wapi.h"
 #include "mono/io-layer/uglify.h"
-#endif /* PLATFORM_WIN32_NATIVE */
-
-#ifdef HAVE_SYS_FILIO_H
-#include <sys/filio.h>     /* defines FIONBIO and FIONREAD */
-#endif
-#ifdef HAVE_SYS_SOCKIO_H
-#include <sys/sockio.h>    /* defines SIOCATMARK */
-#endif
+#endif /* HOST_WIN32 */
 
 #endif /* _MONO_IOLAYER_IOLAYER_H_ */