]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - include/stddef.h
Vendor import of libc++ trunk r256633:
[FreeBSD/FreeBSD.git] / include / stddef.h
1 // -*- C++ -*-
2 //===--------------------------- stddef.h ---------------------------------===//
3 //
4 //                     The LLVM Compiler Infrastructure
5 //
6 // This file is dual licensed under the MIT and the University of Illinois Open
7 // Source Licenses. See LICENSE.TXT for details.
8 //
9 //===----------------------------------------------------------------------===//
10
11 #if defined(__need_ptrdiff_t) || defined(__need_size_t) || \
12     defined(__need_wchar_t) || defined(__need_NULL) || defined(__need_wint_t)
13
14 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
15 #pragma GCC system_header
16 #endif
17
18 #include_next <stddef.h>
19
20 #elif !defined(_LIBCPP_STDDEF_H)
21 #define _LIBCPP_STDDEF_H
22
23 /*
24     stddef.h synopsis
25
26 Macros:
27
28     offsetof(type,member-designator)
29     NULL
30
31 Types:
32
33     ptrdiff_t
34     size_t
35     max_align_t
36     nullptr_t
37
38 */
39
40 #include <__config>
41
42 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
43 #pragma GCC system_header
44 #endif
45
46 #include_next <stddef.h>
47
48 #ifdef __cplusplus
49
50 extern "C++" {
51 #include <__nullptr>
52 using std::nullptr_t;
53 }
54
55 // Re-use the compiler's <stddef.h> max_align_t where possible.
56 #if !defined(__CLANG_MAX_ALIGN_T_DEFINED) && !defined(_GCC_MAX_ALIGN_T)
57 typedef long double max_align_t;
58 #endif
59
60 #endif
61
62 #endif  // _LIBCPP_STDDEF_H