2
0
mirror of https://github.com/xcat2/xNBA.git synced 2024-11-29 12:49:49 +00:00

[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 <mcb30@ipxe.org>
This commit is contained in:
Michael Brown 2013-04-28 17:43:37 +01:00
parent 4678864ce6
commit 1aca99f3cf

View 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;