1 /* Common definitions <stddef.h> 2 3 This file is part of the Public Domain C Library (PDCLib). 4 Permission is granted to use, modify, and / or redistribute at will. 5 */ 6 7 #ifndef _PDCLIB_STDDEF_H 8 #define _PDCLIB_STDDEF_H _PDCLIB_STDDEF_H 9 10 #ifdef __cplusplus 11 extern "C" { 12 #endif 13 14 #include "pdclib/_PDCLIB_lib_ext1.h" 15 #include "pdclib/_PDCLIB_internal.h" 16 17 typedef _PDCLIB_ptrdiff_t ptrdiff_t; 18 19 #ifndef _PDCLIB_SIZE_T_DEFINED 20 #define _PDCLIB_SIZE_T_DEFINED _PDCLIB_SIZE_T_DEFINED 21 typedef _PDCLIB_size_t size_t; 22 #endif 23 24 #ifndef __cplusplus 25 typedef _PDCLIB_wchar_t wchar_t; 26 #endif 27 28 #ifndef _PDCLIB_NULL_DEFINED 29 #define _PDCLIB_NULL_DEFINED _PDCLIB_NULL_DEFINED 30 #define NULL _PDCLIB_NULL 31 #endif 32 33 #define offsetof( type, member ) _PDCLIB_offsetof( type, member ) 34 35 /* Annex K -- Bounds-checking interfaces */ 36 37 #if ( __STDC_WANT_LIB_EXT1__ + 0 ) != 0 38 #ifndef _PDCLIB_RSIZE_T_DEFINED 39 #define _PDCLIB_RSIZE_T_DEFINED _PDCLIB_RSIZE_T_DEFINED 40 typedef size_t rsize_t; 41 #endif 42 #endif 43 44 /* Extension hook for downstream projects that want to have non-standard 45 extensions to standard headers. 46 */ 47 #ifdef _PDCLIB_EXTEND_STDDEF_H 48 #include _PDCLIB_EXTEND_STDDEF_H 49 #endif 50 51 #ifdef __cplusplus 52 } 53 #endif 54 55 #endif 56