put the contents of these header files around #ifdef __x86_64__, and

#include the <i386/foo.h> in the #else clause, making these files
largely bit-size independant.
This commit is contained in:
mrg 2008-10-26 00:08:15 +00:00
parent fb8d95d826
commit 433b5dde02
30 changed files with 277 additions and 51 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ansi.h,v 1.6 2007/10/17 19:53:03 garbled Exp $ */
/* $NetBSD: ansi.h,v 1.7 2008/10/26 00:08:15 mrg Exp $ */
/*-
* Copyright (c) 1990, 1993
@ -31,8 +31,10 @@
* @(#)ansi.h 8.2 (Berkeley) 1/4/94
*/
#ifndef _ANSI_H_
#define _ANSI_H_
#ifndef _X86_64_ANSI_H_
#define _X86_64_ANSI_H_
#ifdef __x86_64__
#include <sys/cdefs.h>
@ -76,4 +78,10 @@ typedef union {
} __mbstate_t;
#define _BSD_MBSTATE_T_ __mbstate_t /* mbstate_t */
#endif /* _ANSI_H_ */
#else /* !__x86_64__ */
#include <i386/ansi.h>
#endif /* __x86_64__ */
#endif /* _X86_64_ANSI_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: asm.h,v 1.12 2008/10/01 07:42:52 joerg Exp $ */
/* $NetBSD: asm.h,v 1.13 2008/10/26 00:08:15 mrg Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -37,6 +37,8 @@
#ifndef _AMD64_ASM_H_
#define _AMD64_ASM_H_
#ifdef __x86_64__
#ifdef PIC
#define PIC_PLT(x) x@PLT
#define PIC_GOT(x) x@GOTPCREL(%rip)
@ -128,4 +130,10 @@
.stabs __STRING(sym),1,0,0,0
#endif /* __STDC__ */
#else /* __x86_64__ */
#include <i386/asm.h>
#endif /* __x86_64__ */
#endif /* !_AMD64_ASM_H_ */

View File

@ -1,13 +1,21 @@
/* $NetBSD: bswap.h,v 1.2 2006/01/31 07:49:18 dsl Exp $ */
/* $NetBSD: bswap.h,v 1.3 2008/10/26 00:08:15 mrg Exp $ */
/* Written by Manuel Bouyer. Public domain */
#ifndef _MACHINE_BSWAP_H_
#define _MACHINE_BSWAP_H_
#ifndef _X86_64_BSWAP_H_
#define _X86_64_BSWAP_H_
#ifdef __x86_64__
#include <machine/byte_swap.h>
#define __BSWAP_RENAME
#include <sys/bswap.h>
#endif /* !_MACHINE_BSWAP_H_ */
#else /* __x86_64__ */
#include <i386/bswap.h>
#endif /* __x86_64__ */
#endif /* !_X86_64_BSWAP_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: byte_swap.h,v 1.5 2008/04/28 20:23:12 martin Exp $ */
/* $NetBSD: byte_swap.h,v 1.6 2008/10/26 00:08:15 mrg Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -36,6 +36,8 @@
#ifndef _AMD64_BYTE_SWAP_H_
#define _AMD64_BYTE_SWAP_H_
#ifdef __x86_64__
#ifdef __GNUC__
#include <sys/types.h>
__BEGIN_DECLS
@ -61,4 +63,10 @@ __byte_swap_u16_variable(uint16_t x)
__END_DECLS
#endif
#else /* __x86_64__ */
#include <i386/byte_swap.h>
#endif /* __x86_64__ */
#endif /* !_AMD64_BYTE_SWAP_H_ */

View File

