Author: fireball
Date: Mon Dec 17 23:53:08 2007
New Revision: 31294
URL:
http://svn.reactos.org/svn/reactos?rev=31294&view=rev
Log:
- It should use only host headers.
Modified:
trunk/reactos/tools/winebuild/build.h
trunk/reactos/tools/winebuild/import.c
trunk/reactos/tools/winebuild/main.c
trunk/reactos/tools/winebuild/parser.c
trunk/reactos/tools/winebuild/res16.c
trunk/reactos/tools/winebuild/res32.c
trunk/reactos/tools/winebuild/spec32.c
trunk/reactos/tools/winebuild/utils.c
trunk/reactos/tools/winebuild/winglue.h
Modified: trunk/reactos/tools/winebuild/build.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/winebuild/build.h?re…
==============================================================================
--- trunk/reactos/tools/winebuild/build.h (original)
+++ trunk/reactos/tools/winebuild/build.h Mon Dec 17 23:53:08 2007
@@ -30,8 +30,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-
-#include "winglue.h"
typedef enum
{
Modified: trunk/reactos/tools/winebuild/import.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/winebuild/import.c?r…
==============================================================================
--- trunk/reactos/tools/winebuild/import.c (original)
+++ trunk/reactos/tools/winebuild/import.c Mon Dec 17 23:53:08 2007
@@ -35,8 +35,7 @@
# include <unistd.h>
#endif
-#include "windef.h"
-#include "winbase.h"
+#include "winglue.h"
#include "build.h"
struct import
Modified: trunk/reactos/tools/winebuild/main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/winebuild/main.c?rev…
==============================================================================
--- trunk/reactos/tools/winebuild/main.c (original)
+++ trunk/reactos/tools/winebuild/main.c Mon Dec 17 23:53:08 2007
@@ -36,8 +36,7 @@
# include <getopt.h>
#endif
-#include "windef.h"
-#include "winbase.h"
+#include "winglue.h"
#include "build.h"
int UsePIC = 0;
@@ -49,7 +48,7 @@
int save_temps = 0;
int link_ext_symbols = 0;
-#ifdef __i386__
+#if defined(__i386__) || defined(__x86_64__)
enum target_cpu target_cpu = CPU_x86;
#elif defined(__x86_64__)
enum target_cpu target_cpu = CPU_x86_64;
Modified: trunk/reactos/tools/winebuild/parser.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/winebuild/parser.c?r…
==============================================================================
--- trunk/reactos/tools/winebuild/parser.c (original)
+++ trunk/reactos/tools/winebuild/parser.c Mon Dec 17 23:53:08 2007
@@ -32,8 +32,7 @@
#include <stdlib.h>
#include <string.h>
-#include "windef.h"
-#include "winbase.h"
+#include "winglue.h"
#include "build.h"
int current_line = 0;
Modified: trunk/reactos/tools/winebuild/res16.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/winebuild/res16.c?re…
==============================================================================
--- trunk/reactos/tools/winebuild/res16.c (original)
+++ trunk/reactos/tools/winebuild/res16.c Mon Dec 17 23:53:08 2007
@@ -38,8 +38,7 @@
#include <sys/mman.h>
#endif
-#include "windef.h"
-#include "winbase.h"
+#include "winglue.h"
#include "build.h"
/* Unicode string or integer id */
Modified: trunk/reactos/tools/winebuild/res32.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/winebuild/res32.c?re…
==============================================================================
--- trunk/reactos/tools/winebuild/res32.c (original)
+++ trunk/reactos/tools/winebuild/res32.c Mon Dec 17 23:53:08 2007
@@ -37,8 +37,7 @@
#include <sys/mman.h>
#endif
-#include "windef.h"
-#include "winbase.h"
+#include "winglue.h"
#include "build.h"
/* Unicode string or integer id */
Modified: trunk/reactos/tools/winebuild/spec32.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/winebuild/spec32.c?r…
==============================================================================
--- trunk/reactos/tools/winebuild/spec32.c (original)
+++ trunk/reactos/tools/winebuild/spec32.c Mon Dec 17 23:53:08 2007
@@ -30,8 +30,7 @@
#include <stdarg.h>
#include <string.h>
-#include "windef.h"
-#include "winbase.h"
+#include "winglue.h"
//#include "wine/exception.h"
#include "build.h"
Modified: trunk/reactos/tools/winebuild/utils.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/winebuild/utils.c?re…
==============================================================================
--- trunk/reactos/tools/winebuild/utils.c (original)
+++ trunk/reactos/tools/winebuild/utils.c Mon Dec 17 23:53:08 2007
@@ -31,8 +31,7 @@
# include <unistd.h>
#endif
-#include "windef.h"
-#include "winnt.h"
+#include "winglue.h"
#include "build.h"
#define MAX_TMP_FILES 8
Modified: trunk/reactos/tools/winebuild/winglue.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/winebuild/winglue.h?…
==============================================================================
--- trunk/reactos/tools/winebuild/winglue.h (original)
+++ trunk/reactos/tools/winebuild/winglue.h Mon Dec 17 23:53:08 2007
@@ -1,10 +1,136 @@
#ifndef _WINGLUE_H
#define _WINGLUE_H
-/* Stuff missing in the host's PSDK */
-#define IMAGE_DLLCHARACTERISTICS_NX_COMPAT 0x0100
+typedef unsigned char BYTE;
+typedef unsigned short WORD;
+typedef unsigned long DWORD;
+typedef unsigned short WCHAR;
+#if defined(_WIN64)
+typedef unsigned __int64 UINT_PTR;
+#else
+typedef unsigned int UINT_PTR;
+#endif
+
+#define LOBYTE(w) ((BYTE)(w))
+#define HIBYTE(w) ((BYTE)(((WORD)(w)>>8)&0xFF))
+
+#define DLL_PROCESS_ATTACH 1
+#define DLL_PROCESS_DETACH 0
+
+#define IMAGE_FILE_EXECUTABLE_IMAGE 2
+#define IMAGE_FILE_LARGE_ADDRESS_AWARE 32
+#define IMAGE_FILE_32BIT_MACHINE 256
+#define IMAGE_FILE_DLL 8192
+#define IMAGE_SUBSYSTEM_NATIVE 1
+#define IMAGE_SUBSYSTEM_WINDOWS_GUI 2
+#define IMAGE_SUBSYSTEM_WINDOWS_CUI 3
+#define IMAGE_NUMBEROF_DIRECTORY_ENTRIES 16
+#define IMAGE_FILE_MACHINE_UNKNOWN 0
+#define IMAGE_FILE_MACHINE_I386 0x014c
#define IMAGE_FILE_MACHINE_ALPHA 0x0184
+#define IMAGE_FILE_MACHINE_POWERPC 0x01f0
+#define IMAGE_FILE_MACHINE_AMD64 0x8664
+#define IMAGE_NT_SIGNATURE 0x00004550
+#define IMAGE_DLLCHARACTERISTICS_NX_COMPAT 0x0100
#define IMAGE_SIZEOF_NT_OPTIONAL32_HEADER 224
#define IMAGE_SIZEOF_NT_OPTIONAL64_HEADER 240
+#define IMAGE_NT_OPTIONAL_HDR32_MAGIC 0x10b
+#define IMAGE_NT_OPTIONAL_HDR64_MAGIC 0x20b
+#if defined(_WIN64)
+#define IMAGE_SIZEOF_NT_OPTIONAL_HEADER IMAGE_SIZEOF_NT_OPTIONAL64_HEADER
+#define IMAGE_NT_OPTIONAL_HDR_MAGIC IMAGE_NT_OPTIONAL_HDR64_MAGIC
+#else
+#define IMAGE_SIZEOF_NT_OPTIONAL_HEADER IMAGE_SIZEOF_NT_OPTIONAL32_HEADER
+#define IMAGE_NT_OPTIONAL_HDR_MAGIC IMAGE_NT_OPTIONAL_HDR32_MAGIC
+#endif
+
+#ifdef __GNUC__
+#ifndef NONAMELESSUNION
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
+#define _ANONYMOUS_UNION __extension__
+#define _ANONYMOUS_STRUCT __extension__
+#else
+#if defined(__cplusplus)
+#define _ANONYMOUS_UNION __extension__
+#endif /* __cplusplus */
+#endif /* __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) */
+#endif /* NONAMELESSUNION */
+#elif defined(__WATCOMC__) || defined(_MSC_VER)
+#define _ANONYMOUS_UNION
+#define _ANONYMOUS_STRUCT
+#endif /* __GNUC__/__WATCOMC__ */
+#ifndef _ANONYMOUS_UNION
+#define _ANONYMOUS_UNION
+#define _UNION_NAME(x) x
+#define DUMMYUNIONNAME u
+#define DUMMYUNIONNAME2 u2
+#define DUMMYUNIONNAME3 u3
+#define DUMMYUNIONNAME4 u4
+#define DUMMYUNIONNAME5 u5
+#define DUMMYUNIONNAME6 u6
+#define DUMMYUNIONNAME7 u7
+#define DUMMYUNIONNAME8 u8
+#else
+#define _UNION_NAME(x)
+#define DUMMYUNIONNAME
+#define DUMMYUNIONNAME2
+#define DUMMYUNIONNAME3
+#define DUMMYUNIONNAME4
+#define DUMMYUNIONNAME5
+#define DUMMYUNIONNAME6
+#define DUMMYUNIONNAME7
+#define DUMMYUNIONNAME8
+#endif
+#ifndef _ANONYMOUS_STRUCT
+#define _ANONYMOUS_STRUCT
+#define _STRUCT_NAME(x) x
+#define DUMMYSTRUCTNAME s
+#define DUMMYSTRUCTNAME2 s2
+#define DUMMYSTRUCTNAME3 s3
+#else
+#define _STRUCT_NAME(x)
+#define DUMMYSTRUCTNAME
+#define DUMMYSTRUCTNAME2
+#define DUMMYSTRUCTNAME3
+#endif
+
+typedef struct _IMAGE_RESOURCE_DIRECTORY {
+ DWORD Characteristics;
+ DWORD TimeDateStamp;
+ WORD MajorVersion;
+ WORD MinorVersion;
+ WORD NumberOfNamedEntries;
+ WORD NumberOfIdEntries;
+} IMAGE_RESOURCE_DIRECTORY,*PIMAGE_RESOURCE_DIRECTORY;
+_ANONYMOUS_STRUCT typedef struct _IMAGE_RESOURCE_DIRECTORY_ENTRY {
+ _ANONYMOUS_UNION union {
+ _ANONYMOUS_STRUCT struct {
+ DWORD NameOffset:31;
+ DWORD NameIsString:1;
+ }DUMMYSTRUCTNAME;
+ DWORD Name;
+ WORD Id;
+ } DUMMYUNIONNAME;
+ _ANONYMOUS_UNION union {
+ DWORD OffsetToData;
+ _ANONYMOUS_STRUCT struct {
+ DWORD OffsetToDirectory:31;
+ DWORD DataIsDirectory:1;
+ } DUMMYSTRUCTNAME2;
+ } DUMMYUNIONNAME2;
+} IMAGE_RESOURCE_DIRECTORY_ENTRY,*PIMAGE_RESOURCE_DIRECTORY_ENTRY;
+typedef struct _IMAGE_RESOURCE_DATA_ENTRY {
+ DWORD OffsetToData;
+ DWORD Size;
+ DWORD CodePage;
+ DWORD Reserved;
+} IMAGE_RESOURCE_DATA_ENTRY,*PIMAGE_RESOURCE_DATA_ENTRY;
+
+#ifndef max
+#define max(a,b) ((a)>(b)?(a):(b))
+#endif
+#ifndef min
+#define min(a,b) ((a)<(b)?(a):(b))
+#endif
#endif /* _WINGLUE_H */