1*0b57cec5SDimitry Andric // -*- C++ -*- 2*0b57cec5SDimitry Andric //===--------------------------- stddef.h ---------------------------------===// 3*0b57cec5SDimitry Andric // 4*0b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 5*0b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 6*0b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7*0b57cec5SDimitry Andric // 8*0b57cec5SDimitry Andric //===----------------------------------------------------------------------===// 9*0b57cec5SDimitry Andric 10*0b57cec5SDimitry Andric #if defined(__need_ptrdiff_t) || defined(__need_size_t) || \ 11*0b57cec5SDimitry Andric defined(__need_wchar_t) || defined(__need_NULL) || defined(__need_wint_t) 12*0b57cec5SDimitry Andric 13*0b57cec5SDimitry Andric #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 14*0b57cec5SDimitry Andric #pragma GCC system_header 15*0b57cec5SDimitry Andric #endif 16*0b57cec5SDimitry Andric 17*0b57cec5SDimitry Andric #include_next <stddef.h> 18*0b57cec5SDimitry Andric 19*0b57cec5SDimitry Andric #elif !defined(_LIBCPP_STDDEF_H) 20*0b57cec5SDimitry Andric #define _LIBCPP_STDDEF_H 21*0b57cec5SDimitry Andric 22*0b57cec5SDimitry Andric /* 23*0b57cec5SDimitry Andric stddef.h synopsis 24*0b57cec5SDimitry Andric 25*0b57cec5SDimitry Andric Macros: 26*0b57cec5SDimitry Andric 27*0b57cec5SDimitry Andric offsetof(type,member-designator) 28*0b57cec5SDimitry Andric NULL 29*0b57cec5SDimitry Andric 30*0b57cec5SDimitry Andric Types: 31*0b57cec5SDimitry Andric 32*0b57cec5SDimitry Andric ptrdiff_t 33*0b57cec5SDimitry Andric size_t 34*0b57cec5SDimitry Andric max_align_t 35*0b57cec5SDimitry Andric nullptr_t 36*0b57cec5SDimitry Andric 37*0b57cec5SDimitry Andric */ 38*0b57cec5SDimitry Andric 39*0b57cec5SDimitry Andric #include <__config> 40*0b57cec5SDimitry Andric 41*0b57cec5SDimitry Andric #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 42*0b57cec5SDimitry Andric #pragma GCC system_header 43*0b57cec5SDimitry Andric #endif 44*0b57cec5SDimitry Andric 45*0b57cec5SDimitry Andric #include_next <stddef.h> 46*0b57cec5SDimitry Andric 47*0b57cec5SDimitry Andric #ifdef __cplusplus 48*0b57cec5SDimitry Andric 49*0b57cec5SDimitry Andric extern "C++" { 50*0b57cec5SDimitry Andric #include <__nullptr> 51*0b57cec5SDimitry Andric using std::nullptr_t; 52*0b57cec5SDimitry Andric } 53*0b57cec5SDimitry Andric 54*0b57cec5SDimitry Andric // Re-use the compiler's <stddef.h> max_align_t where possible. 55*0b57cec5SDimitry Andric #if !defined(__CLANG_MAX_ALIGN_T_DEFINED) && !defined(_GCC_MAX_ALIGN_T) && \ 56*0b57cec5SDimitry Andric !defined(__DEFINED_max_align_t) && !defined(__NetBSD__) 57*0b57cec5SDimitry Andric typedef long double max_align_t; 58*0b57cec5SDimitry Andric #endif 59*0b57cec5SDimitry Andric 60*0b57cec5SDimitry Andric #endif 61*0b57cec5SDimitry Andric 62*0b57cec5SDimitry Andric #endif // _LIBCPP_STDDEF_H 63