| 1 | // -*- C++ -*- |
| 2 | //===----------------------------------------------------------------------===// |
| 3 | // |
| 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 |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | /* |
| 11 | stddef.h synopsis |
| 12 | |
| 13 | Macros: |
| 14 | |
| 15 | offsetof(type,member-designator) |
| 16 | NULL |
| 17 | |
| 18 | Types: |
| 19 | |
| 20 | ptrdiff_t |
| 21 | size_t |
| 22 | max_align_t // C++11 |
| 23 | nullptr_t |
| 24 | |
| 25 | */ |
| 26 | |
| 27 | #if defined(__cplusplus) && __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS) |
| 28 | # include <__cxx03/stddef.h> |
| 29 | #else |
| 30 | # include <__config> |
| 31 | |
| 32 | # if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) |
| 33 | # pragma GCC system_header |
| 34 | # endif |
| 35 | |
| 36 | // Note: This include is outside of header guards because we sometimes get included multiple times |
| 37 | // with different defines and the underlying <stddef.h> will know how to deal with that. |
| 38 | # include_next <stddef.h> |
| 39 | |
| 40 | # ifndef _LIBCPP_STDDEF_H |
| 41 | # define _LIBCPP_STDDEF_H |
| 42 | |
| 43 | # ifdef __cplusplus |
| 44 | typedef decltype(nullptr) nullptr_t; |
| 45 | # endif |
| 46 | # endif // defined(__cplusplus) && __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS) |
| 47 | |
| 48 | #endif // _LIBCPP_STDDEF_H |
| 49 | |