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