@ -1,8 +1,8 @@
/* $NetBSD: cdefs.h,v 1.1 2003/04/26 18:39:39 fvdl Exp $ */
/* $NetBSD: cdefs.h,v 1.2 2008/10/26 00:08:15 mrg Exp $ */
#ifndef _MACHINE_CDEFS_H_
#define _MACHINE_CDEFS_H_
#ifndef _X86_64_CDEFS_H_
#define _X86_64_CDEFS_H_
/* No arch-specific cdefs. */
#endif /* !_MACHINE_CDEFS_H_ */
#endif /* !_X86_64_CDEFS_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: cpu.h,v 1.57 2008/05/22 13:55:51 ad Exp $ */
/* $NetBSD: cpu.h,v 1.58 2008/10/26 00:08:15 mrg Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -37,6 +37,8 @@
#ifndef _AMD64_CPU_H_
#define _AMD64_CPU_H_
#ifdef __x86_64__
#include <x86/cpu.h>
#ifdef _KERNEL
@ -89,4 +91,10 @@ cpu_set_curpri(int pri)
#endif /* _KERNEL */
#else /* __x86_64__ */
#include <i386/cpu.h>
#endif /* __x86_64__ */
#endif /* !_AMD64_CPU_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: db_machdep.h,v 1.6 2007/02/21 22:59:37 thorpej Exp $ */
/* $NetBSD: db_machdep.h,v 1.7 2008/10/26 00:08:15 mrg Exp $ */
/*
* Mach Operating System
@ -26,8 +26,8 @@
* the rights to redistribute these changes.
*/
#ifndef _I386_DB_MACHDEP_H_
#define _I386_DB_MACHDEP_H_
#ifndef _X86_64_DB_MACHDEP_H_
#define _X86_64_DB_MACHDEP_H_
/*
* Machine-dependent defines for new kernel debugger.
@ -135,4 +135,4 @@ extern void db_machine_init __P((void));
extern void cpu_debug_dump __P((void));
#endif /* _I386_DB_MACHDEP_H_ */
#endif /* _X86_64_DB_MACHDEP_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: disklabel.h,v 1.6 2005/12/11 12:16:25 christos Exp $ */
/* $NetBSD: disklabel.h,v 1.7 2008/10/26 00:08:15 mrg Exp $ */
/*
* Copyright (c) 1994 Christopher G. Demetriou
@ -30,8 +30,10 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef _MACHINE_DISKLABEL_H_
#define _MACHINE_DISKLABEL_H_
#ifndef _X86_64_DISKLABEL_H_
#define _X86_64_DISKLABEL_H_
#ifdef __x86_64__
#define LABELSECTOR 1 /* sector containing label */
#define LABELOFFSET 0 /* offset of label in sector */
@ -61,4 +63,10 @@ struct cpu_disklabel {
};
#endif
#endif /* _MACHINE_DISKLABEL_H_ */
#else /* __x86_64__ */
#include <i386/disklabel.h>
#endif /* __x86_64__ */
#endif /* _X86_64_DISKLABEL_H_ */

View File

