]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[build] Default to short wchar_t in stddef.h
authorMichael Brown <mcb30@ipxe.org>
Sun, 28 Apr 2013 16:43:37 +0000 (17:43 +0100)
committerMichael Brown <mcb30@ipxe.org>
Sun, 28 Apr 2013 16:43:37 +0000 (17:43 +0100)
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 <mcb30@ipxe.org>
src/include/stddef.h

index 20419bdf189c6cbfd69e3c9858472882e56d5d9b..bf792771f36d4f2f24137b9368f3e576906fb5ba 100644 (file)
@@ -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;