Index: configure.ac =================================================================== RCS file: /home/wine/wine/configure.ac,v retrieving revision 1.366 diff -u -r1.366 configure.ac --- configure.ac 20 Jun 2005 15:52:16 -0000 1.366 +++ configure.ac 20 Jun 2005 20:16:14 -0000 @@ -1276,6 +1276,7 @@ AC_C_INLINE AC_CHECK_TYPES([mode_t, off_t, pid_t, size_t, ssize_t, long long, fsblkcnt_t, fsfilcnt_t]) AC_CHECK_TYPES([sigset_t],,,[#include ]) +AC_CHECK_TYPES(intptr_t) AC_CACHE_CHECK([whether linux/input.h is for real], wine_cv_linux_input_h, Index: include/wine/unicode.h =================================================================== RCS file: /home/wine/wine/include/wine/unicode.h,v retrieving revision 1.32 diff -u -r1.32 unicode.h --- include/wine/unicode.h 28 Apr 2005 12:01:37 -0000 1.32 +++ include/wine/unicode.h 20 Jun 2005 20:16:14 -0000 @@ -31,6 +31,17 @@ #define WINE_UNICODE_API DECLSPEC_IMPORT #endif +#include +#include + +#ifdef HAVE_INTPTR_T +#define discard_const(ptr) ((void *)((intptr_t)(ptr))) +#else +#define discard_const(ptr) ((void *)(ptr)) +#endif +#define discard_const_p(type, ptr) ((type *)discard_const(ptr)) + + /* code page info common to SBCS and DBCS */ struct cp_info { @@ -215,20 +226,20 @@ static inline WCHAR *strchrW( const WCHAR *str, WCHAR ch ) { - for ( ; *str; str++) if (*str == ch) return (WCHAR *)str; + for ( ; *str; str++) if (*str == ch) return discard_const_p(WCHAR, str); return NULL; } static inline WCHAR *strrchrW( const WCHAR *str, WCHAR ch ) { WCHAR *ret = NULL; - for ( ; *str; str++) if (*str == ch) ret = (WCHAR *)str; + for ( ; *str; str++) if (*str == ch) ret = discard_const_p(WCHAR, str); return ret; } static inline WCHAR *strpbrkW( const WCHAR *str, const WCHAR *accept ) { - for ( ; *str; str++) if (strchrW( accept, *str )) return (WCHAR *)str; + for ( ; *str; str++) if (strchrW( accept, *str )) return discard_const_p(WCHAR, str); return NULL; } @@ -263,7 +274,7 @@ static inline WCHAR *memchrW( const WCHAR *ptr, WCHAR ch, size_t n ) { const WCHAR *end; - for (end = ptr + n; ptr < end; ptr++) if (*ptr == ch) return (WCHAR *)ptr; + for (end = ptr + n; ptr < end; ptr++) if (*ptr == ch) return discard_const_p(WCHAR, ptr); return NULL; } @@ -271,7 +282,7 @@ { const WCHAR *end, *ret = NULL; for (end = ptr + n; ptr < end; ptr++) if (*ptr == ch) ret = ptr; - return (WCHAR *)ret; + return discard_const_p(WCHAR , ret); } static inline long int atolW( const WCHAR *str )