aboutsummaryrefslogtreecommitdiffstats
path: root/src/include/stddef.h
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2013-04-28 17:43:37 +0100
committerMichael Brown <mcb30@ipxe.org>2013-04-28 17:43:37 +0100
commit1aca99f3cf46fc8551895b30d974ade52a2ba489 (patch)
tree583f57e4b2ec7d6310312000626cd6642a826bde /src/include/stddef.h
parent4678864ce65d5f3f3ae6399e152448d848bd8027 (diff)
downloadipxe-1aca99f3cf46fc8551895b30d974ade52a2ba489.tar.gz
[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>
Diffstat (limited to 'src/include/stddef.h')
-rw-r--r--src/include/stddef.h4
1 files changed, 2 insertions, 2 deletions
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;