aruu

[MIRROR] Actual replacement for Busybox | suckless
git clone https://git.daat.foo/aruu.git
Log | Files | Refs | README | LICENSE

stddef.h (1084B)


      1 #ifndef _STDDEF_H
      2 #define _STDDEF_H
      3 
      4 typedef __SIZE_TYPE__    size_t;
      5 typedef __PTRDIFF_TYPE__ ssize_t;
      6 typedef __WCHAR_TYPE__   wchar_t;
      7 typedef __PTRDIFF_TYPE__ ptrdiff_t;
      8 typedef __PTRDIFF_TYPE__ intptr_t;
      9 typedef __SIZE_TYPE__    uintptr_t;
     10 
     11 #if __STDC_VERSION__ >= 201112L
     12 typedef union {
     13   long long   __ll;
     14   long double __ld;
     15 } max_align_t;
     16 #endif
     17 
     18 #ifndef NULL
     19 #define NULL ((void *)0)
     20 #endif
     21 
     22 #undef offsetof
     23 #define offsetof(type, field) __builtin_offsetof(type, field)
     24 
     25 void *alloca(size_t size);
     26 
     27 #endif
     28 
     29 /* some older libcs require a wint_t from <stddef.h> (when requested
     30  * by __need_wint_t, as otherwise stddef.h isnt allowed to
     31  * define this type). note that this must be outside the normal
     32  * _STDDEF_H guard, so that it works even when we've included the file
     33  * already (without requiring wint_t). some other libs define _WINT_T
     34  * if they've already provided that type, so we can use that as guard
     35  * TCC defines __WINT_TYPE__ for us */
     36 #if defined(__need_wint_t)
     37 #ifndef _WINT_T
     38 #define _WINT_T
     39 typedef __WINT_TYPE__ wint_t;
     40 #endif
     41 #undef __need_wint_t
     42 #endif