From 1aca99f3cf46fc8551895b30d974ade52a2ba489 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Sun, 28 Apr 2013 17:43:37 +0100 Subject: [PATCH] [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 --- src/include/stddef.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/include/stddef.h b/src/include/stddef.h index 20419bdf..bf792771 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;