X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fwchar.in.h;fp=lib%2Fwchar.in.h;h=8534acb789447985cf4ddabea9b552a1b3160dde;hb=2210a2b11c43222262e65d7200bb094dc6d052d3;hp=f76f371ace52a288f2d481fbe3ee51a7dd82d9eb;hpb=82d47b6ea0888839c20d60efad01b50fc21fc27c;p=gnulib.git diff --git a/lib/wchar.in.h b/lib/wchar.in.h index f76f371ac..8534acb78 100644 --- a/lib/wchar.in.h +++ b/lib/wchar.in.h @@ -98,6 +98,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