summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Brown2008-10-07 23:27:55 +0200
committerMichael Brown2008-10-07 23:27:55 +0200
commit160b950af816d193509d5ce704a8d9e709aab912 (patch)
treece9925950fa5d91e7a2db6ee05ff048b6f4a996a /src
parent[libc] Add function declaration for main() in stdlib.h (diff)
downloadipxe-160b950af816d193509d5ce704a8d9e709aab912.tar.gz
ipxe-160b950af816d193509d5ce704a8d9e709aab912.tar.xz
ipxe-160b950af816d193509d5ce704a8d9e709aab912.zip
[libc] Define wchar_t in a gcc-compatible way
gcc defines the magic __WCHAR_TYPE__ macro, in order to convey information about whether or not the user selected -fshort-wchar.
Diffstat (limited to 'src')
-rw-r--r--src/include/stddef.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/include/stddef.h b/src/include/stddef.h
index 6f91d219..11ea9345 100644
--- a/src/include/stddef.h
+++ b/src/include/stddef.h
@@ -15,4 +15,10 @@
const typeof( ((type *)0)->member ) *__mptr = (ptr); \
(type *)( (char *)__mptr - offsetof(type,member) );})
+/* __WCHAR_TYPE__ is defined by gcc and will change if -fshort-wchar is used */
+#ifndef __WCHAR_TYPE__
+#define __WCHAR_TYPE__ long int
+#endif
+typedef __WCHAR_TYPE__ wchar_t;
+
#endif /* STDDEF_H */