From cddcaa508e2a4a9b8b56ba0984405c0d6b7549c4 Mon Sep 17 00:00:00 2001 From: Colin Finck Date: Sun, 19 Aug 2007 15:38:21 +0000 Subject: [PATCH] - Always include "wine/unicode.h" before all other headers, when we need the wchar_t type. unicode.h includes windef.h, which includes winnt.h, which has the handling for the wchar_t type. As it's the first included header, no other wchar_t type will be defined before. - Remove the wchar_t definition from the Makefile as the winnt.h header will define it as "unsigned short" automatically. svn path=/trunk/; revision=28423 --- reactos/tools/unicode/cptable.c | 4 +--- reactos/tools/unicode/mbtowc.c | 3 +-- reactos/tools/unicode/string.c | 3 +-- reactos/tools/unicode/unicode.mak | 1 - reactos/tools/unicode/utf8.c | 3 +-- reactos/tools/unicode/wctomb.c | 3 +-- 6 files changed, 5 insertions(+), 12 deletions(-) diff --git a/reactos/tools/unicode/cptable.c b/reactos/tools/unicode/cptable.c index dd66d2f412e..a44a1a22d1b 100644 --- a/reactos/tools/unicode/cptable.c +++ b/reactos/tools/unicode/cptable.c @@ -18,10 +18,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include -#include - #include "wine/unicode.h" +#include /* Everything below this line is generated automatically by cpmap.pl */ /* ### cpmap begin ### */ diff --git a/reactos/tools/unicode/mbtowc.c b/reactos/tools/unicode/mbtowc.c index c0e5791ccfb..41d2bab696e 100644 --- a/reactos/tools/unicode/mbtowc.c +++ b/reactos/tools/unicode/mbtowc.c @@ -18,9 +18,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include - #include "wine/unicode.h" +#include /* get the decomposition of a Unicode char */ static int get_decomposition( WCHAR src, WCHAR *dst, unsigned int dstlen ) diff --git a/reactos/tools/unicode/string.c b/reactos/tools/unicode/string.c index 860e09d410b..2767ad6af18 100644 --- a/reactos/tools/unicode/string.c +++ b/reactos/tools/unicode/string.c @@ -18,11 +18,10 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include "wine/unicode.h" #include #include -#include "wine/unicode.h" - extern const WCHAR wine_casemap_lower[]; extern const WCHAR wine_casemap_upper[]; extern const unsigned short wine_wctype_table[]; diff --git a/reactos/tools/unicode/unicode.mak b/reactos/tools/unicode/unicode.mak index a0cdce87914..d359d7f4f44 100644 --- a/reactos/tools/unicode/unicode.mak +++ b/reactos/tools/unicode/unicode.mak @@ -96,7 +96,6 @@ UNICODE_OBJECTS = \ UNICODE_HOST_CFLAGS = \ -D__USE_W32API -DWINVER=0x501 -DWINE_UNICODE_API= \ - -Dwchar_t="unsigned short" -D_WCHAR_T_DEFINED \ -I$(UNICODE_BASE) -Iinclude/reactos/wine -Iinclude -Iinclude/psdk \ $(TOOLS_CFLAGS) diff --git a/reactos/tools/unicode/utf8.c b/reactos/tools/unicode/utf8.c index 334d7fc3b3e..484173c1f0f 100644 --- a/reactos/tools/unicode/utf8.c +++ b/reactos/tools/unicode/utf8.c @@ -18,9 +18,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include - #include "wine/unicode.h" +#include /* number of following bytes in sequence based on first byte value (for bytes above 0x7f) */ static const char utf8_length[128] = diff --git a/reactos/tools/unicode/wctomb.c b/reactos/tools/unicode/wctomb.c index 5ad027acd3c..e171e0fac13 100644 --- a/reactos/tools/unicode/wctomb.c +++ b/reactos/tools/unicode/wctomb.c @@ -18,9 +18,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include - #include "wine/unicode.h" +#include /* search for a character in the unicode_compose_table; helper for compose() */ static inline int binary_search( WCHAR ch, int low, int high )