Author: cfinck
Date: Fri Sep 14 22:55:43 2007
New Revision: 29042
URL:
http://svn.reactos.org/svn/reactos?rev=29042&view=rev
Log:
- Create a new "include/host" directory for host-only includes.
- Copy the "pshpack*.h", "poppack.h" and "typedefs_host.h"
(renamed to "typedefs.h") files to this directory
- Modify the Makefiles of cmlib_host, inflib_host, mkhive, unicode, wmc and wrc to remove
the "include/psdk" dependency
- Remove the inclusion of "ntstatus.h" in cmlib_host and mkhive
Added:
trunk/reactos/include/host/
trunk/reactos/include/host/poppack.h
- copied unchanged from r29040, trunk/reactos/include/psdk/poppack.h
trunk/reactos/include/host/pshpack1.h
- copied unchanged from r29040, trunk/reactos/include/psdk/pshpack1.h
trunk/reactos/include/host/pshpack2.h
- copied unchanged from r29040, trunk/reactos/include/psdk/pshpack2.h
trunk/reactos/include/host/pshpack4.h
- copied unchanged from r29040, trunk/reactos/include/psdk/pshpack4.h
trunk/reactos/include/host/pshpack8.h
- copied unchanged from r29040, trunk/reactos/include/psdk/pshpack8.h
trunk/reactos/include/host/pshpck16.h
- copied unchanged from r29040, trunk/reactos/include/psdk/pshpck16.h
trunk/reactos/include/host/typedefs.h
- copied, changed from r29040, trunk/reactos/include/reactos/typedefs_host.h
Removed:
trunk/reactos/include/reactos/typedefs_host.h
Modified:
trunk/reactos/lib/cmlib/cmlib.h
trunk/reactos/lib/cmlib/cmlib.mak
trunk/reactos/lib/inflib/builddep.h
trunk/reactos/lib/inflib/inflib.mak
trunk/reactos/tools/mkhive/mkhive.h
trunk/reactos/tools/mkhive/mkhive.mak
trunk/reactos/tools/unicode/unicode.mak
trunk/reactos/tools/unicode/wine/unicode.h
trunk/reactos/tools/wmc/wmc.mak
trunk/reactos/tools/wmc/wmctypes.h
trunk/reactos/tools/wrc/wrc.mak
trunk/reactos/tools/wrc/wrcrostypes.h
Copied: trunk/reactos/include/host/typedefs.h (from r29040,
trunk/reactos/include/reactos/typedefs_host.h)
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/host/typedefs.h?p2…
==============================================================================
--- trunk/reactos/include/reactos/typedefs_host.h (original)
+++ trunk/reactos/include/host/typedefs.h Fri Sep 14 22:55:43 2007
@@ -1,7 +1,7 @@
/*
PROJECT: ReactOS
LICENSE: GPL v2 or any later version
- FILE: include/reactos/typedefs_host.h
+ FILE: include/host/typedefs.h
PURPOSE: Type definitions and useful macros for host tools
COPYRIGHT: Copyright 2007 Hervé Poussineau
*/
Removed: trunk/reactos/include/reactos/typedefs_host.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/typedefs_h…
==============================================================================
--- trunk/reactos/include/reactos/typedefs_host.h (original)
+++ trunk/reactos/include/reactos/typedefs_host.h (removed)
@@ -1,136 +1,0 @@
-/*
- PROJECT: ReactOS
- LICENSE: GPL v2 or any later version
- FILE: include/reactos/typedefs_host.h
- PURPOSE: Type definitions and useful macros for host tools
- COPYRIGHT: Copyright 2007 Hervé Poussineau
-*/
-
-#ifndef _TYPEDEFS_HOST_H
-#define _TYPEDEFS_HOST_H
-
-#include <assert.h>
-#include <stdlib.h>
-#include <limits.h>
-
-#if defined(_MSC_VER)
-#define W64 __w64
-#elif defined(__GNUC__)
-#define W64
-#else
-#error Unknown compiler
-#endif
-
-#if !defined(_MSC_VER) && !defined(__fastcall)
-#define __fastcall __attribute__((fastcall))
-#endif
-#if !defined(_MSC_VER) && !defined(__cdecl)
-#define __cdecl __attribute__((cdecl))
-#endif
-#if !defined(_MSC_VER) && !defined(__stdcall)
-#define __stdcall __attribute__((stdcall))
-#endif
-
-#define UNIMPLEMENTED { printf("%s unimplemented\n", __FUNCTION__); exit(1); }
-#define ASSERT(x) assert(x)
-#define DPRINT if (0) printf
-#define DPRINT1 printf
-
-#define NTAPI
-#define WINAPI
-
-#define IN
-#define OUT
-#define OPTIONAL
-
-#define FALSE 0
-#define TRUE (!(FALSE))
-
-/* FIXME: this value is target specific, host tools MUST not use it
- * and this line has to be removed */
-#define PAGE_SIZE 4096
-
-typedef void VOID, *PVOID, *HANDLE;
-typedef HANDLE HKEY, *PHKEY;
-typedef unsigned char UCHAR, *PUCHAR, BYTE, *LPBYTE;
-typedef char CHAR, *PCHAR, *PSTR;
-typedef const char CCHAR;
-typedef const char *PCSTR, *LPCSTR;
-typedef short SHORT;
-typedef unsigned short USHORT;
-typedef unsigned short WORD, *PWORD, *LPWORD;
-typedef int LONG, *PLONG, *LPLONG;
-typedef unsigned int ULONG, *PULONG, DWORD, *LPDWORD;
-typedef long long LONGLONG;
-typedef unsigned long long ULONGLONG;
-typedef UCHAR BOOLEAN, *PBOOLEAN;
-typedef int BOOL;
-typedef long int W64 LONG_PTR, *PLONG_PTR;
-typedef long unsigned int W64 ULONG_PTR, DWORD_PTR, *PULONG_PTR;
-typedef ULONG_PTR SIZE_T, *PSIZE_T;
-typedef unsigned short WCHAR, *PWCHAR, *PWSTR, *LPWSTR;
-typedef const unsigned short *PCWSTR, *LPCWSTR;
-typedef int NTSTATUS;
-typedef int POOL_TYPE;
-
-#define MAXUSHORT USHRT_MAX
-
-#include <pshpack4.h>
-typedef struct _RTL_BITMAP
-{
- ULONG SizeOfBitMap;
- PULONG Buffer;
-} RTL_BITMAP, *PRTL_BITMAP;
-
-typedef struct _RTL_BITMAP_RUN
-{
- ULONG StartingIndex;
- ULONG NumberOfBits;
-} RTL_BITMAP_RUN, *PRTL_BITMAP_RUN;
-
-typedef union _LARGE_INTEGER
-{
- struct
- {
- DWORD LowPart;
- LONG HighPart;
- } u;
- LONGLONG QuadPart;
-} LARGE_INTEGER, *PLARGE_INTEGER;
-
-typedef struct _LIST_ENTRY
-{
- struct _LIST_ENTRY *Flink;
- struct _LIST_ENTRY *Blink;
-} LIST_ENTRY,*PLIST_ENTRY;
-
-typedef struct _ANSI_STRING
-{
- USHORT Length;
- USHORT MaximumLength;
- PSTR Buffer;
-} ANSI_STRING, *PANSI_STRING;
-
-typedef struct _UNICODE_STRING
-{
- USHORT Length;
- USHORT MaximumLength;
- PWSTR Buffer;
-} UNICODE_STRING, *PUNICODE_STRING;
-#include <poppack.h>
-
-typedef const UNICODE_STRING *PCUNICODE_STRING;
-
-#define NT_SUCCESS(x) ((x)>=0)
-#define FIELD_OFFSET(t,f) ((LONG_PTR)&(((t*)0)->f))
-#define RTL_CONSTANT_STRING(s) { sizeof(s)-sizeof((s)[0]), sizeof(s), s }
-#define RtlZeroMemory(Destination, Length) memset(Destination, 0, Length)
-#define RtlCopyMemory(Destination, Source, Length) memcpy(Destination, Source, Length)
-#define RtlMoveMemory(Destination, Source, Length) memmove(Destination, Source, Length)
-
-/* Prevent inclusion of some other headers */
-#define __INTERNAL_DEBUG
-#define RTL_H
-#define _TYPEDEFS64_H
-
-#endif
Modified: trunk/reactos/lib/cmlib/cmlib.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/cmlib/cmlib.h?rev=2904…
==============================================================================
--- trunk/reactos/lib/cmlib/cmlib.h (original)
+++ trunk/reactos/lib/cmlib/cmlib.h Fri Sep 14 22:55:43 2007
@@ -9,10 +9,20 @@
#define CMLIB_H
#ifdef CMLIB_HOST
-#include <typedefs_host.h>
+#include <host/typedefs.h>
#include <stdio.h>
#include <string.h>
-#include <ntstatus.h>
+
+// Definitions copied from <ntstatus.h>
+// We only want to include host headers, so we define them manually
+#define STATUS_SUCCESS ((NTSTATUS)0x00000000)
+#define STATUS_NOT_IMPLEMENTED ((NTSTATUS)0xC0000002)
+#define STATUS_NO_MEMORY ((NTSTATUS)0xC0000017)
+#define STATUS_INSUFFICIENT_RESOURCES ((NTSTATUS)0xC000009A)
+#define STATUS_REGISTRY_CORRUPT ((NTSTATUS)0xC000014C)
+#define STATUS_NOT_REGISTRY_FILE ((NTSTATUS)0xC000015C)
+#define STATUS_REGISTRY_RECOVERED ((NTSTATUS)0x40000009)
+
#endif
#ifndef _TYPEDEFS_HOST_H
Modified: trunk/reactos/lib/cmlib/cmlib.mak
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/cmlib/cmlib.mak?rev=29…
==============================================================================
--- trunk/reactos/lib/cmlib/cmlib.mak (original)
+++ trunk/reactos/lib/cmlib/cmlib.mak Fri Sep 14 22:55:43 2007
@@ -31,7 +31,7 @@
$(subst $(CMLIB_BASE), $(CMLIB_INT), $(CMLIB_HOST_SOURCES:.c=.o))
CMLIB_HOST_CFLAGS = -O3 -Wall -Wwrite-strings -Wpointer-arith \
- -I$(CMLIB_BASE) -Iinclude/reactos -Iinclude/psdk \
+ -I$(CMLIB_BASE) -Iinclude/reactos -Iinclude \
-DCMLIB_HOST
$(CMLIB_HOST_TARGET): $(CMLIB_HOST_OBJECTS) | $(CMLIB_OUT)
Modified: trunk/reactos/lib/inflib/builddep.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/inflib/builddep.h?rev=…
==============================================================================
--- trunk/reactos/lib/inflib/builddep.h (original)
+++ trunk/reactos/lib/inflib/builddep.h Fri Sep 14 22:55:43 2007
@@ -8,7 +8,7 @@
/* Definitions native to the host on which we're building */
-#include <typedefs_host.h>
+#include <host/typedefs.h>
#include <stdarg.h>
#include <stdio.h>
Modified: trunk/reactos/lib/inflib/inflib.mak
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/inflib/inflib.mak?rev=…
==============================================================================
--- trunk/reactos/lib/inflib/inflib.mak (original)
+++ trunk/reactos/lib/inflib/inflib.mak Fri Sep 14 22:55:43 2007
@@ -32,7 +32,7 @@
INFLIB_HOST_CFLAGS = -O3 -Wall -Wpointer-arith -Wconversion \
-Wstrict-prototypes -Wmissing-prototypes -DINFLIB_HOST \
- -Iinclude/reactos -Iinclude/psdk
+ -Iinclude/reactos -Iinclude
$(INFLIB_HOST_TARGET): $(INFLIB_HOST_OBJECTS) | $(INFLIB_OUT)
$(ECHO_AR)
Modified: trunk/reactos/tools/mkhive/mkhive.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/mkhive/mkhive.h?rev=…
==============================================================================
--- trunk/reactos/tools/mkhive/mkhive.h (original)
+++ trunk/reactos/tools/mkhive/mkhive.h Fri Sep 14 22:55:43 2007
@@ -30,8 +30,19 @@
#include <stdio.h>
#include <stdlib.h>
-#include <typedefs_host.h>
-#include <ntstatus.h>
+#include <host/typedefs.h>
+
+// Definitions copied from <ntstatus.h>
+// We only want to include host headers, so we define them manually
+#define STATUS_SUCCESS ((NTSTATUS)0x00000000)
+#define STATUS_UNSUCCESSFUL ((NTSTATUS)0xC0000001)
+#define STATUS_NOT_IMPLEMENTED ((NTSTATUS)0xC0000002)
+#define STATUS_INVALID_PARAMETER ((NTSTATUS)0xC000000D)
+#define STATUS_NO_MEMORY ((NTSTATUS)0xC0000017)
+#define STATUS_INSUFFICIENT_RESOURCES ((NTSTATUS)0xC000009A)
+#define STATUS_OBJECT_NAME_NOT_FOUND ((NTSTATUS)0xC0000034)
+#define STATUS_INVALID_PARAMETER_2 ((NTSTATUS)0xC00000F0)
+#define STATUS_BUFFER_OVERFLOW ((NTSTATUS)0x80000005)
NTSTATUS NTAPI
RtlAnsiStringToUnicodeString(
Modified: trunk/reactos/tools/mkhive/mkhive.mak
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/mkhive/mkhive.mak?re…
==============================================================================
--- trunk/reactos/tools/mkhive/mkhive.mak (original)
+++ trunk/reactos/tools/mkhive/mkhive.mak Fri Sep 14 22:55:43 2007
@@ -31,7 +31,7 @@
$(addprefix $(INTERMEDIATE_), $(MKHIVE_SOURCES:.c=.o))
MKHIVE_HOST_CFLAGS = -fshort-wchar $(xTOOLS_CFLAGS) -I$(INFLIB_BASE) -I$(CMLIB_BASE) \
- -DMKHIVE_HOST -Iinclude/reactos -Iinclude/psdk -g3
+ -DMKHIVE_HOST -Iinclude/reactos -Iinclude -g3
MKHIVE_HOST_LFLAGS = $(xTOOLS_LFLAGS) -g3
Modified: trunk/reactos/tools/unicode/unicode.mak
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/unicode.mak?…
==============================================================================
--- trunk/reactos/tools/unicode/unicode.mak (original)
+++ trunk/reactos/tools/unicode/unicode.mak Fri Sep 14 22:55:43 2007
@@ -96,7 +96,7 @@
UNICODE_HOST_CFLAGS = \
-D__USE_W32API -DWINVER=0x501 -DWINE_UNICODE_API= \
- -I$(UNICODE_BASE) -Iinclude/reactos/wine -Iinclude -Iinclude/psdk -Iinclude/reactos \
+ -I$(UNICODE_BASE) -Iinclude/reactos/wine -Iinclude -Iinclude/reactos \
$(TOOLS_CFLAGS)
.PHONY: unicode
Modified: trunk/reactos/tools/unicode/wine/unicode.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/unicode/wine/unicode…
==============================================================================
--- trunk/reactos/tools/unicode/wine/unicode.h (original)
+++ trunk/reactos/tools/unicode/wine/unicode.h Fri Sep 14 22:55:43 2007
@@ -22,7 +22,7 @@
#define __WINE_UNICODE_H
#include <stdarg.h>
-#include <typedefs_host.h>
+#include <host/typedefs.h>
// Definitions copied from <winnls.h>
// We only want to include host headers, so we define them manually
Modified: trunk/reactos/tools/wmc/wmc.mak
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/wmc/wmc.mak?rev=2904…
==============================================================================
--- trunk/reactos/tools/wmc/wmc.mak (original)
+++ trunk/reactos/tools/wmc/wmc.mak Fri Sep 14 22:55:43 2007
@@ -34,7 +34,7 @@
WMC_HOST_CFLAGS = -I$(WMC_BASE) $(TOOLS_CFLAGS) \
-D__USE_W32API -DWINE_UNICODE_API= -I$(UNICODE_BASE) \
- -Iinclude/reactos/wine -Iinclude/reactos -Iinclude -Iinclude/psdk \
+ -Iinclude/reactos/wine -Iinclude/reactos -Iinclude \
-I$(INTERMEDIATE_)/include
WMC_HOST_LFLAGS = $(TOOLS_LFLAGS)
Modified: trunk/reactos/tools/wmc/wmctypes.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/wmc/wmctypes.h?rev=2…
==============================================================================
--- trunk/reactos/tools/wmc/wmctypes.h (original)
+++ trunk/reactos/tools/wmc/wmctypes.h Fri Sep 14 22:55:43 2007
@@ -22,7 +22,7 @@
#define __WMC_WMCTYPES_H
#include <stdarg.h>
-#include <typedefs_host.h>
+#include <host/typedefs.h>
/* Byteordering defines */
#define WMC_BO_NATIVE 0x00
Modified: trunk/reactos/tools/wrc/wrc.mak
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/wrc/wrc.mak?rev=2904…
==============================================================================
--- trunk/reactos/tools/wrc/wrc.mak (original)
+++ trunk/reactos/tools/wrc/wrc.mak Fri Sep 14 22:55:43 2007
@@ -57,7 +57,7 @@
WRC_HOST_CFLAGS = -I$(WRC_BASE) $(TOOLS_CFLAGS) \
-D__USE_W32API -DWINE_UNICODE_API= \
-I$(UNICODE_BASE) -I$(WPP_BASE) \
- -Iinclude/reactos/wine -Iinclude/reactos -Iinclude -Iinclude/psdk \
+ -Iinclude/reactos/wine -Iinclude/reactos -Iinclude \
-I$(INTERMEDIATE_)include
WRC_HOST_LFLAGS = $(TOOLS_LFLAGS)
Modified: trunk/reactos/tools/wrc/wrcrostypes.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/wrc/wrcrostypes.h?re…
==============================================================================
--- trunk/reactos/tools/wrc/wrcrostypes.h (original)
+++ trunk/reactos/tools/wrc/wrcrostypes.h Fri Sep 14 22:55:43 2007
@@ -9,7 +9,7 @@
#ifndef _WRC_ROSTYPES_H
#define _WRC_ROSTYPES_H
-#include <typedefs_host.h>
+#include <host/typedefs.h>
#include <string.h>
// Definitions copied from various <win....h> files
@@ -159,7 +159,7 @@
#define SUBLANG_SERBIAN_CYRILLIC 0x03
#define SUBLANG_UZBEK_CYRILLIC 0x02
-#include <pshpack2.h>
+#include <host/pshpack2.h>
typedef struct tagBITMAPFILEHEADER {
WORD bfType;
DWORD bfSize;
@@ -167,7 +167,7 @@
WORD bfReserved2;
DWORD bfOffBits;
} BITMAPFILEHEADER,*LPBITMAPFILEHEADER,*PBITMAPFILEHEADER;
-#include <poppack.h>
+#include <host/poppack.h>
typedef int FXPT2DOT30;
typedef struct tagCIEXYZ {