From: Michael Brown Date: Sun, 28 Apr 2013 16:43:37 +0000 (+0100) Subject: [build] Default to short wchar_t in stddef.h X-Git-Tag: v1.20.1~1524 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1aca99f3cf46fc8551895b30d974ade52a2ba489;p=thirdparty%2Fipxe.git [build] Default to short wchar_t in stddef.h sparse does not understand -fshort-wchar. Default to using uint16_t as a wchar_t if not explicitly specified by the compiler, to avoid large numbers of spurious warnings from sparse. Signed-off-by: Michael Brown --- diff --git a/src/include/stddef.h b/src/include/stddef.h index 20419bdf1..bf792771f 100644 --- a/src/include/stddef.h +++ b/src/include/stddef.h @@ -23,10 +23,10 @@ FILE_LICENCE ( GPL2_ONLY ); /* __WCHAR_TYPE__ is defined by gcc and will change if -fshort-wchar is used */ #ifndef __WCHAR_TYPE__ -#define __WCHAR_TYPE__ long int +#define __WCHAR_TYPE__ uint16_t #endif #ifndef __WINT_TYPE__ -#define __WINT_TYPE__ long int +#define __WINT_TYPE__ int #endif typedef __WCHAR_TYPE__ wchar_t; typedef __WINT_TYPE__ wint_t;