OSDN Git Service

Sorry, committed the wrong version of the last patch.
[pf3gnuchains/gcc-fork.git] / gcc / config / i386 / cross-stdarg.h
1 /* Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008
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 2, 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    You should have received a copy of the GNU General Public License
17    along with GCC; see the file COPYING.  If not, write to
18    the Free Software Foundation, 51 Franklin Street, Fifth Floor,
19    Boston, MA 02110-1301, USA.  */
20
21 /* As a special exception, if you include this header file into source
22    files compiled by GCC, this header file does not by itself cause
23    the resulting executable to be covered by the GNU General Public
24    License.  This exception does not however invalidate any other
25    reasons why the executable file might be covered by the GNU General
26    Public License.  */
27
28 #ifndef __CROSS_STDARG_H_INCLUDED
29 #define __CROSS_STDARG_H_INCLUDED
30
31 /* Make sure that for non x64 targets cross builtins are defined.  */
32 #ifndef __x86_64__
33 /* Call abi ms_abi.  */
34 #define __builtin_ms_va_list __builtin_va_list
35 #define __builtin_ms_va_copy __builtin_va_copy
36 #define __builtin_ms_va_start __builtin_va_start
37 #define __builtin_ms_va_end __builtin_va_end
38
39 /* Call abi sysv_abi.  */
40 #define __builtin_sysv_va_list __builtin_va_list
41 #define __builtin_sysv_va_copy __builtin_va_copy
42 #define __builtin_sysv_va_start __builtin_va_start
43 #define __builtin_sysv_va_end __builtin_va_end
44 #endif
45
46 #define __ms_va_copy(__d,__s) __builtin_ms_va_copy(__d,__s)
47 #define __ms_va_start(__v,__l) __builtin_ms_va_start(__v,__l)
48 #define __ms_va_arg(__v,__l)    __builtin_va_arg(__v,__l)
49 #define __ms_va_end(__v) __builtin_ms_va_end(__v)
50
51 #define __sysv_va_copy(__d,__s) __builtin_sysv_va_copy(__d,__s)
52 #define __sysv_va_start(__v,__l) __builtin_sysv_va_start(__v,__l)
53 #define __sysv_va_arg(__v,__l)  __builtin_va_arg(__v,__l)
54 #define __sysv_va_end(__v) __builtin_sysv_va_end(__v)
55
56 #ifndef __GNUC_SYSV_VA_LIST
57 #define __GNUC_SYSV_VA_LIST
58   typedef __builtin_sysv_va_list __gnuc_sysv_va_list;
59 #endif
60
61 #ifndef _SYSV_VA_LIST_DEFINED
62 #define _SYSV_VA_LIST_DEFINED
63   typedef __gnuc_sysv_va_list sysv_va_list;
64 #endif
65
66 #ifndef __GNUC_MS_VA_LIST
67 #define __GNUC_MS_VA_LIST
68   typedef __builtin_ms_va_list __gnuc_ms_va_list;
69 #endif
70
71 #ifndef _MS_VA_LIST_DEFINED
72 #define _MS_VA_LIST_DEFINED
73   typedef __gnuc_ms_va_list ms_va_list;
74 #endif
75
76 #endif /* __CROSS_STDARG_H_INCLUDED */