david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

[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.
This commit is contained in:
Michael Brown 2008-10-07 22:27:55 +01:00
parent 19a0452205
commit 160b950af8
1 changed files with 6 additions and 0 deletions

View File

@ -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 */