stddef.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. #include_next <stddef.h>
  33. #ifdef __cplusplus
  34. typedef decltype(nullptr) nullptr_t;
  35. #endif
  36. #endif // _LIBCPP_STDDEF_H