cross-stdarg.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /* Copyright (C) 2002-2019 Free Software Foundation, Inc.
  2. This file is part of GCC.
  3. GCC is free software; you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation; either version 3, or (at your option)
  6. any later version.
  7. GCC is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. Under Section 7 of GPL version 3, you are granted additional
  12. permissions described in the GCC Runtime Library Exception, version
  13. 3.1, as published by the Free Software Foundation.
  14. You should have received a copy of the GNU General Public License and
  15. a copy of the GCC Runtime Library Exception along with this program;
  16. see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
  17. <http://www.gnu.org/licenses/>. */
  18. #ifndef __CROSS_STDARG_H_INCLUDED
  19. #define __CROSS_STDARG_H_INCLUDED
  20. /* Make sure that for non x64 targets cross builtins are defined. */
  21. #ifndef __x86_64__
  22. /* Call abi ms_abi. */
  23. #define __builtin_ms_va_list __builtin_va_list
  24. #define __builtin_ms_va_copy __builtin_va_copy
  25. #define __builtin_ms_va_start __builtin_va_start
  26. #define __builtin_ms_va_end __builtin_va_end
  27. /* Call abi sysv_abi. */
  28. #define __builtin_sysv_va_list __builtin_va_list
  29. #define __builtin_sysv_va_copy __builtin_va_copy
  30. #define __builtin_sysv_va_start __builtin_va_start
  31. #define __builtin_sysv_va_end __builtin_va_end
  32. #endif
  33. #define __ms_va_copy(__d,__s) __builtin_ms_va_copy(__d,__s)
  34. #define __ms_va_start(__v,__l) __builtin_ms_va_start(__v,__l)
  35. #define __ms_va_arg(__v,__l) __builtin_va_arg(__v,__l)
  36. #define __ms_va_end(__v) __builtin_ms_va_end(__v)
  37. #define __sysv_va_copy(__d,__s) __builtin_sysv_va_copy(__d,__s)
  38. #define __sysv_va_start(__v,__l) __builtin_sysv_va_start(__v,__l)
  39. #define __sysv_va_arg(__v,__l) __builtin_va_arg(__v,__l)
  40. #define __sysv_va_end(__v) __builtin_sysv_va_end(__v)
  41. #ifndef __GNUC_SYSV_VA_LIST
  42. #define __GNUC_SYSV_VA_LIST
  43. typedef __builtin_sysv_va_list __gnuc_sysv_va_list;
  44. #endif
  45. #ifndef _SYSV_VA_LIST_DEFINED
  46. #define _SYSV_VA_LIST_DEFINED
  47. typedef __gnuc_sysv_va_list sysv_va_list;
  48. #endif
  49. #ifndef __GNUC_MS_VA_LIST
  50. #define __GNUC_MS_VA_LIST
  51. typedef __builtin_ms_va_list __gnuc_ms_va_list;
  52. #endif
  53. #ifndef _MS_VA_LIST_DEFINED
  54. #define _MS_VA_LIST_DEFINED
  55. typedef __gnuc_ms_va_list ms_va_list;
  56. #endif
  57. #endif /* __CROSS_STDARG_H_INCLUDED */