summaryrefslogtreecommitdiffstats
path: root/src/include/stddef.h
Commit message (Collapse)AuthorAgeFilesLines
* [libc] Allow container_of() to be used on volatile pointersMichael Brown2016-03-181-1/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [libc] Rewrite unrelicensable portions of stddef.hMichael Brown2015-03-021-11/+29
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Default to short wchar_t in stddef.hMichael Brown2013-04-281-2/+2
| | | | | | | | sparse does not understand -fshort-wchar. Default to using uint16_t as a wchar_t if not explicitly specified by the compiler, to avoid large numbers of spurious warnings from sparse. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Define __WINT_TYPE__ if necessaryMichael Brown2013-04-251-0/+3
| | | | | | | | sparse does not define __WCHAR_TYPE__ or __WINT_TYPE__. We already define __WCHAR_TYPE__ if the compiler does not do so; do the same for __WINT_TYPE__. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [libc] Add support for "%lc" and "%ls" format specifiersMichael Brown2012-07-191-0/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Really use __builtin_offsetof() when availableArkadiusz Miskiewicz2010-11-281-2/+2
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Use __builtin_offsetof() when availableMichael Brown2010-11-281-0/+4
| | | | | | | | | | | Some newer versions of gcc (observed with a patched gcc 4.5.1) seem to treat our offsetof() implementation as not being a compile-time constant. Fix by using __builtin_offsetof() when available. (As with the original offsetof() macro, this code is copied from the Linux kernel's stddef.h.) Reported-by: Arkadiusz Miskiewicz <arekm@maven.pl> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [legal] Add a selection of FILE_LICENCE declarationsMichael Brown2009-05-181-0/+2
| | | | | Add FILE_LICENCE declarations to almost all files that make up the various standard builds of gPXE.
* [libc] Define wchar_t in a gcc-compatible wayMichael Brown2008-10-071-0/+6
| | | | | gcc defines the magic __WCHAR_TYPE__ macro, in order to convey information about whether or not the user selected -fshort-wchar.
* Added container_of(). This seems about the best place to put it, sinceMichael Brown2006-03-231-2/+7
| | | | the definition of it uses offsetof(), and the two concepts are related.
* Merged mcb30-realmode-redesign back to HEADMichael Brown2005-04-081-0/+13