http://git.etherboot.org
/
people
/
sha0
/
gpxe.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
19a0452
)
[libc] Define wchar_t in a gcc-compatible way
author
Michael Brown
<mcb30@etherboot.org>
Tue, 7 Oct 2008 21:27:55 +0000
(22:27 +0100)
committer
Michael Brown
<mcb30@etherboot.org>
Tue, 7 Oct 2008 21:27:55 +0000
(22:27 +0100)
gcc defines the magic __WCHAR_TYPE__ macro, in order to convey
information about whether or not the user selected -fshort-wchar.
src/include/stddef.h
patch
|
blob
|
history
diff --git
a/src/include/stddef.h
b/src/include/stddef.h
index
6f91d21
..
11ea934
100644
(file)
--- 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 */