Richard Smith | f88eeb7 | 2015-10-08 22:25:27 +0000 | [diff] [blame] | 1 | // -*- C++ -*- |
| 2 | //===--------------------------- stddef.h ---------------------------------===// |
| 3 | // |
Chandler Carruth | d201210 | 2019-01-19 10:56:40 +0000 | [diff] [blame] | 4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 5 | // See https://llvm.org/LICENSE.txt for license information. |
| 6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
Richard Smith | f88eeb7 | 2015-10-08 22:25:27 +0000 | [diff] [blame] | 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | #if defined(__need_ptrdiff_t) || defined(__need_size_t) || \ |
| 11 | defined(__need_wchar_t) || defined(__need_NULL) || defined(__need_wint_t) |
Richard Smith | 523b172 | 2015-10-09 00:26:50 +0000 | [diff] [blame] | 12 | |
| 13 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) |
| 14 | #pragma GCC system_header |
| 15 | #endif |
| 16 | |
Richard Smith | f88eeb7 | 2015-10-08 22:25:27 +0000 | [diff] [blame] | 17 | #include_next <stddef.h> |
| 18 | |
| 19 | #elif !defined(_LIBCPP_STDDEF_H) |
| 20 | #define _LIBCPP_STDDEF_H |
| 21 | |
| 22 | /* |
| 23 | stddef.h synopsis |
| 24 | |
| 25 | Macros: |
| 26 | |
| 27 | offsetof(type,member-designator) |
| 28 | NULL |
| 29 | |
| 30 | Types: |
| 31 | |
| 32 | ptrdiff_t |
| 33 | size_t |
Joerg Sonnenberger | 09c4ae5 | 2020-04-04 00:48:02 +0200 | [diff] [blame] | 34 | max_align_t // C++11 |
Richard Smith | f88eeb7 | 2015-10-08 22:25:27 +0000 | [diff] [blame] | 35 | nullptr_t |
| 36 | |
| 37 | */ |
| 38 | |
| 39 | #include <__config> |
Richard Smith | f88eeb7 | 2015-10-08 22:25:27 +0000 | [diff] [blame] | 40 | |
| 41 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) |
| 42 | #pragma GCC system_header |
| 43 | #endif |
| 44 | |
Richard Smith | 523b172 | 2015-10-09 00:26:50 +0000 | [diff] [blame] | 45 | #include_next <stddef.h> |
| 46 | |
Richard Smith | f88eeb7 | 2015-10-08 22:25:27 +0000 | [diff] [blame] | 47 | #ifdef __cplusplus |
| 48 | |
| 49 | extern "C++" { |
| 50 | #include <__nullptr> |
| 51 | using std::nullptr_t; |
| 52 | } |
| 53 | |
Richard Smith | f88eeb7 | 2015-10-08 22:25:27 +0000 | [diff] [blame] | 54 | #endif |
| 55 | |
| 56 | #endif // _LIBCPP_STDDEF_H |