X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fwctype.in.h;h=641e991fb5af4578bab9221646fe676b8588803b;hb=6815bc73969d38c2226cf6e3366c1e4f4f756ba0;hp=feef37dbe37d0385163d49d0961b007ef83e9935;hpb=0fd07686f8cf0e1f3e025f3598090d938dbf4e80;p=gnulib.git diff --git a/lib/wctype.in.h b/lib/wctype.in.h index feef37dbe..641e991fb 100644 --- a/lib/wctype.in.h +++ b/lib/wctype.in.h @@ -26,7 +26,7 @@ * wctrans_t, and wctype_t are not yet implemented. */ -#ifndef _GL_WCTYPE_H +#ifndef _@GUARD_PREFIX@_WCTYPE_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ @@ -52,13 +52,26 @@ # @INCLUDE_NEXT@ @NEXT_WCTYPE_H@ #endif -#ifndef _GL_WCTYPE_H -#define _GL_WCTYPE_H +#ifndef _@GUARD_PREFIX@_WCTYPE_H +#define _@GUARD_PREFIX@_WCTYPE_H /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ +/* Solaris 2.6 includes which includes which + #defines a number of identifiers in the application namespace. Revert + these #defines. */ +#ifdef __sun +# undef multibyte +# undef eucw1 +# undef eucw2 +# undef eucw3 +# undef scrw1 +# undef scrw2 +# undef scrw3 +#endif + /* Define wint_t and WEOF. (Also done in wchar.in.h.) */ #if !@HAVE_WINT_T@ && !defined wint_t # define wint_t int @@ -66,6 +79,18 @@ # define WEOF -1 # endif #else +/* MSVC defines wint_t as 'unsigned short' in . + This is too small: ISO C 99 section 7.24.1.(2) says that wint_t must be + "unchanged by default argument promotions". Override it. */ +# if defined _MSC_VER +# if !GNULIB_defined_wint_t +# include +typedef unsigned int rpl_wint_t; +# undef wint_t +# define wint_t rpl_wint_t +# define GNULIB_defined_wint_t 1 +# endif +# endif # ifndef WEOF # define WEOF ((wint_t) -1) # endif @@ -115,6 +140,10 @@ # define iswspace rpl_iswspace # define iswupper rpl_iswupper # define iswxdigit rpl_iswxdigit +# endif +# endif +# if @REPLACE_TOWLOWER@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define towlower rpl_towlower # define towupper rpl_towupper # endif @@ -258,7 +287,7 @@ iswxdigit } static inline wint_t -# if @REPLACE_ISWCNTRL@ +# if @REPLACE_TOWLOWER@ rpl_towlower # else towlower @@ -269,7 +298,7 @@ towlower } static inline wint_t -# if @REPLACE_ISWCNTRL@ +# if @REPLACE_TOWLOWER@ rpl_towupper # else towupper @@ -416,7 +445,7 @@ _GL_WARN_ON_USE (iswctype, "iswctype is unportable - " # endif #endif -#if @REPLACE_ISWCNTRL@ || defined __MINGW32__ +#if @REPLACE_TOWLOWER@ || defined __MINGW32__ _GL_CXXALIAS_RPL (towlower, wint_t, (wint_t wc)); _GL_CXXALIAS_RPL (towupper, wint_t, (wint_t wc)); #else @@ -466,5 +495,5 @@ _GL_WARN_ON_USE (towctrans, "towctrans is unportable - " #endif -#endif /* _GL_WCTYPE_H */ -#endif /* _GL_WCTYPE_H */ +#endif /* _@GUARD_PREFIX@_WCTYPE_H */ +#endif /* _@GUARD_PREFIX@_WCTYPE_H */