diff options
| author | Michael Matz <matz@suse.de> | 2014-04-07 00:26:36 +0200 |
|---|---|---|
| committer | Michael Matz <matz@suse.de> | 2014-04-07 00:27:46 +0200 |
| commit | 0961a38493c545cd23a791cf66b45d8fc78accbd (patch) | |
| tree | ab3a34678bcf4d1dcd933a3637ac3abbc03c8fc5 /include | |
| parent | 0e43f3aef401f87030a540646f061b025a5a130b (diff) | |
| download | tinycc-0961a38493c545cd23a791cf66b45d8fc78accbd.tar.gz tinycc-0961a38493c545cd23a791cf66b45d8fc78accbd.tar.bz2 | |
Declare wint_t in <stddef.h> when needed
Some old glibcs <wctype.h> require <stddef.h> to provide
wint_t, accomodate them.
Diffstat (limited to 'include')
| -rw-r--r-- | include/stddef.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/stddef.h b/include/stddef.h index fbc61fc..eaf0669 100644 --- a/include/stddef.h +++ b/include/stddef.h @@ -26,3 +26,18 @@ typedef unsigned long long int uint64_t; void *alloca(size_t size); #endif + +/* Older glibc require a wint_t from <stddef.h> (when requested + by __need_wint_t, as otherwise stddef.h isn't allowed to + define this type). Note that this must be outside the normal + _STDDEF_H guard, so that it works even when we've included the file + already (without requring wint_t). Some other libs define _WINT_T + if they've already provided that type, so we can use that as guard. + TCC defines __WINT_TYPE__ for us. */ +#if defined (__need_wint_t) +#ifndef _WINT_T +#define _WINT_T +typedef __WINT_TYPE__ wint_t; +#endif +#undef __need_wint_t +#endif |
