2008-10-26 Zoltan Varga <vargaz@gmail.com>
[mono-project.git] / mono / io-layer / io-layer.h
blob4776f8d4b1e875b84d8fddf264137641aa5689bd
1 /*
2 * io-layer.h: Include the right files depending on platform. This
3 * file is the only entry point into the io-layer library.
5 * Author:
6 * Dick Porter (dick@ximian.com)
8 * (C) 2002 Ximian, Inc.
9 */
11 #ifndef _MONO_IOLAYER_IOLAYER_H_
12 #define _MONO_IOLAYER_IOLAYER_H_
14 #if defined(__WIN32__)
15 /* Native win32 */
16 #define __USE_W32_SOCKETS
17 #if (_WIN32_WINNT < 0x0502)
18 /* GetProcessId is available on Windows XP SP1 and later.
19 * Windows SDK declares it unconditionally.
20 * MinGW declares for Windows XP and later.
21 * Declare as __GetProcessId for unsupported targets. */
22 #define GetProcessId __GetProcessId
23 #endif
24 #include <winsock2.h>
25 #include <windows.h>
26 #include <winbase.h>
27 #include <ws2tcpip.h>
28 #include <psapi.h>
29 #include <shlobj.h>
30 #include <mswsock.h>
31 #if (_WIN32_WINNT < 0x0502)
32 #undef GetProcessId
33 #endif
34 #ifndef HAVE_GETPROCESSID
35 #ifdef _MSC_VER
36 #include <winternl.h>
37 #ifndef NT_SUCCESS
38 #define NT_SUCCESS(status) ((NTSTATUS) (status) >= 0)
39 #endif /* !NT_SUCCESS */
40 #else /* !_MSC_VER */
41 #include <ddk/ntddk.h>
42 #include <ddk/ntapi.h>
43 #endif /* _MSC_VER */
44 #endif /* !HAVE_GETPROCESSID */
45 #else /* EVERYONE ELSE */
46 #include "mono/io-layer/wapi.h"
47 #include "mono/io-layer/uglify.h"
48 #endif /* PLATFORM_WIN32 */
50 #endif /* _MONO_IOLAYER_IOLAYER_H_ */