xref: /freebsd/contrib/llvm-project/libcxx/include/stddef.h (revision 349cc55c9796c4596a5b9904cd3281af295f878f)
10b57cec5SDimitry Andric // -*- C++ -*-
2*349cc55cSDimitry Andric //===----------------------------------------------------------------------===//
30b57cec5SDimitry Andric //
40b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
50b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
60b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
70b57cec5SDimitry Andric //
80b57cec5SDimitry Andric //===----------------------------------------------------------------------===//
90b57cec5SDimitry Andric 
100b57cec5SDimitry Andric #if defined(__need_ptrdiff_t) || defined(__need_size_t) || \
110b57cec5SDimitry Andric     defined(__need_wchar_t) || defined(__need_NULL) || defined(__need_wint_t)
120b57cec5SDimitry Andric 
130b57cec5SDimitry Andric #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
140b57cec5SDimitry Andric #pragma GCC system_header
150b57cec5SDimitry Andric #endif
160b57cec5SDimitry Andric 
170b57cec5SDimitry Andric #include_next <stddef.h>
180b57cec5SDimitry Andric 
190b57cec5SDimitry Andric #elif !defined(_LIBCPP_STDDEF_H)
200b57cec5SDimitry Andric #define _LIBCPP_STDDEF_H
210b57cec5SDimitry Andric 
220b57cec5SDimitry Andric /*
230b57cec5SDimitry Andric     stddef.h synopsis
240b57cec5SDimitry Andric 
250b57cec5SDimitry Andric Macros:
260b57cec5SDimitry Andric 
270b57cec5SDimitry Andric     offsetof(type,member-designator)
280b57cec5SDimitry Andric     NULL
290b57cec5SDimitry Andric 
300b57cec5SDimitry Andric Types:
310b57cec5SDimitry Andric 
320b57cec5SDimitry Andric     ptrdiff_t
330b57cec5SDimitry Andric     size_t
345ffd83dbSDimitry Andric     max_align_t // C++11
350b57cec5SDimitry Andric     nullptr_t
360b57cec5SDimitry Andric 
370b57cec5SDimitry Andric */
380b57cec5SDimitry Andric 
390b57cec5SDimitry Andric #include <__config>
400b57cec5SDimitry Andric 
410b57cec5SDimitry Andric #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
420b57cec5SDimitry Andric #pragma GCC system_header
430b57cec5SDimitry Andric #endif
440b57cec5SDimitry Andric 
450b57cec5SDimitry Andric #include_next <stddef.h>
460b57cec5SDimitry Andric 
470b57cec5SDimitry Andric #ifdef __cplusplus
480b57cec5SDimitry Andric 
490b57cec5SDimitry Andric extern "C++" {
500b57cec5SDimitry Andric #include <__nullptr>
510b57cec5SDimitry Andric using std::nullptr_t;
520b57cec5SDimitry Andric }
530b57cec5SDimitry Andric 
540b57cec5SDimitry Andric #endif
550b57cec5SDimitry Andric 
560b57cec5SDimitry Andric #endif // _LIBCPP_STDDEF_H
57