mirror of
https://github.com/ipxe/ipxe
synced 2026-02-28 03:11:18 +03:00
[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:
@@ -15,4 +15,10 @@
|
|||||||
const typeof( ((type *)0)->member ) *__mptr = (ptr); \
|
const typeof( ((type *)0)->member ) *__mptr = (ptr); \
|
||||||
(type *)( (char *)__mptr - offsetof(type,member) );})
|
(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 */
|
#endif /* STDDEF_H */
|
||||||
|
|||||||
Reference in New Issue
Block a user