@ -1,4 +1,6 @@
/* $NetBSD: elf_machdep.h,v 1.1 2003/04/26 18:39:40 fvdl Exp $ */
/* $NetBSD: elf_machdep.h,v 1.2 2008/10/26 00:08:15 mrg Exp $ */
#ifdef __x86_64__
#define ELF32_MACHDEP_ENDIANNESS ELFDATA2LSB
#define ELF32_MACHDEP_ID_CASES \
@ -35,3 +37,9 @@
#define R_X86_64_PC8 15
#define R_TYPE(name) __CONCAT(R_X86_64_,name)
#else /* __x86_64__ */
#include <i386/elf_machdep.h>
#endif /* __x86_64__ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: frame.h,v 1.14 2008/04/28 20:23:12 martin Exp $ */
/* $NetBSD: frame.h,v 1.15 2008/10/26 00:08:15 mrg Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -70,6 +70,8 @@
#ifndef _AMD64_FRAME_H_
#define _AMD64_FRAME_H_
#ifdef __x86_64__
#include <sys/signal.h>
#include <machine/fpu.h>
#include <machine/frame_regs.h>
@ -120,4 +122,10 @@ struct sigframe_siginfo {
void buildcontext(struct lwp *, void *, void *);
#endif
#else /* __x86_64__ */
#include <i386/frame.h>
#endif /* __x86_64__ */
#endif /* _AMD64_FRAME_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: int_const.h,v 1.2 2008/04/28 20:23:12 martin Exp $ */
/* $NetBSD: int_const.h,v 1.3 2008/10/26 00:08:15 mrg Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -32,6 +32,8 @@
#ifndef _AMD64_INT_CONST_H_
#define _AMD64_INT_CONST_H_
#ifdef __x86_64__
/*
* 7.18.4 Macros for integer constants
*/
@ -53,4 +55,10 @@
#define INTMAX_C(c) c ## L
#define UINTMAX_C(c) c ## UL
#else /* __x86_64__ */
#include <i386/int_const.h>
#endif /* __x86_64__ */
#endif /* !_AMD64_INT_CONST_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: int_fmtio.h,v 1.5 2008/04/28 20:23:12 martin Exp $ */
/* $NetBSD: int_fmtio.h,v 1.6 2008/10/26 00:08:15 mrg Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -32,6 +32,8 @@
#ifndef _AMD64_INT_FMTIO_H_
#define _AMD64_INT_FMTIO_H_
#ifdef __x86_64__
/*
* 7.8.1 Macros for format specifiers
*/
@ -209,4 +211,10 @@
#define SCNxMAX "lx" /* uintmax_t */
#define SCNxPTR "lx" /* uintptr_t */
#else /* __x86_64__ */
#include <i386/int_fmtio.h>
#endif /* __x86_64__ */
#endif /* !_AMD64_INT_FMTIO_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: int_limits.h,v 1.6 2008/04/28 20:23:12 martin Exp $ */
/* $NetBSD: int_limits.h,v 1.7 2008/10/26 00:08:15 mrg Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -32,6 +32,8 @@
#ifndef _AMD64_INT_LIMITS_H_
#define _AMD64_INT_LIMITS_H_
#ifdef __x86_64__
/*
* 7.18.2 Limits of specified-width integer types
*/
@ -124,4 +126,10 @@
/* limit of size_t */
#define SIZE_MAX 0xffffffffffffffffUL /* size_t */
#else /* __x86_64__ */
#include <i386/int_limits.h>
#endif /* __x86_64__ */
#endif /* !_AMD64_INT_LIMITS_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: int_mwgwtypes.h,v 1.6 2008/04/28 20:23:12 martin Exp $ */
/* $NetBSD: int_mwgwtypes.h,v 1.7 2008/10/26 00:08:15 mrg Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -32,6 +32,8 @@
#ifndef _AMD64_INT_MWGWTYPES_H_
#define _AMD64_INT_MWGWTYPES_H_
#ifdef __x86_64__
/*
* 7.18.1 Integer types
*/
@ -62,4 +64,10 @@ typedef unsigned long int uint_fast64_t;
typedef long int intmax_t;
typedef unsigned long int uintmax_t;
#else /* __x86_64__ */
#include <i386/int_mwgwtypes.h>
#endif /* __x86_64__ */
#endif /* !_AMD64_INT_MWGWTYPES_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: int_types.h,v 1.5 2005/12/24 20:06:47 perry Exp $ */
/* $NetBSD: int_types.h,v 1.6 2008/10/26 00:08:15 mrg Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -34,6 +34,8 @@
#ifndef _AMD64_INT_TYPES_H_
#define _AMD64_INT_TYPES_H_
#ifdef __x86_64__
#include <sys/cdefs.h>
/*
@ -58,4 +60,10 @@ typedef unsigned long int __uint64_t;
typedef long __intptr_t;
typedef unsigned long __uintptr_t;
#else /* __x86_64__ */
#include <i386/int_types.h>
#endif /* __x86_64__ */
#endif /* !_AMD64_INT_TYPES_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: limits.h,v 1.9 2007/10/17 19:53:04 garbled Exp $ */
/* $NetBSD: limits.h,v 1.10 2008/10/26 00:08:15 mrg Exp $ */
/*
* Copyright (c) 1988 The Regents of the University of California.
@ -31,8 +31,10 @@
* @(#)limits.h 7.2 (Berkeley) 6/28/90
*/
#ifndef _MACHINE_LIMITS_H_
#define _MACHINE_LIMITS_H_
#ifndef _X86_64_LIMITS_H_
#define _X86_64_LIMITS_H_
#ifdef __x86_64__
#include <sys/featuretest.h>
@ -92,4 +94,10 @@
#define FLT_MIN 1.17549435E-38F
#endif
#endif /* _MACHINE_LIMITS_H_ */
#else /* __x86_64__ */
#include <i386/limits.h>
#endif /* __x86_64__ */
#endif /* _X86_64_LIMITS_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: mcontext.h,v 1.10 2008/04/28 20:23:12 martin Exp $ */
/* $NetBSD: mcontext.h,v 1.11 2008/10/26 00:08:15 mrg Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -32,6 +32,8 @@
#ifndef _AMD64_MCONTEXT_H_
#define _AMD64_MCONTEXT_H_
#ifdef __x86_64__
#include <machine/frame_regs.h>
/*
@ -129,4 +131,10 @@ int check_mcontext(struct lwp *, const mcontext_t *, struct trapframe *);
#endif /* _KERNEL */
#else /* __x86_64__ */
#include <i386/mcontext.h>
#endif /* __x86_64__ */
#endif /* !_AMD64_MCONTEXT_H_ */

View File

