cstdarg 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. #ifndef _LIBCPP_CSTDARG
  10. #define _LIBCPP_CSTDARG
  11. /*
  12. cstdarg synopsis
  13. Macros:
  14. type va_arg(va_list ap, type);
  15. void va_copy(va_list dest, va_list src); // C99
  16. void va_end(va_list ap);
  17. void va_start(va_list ap, parmN);
  18. namespace std
  19. {
  20. Types:
  21. va_list
  22. } // std
  23. */
  24. #include <__config>
  25. // <stdarg.h> is not provided by libc++
  26. #if __has_include(<stdarg.h>)
  27. # include <stdarg.h>
  28. # ifdef _LIBCPP_STDARG_H
  29. # error "If libc++ starts defining <stdarg.h>, the __has_include check should move to libc++'s <stdarg.h>"
  30. # endif
  31. #endif
  32. #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
  33. # pragma GCC system_header
  34. #endif
  35. _LIBCPP_BEGIN_NAMESPACE_STD
  36. using ::va_list _LIBCPP_USING_IF_EXISTS;
  37. _LIBCPP_END_NAMESPACE_STD
  38. #endif // _LIBCPP_CSTDARG