diff options
author | Michael Brown <mcb30@etherboot.org> | 2008-10-07 22:27:55 +0100 |
---|---|---|
committer | Michael Brown <mcb30@etherboot.org> | 2008-10-07 22:27:55 +0100 |
commit | 160b950af816d193509d5ce704a8d9e709aab912 (patch) | |
tree | ce9925950fa5d91e7a2db6ee05ff048b6f4a996a /src/include/stddef.h | |
parent | 19a0452205baf114b505050d49ff6a826743954a (diff) | |
download | ipxe-160b950af816d193509d5ce704a8d9e709aab912.zip ipxe-160b950af816d193509d5ce704a8d9e709aab912.tar.gz ipxe-160b950af816d193509d5ce704a8d9e709aab912.tar.bz2 |
[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/include/stddef.h')
-rw-r--r-- | src/include/stddef.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/include/stddef.h b/src/include/stddef.h index 6f91d21..11ea934 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 */ |