diff options
author | Bernhard Schommer <bernhardschommer@gmail.com> | 2015-12-11 13:05:58 +0100 |
---|---|---|
committer | Bernhard Schommer <bernhardschommer@gmail.com> | 2015-12-11 13:05:58 +0100 |
commit | fd2d8d86daf9d63d5695c93f412a7cf549d312c6 (patch) | |
tree | e44d0c6afed8cb09f244626b96df71e084a070ec /runtime/include/stddef.h | |
parent | da4ca8a5313c6dc1f6015102b42dfbbeeb546dc7 (diff) | |
download | compcert-fd2d8d86daf9d63d5695c93f412a7cf549d312c6.tar.gz compcert-fd2d8d86daf9d63d5695c93f412a7cf549d312c6.zip |
More gcc/newlib compatibility code.
Some newlib headers use the __extension__ keyword which suppresses
warnings for gcc extensions in strict mode. CompCert now ignores
this keyword for the gnu backends.
Also it seems that stddef of the gcc defines wint_t even though
it should not. However some libs rely on this. So wint_t is now
defined in CompCert's stddef header.
Bug 17613.
Diffstat (limited to 'runtime/include/stddef.h')
-rw-r--r-- | runtime/include/stddef.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/runtime/include/stddef.h b/runtime/include/stddef.h index 31edf4ef..f61e87b4 100644 --- a/runtime/include/stddef.h +++ b/runtime/include/stddef.h @@ -13,7 +13,7 @@ * * Neither the name of the <organization> nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR @@ -90,6 +90,18 @@ typedef signed int wchar_t; #endif #endif +#if defined (__need_wint_t) +#ifndef _WINT_T +#define _WINT_T + +#ifndef __WINT_TYPE__ +#define __WINT_TYPE__ unsigned int +#endif +typedef __WINT_TYPE__ wint_t; +#endif +#undef __need_wint_t +#endif + #if defined(_STDDEF_H) || defined(__need_NULL) #ifndef NULL #define NULL 0 @@ -102,4 +114,3 @@ typedef signed int wchar_t; #endif #endif - |