getaddrinfo: add EAI_NODATA error code to distinguish NODATA vs NxDomain
[musl.git] / include / stddef.h
blobf25b86396e80a015490a6aec521cb38ab36ab118
1 #ifndef _STDDEF_H
2 #define _STDDEF_H
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
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
19 #include <bits/alltypes.h>
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
27 #endif