| 1 |
#ifndef _STDDEF_H |
| 2 |
#define _STDDEF_H |
| 3 |
|
| 4 |
#if __cplusplus >= 201103L |
| 5 |
#define NULL nullptr |
| 6 |
#elif defined(__cplusplus) |
| 7 |
#define NULL 0L |
| 8 |
#else |
| 9 |
#define NULL ((void*)0) |
| 10 |
#endif |
| 11 |
|
| 12 |
#define __NEED_ptrdiff_t |
| 13 |
#define __NEED_size_t |
| 14 |
#define __NEED_wchar_t |
| 15 |
#if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L |
| 16 |
#define __NEED_max_align_t |
| 17 |
#endif |
| 18 |
|
| 19 |
#include <bits/alltypes.h> |
| 20 |
|
| 21 |
#if __GNUC__ > 3 |
| 22 |
#define offsetof(type, member) __builtin_offsetof(type, member) |
| 23 |
#else |
| 24 |
#define offsetof(type, member) ((size_t)( (char *)&(((type *)0)->member) - (char *)0 )) |
| 25 |
#endif |
| 26 |
|
| 27 |
#endif |