From: Michael Brown Date: Tue, 7 Oct 2008 21:27:55 +0000 (+0100) Subject: [libc] Define wchar_t in a gcc-compatible way X-Git-Tag: v0.9.6~112 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=160b950af816d193509d5ce704a8d9e709aab912;p=thirdparty%2Fipxe.git [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. --- diff --git a/src/include/stddef.h b/src/include/stddef.h index 6f91d2191..11ea93456 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 */