@ -1,4 +1,6 @@
/* $NetBSD: param.h,v 1.8 2008/01/08 13:15:02 yamt Exp $ */
/* $NetBSD: param.h,v 1.9 2008/10/26 00:08:15 mrg Exp $ */
#ifdef __x86_64__
#ifdef _KERNEL
#include <machine/cpu.h>
@ -127,3 +129,9 @@
#define round_pdr(x) x86_round_pdr(x)
#define mstohz(ms) ((ms + 0UL) * hz / 1000)
#else /* __x86_64__ */
#include <i386/param.h>
#endif /* __x86_64__ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: pcb.h,v 1.14 2008/04/30 21:04:24 ad Exp $ */
/* $NetBSD: pcb.h,v 1.15 2008/10/26 00:08:15 mrg Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -70,6 +70,8 @@
#ifndef _AMD64_PCB_H_
#define _AMD64_PCB_H_
#ifdef __x86_64__
#include <sys/signal.h>
#include <machine/segments.h>
@ -112,4 +114,10 @@ struct md_coredump {
long md_pad[8];
};
#else /* __x86_64__ */
#include <i386/pcb.h>
#endif /* __x86_64__ */
#endif /* _AMD64_PCB_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.h,v 1.21 2008/01/23 19:46:43 bouyer Exp $ */
/* $NetBSD: pmap.h,v 1.22 2008/10/26 00:08:15 mrg Exp $ */
/*
*
@ -70,6 +70,8 @@
#ifndef _AMD64_PMAP_H_
#define _AMD64_PMAP_H_
#ifdef __x86_64__
#if defined(_KERNEL_OPT)
#include "opt_xen.h"
#endif
@ -341,4 +343,10 @@ pmap_pte_flush(void)
void pmap_prealloc_lowmem_ptps(void);
void pmap_changeprot_local(vaddr_t, vm_prot_t);
#else /* __x86_64__ */
#include <i386/pmap.h>
#endif /* __x86_64__ */
#endif /* _AMD64_PMAP_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: proc.h,v 1.10 2008/06/05 21:09:12 ad Exp $ */
/* $NetBSD: proc.h,v 1.11 2008/10/26 00:08:15 mrg Exp $ */
/*
* Copyright (c) 1991 Regents of the University of California.
@ -34,6 +34,8 @@
#ifndef _AMD64_PROC_H
#define _AMD64_PROC_H
#ifdef __x86_64__
#include <sys/user.h> /* for sizeof(struct user) */
#include <machine/frame.h>
@ -68,4 +70,10 @@ struct mdproc {
#define KSTACK_LOWEST_ADDR(l) ((void *)USER_TO_UAREA((l)->l_addr))
#define KSTACK_SIZE UAREA_USER_OFFSET
#else /* __x86_64__ */
#include <i386/proc.h>
#endif /* __x86_64__ */
#endif /* _AMD64_PROC_H */

View File

@ -1,4 +1,4 @@
/* $NetBSD: profile.h,v 1.14 2008/05/25 15:57:50 chs Exp $ */
/* $NetBSD: profile.h,v 1.15 2008/10/26 00:08:15 mrg Exp $ */
/*
* Copyright (c) 1992, 1993
@ -31,6 +31,8 @@
* @(#)profile.h 8.1 (Berkeley) 6/11/93
*/
#ifdef __x86_64__
#ifdef _KERNEL_OPT
#include "opt_multiprocessor.h"
#include "opt_xen.h"
@ -158,3 +160,9 @@ mcount_write_psl(u_long ef)
mcount_write_psl(s);
#endif /* _KERNEL */
#else /* __x86_64__ */
#include <i386/profile.h>
#endif /* __x86_64__ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: reg.h,v 1.6 2008/01/05 12:08:51 dsl Exp $ */
/* $NetBSD: reg.h,v 1.7 2008/10/26 00:08:15 mrg Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -37,6 +37,8 @@
#ifndef _AMD64_REG_H_
#define _AMD64_REG_H_
#ifdef __x86_64__
#include <machine/fpu.h>
#include <machine/mcontext.h>
@ -71,4 +73,10 @@ struct fpreg {
#define fp_st fxstate.fx_st
#define fp_xmm fxstate.fx_xmm
#else /* __x86_64__ */
#include <i386/reg.h>
#endif /* __x86_64__ */
#endif /* !_AMD64_REG_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: segments.h,v 1.18 2008/04/19 12:10:08 cegger Exp $ */
/* $NetBSD: segments.h,v 1.19 2008/10/26 00:08:15 mrg Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -84,6 +84,9 @@
#ifndef _AMD64_SEGMENTS_H_
#define _AMD64_SEGMENTS_H_
#ifdef __x86_64__
#ifdef _KERNEL_OPT
#include "opt_xen.h"
#endif
@ -389,4 +392,10 @@ int valid_user_selector(struct lwp *, uint64_t, char *, int);
#define VALID_USER_DSEL(s) \
((s) == GSEL(GUDATA_SEL, SEL_UPL) || (s) == LSEL(LUDATA_SEL, SEL_UPL))
#else /* __x86_64__ */
#include <i386/segments.h>
#endif /* __x86_64__ */
#endif /* _AMD64_SEGMENTS_H_ */

View File

@ -1,4 +1,6 @@
/* $NetBSD: setjmp.h,v 1.1 2003/04/26 18:39:47 fvdl Exp $ */
/* $NetBSD: setjmp.h,v 1.2 2008/10/26 00:08:15 mrg Exp $ */
#ifdef __x86_64__
/*
* machine/setjmp.h: machine dependent setjmp-related information.
@ -18,3 +20,9 @@
#define _JB_SIGMASK 9
#define _JBLEN 11 /* size, in longs, of a jmp_buf */
#else /* __x86_64__ */
#include <i386/setjmp.h>
#endif /* __x86_64__ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: signal.h,v 1.9 2007/02/18 01:45:37 pavel Exp $ */
/* $NetBSD: signal.h,v 1.10 2008/10/26 00:08:15 mrg Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1991 Regents of the University of California.
@ -34,6 +34,8 @@
#ifndef _AMD64_SIGNAL_H_
#define _AMD64_SIGNAL_H_
#ifdef __x86_64__
#include <sys/featuretest.h>
typedef int sig_atomic_t;
@ -59,4 +61,11 @@ typedef int sig_atomic_t;
#endif
#endif /* _NETBSD_SOURCE */
#else /* __x86_64__ */
#include <i386/signal.h>
#endif /* __x86_64__ */
#endif /* !_AMD64_SIGNAL_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: stdarg.h,v 1.5 2005/12/11 12:16:25 christos Exp $ */
/* $NetBSD: stdarg.h,v 1.6 2008/10/26 00:08:15 mrg Exp $ */
/*-
* Copyright (c) 1991, 1993
@ -34,6 +34,8 @@
#ifndef _AMD64_STDARG_H_
#define _AMD64_STDARG_H_
#ifdef __x86_64__
#include <machine/ansi.h>
#include <sys/featuretest.h>
@ -58,4 +60,10 @@ typedef _BSD_VA_LIST_ va_list;
#define va_copy(dest, src) __va_copy((dest), (src))
#endif
#else /* __x86_64__ */
#include <i386/stdarg.h>
#endif /* __x86_64__ */
#endif /* !_AMD64_STDARG_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: tss.h,v 1.4 2008/04/16 21:51:03 cegger Exp $ */
/* $NetBSD: tss.h,v 1.5 2008/10/26 00:08:15 mrg Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
@ -38,6 +38,8 @@
#ifndef _AMD64_TSS_H_
#define _AMD64_TSS_H_
#ifdef __x86_64__
/*
* TSS structure. Since TSS hw switching is not supported in long
* mode, this is mainly there for the I/O permission map in
@ -63,4 +65,10 @@ struct x86_64_tss {
*/
#define IOMAP_INVALOFF 0xffff
#else /* __x86_64__ */
#include <i386/tss.h>
#endif /* __x86_64__ */
#endif /* _AMD64_TSS_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: types.h,v 1.26 2008/02/21 16:31:13 ad Exp $ */
/* $NetBSD: types.h,v 1.27 2008/10/26 00:08:15 mrg Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -31,8 +31,10 @@
* @(#)types.h 7.5 (Berkeley) 3/9/91
*/
#ifndef _MACHTYPES_H_
#define _MACHTYPES_H_
#ifndef _X86_64_MACHTYPES_H_
#define _X86_64_MACHTYPES_H_
#ifdef __x86_64__
#include <sys/cdefs.h>
#include <sys/featuretest.h>
@ -79,4 +81,10 @@ typedef volatile unsigned char __cpu_simple_lock_t;
#define __HAVE_RAS
#endif
#endif /* _MACHTYPES_H_ */
#else /* !__x86_64__ */
#include <i386/types.h>
#endif /* __x86_64__ */
#endif /* _X86_64_MACHTYPES_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: varargs.h,v 1.3 2005/12/11 12:16:25 christos Exp $ */
/* $NetBSD: varargs.h,v 1.4 2008/10/26 00:08:15 mrg Exp $ */
/*-
* Copyright (c) 1990, 1993
@ -39,6 +39,8 @@
#ifndef _AMD64_VARARGS_H_
#define _AMD64_VARARGS_H_
#ifdef __x86_64__
#include <machine/stdarg.h>
#define __va_ellipsis ...
@ -49,4 +51,10 @@
#undef va_start
#define va_start(ap) __builtin_varargs_start((ap))
#else /* __x86_64__ */
#include <i386/varargs.h>
#endif /* __x86_64__ */
#endif /* !_AMD64_VARARGS_H_ */