[io-layer] Extract file (#4255)
[mono.git] / mono / io-layer / wapi.h
index 8a7ef1f77daa6a2600f919220a45bc2b0c268cb2..4409210db2d89b515e29e9dc9cf505645a8f1a62 100644 (file)
 #ifndef _WAPI_WAPI_H_
 #define _WAPI_WAPI_H_
 
+#include <config.h>
 #include <glib.h>
 
+#ifdef HAVE_DIRENT_H
+#include <dirent.h>
+#endif
+#include <unistd.h>
+#include <utime.h>
 #include <sys/types.h>
+#include <sys/stat.h>
 
 #include <mono/io-layer/wapi-remap.h>
-#include <mono/io-layer/types.h>
-#include <mono/io-layer/macros.h>
-#include <mono/io-layer/io.h>
 #include <mono/io-layer/error.h>
-#include <mono/io-layer/messages.h>
-#include <mono/io-layer/security.h>
-#include <mono/io-layer/sockets.h>
-#include <mono/io-layer/status.h>
-#include <mono/io-layer/timefuncs.h>
-#include <mono/io-layer/versioninfo.h>
+#include <mono/utils/mono-logger-internals.h>
 
 G_BEGIN_DECLS
 
-#define WAIT_FAILED            0xFFFFFFFF
-#define WAIT_OBJECT_0          ((STATUS_WAIT_0) +0)
-#define WAIT_ABANDONED         ((STATUS_ABANDONED_WAIT_0) +0)
-#define WAIT_ABANDONED_0       ((STATUS_ABANDONED_WAIT_0) +0)
-#define WAIT_TIMEOUT           STATUS_TIMEOUT
-#define WAIT_IO_COMPLETION     STATUS_USER_APC
+#define WAIT_FAILED        ((gint) 0xFFFFFFFF)
+#define WAIT_OBJECT_0      ((gint) 0x00000000)
+#define WAIT_ABANDONED_0   ((gint) 0x00000080)
+#define WAIT_TIMEOUT       ((gint) 0x00000102)
+#define WAIT_IO_COMPLETION ((gint) 0x000000C0)
 
-void
-wapi_init (void);
+#ifdef DISABLE_IO_LAYER_TRACE
+#define MONO_TRACE(...)
+#else
+#define MONO_TRACE(...) mono_trace (__VA_ARGS__)
+#endif
 
-void
-wapi_cleanup (void);
+#define WINAPI
+
+typedef guint32 DWORD;
+typedef gboolean BOOL;
+typedef gint32 LONG;
+typedef guint32 ULONG;
+typedef guint UINT;
+
+typedef gpointer HANDLE;
+typedef gpointer HMODULE;
 
 gboolean
 CloseHandle (gpointer handle);