- 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
This commit is contained in:
Colin Finck 2007-08-19 15:38:21 +00:00
parent fd468bc98a
commit cddcaa508e
6 changed files with 5 additions and 12 deletions

View file

@ -18,10 +18,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <windef.h>
#include <stdlib.h>
#include "wine/unicode.h"
#include <stdlib.h>
/* Everything below this line is generated automatically by cpmap.pl */
/* ### cpmap begin ### */

View file

@ -18,9 +18,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <string.h>
#include "wine/unicode.h"
#include <string.h>
/* get the decomposition of a Unicode char */
static int get_decomposition( WCHAR src, WCHAR *dst, unsigned int dstlen )

View file

@ -18,11 +18,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "wine/unicode.h"
#include <limits.h>
#include <stdio.h>
#include "wine/unicode.h"
extern const WCHAR wine_casemap_lower[];
extern const WCHAR wine_casemap_upper[];
extern const unsigned short wine_wctype_table[];

View file

@ -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)

View file

@ -18,9 +18,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <string.h>
#include "wine/unicode.h"
#include <string.h>
/* number of following bytes in sequence based on first byte value (for bytes above 0x7f) */
static const char utf8_length[128] =

View file

@ -18,9 +18,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <string.h>
#include "wine/unicode.h"
#include <string.h>
/* search for a character in the unicode_compose_table; helper for compose() */
static inline int binary_search( WCHAR ch, int low, int high )