/* ISO C Runtime Library Copyright (c) 1983-2020 Green Hills Software, Inc. This program is the property of Green Hills Software, Inc, its contents are proprietary information and no part of it is to be disclosed to anyone except employees of Green Hills Software, Inc., or as agreed in writing signed by the President of Green Hills Software, Inc. */ #ifndef _STDDEF_H #ifdef __ghs__ #pragma ghs startnomisra #endif #define _STDDEF_H #include "ghs_null.h" /* defines NULL and size_t */ #include "ghs_wchar.h" /* defines wchar_t */ #ifdef __cplusplus extern "C" { #endif #if defined(__ghs_max_pack_value) #pragma pack (push, __ghs_max_pack_value) #endif #ifndef _PTRDIFF_T #define _PTRDIFF_T # if (__PTR_BIT <= __INT_BIT) || (__INT_BIT == __LONG_BIT) typedef int ptrdiff_t; # elif (__PTR_BIT <= __LONG_BIT) || (__LONG_BIT == __LLONG_BIT) typedef long ptrdiff_t; # else typedef long long ptrdiff_t; # endif #endif /* _PTRDIFF_T */ #if (!defined(__MISRA_20_6) || (__MISRA_20_6 != 2)) && (!defined(__MISRA_120) || (__MISRA_120 != 2)) && !defined(__SC3__) #if defined(__GHS_OFFSETOF_OLD_FORM__) # define offsetof(type,id) ((size_t)(((char*)&(((type *)16)->id))-((char*)((type *)16)))) #elif defined(__GHS_NO_BUILTIN_OFFSETOF__) # define offsetof(t, memb) (__INTADDR__(&(((t *)0)->memb))) #else # define offsetof(t, memb) __builtin_offsetof(t, memb) #endif #endif /* __MISRA_20_6 */ #if (defined(__cplusplus) && (__cplusplus >= 201103L)) || \ (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)) typedef union { #if defined(__LLONG_BIT) long long __max_align_ll; #else long __max_align_l; #endif /* defined(__LLONG_BIT) */ #if !defined(__NoFloat) && !defined(__NoDouble) long double __max_align_ld; #endif /* !defined(__NoFloat) && !defined(__NoDouble) */ unsigned char __max_align_attr __attribute__((aligned(__ghs_alignment))); } max_align_t; // most aligned type #define __GHS_HAVE_MAX_ALIGN_T #endif /* (defined(__cplusplus) && (__cplusplus >= 201103L)) || (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)) */ #if defined(__cplusplus) && (__cplusplus >= 201103L) typedef decltype(nullptr) nullptr_t; #define __GHS_HAVE_NULLPTR_T #endif /* defined(__cplusplus) && (__cplusplus >= 201103L) */ #define __GHS_WANT_RSIZE_T 1 #include "ghs_annex_k.h" #if defined(__ghs_max_pack_value) #pragma pack(pop) #endif #ifdef __cplusplus } #endif #ifdef __ghs__ #pragma ghs endnomisra #endif #endif /* _STDDEF_H */