summaryrefslogtreecommitdiffstats
path: root/loader/wine
diff options
context:
space:
mode:
Diffstat (limited to 'loader/wine')
-rw-r--r--loader/wine/avifmt.h246
-rw-r--r--loader/wine/basetsd.h145
-rw-r--r--loader/wine/config.h442
-rw-r--r--loader/wine/debugtools.h93
-rw-r--r--loader/wine/driver.h112
-rw-r--r--loader/wine/elfdll.h14
-rw-r--r--loader/wine/heap.h56
-rw-r--r--loader/wine/ldt.h98
-rw-r--r--loader/wine/mmreg.h104
-rw-r--r--loader/wine/module.h198
-rw-r--r--loader/wine/msacm.h942
-rw-r--r--loader/wine/msacmdrv.h203
-rw-r--r--loader/wine/ntdef.h101
-rw-r--r--loader/wine/pe_image.h81
-rw-r--r--loader/wine/poppack.h15
-rw-r--r--loader/wine/pshpack1.h13
-rw-r--r--loader/wine/pshpack2.h12
-rw-r--r--loader/wine/pshpack4.h15
-rw-r--r--loader/wine/pshpack8.h12
-rw-r--r--loader/wine/vfw.h654
-rw-r--r--loader/wine/winbase.h1791
-rw-r--r--loader/wine/windef.h656
-rw-r--r--loader/wine/windows.h38
-rw-r--r--loader/wine/winerror.h1658
-rw-r--r--loader/wine/winestring.h13
-rw-r--r--loader/wine/winnt.h2665
-rw-r--r--loader/wine/winreg.h57
-rw-r--r--loader/wine/winuser.h2929
28 files changed, 13363 insertions, 0 deletions
diff --git a/loader/wine/avifmt.h b/loader/wine/avifmt.h
new file mode 100644
index 0000000000..33646a9f34
--- /dev/null
+++ b/loader/wine/avifmt.h
@@ -0,0 +1,246 @@
+/****************************************************************************
+ *
+ * AVIFMT - AVI file format definitions
+ *
+ ****************************************************************************/
+#ifndef AVIFMT
+
+#define AVIFMT
+
+#ifndef NOAVIFMT
+
+
+#ifndef __WINE_WINDEF_H
+#include <wine/windef.h>
+#endif
+
+#ifndef __WINE_MMSYSTEM_H
+#ifndef __WINE_MSACM_H
+typedef DWORD FOURCC;
+#endif
+#endif
+
+
+#ifdef _MSC_VER
+#pragma warning(disable:4200)
+#endif
+
+/* The following is a short description of the AVI file format. Please
+ * see the accompanying documentation for a full explanation.
+ *
+ * An AVI file is the following RIFF form:
+ *
+ * RIFF('AVI'
+ * LIST('hdrl'
+ * avih(<MainAVIHeader>)
+ * LIST ('strl'
+ * strh(<Stream header>)
+ * strf(<Stream format>)
+ * ... additional header data
+ * LIST('movi'
+ * { LIST('rec'
+ * SubChunk...
+ * )
+ * | SubChunk } ....
+ * )
+ * [ <AVIIndex> ]
+ * )
+ *
+ * The main file header specifies how many streams are present. For
+ * each one, there must be a stream header chunk and a stream format
+ * chunk, enlosed in a 'strl' LIST chunk. The 'strf' chunk contains
+ * type-specific format information; for a video stream, this should
+ * be a BITMAPINFO structure, including palette. For an audio stream,
+ * this should be a WAVEFORMAT (or PCMWAVEFORMAT) structure.
+ *
+ * The actual data is contained in subchunks within the 'movi' LIST
+ * chunk. The first two characters of each data chunk are the
+ * stream number with which that data is associated.
+ *
+ * Some defined chunk types:
+ * Video Streams:
+ * ##db: RGB DIB bits
+ * ##dc: RLE8 compressed DIB bits
+ * ##pc: Palette Change
+ *
+ * Audio Streams:
+ * ##wb: waveform audio bytes
+ *
+ * The grouping into LIST 'rec' chunks implies only that the contents of
+ * the chunk should be read into memory at the same time. This
+ * grouping is used for files specifically intended to be played from
+ * CD-ROM.
+ *
+ * The index chunk at the end of the file should contain one entry for
+ * each data chunk in the file.
+ *
+ * Limitations for the current software:
+ * Only one video stream and one audio stream are allowed.
+ * The streams must start at the beginning of the file.
+ *
+ *
+ * To register codec types please obtain a copy of the Multimedia
+ * Developer Registration Kit from:
+ *
+ * Microsoft Corporation
+ * Multimedia Systems Group
+ * Product Marketing
+ * One Microsoft Way
+ * Redmond, WA 98052-6399
+ *
+ */
+
+#ifndef mmioFOURCC
+#define mmioFOURCC( ch0, ch1, ch2, ch3 ) \
+ ( (DWORD)(BYTE)(ch0) | ( (DWORD)(BYTE)(ch1) << 8 ) | \
+ ( (DWORD)(BYTE)(ch2) << 16 ) | ( (DWORD)(BYTE)(ch3) << 24 ) )
+#endif
+
+/* Macro to make a TWOCC out of two characters */
+#ifndef aviTWOCC
+#define aviTWOCC(ch0, ch1) ((WORD)(BYTE)(ch0) | ((WORD)(BYTE)(ch1) << 8))
+#endif
+
+typedef WORD TWOCC;
+
+/* form types, list types, and chunk types */
+#define formtypeAVI mmioFOURCC('A', 'V', 'I', ' ')
+#define listtypeAVIHEADER mmioFOURCC('h', 'd', 'r', 'l')
+#define ckidAVIMAINHDR mmioFOURCC('a', 'v', 'i', 'h')
+#define listtypeSTREAMHEADER mmioFOURCC('s', 't', 'r', 'l')
+#define ckidSTREAMHEADER mmioFOURCC('s', 't', 'r', 'h')
+#define ckidSTREAMFORMAT mmioFOURCC('s', 't', 'r', 'f')
+#define ckidSTREAMHANDLERDATA mmioFOURCC('s', 't', 'r', 'd')
+#define ckidSTREAMNAME mmioFOURCC('s', 't', 'r', 'n')
+
+#define listtypeAVIMOVIE mmioFOURCC('m', 'o', 'v', 'i')
+#define listtypeAVIRECORD mmioFOURCC('r', 'e', 'c', ' ')
+
+#define ckidAVINEWINDEX mmioFOURCC('i', 'd', 'x', '1')
+
+/*
+** Stream types for the <fccType> field of the stream header.
+*/
+#define streamtypeVIDEO mmioFOURCC('v', 'i', 'd', 's')
+#define streamtypeAUDIO mmioFOURCC('a', 'u', 'd', 's')
+#define streamtypeMIDI mmioFOURCC('m', 'i', 'd', 's')
+#define streamtypeTEXT mmioFOURCC('t', 'x', 't', 's')
+
+/* Basic chunk types */
+#define cktypeDIBbits aviTWOCC('d', 'b')
+#define cktypeDIBcompressed aviTWOCC('d', 'c')
+#define cktypePALchange aviTWOCC('p', 'c')
+#define cktypeWAVEbytes aviTWOCC('w', 'b')
+
+/* Chunk id to use for extra chunks for padding. */
+#define ckidAVIPADDING mmioFOURCC('J', 'U', 'N', 'K')
+
+/*
+** Useful macros
+**
+** Warning: These are nasty macro, and MS C 6.0 compiles some of them
+** incorrectly if optimizations are on. Ack.
+*/
+
+/* Macro to get stream number out of a FOURCC ckid */
+#define FromHex(n) (((n) >= 'A') ? ((n) + 10 - 'A') : ((n) - '0'))
+#define StreamFromFOURCC(fcc) ((WORD) ((FromHex(LOBYTE(LOWORD(fcc))) << 4) + \
+ (FromHex(HIBYTE(LOWORD(fcc))))))
+
+/* Macro to get TWOCC chunk type out of a FOURCC ckid */
+#define TWOCCFromFOURCC(fcc) HIWORD(fcc)
+
+/* Macro to make a ckid for a chunk out of a TWOCC and a stream number
+** from 0-255.
+*/
+#define ToHex(n) ((BYTE) (((n) > 9) ? ((n) - 10 + 'A') : ((n) + '0')))
+#define MAKEAVICKID(tcc, stream) \
+ MAKELONG((ToHex((stream) & 0x0f) << 8) | \
+ (ToHex(((stream) & 0xf0) >> 4)), tcc)
+
+/*
+** Main AVI File Header
+*/
+
+/* flags for use in <dwFlags> in AVIFileHdr */
+#define AVIF_HASINDEX 0x00000010 // Index at end of file?
+#define AVIF_MUSTUSEINDEX 0x00000020
+#define AVIF_ISINTERLEAVED 0x00000100
+#define AVIF_TRUSTCKTYPE 0x00000800 // Use CKType to find key frames?
+#define AVIF_WASCAPTUREFILE 0x00010000
+#define AVIF_COPYRIGHTED 0x00020000
+
+/* The AVI File Header LIST chunk should be padded to this size */
+#define AVI_HEADERSIZE 2048 // size of AVI header list
+
+typedef struct
+{
+ DWORD dwMicroSecPerFrame; // frame display rate (or 0L)
+ DWORD dwMaxBytesPerSec; // max. transfer rate
+ DWORD dwPaddingGranularity; // pad to multiples of this
+ // size; normally 2K.
+ DWORD dwFlags; // the ever-present flags
+ DWORD dwTotalFrames; // # frames in file
+ DWORD dwInitialFrames;
+ DWORD dwStreams;
+ DWORD dwSuggestedBufferSize;
+
+ DWORD dwWidth;
+ DWORD dwHeight;
+
+ DWORD dwReserved[4];
+} MainAVIHeader;
+
+/*
+** Stream header
+*/
+
+#define AVISF_DISABLED 0x00000001
+
+#define AVISF_VIDEO_PALCHANGES 0x00010000
+
+
+typedef struct {
+ FOURCC fccType;
+ FOURCC fccHandler;
+ DWORD dwFlags; /* Contains AVITF_* flags */
+ WORD wPriority;
+ WORD wLanguage;
+ DWORD dwInitialFrames;
+ DWORD dwScale;
+ DWORD dwRate; /* dwRate / dwScale == samples/second */
+ DWORD dwStart;
+ DWORD dwLength; /* In units above... */
+ DWORD dwSuggestedBufferSize;
+ DWORD dwQuality;
+ DWORD dwSampleSize;
+ RECT rcFrame;
+} AVIStreamHeader;
+
+/* Flags for index */
+#define AVIIF_LIST 0x00000001L // chunk is a 'LIST'
+#define AVIIF_KEYFRAME 0x00000010L // this frame is a key frame.
+
+#define AVIIF_NOTIME 0x00000100L // this frame doesn't take any time
+#define AVIIF_COMPUSE 0x0FFF0000L // these bits are for compressor use
+
+#define FOURCC_RIFF mmioFOURCC('R', 'I', 'F', 'F')
+#define FOURCC_LIST mmioFOURCC('L', 'I', 'S', 'T')
+
+typedef struct
+{
+ DWORD ckid;
+ DWORD dwFlags;
+ DWORD dwChunkOffset; // Position of chunk
+ DWORD dwChunkLength; // Length of chunk
+} AVIINDEXENTRY;
+
+#define AVISTREAMREAD_CONVENIENT (-1L)
+
+/*
+** Palette change chunk
+**
+** Used in video streams.
+*/
+#endif /* NOAVIFMT */
+#endif
diff --git a/loader/wine/basetsd.h b/loader/wine/basetsd.h
new file mode 100644
index 0000000000..7b5d3aba92
--- /dev/null
+++ b/loader/wine/basetsd.h
@@ -0,0 +1,145 @@
+/*
+ * Compilers that uses ILP32, LP64 or P64 type models
+ * for both Win32 and Win64 are supported by this file.
+ */
+
+#ifndef __WINE_BASETSD_H
+#define __WINE_BASETSD_H
+
+#ifdef __WINE__
+#include "config.h"
+#endif /* defined(__WINE__) */
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* defined(__cplusplus) */
+
+/*
+ * Win32 was easy to implement under Unix since most (all?) 32-bit
+ * Unices uses the same type model (ILP32) as Win32, where int, long
+ * and pointer are 32-bit.
+ *
+ * Win64, however, will cause some problems when implemented under Unix.
+ * Linux/{Alpha, Sparc64} and most (all?) other 64-bit Unices uses
+ * the LP64 type model where int is 32-bit and long and pointer are
+ * 64-bit. Win64 on the other hand uses the P64 (sometimes called LLP64)
+ * type model where int and long are 32 bit and pointer is 64-bit.
+ */
+
+/* Type model indepent typedefs */
+
+typedef char __int8;
+typedef unsigned char __uint8;
+
+typedef short __int16;
+typedef unsigned short __uint16;
+
+typedef int __int32;
+typedef unsigned int __uint32;
+
+typedef long long __int64;
+typedef unsigned long long __uint64;
+
+#if defined(_WIN64)
+
+typedef __uint32 __ptr32;
+typedef void *__ptr64;
+
+#else /* FIXME: defined(_WIN32) */
+
+typedef void *__ptr32;
+typedef __uint64 __ptr64;
+
+#endif
+
+/* Always signed and 32 bit wide */
+
+typedef __int32 LONG32;
+//typedef __int32 INT32;
+
+typedef LONG32 *PLONG32;
+//typedef INT32 *PINT32;
+
+/* Always unsigned and 32 bit wide */
+
+typedef __uint32 ULONG32;
+typedef __uint32 DWORD32;
+typedef __uint32 UINT32;
+
+typedef ULONG32 *PULONG32;
+typedef DWORD32 *PDWORD32;
+typedef UINT32 *PUINT32;
+
+/* Always signed and 64 bit wide */
+
+typedef __int64 LONG64;
+typedef __int64 INT64;
+
+typedef LONG64 *PLONG64;
+typedef INT64 *PINT64;
+
+/* Always unsigned and 64 bit wide */
+
+typedef __uint64 ULONG64;
+typedef __uint64 DWORD64;
+typedef __uint64 UINT64;
+
+typedef ULONG64 *PULONG64;
+typedef DWORD64 *PDWORD64;
+typedef UINT64 *PUINT64;
+
+/* Win32 or Win64 dependent typedef/defines. */
+
+#ifdef _WIN64
+
+typedef __int64 INT_PTR, *PINT_PTR;
+typedef __uint64 UINT_PTR, *PUINT_PTR;
+
+#define MAXINT_PTR 0x7fffffffffffffff
+#define MININT_PTR 0x8000000000000000
+#define MAXUINT_PTR 0xffffffffffffffff
+
+typedef __int32 HALF_PTR, *PHALF_PTR;
+typedef __int32 UHALF_PTR, *PUHALF_PTR;
+
+#define MAXHALF_PTR 0x7fffffff
+#define MINHALF_PTR 0x80000000
+#define MAXUHALF_PTR 0xffffffff
+
+typedef __int64 LONG_PTR, *PLONG_PTR;
+typedef __uint64 ULONG_PTR, *PULONG_PTR;
+typedef __uint64 DWORD_PTR, *PDWORD_PTR;
+
+#else /* FIXME: defined(_WIN32) */
+
+typedef __int32 INT_PTR, *PINT_PTR;
+typedef __uint32 UINT_PTR, *PUINT_PTR;
+
+#define MAXINT_PTR 0x7fffffff
+#define MININT_PTR 0x80000000
+#define MAXUINT_PTR 0xffffffff
+
+typedef __int16 HALF_PTR, *PHALF_PTR;
+typedef __uint16 UHALF_PTR, *PUHALF_PTR;
+
+#define MAXUHALF_PTR 0xffff
+#define MAXHALF_PTR 0x7fff
+#define MINHALF_PTR 0x8000
+
+typedef __int32 LONG_PTR, *PLONG_PTR;
+typedef __uint32 ULONG_PTR, *PULONG_PTR;
+typedef __uint32 DWORD_PTR, *PDWORD_PTR;
+
+#endif /* defined(_WIN64) || defined(_WIN32) */
+
+typedef INT_PTR SSIZE_T, *PSSIZE_T;
+typedef UINT_PTR SIZE_T, *PSIZE_T;
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif /* defined(__cplusplus) */
+
+#endif /* !defined(__WINE_BASETSD_H) */
+
+
+
diff --git a/loader/wine/config.h b/loader/wine/config.h
new file mode 100644
index 0000000000..dc651b3d89
--- /dev/null
+++ b/loader/wine/config.h
@@ -0,0 +1,442 @@
+/* include/config.h. Generated automatically by configure. */
+/* include/config.h.in. Generated automatically from configure.in by autoheader. */
+
+/* Define if using alloca.c. */
+/* #undef C_ALLOCA */
+
+/* Define to empty if the keyword does not work. */
+/* #undef const */
+
+/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
+ This function is required for alloca.c support on those systems. */
+/* #undef CRAY_STACKSEG_END */
+
+/* Define if you have alloca, as a function or macro. */
+#define HAVE_ALLOCA 1
+
+/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
+#define HAVE_ALLOCA_H 1
+
+/* Define as __inline if that's what the C compiler calls it. */
+/* #undef inline */
+
+/* Define to `unsigned' if <sys/types.h> doesn't define. */
+/* #undef size_t */
+
+/* If using the C implementation of alloca, define if you know the
+ direction of stack growth for your system; otherwise it will be
+ automatically deduced at run-time.
+ STACK_DIRECTION > 0 => grows toward higher addresses
+ STACK_DIRECTION < 0 => grows toward lower addresses
+ STACK_DIRECTION = 0 => direction of growth unknown
+ */
+/* #undef STACK_DIRECTION */
+
+/* Define if the `S_IS*' macros in <sys/stat.h> do not work properly. */
+/* #undef STAT_MACROS_BROKEN */
+
+/* Define if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Define if your processor stores words with the most significant
+ byte first (like Motorola and SPARC, unlike Intel and VAX). */
+/* #undef WORDS_BIGENDIAN */
+
+/* Define if the X Window System is missing or not being used. */
+/* #undef X_DISPLAY_MISSING */
+
+/* Define if symbols declared in assembly code need an underscore prefix */
+/* #undef NEED_UNDERSCORE_PREFIX */
+
+/* Define to use .string instead of .ascii */
+#define HAVE_ASM_STRING 1
+
+/* Define if struct msghdr contains msg_accrights */
+/* #undef HAVE_MSGHDR_ACCRIGHTS */
+
+/* Define if struct sockaddr_un contains sun_len */
+/* #undef HAVE_SOCKADDR_SUN_LEN */
+
+/* Define if you have the Xxf86dga library (-lXxf86dga). */
+#define HAVE_LIBXXF86DGA 1
+
+/* Define if you have the Xxf86dga library version 2.0 (-lXxf86dga). */
+/* #undef HAVE_LIBXXF86DGA2 */
+
+/* Define if you have the X Shm extension */
+#define HAVE_LIBXXSHM 1
+
+/* Define if you have the Xxf86vm library */
+#define HAVE_LIBXXF86VM 1
+
+/* Define if you have the Xpm library */
+#define HAVE_LIBXXPM 1
+
+/* Define if you have the Open Sound system. */
+#define HAVE_OSS 1
+
+/* Define if you have the Open Sound system (MIDI interface). */
+#define HAVE_OSS_MIDI 1
+
+/* Define if X libraries are not reentrant (compiled without -D_REENTRANT). */
+/* #undef NO_REENTRANT_X11 */
+
+/* Define if libc is not reentrant */
+/* #undef NO_REENTRANT_LIBC */
+
+/* Define if libc uses __errno_location for reentrant errno */
+#define HAVE__ERRNO_LOCATION 1
+
+/* Define if libc uses __error for reentrant errno */
+/* #undef HAVE__ERROR */
+
+/* Define if libc uses ___errno for reentrant errno */
+/* #undef HAVE___ERRNO */
+
+/* Define if libc uses __thr_errno for reentrant errno */
+/* #undef HAVE__THR_ERRNO */
+
+/* Define if all debug messages are to be compiled out */
+/* #undef NO_DEBUG_MSGS */
+
+/* Define if TRACE messages are to be compiled out */
+/* #undef NO_TRACE_MSGS */
+
+/* Define if the struct statfs has the member bavail */
+#define STATFS_HAS_BAVAIL 1
+
+/* Define if the struct statfs has the member bfree */
+#define STATFS_HAS_BFREE 1
+
+/* Define if the struct statfs is defined by <sys/vfs.h> */
+#define STATFS_DEFINED_BY_SYS_VFS 1
+
+/* Define if the struct statfs is defined by <sys/statfs.h> */
+#define STATFS_DEFINED_BY_SYS_STATFS 1
+
+/* Define if the struct statfs is defined by <sys/mount.h> */
+/* #undef STATFS_DEFINED_BY_SYS_MOUNT */
+
+/* Define if ncurses have the new resizeterm function */
+#define HAVE_RESIZETERM 1
+
+/* Define if ncurses have the new getbkgd function */
+#define HAVE_GETBKGD 1
+
+/* Define if IPX should use netipx/ipx.h from libc */
+#define HAVE_IPX_GNU 1
+
+/* Define if IPX includes are taken from Linux kernel */
+/* #undef HAVE_IPX_LINUX */
+
+/* Define if Mesa is present on the system or not */
+/* #undef HAVE_LIBMESAGL */
+
+/* Define if the system has dynamic link library support with the dl* API */
+#define HAVE_DL_API 1
+
+/* Define if <linux/joystick.h> defines the Linux 2.2 joystick API */
+#define HAVE_LINUX_22_JOYSTICK_API 1
+
+/* Define if the OpenGL implementation supports the GL_EXT_color_table extension */
+/* #undef HAVE_GL_COLOR_TABLE */
+
+/* Define if the OpenGL implementation supports the GL_EXT_paletted_texture extension */
+/* #undef HAVE_GL_PALETTED_TEXTURE */
+
+/* The number of bytes in a long long. */
+#define SIZEOF_LONG_LONG 8
+
+/* Define if you have the __libc_fork function. */
+/* #undef HAVE___LIBC_FORK */
+
+/* Define if you have the _lwp_create function. */
+/* #undef HAVE__LWP_CREATE */
+
+/* Define if you have the clone function. */
+#define HAVE_CLONE 1
+
+/* Define if you have the connect function. */
+#define HAVE_CONNECT 1
+
+/* Define if you have the dlopen function. */
+/* #undef HAVE_DLOPEN */
+
+/* Define if you have the gethostbyname function. */
+#define HAVE_GETHOSTBYNAME 1
+
+/* Define if you have the getnetbyaddr function. */
+#define HAVE_GETNETBYADDR 1
+
+/* Define if you have the getnetbyname function. */
+#define HAVE_GETNETBYNAME 1
+
+/* Define if you have the getpagesize function. */
+#define HAVE_GETPAGESIZE 1
+
+/* Define if you have the getprotobyname function. */
+#define HAVE_GETPROTOBYNAME 1
+
+/* Define if you have the getprotobynumber function. */
+#define HAVE_GETPROTOBYNUMBER 1
+
+/* Define if you have the getservbyport function. */
+#define HAVE_GETSERVBYPORT 1
+
+/* Define if you have the getsockopt function. */
+#define HAVE_GETSOCKOPT 1
+
+/* Define if you have the inet_network function. */
+#define HAVE_INET_NETWORK 1
+
+/* Define if you have the memmove function. */
+#define HAVE_MEMMOVE 1
+
+/* Define if you have the openpty function. */
+#define HAVE_OPENPTY 1
+
+/* Define if you have the rfork function. */
+/* #undef HAVE_RFORK */
+
+/* Define if you have the select function. */
+#define HAVE_SELECT 1
+
+/* Define if you have the sendmsg function. */
+#define HAVE_SENDMSG 1
+
+/* Define if you have the settimeofday function. */
+#define HAVE_SETTIMEOFDAY 1
+
+/* Define if you have the sigaltstack function. */
+#define HAVE_SIGALTSTACK 1
+
+/* Define if you have the statfs function. */
+#define HAVE_STATFS 1
+
+/* Define if you have the strcasecmp function. */
+#define HAVE_STRCASECMP 1
+
+/* Define if you have the strerror function. */
+#define HAVE_STRERROR 1
+
+/* Define if you have the strncasecmp function. */
+#define HAVE_STRNCASECMP 1
+
+/* Define if you have the tcgetattr function. */
+#define HAVE_TCGETATTR 1
+
+/* Define if you have the timegm function. */
+#define HAVE_TIMEGM 1
+
+/* Define if you have the usleep function. */
+#define HAVE_USLEEP 1
+
+/* Define if you have the vfscanf function. */
+#define HAVE_VFSCANF 1
+
+/* Define if you have the wait4 function. */
+#define HAVE_WAIT4 1
+
+/* Define if you have the waitpid function. */
+#define HAVE_WAITPID 1
+
+/* Define if you have the <GL/gl.h> header file. */
+/* #undef HAVE_GL_GL_H */
+
+/* Define if you have the <GL/glx.h> header file. */
+/* #undef HAVE_GL_GLX_H */
+
+/* Define if you have the <X11/Xlib.h> header file. */
+#define HAVE_X11_XLIB_H 1
+
+/* Define if you have the <X11/extensions/XShm.h> header file. */
+#define HAVE_X11_EXTENSIONS_XSHM_H 1
+
+/* Define if you have the <X11/extensions/xf86dga.h> header file. */
+#define HAVE_X11_EXTENSIONS_XF86DGA_H 1
+
+/* Define if you have the <X11/extensions/xf86vmode.h> header file. */
+#define HAVE_X11_EXTENSIONS_XF86VMODE_H 1
+
+/* Define if you have the <X11/xpm.h> header file. */
+#define HAVE_X11_XPM_H 1
+
+/* Define if you have the <a.out.h> header file. */
+#define HAVE_A_OUT_H 1
+
+/* Define if you have the <a_out.h> header file. */
+#define HAVE_A_OUT_H 1
+
+/* Define if you have the <arpa/inet.h> header file. */
+#define HAVE_ARPA_INET_H 1
+
+/* Define if you have the <arpa/nameser.h> header file. */
+#define HAVE_ARPA_NAMESER_H 1
+
+/* Define if you have the <curses.h> header file. */
+/* #undef HAVE_CURSES_H */
+
+/* Define if you have the <dlfcn.h> header file. */
+#define HAVE_DLFCN_H 1
+
+/* Define if you have the <elf.h> header file. */
+#define HAVE_ELF_H 1
+
+/* Define if you have the <float.h> header file. */
+#define HAVE_FLOAT_H 1
+
+/* Define if you have the <libio.h> header file. */
+#define HAVE_LIBIO_H 1
+
+/* Define if you have the <link.h> header file. */
+#define HAVE_LINK_H 1
+
+/* Define if you have the <linux/cdrom.h> header file. */
+#define HAVE_LINUX_CDROM_H 1
+
+/* Define if you have the <linux/joystick.h> header file. */
+#define HAVE_LINUX_JOYSTICK_H 1
+
+/* Define if you have the <linux/ucdrom.h> header file. */
+/* #undef HAVE_LINUX_UCDROM_H */
+
+/* Define if you have the <machine/soundcard.h> header file. */
+/* #undef HAVE_MACHINE_SOUNDCARD_H */
+
+/* Define if you have the <ncurses.h> header file. */
+#define HAVE_NCURSES_H 1
+
+/* Define if you have the <net/if.h> header file. */
+#define HAVE_NET_IF_H 1
+
+/* Define if you have the <netinet/in.h> header file. */
+#define HAVE_NETINET_IN_H 1
+
+/* Define if you have the <netinet/tcp.h> header file. */
+#define HAVE_NETINET_TCP_H 1
+
+/* Define if you have the <pty.h> header file. */
+#define HAVE_PTY_H 1
+
+/* Define if you have the <resolv.h> header file. */
+#define HAVE_RESOLV_H 1
+
+/* Define if you have the <sched.h> header file. */
+#define HAVE_SCHED_H 1
+
+/* Define if you have the <socket.h> header file. */
+/* #undef HAVE_SOCKET_H */
+
+/* Define if you have the <soundcard.h> header file. */
+/* #undef HAVE_SOUNDCARD_H */
+
+/* Define if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define if you have the <sys/cdio.h> header file. */
+/* #undef HAVE_SYS_CDIO_H */
+
+/* Define if you have the <sys/errno.h> header file. */
+#define HAVE_SYS_ERRNO_H 1
+
+/* Define if you have the <sys/file.h> header file. */
+#define HAVE_SYS_FILE_H 1
+
+/* Define if you have the <sys/filio.h> header file. */
+/* #undef HAVE_SYS_FILIO_H */
+
+/* Define if you have the <sys/ipc.h> header file. */
+#define HAVE_SYS_IPC_H 1
+
+/* Define if you have the <sys/lwp.h> header file. */
+/* #undef HAVE_SYS_LWP_H */
+
+/* Define if you have the <sys/mman.h> header file. */
+#define HAVE_SYS_MMAN_H 1
+
+/* Define if you have the <sys/modem.h> header file. */
+/* #undef HAVE_SYS_MODEM_H */
+
+/* Define if you have the <sys/mount.h> header file. */
+#define HAVE_SYS_MOUNT_H 1
+
+/* Define if you have the <sys/msg.h> header file. */
+#define HAVE_SYS_MSG_H 1
+
+/* Define if you have the <sys/param.h> header file. */
+#define HAVE_SYS_PARAM_H 1
+
+/* Define if you have the <sys/reg.h> header file. */
+#define HAVE_SYS_REG_H 1
+
+/* Define if you have the <sys/shm.h> header file. */
+#define HAVE_SYS_SHM_H 1
+
+/* Define if you have the <sys/signal.h> header file. */
+#define HAVE_SYS_SIGNAL_H 1
+
+/* Define if you have the <sys/socket.h> header file. */
+#define HAVE_SYS_SOCKET_H 1
+
+/* Define if you have the <sys/sockio.h> header file. */
+/* #undef HAVE_SYS_SOCKIO_H */
+
+/* Define if you have the <sys/soundcard.h> header file. */
+#define HAVE_SYS_SOUNDCARD_H 1
+
+/* Define if you have the <sys/statfs.h> header file. */
+#define HAVE_SYS_STATFS_H 1
+
+/* Define if you have the <sys/strtio.h> header file. */
+/* #undef HAVE_SYS_STRTIO_H */
+
+/* Define if you have the <sys/syscall.h> header file. */
+#define HAVE_SYS_SYSCALL_H 1
+
+/* Define if you have the <sys/v86.h> header file. */
+/* #undef HAVE_SYS_V86_H */
+
+/* Define if you have the <sys/v86intr.h> header file. */
+/* #undef HAVE_SYS_V86INTR_H */
+
+/* Define if you have the <sys/vfs.h> header file. */
+#define HAVE_SYS_VFS_H 1
+
+/* Define if you have the <sys/vm86.h> header file. */
+#define HAVE_SYS_VM86_H 1
+
+/* Define if you have the <sys/wait.h> header file. */
+#define HAVE_SYS_WAIT_H 1
+
+/* Define if you have the <syscall.h> header file. */
+#define HAVE_SYSCALL_H 1
+
+/* Define if you have the <ucontext.h> header file. */
+#define HAVE_UCONTEXT_H 1
+
+/* Define if you have the <wctype.h> header file. */
+#define HAVE_WCTYPE_H 1
+
+/* Define if you have the curses library (-lcurses). */
+/* #undef HAVE_LIBCURSES */
+
+/* Define if you have the i386 library (-li386). */
+/* #undef HAVE_LIBI386 */
+
+/* Define if you have the m library (-lm). */
+#define HAVE_LIBM 1
+
+/* Define if you have the mmap library (-lmmap). */
+/* #undef HAVE_LIBMMAP */
+
+/* Define if you have the ncurses library (-lncurses). */
+#define HAVE_LIBNCURSES 1
+
+/* Define if you have the ossaudio library (-lossaudio). */
+/* #undef HAVE_LIBOSSAUDIO */
+
+/* Define if you have the w library (-lw). */
+/* #undef HAVE_LIBW */
+
+/* Define if you have the xpg4 library (-lxpg4). */
+/* #undef HAVE_LIBXPG4 */
diff --git a/loader/wine/debugtools.h b/loader/wine/debugtools.h
new file mode 100644
index 0000000000..ce2448db87
--- /dev/null
+++ b/loader/wine/debugtools.h
@@ -0,0 +1,93 @@
+
+#ifndef __WINE_DEBUGTOOLS_H
+#define __WINE_DEBUGTOOLS_H
+
+#ifdef __WINE__ /* Debugging interface is internal to Wine */
+
+#include <stdarg.h>
+#include "config.h"
+#include "windef.h"
+
+struct _GUID;
+
+/* Internal definitions (do not use these directly) */
+
+enum __DEBUG_CLASS { __DBCL_FIXME, __DBCL_ERR, __DBCL_WARN, __DBCL_TRACE, __DBCL_COUNT };
+
+#ifndef NO_TRACE_MSGS
+# define __GET_DEBUGGING_trace(dbch) ((dbch)[0] & (1 << __DBCL_TRACE))
+#else
+# define __GET_DEBUGGING_trace(dbch) 0
+#endif
+
+#ifndef NO_DEBUG_MSGS
+# define __GET_DEBUGGING_warn(dbch) ((dbch)[0] & (1 << __DBCL_WARN))
+# define __GET_DEBUGGING_fixme(dbch) ((dbch)[0] & (1 << __DBCL_FIXME))
+#else
+# define __GET_DEBUGGING_warn(dbch) 0
+# define __GET_DEBUGGING_fixme(dbch) 0
+#endif
+
+/* define error macro regardless of what is configured */
+#define __GET_DEBUGGING_err(dbch) ((dbch)[0] & (1 << __DBCL_ERR))
+
+#define __GET_DEBUGGING(dbcl,dbch) __GET_DEBUGGING_##dbcl(dbch)
+#define __SET_DEBUGGING(dbcl,dbch,on) \
+ ((on) ? ((dbch)[0] |= 1 << (dbcl)) : ((dbch)[0] &= ~(1 << (dbcl))))
+
+#ifndef __GNUC__
+#define __FUNCTION__ ""
+#endif
+
+#define __DPRINTF(dbcl,dbch) \
+ (!__GET_DEBUGGING(dbcl,(dbch)) || (dbg_header_##dbcl((dbch),__FUNCTION__),0)) ? \
+ (void)0 : (void)dbg_printf
+
+/* Exported definitions and macros */
+
+/* These function return a printable version of a string, including
+ quotes. The string will be valid for some time, but not indefinitely
+ as strings are re-used. */
+extern LPCSTR debugstr_an (LPCSTR s, int n);
+extern LPCSTR debugstr_wn (LPCWSTR s, int n);
+extern LPCSTR debugres_a (LPCSTR res);
+extern LPCSTR debugres_w (LPCWSTR res);
+extern LPCSTR debugstr_guid( const struct _GUID *id );
+extern LPCSTR debugstr_hex_dump (const void *ptr, int len);
+extern int dbg_header_err( const char *dbg_channel, const char *func );
+extern int dbg_header_warn( const char *dbg_channel, const char *func );
+extern int dbg_header_fixme( const char *dbg_channel, const char *func );
+extern int dbg_header_trace( const char *dbg_channel, const char *func );
+extern int dbg_vprintf( const char *format, va_list args );