Browse Source

[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>
tags/v1.20.1
Michael Brown 11 years ago
parent
commit
1aca99f3cf
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      src/include/stddef.h

+ 2
- 2
src/include/stddef.h View File

@@ -23,10 +23,10 @@ FILE_LICENCE ( GPL2_ONLY );
23 23
 
24 24
 /* __WCHAR_TYPE__ is defined by gcc and will change if -fshort-wchar is used */
25 25
 #ifndef __WCHAR_TYPE__
26
-#define __WCHAR_TYPE__ long int
26
+#define __WCHAR_TYPE__ uint16_t
27 27
 #endif
28 28
 #ifndef __WINT_TYPE__
29
-#define __WINT_TYPE__ long int
29
+#define __WINT_TYPE__ int
30 30
 #endif
31 31
 typedef __WCHAR_TYPE__ wchar_t;
32 32
 typedef __WINT_TYPE__ wint_t;

Loading…
Cancel
Save