stddef.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. #if defined(__need_ptrdiff_t) || defined(__need_size_t) || \
  10. defined(__need_wchar_t) || defined(__need_NULL) || defined(__need_wint_t)
  11. #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
  12. # pragma GCC system_header
  13. #endif
  14. #include_next <stddef.h>
  15. #elif !defined(_LIBCPP_STDDEF_H)
  16. #define _LIBCPP_STDDEF_H
  17. /*
  18. stddef.h synopsis
  19. Macros:
  20. offsetof(type,member-designator)
  21. NULL
  22. Types:
  23. ptrdiff_t
  24. size_t
  25. max_align_t // C++11
  26. nullptr_t
  27. */
  28. #include <__config>
  29. #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
  30. # pragma GCC system_header
  31. #endif
  32. # if __has_include_next(<stddef.h>)
  33. # include_next <stddef.h>
  34. # endif
  35. #ifdef __cplusplus
  36. typedef decltype(nullptr) nullptr_t;
  37. #endif
  38. #endif // _LIBCPP_STDDEF_H