From 1fa4de80fcfc697b5e5879cc351fb3e9dbf6acbe Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Sat, 12 Apr 2008 20:39:18 +0200 Subject: Check for __x86_64__ when we check for __amd64__ It seems Intel C Compiler neglects to define __amd64__, __amd64, or amd64, but *does* define __x86_64__. --- fb/fb.h | 2 +- hw/xfree86/common/compiler.h | 2 +- hw/xfree86/common/xf86AutoConfig.c | 2 +- hw/xfree86/loader/loader.c | 2 +- hw/xfree86/os-support/bsd/bsdResource.c | 2 +- hw/xfree86/os-support/bsd/i386_video.c | 8 ++++---- hw/xfree86/os-support/bus/Pci.h | 2 +- hw/xfree86/utils/xorgcfg/loadmod.c | 4 +++- hw/xfree86/x86emu/prim_ops.c | 2 +- hw/xfree86/x86emu/x86emu/prim_x86_gcc.h | 2 +- hw/xfree86/x86emu/x86emu/types.h | 2 +- hw/xprint/ps/psout.h | 2 +- include/servermd.h | 2 +- mi/micoord.h | 2 +- 14 files changed, 19 insertions(+), 17 deletions(-) diff --git a/fb/fb.h b/fb/fb.h index 01000d79c..1cd947380 100644 --- a/fb/fb.h +++ b/fb/fb.h @@ -141,7 +141,7 @@ typedef unsigned __int64 FbBits; defined(ia64) || defined(__ia64__) || \ defined(__sparc64__) || defined(_LP64) || \ defined(__s390x__) || \ - defined(amd64) || defined (__amd64__) || \ + defined(amd64) || defined (__amd64__) || defined(__x86_64__) || \ defined (__powerpc64__) || \ (defined(sgi) && (_MIPS_SZLONG == 64)) typedef unsigned long FbBits; diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h index 73ca3d0ac..7b65da844 100644 --- a/hw/xfree86/common/compiler.h +++ b/hw/xfree86/common/compiler.h @@ -498,7 +498,7 @@ extern unsigned int inb(unsigned long port); extern unsigned int inw(unsigned long port); extern unsigned int inl(unsigned long port); -# elif defined(linux) && defined(__amd64__) +# elif defined(linux) && (defined(__amd64__) || defined(__x86_64__)) # include diff --git a/hw/xfree86/common/xf86AutoConfig.c b/hw/xfree86/common/xf86AutoConfig.c index 3210e4460..92b204ba0 100644 --- a/hw/xfree86/common/xf86AutoConfig.c +++ b/hw/xfree86/common/xf86AutoConfig.c @@ -449,7 +449,7 @@ chooseVideoDriver(void) if (info != NULL) chosen_driver = videoPtrToDriverName(info); if (chosen_driver == NULL) { -#if defined __i386__ || defined __amd64__ || defined __hurd__ +#if defined __i386__ || defined __amd64__ || defined __x86_64__ || defined __hurd__ chosen_driver = "vesa"; #elif defined __sparc__ chosen_driver = "sunffb"; diff --git a/hw/xfree86/loader/loader.c b/hw/xfree86/loader/loader.c index 774a4c4a0..a00269b70 100644 --- a/hw/xfree86/loader/loader.c +++ b/hw/xfree86/loader/loader.c @@ -63,7 +63,7 @@ #include #if defined(linux) && \ (defined(__alpha__) || defined(__powerpc__) || defined(__ia64__) \ - || defined(__amd64__)) + || defined(__amd64__) || defined(__x86_64__)) #include #endif #include diff --git a/hw/xfree86/os-support/bsd/bsdResource.c b/hw/xfree86/os-support/bsd/bsdResource.c index fe166c845..d1ee787f1 100644 --- a/hw/xfree86/os-support/bsd/bsdResource.c +++ b/hw/xfree86/os-support/bsd/bsdResource.c @@ -19,7 +19,7 @@ #ifdef INCLUDE_XF86_NO_DOMAIN -#if defined(__alpha__) || defined(__sparc64__) || defined(__amd64__) +#if defined(__alpha__) || defined(__sparc64__) || defined(__amd64__) || defined(__x86_64__) resPtr xf86AccResFromOS(resPtr ret) diff --git a/hw/xfree86/os-support/bsd/i386_video.c b/hw/xfree86/os-support/bsd/i386_video.c index 1ebac678d..e2f6420d8 100644 --- a/hw/xfree86/os-support/bsd/i386_video.c +++ b/hw/xfree86/os-support/bsd/i386_video.c @@ -55,7 +55,7 @@ #endif #endif -#if defined(__OpenBSD__) && defined(__amd64__) +#if defined(__OpenBSD__) && (defined(__amd64__) || defined(__x86_64__)) #include #include #endif @@ -108,7 +108,7 @@ static pointer NetBSDsetWC(int, unsigned long, unsigned long, Bool, MessageType); static void NetBSDundoWC(int, pointer); #endif -#if defined(__amd64__) && defined(__OpenBSD__) +#if (defined(__amd64__) || defined(__x86_64__)) && defined(__OpenBSD__) static pointer amd64setWC(int, unsigned long, unsigned long, Bool, MessageType); static void amd64undoWC(int, pointer); @@ -229,7 +229,7 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem) pVidMem->setWC = NetBSDsetWC; pVidMem->undoWC = NetBSDundoWC; #endif -#if defined(__amd64__) && defined(__OpenBSD__) +#if (defined(__amd64__) || defined(__x86_64__)) && defined(__OpenBSD__) pVidMem->setWC = amd64setWC; pVidMem->undoWC = amd64undoWC; #endif @@ -953,7 +953,7 @@ NetBSDundoWC(int screenNum, pointer list) } #endif -#if defined(__OpenBSD__) && defined(__amd64__) +#if defined(__OpenBSD__) && (defined(__amd64__) || defined(__x86_64__)) static pointer amd64setWC(int screenNum, unsigned long base, unsigned long size, Bool enable, MessageType from) diff --git a/hw/xfree86/os-support/bus/Pci.h b/hw/xfree86/os-support/bus/Pci.h index ebac0905b..b78d30720 100644 --- a/hw/xfree86/os-support/bus/Pci.h +++ b/hw/xfree86/os-support/bus/Pci.h @@ -246,7 +246,7 @@ # if !defined(__FreeBSD__) && !defined(linux) # define ARCH_PCI_PCI_BRIDGE sparcPciPciBridge # endif -#elif defined(__amd64__) || defined(__amd64) +#elif defined(__amd64__) || defined(__amd64) || defined(__x86_64__) # if defined(linux) # define ARCH_PCI_INIT linuxPciInit # else diff --git a/hw/xfree86/utils/xorgcfg/loadmod.c b/hw/xfree86/utils/xorgcfg/loadmod.c index 1207820ce..629dfe118 100644 --- a/hw/xfree86/utils/xorgcfg/loadmod.c +++ b/hw/xfree86/utils/xorgcfg/loadmod.c @@ -179,7 +179,9 @@ LOOKUP xfree86LookupTab[] = { SYMFUNC(xf86memchr) SYMFUNC(xf86memcmp) SYMFUNC(xf86memcpy) -#if (defined(__powerpc__) && (defined(Lynx) || defined(linux))) || defined(__sparc__) || defined(__sparc) || defined(__ia64__) || defined (__amd64__) +#if (defined(__powerpc__) && (defined(Lynx) || defined(linux))) || \ + defined(__sparc__) || defined(__sparc) || defined(__ia64__) || \ + defined (__amd64__) || defined(__x86_64__) /* * Some PPC, SPARC, and IA64 compilers generate calls to memcpy to handle * structure copies. This causes a problem both here and in shared diff --git a/hw/xfree86/x86emu/prim_ops.c b/hw/xfree86/x86emu/prim_ops.c index b42cdc0a5..41968e1a7 100644 --- a/hw/xfree86/x86emu/prim_ops.c +++ b/hw/xfree86/x86emu/prim_ops.c @@ -103,7 +103,7 @@ #include "x86emu/x86emui.h" #if defined(__GNUC__) -# if defined (__i386__) || defined(__i386) || defined(__AMD64__) || defined(__x86_64__) || defined(__amd64__) +# if defined (__i386__) || defined(__i386) || defined(__AMD64__) || defined(__x86_64__) || defined(__amd64__) || defined(__x86_64__) # include "x86emu/prim_x86_gcc.h" # endif #endif diff --git a/hw/xfree86/x86emu/x86emu/prim_x86_gcc.h b/hw/xfree86/x86emu/x86emu/prim_x86_gcc.h index af61e2023..5a443cdbf 100644 --- a/hw/xfree86/x86emu/x86emu/prim_x86_gcc.h +++ b/hw/xfree86/x86emu/x86emu/prim_x86_gcc.h @@ -42,7 +42,7 @@ #include "x86emu/types.h" -#if !defined(__GNUC__) || !(defined (__i386__) || defined(__i386) || defined(__AMD64__) || defined(__x86_64__) || defined(__amd64__)) +#if !defined(__GNUC__) || !(defined (__i386__) || defined(__i386) || defined(__AMD64__) || defined(__x86_64__) || defined(__amd64__) || defined(__x86_64__)) #error This file is intended to be used by gcc on i386 or x86-64 system #endif diff --git a/hw/xfree86/x86emu/x86emu/types.h b/hw/xfree86/x86emu/x86emu/types.h index c0c09c1b0..2d41b0f18 100644 --- a/hw/xfree86/x86emu/x86emu/types.h +++ b/hw/xfree86/x86emu/x86emu/types.h @@ -75,7 +75,7 @@ defined(__sparc64__) || \ defined(__s390x__) || \ (defined(__hppa__) && defined(__LP64)) || \ - defined(__amd64__) || defined(amd64) || \ + defined(__amd64__) || defined(amd64) || defined(__x86_64__) || \ (defined(__sgi) && (_MIPS_SZLONG == 64)) #define NUM32 int #else diff --git a/hw/xprint/ps/psout.h b/hw/xprint/ps/psout.h index 3e19d5a67..1138e4afe 100644 --- a/hw/xprint/ps/psout.h +++ b/hw/xprint/ps/psout.h @@ -169,7 +169,7 @@ typedef signed __int64 PsOutColor; defined(ia64) || defined(__ia64__) || \ defined(__sparc64__) || defined(_LP64) || \ defined(__s390x__) || \ - defined(amd64) || defined (__amd64__) || \ + defined(amd64) || defined (__amd64__) || defined(__x86_64__) || \ defined (__powerpc64__) || \ (defined(sgi) && (_MIPS_SZLONG == 64)) typedef signed long PsOutColor; diff --git a/include/servermd.h b/include/servermd.h index 2f511dabe..616841089 100644 --- a/include/servermd.h +++ b/include/servermd.h @@ -393,7 +393,7 @@ SOFTWARE. #endif /* ia64 */ -#if defined(__amd64__) || defined(amd64) || defined(__amd64) +#if defined(__amd64__) || defined(amd64) || defined(__amd64) || defined(__x86_64__) # define IMAGE_BYTE_ORDER LSBFirst # if defined(XF86MONOVGA) || defined(XF86VGA16) || defined(XF86MONO) diff --git a/mi/micoord.h b/mi/micoord.h index 16d086117..876e88c95 100644 --- a/mi/micoord.h +++ b/mi/micoord.h @@ -48,7 +48,7 @@ defined(__alpha) || defined(__alpha__) || \ defined(__i386__) || defined(__i386) || defined(__ia64__) || \ defined(__s390x__) || defined(__s390__) || \ - defined(__amd64__) || defined(amd64) || defined(__amd64) + defined(__amd64__) || defined(amd64) || defined(__amd64) || defined(__x86_64__) #define GetHighWord(x) (((int) (x)) >> 16) #else #define GetHighWord(x) (((int) (x)) / 65536) -- cgit v1.2.3