1 From 9719354ae04a41e9834ac9ba8fd9e895092ba4f1 Mon Sep 17 00:00:00 2001 |
|
2 From: Adam Jackson <[email protected]> |
|
3 Date: Tue, 24 Jun 2008 14:37:06 -0400 |
|
4 Subject: [PATCH] Check for __amd64__, not __x86_64__. |
|
5 |
|
6 Spiritual revert of 1fa4de80fcfc697b5e5879cc351fb3e9dbf6acbe. Intel's C |
|
7 compiler claims to be gcc-compatible; if they're not defining the same |
|
8 macros as gcc then that's their bug, not ours. Even if we were to do |
|
9 this aliasing we should do it once and for all in servermd.h. |
|
10 --- |
|
11 fb/fb.h | 2 +- |
|
12 hw/xfree86/common/compiler.h | 2 +- |
|
13 hw/xfree86/common/xf86AutoConfig.c | 2 +- |
|
14 hw/xfree86/loader/loader.c | 2 +- |
|
15 hw/xfree86/os-support/bsd/bsdResource.c | 2 +- |
|
16 hw/xfree86/os-support/bus/Pci.h | 2 +- |
|
17 hw/xfree86/os-support/misc/SlowBcopy.c | 4 ++-- |
|
18 hw/xfree86/utils/xorgcfg/loadmod.c | 2 +- |
|
19 hw/xfree86/x86emu/prim_ops.c | 2 +- |
|
20 hw/xfree86/x86emu/x86emu/prim_x86_gcc.h | 2 +- |
|
21 hw/xfree86/x86emu/x86emu/types.h | 2 +- |
|
22 include/servermd.h | 2 +- |
|
23 mi/micoord.h | 2 +- |
|
24 13 files changed, 14 insertions(+), 14 deletions(-) |
|
25 |
|
26 diff --git a/fb/fb.h b/fb/fb.h |
|
27 index 8e76beb..2c6c4fb 100644 |
|
28 --- a/fb/fb.h |
|
29 +++ b/fb/fb.h |
|
30 @@ -138,7 +138,7 @@ # if defined(__alpha__) || defined(__al |
|
31 defined(ia64) || defined(__ia64__) || \ |
|
32 defined(__sparc64__) || defined(_LP64) || \ |
|
33 defined(__s390x__) || \ |
|
34 - defined(amd64) || defined (__amd64__) || defined(__x86_64__) || \ |
|
35 + defined(amd64) || defined (__amd64__) \ |
|
36 defined (__powerpc64__) || \ |
|
37 (defined(sgi) && (_MIPS_SZLONG == 64)) |
|
38 typedef unsigned long FbBits; |
|
39 diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h |
|
40 index 9e7f821..a20baa3 100644 |
|
41 --- a/hw/xfree86/common/compiler.h |
|
42 +++ b/hw/xfree86/common/compiler.h |
|
43 @@ -498,7 +498,7 @@ extern unsigned int inb(unsigned long po |
|
44 extern unsigned int inw(unsigned long port); |
|
45 extern unsigned int inl(unsigned long port); |
|
46 |
|
47 -# elif defined(linux) && (defined(__amd64__) || defined(__x86_64__)) |
|
48 +# elif defined(linux) && defined(__amd64__) |
|
49 |
|
50 # include <inttypes.h> |
|
51 |
|
52 diff --git a/hw/xfree86/common/xf86AutoConfig.c b/hw/xfree86/common/xf86AutoConfig.c |
|
53 index 7e5fab4..a786eed 100644 |
|
54 --- a/hw/xfree86/common/xf86AutoConfig.c |
|
55 +++ b/hw/xfree86/common/xf86AutoConfig.c |
|
56 @@ -454,7 +454,7 @@ #endif /* __linux__ */ |
|
57 if (info != NULL) |
|
58 chosen_driver = videoPtrToDriverName(info); |
|
59 if (chosen_driver == NULL) { |
|
60 -#if defined __i386__ || defined __amd64__ || defined __x86_64__ || defined __hurd__ |
|
61 +#if defined __i386__ || defined __amd64__ || defined __hurd__ |
|
62 chosen_driver = "vesa"; |
|
63 #elif defined __sparc__ |
|
64 chosen_driver = "sunffb"; |
|
65 diff --git a/hw/xfree86/loader/loader.c b/hw/xfree86/loader/loader.c |
|
66 index a00269b..774a4c4 100644 |
|
67 --- a/hw/xfree86/loader/loader.c |
|
68 +++ b/hw/xfree86/loader/loader.c |
|
69 @@ -63,7 +63,7 @@ #include <fcntl.h> |
|
70 #include <string.h> |
|
71 #if defined(linux) && \ |
|
72 (defined(__alpha__) || defined(__powerpc__) || defined(__ia64__) \ |
|
73 - || defined(__amd64__) || defined(__x86_64__)) |
|
74 + || defined(__amd64__)) |
|
75 #include <malloc.h> |
|
76 #endif |
|
77 #include <stdarg.h> |
|
78 diff --git a/hw/xfree86/os-support/bsd/bsdResource.c b/hw/xfree86/os-support/bsd/bsdResource.c |
|
79 index d1ee787..fe166c8 100644 |
|
80 --- a/hw/xfree86/os-support/bsd/bsdResource.c |
|
81 +++ b/hw/xfree86/os-support/bsd/bsdResource.c |
|
82 @@ -19,7 +19,7 @@ #include "bus/Pci.h" |
|
83 |
|
84 #ifdef INCLUDE_XF86_NO_DOMAIN |
|
85 |
|
86 -#if defined(__alpha__) || defined(__sparc64__) || defined(__amd64__) || defined(__x86_64__) |
|
87 +#if defined(__alpha__) || defined(__sparc64__) || defined(__amd64__) |
|
88 |
|
89 resPtr |
|
90 xf86AccResFromOS(resPtr ret) |
|
91 diff --git a/hw/xfree86/os-support/bus/Pci.h b/hw/xfree86/os-support/bus/Pci.h |
|
92 index 557483b..a1390c0 100644 |
|
93 --- a/hw/xfree86/os-support/bus/Pci.h |
|
94 +++ b/hw/xfree86/os-support/bus/Pci.h |
|
95 @@ -202,7 +202,7 @@ #if !defined(ARCH_PCI_INIT) |
|
96 /* |
|
97 * Select architecture specific PCI init function |
|
98 */ |
|
99 -#if defined(__i386__) || defined(__i386) || defined(__amd64__) || defined(__amd64) || defined(__x86_64__) |
|
100 +#if defined(__i386__) || defined(__i386) || defined(__amd64__) || defined(__amd64) |
|
101 # define ARCH_PCI_INIT ix86PciInit |
|
102 #elif defined(__powerpc__) || defined(__powerpc64__) |
|
103 # define ARCH_PCI_INIT ppcPciInit |
|
104 diff --git a/hw/xfree86/os-support/misc/SlowBcopy.c b/hw/xfree86/os-support/misc/SlowBcopy.c |
|
105 index 5cd7168..7c51fcc 100644 |
|
106 --- a/hw/xfree86/os-support/misc/SlowBcopy.c |
|
107 +++ b/hw/xfree86/os-support/misc/SlowBcopy.c |
|
108 @@ -30,7 +30,7 @@ xf86SetReallySlowBcopy(void) |
|
109 really_slow_bcopy = 1; |
|
110 } |
|
111 |
|
112 -#if defined(__i386__) || defined(__x86_64__) |
|
113 +#if defined(__i386__) || defined(__amd64__) |
|
114 static void xf86_really_slow_bcopy(unsigned char *src, unsigned char *dst, int len) |
|
115 { |
|
116 while(len--) |
|
117 @@ -45,7 +45,7 @@ #endif |
|
118 _X_EXPORT void |
|
119 xf86SlowBcopy(unsigned char *src, unsigned char *dst, int len) |
|
120 { |
|
121 -#if defined(__i386__) || defined(__x86_64__) |
|
122 +#if defined(__i386__) || defined(__amd64__) |
|
123 if (really_slow_bcopy) { |
|
124 xf86_really_slow_bcopy(src, dst, len); |
|
125 return; |
|
126 diff --git a/hw/xfree86/utils/xorgcfg/loadmod.c b/hw/xfree86/utils/xorgcfg/loadmod.c |
|
127 index 629dfe1..748bd3a 100644 |
|
128 --- a/hw/xfree86/utils/xorgcfg/loadmod.c |
|
129 +++ b/hw/xfree86/utils/xorgcfg/loadmod.c |
|
130 @@ -181,7 +181,7 @@ LOOKUP xfree86LookupTab[] = { |
|
131 SYMFUNC(xf86memcpy) |
|
132 #if (defined(__powerpc__) && (defined(Lynx) || defined(linux))) || \ |
|
133 defined(__sparc__) || defined(__sparc) || defined(__ia64__) || \ |
|
134 - defined (__amd64__) || defined(__x86_64__) |
|
135 + defined (__amd64__) |
|
136 /* |
|
137 * Some PPC, SPARC, and IA64 compilers generate calls to memcpy to handle |
|
138 * structure copies. This causes a problem both here and in shared |
|
139 diff --git a/hw/xfree86/x86emu/prim_ops.c b/hw/xfree86/x86emu/prim_ops.c |
|
140 index 41968e1..4a6ac5d 100644 |
|
141 --- a/hw/xfree86/x86emu/prim_ops.c |
|
142 +++ b/hw/xfree86/x86emu/prim_ops.c |
|
143 @@ -103,7 +103,7 @@ #define PRIM_OPS_NO_REDEFINE_ASM |
|
144 #include "x86emu/x86emui.h" |
|
145 |
|
146 #if defined(__GNUC__) |
|
147 -# if defined (__i386__) || defined(__i386) || defined(__AMD64__) || defined(__x86_64__) || defined(__amd64__) || defined(__x86_64__) |
|
148 +# if defined (__i386__) || defined(__i386) || defined(__AMD64__) || defined(__amd64__) |
|
149 # include "x86emu/prim_x86_gcc.h" |
|
150 # endif |
|
151 #endif |
|
152 diff --git a/hw/xfree86/x86emu/x86emu/prim_x86_gcc.h b/hw/xfree86/x86emu/x86emu/prim_x86_gcc.h |
|
153 index 5a443cd..5530a3a 100644 |
|
154 --- a/hw/xfree86/x86emu/x86emu/prim_x86_gcc.h |
|
155 +++ b/hw/xfree86/x86emu/x86emu/prim_x86_gcc.h |
|
156 @@ -42,7 +42,7 @@ #define __X86EMU_PRIM_X86_GCC_H |
|
157 |
|
158 #include "x86emu/types.h" |
|
159 |
|
160 -#if !defined(__GNUC__) || !(defined (__i386__) || defined(__i386) || defined(__AMD64__) || defined(__x86_64__) || defined(__amd64__) || defined(__x86_64__)) |
|
161 +#if !defined(__GNUC__) || !(defined (__i386__) || defined(__i386) || defined(__AMD64__) || defined(__amd64__)) |
|
162 #error This file is intended to be used by gcc on i386 or x86-64 system |
|
163 #endif |
|
164 |
|
165 diff --git a/hw/xfree86/x86emu/x86emu/types.h b/hw/xfree86/x86emu/x86emu/types.h |
|
166 index 2d41b0f..ff28885 100644 |
|
167 --- a/hw/xfree86/x86emu/x86emu/types.h |
|
168 +++ b/hw/xfree86/x86emu/x86emu/types.h |
|
169 @@ -75,7 +75,7 @@ #if defined (_LP64) || \ |
|
170 defined(__sparc64__) || \ |
|
171 defined(__s390x__) || \ |
|
172 (defined(__hppa__) && defined(__LP64)) || \ |
|
173 - defined(__amd64__) || defined(amd64) || defined(__x86_64__) || \ |
|
174 + defined(__amd64__) || defined(amd64) \ |
|
175 (defined(__sgi) && (_MIPS_SZLONG == 64)) |
|
176 #define NUM32 int |
|
177 #else |
|
178 diff --git a/include/servermd.h b/include/servermd.h |
|
179 index 91b705b..f10e6bc 100644 |
|
180 --- a/include/servermd.h |
|
181 +++ b/include/servermd.h |
|
182 @@ -285,7 +285,7 @@ # define GLYPHPADBYTES 4 |
|
183 |
|
184 #endif /* ia64 */ |
|
185 |
|
186 -#if defined(__amd64__) || defined(amd64) || defined(__amd64) || defined(__x86_64__) |
|
187 +#if defined(__amd64__) || defined(amd64) || defined(__amd64) |
|
188 # define IMAGE_BYTE_ORDER LSBFirst |
|
189 |
|
190 # if defined(XF86MONOVGA) || defined(XF86VGA16) || defined(XF86MONO) |
|
191 diff --git a/mi/micoord.h b/mi/micoord.h |
|
192 index 876e88c..16d0861 100644 |
|
193 --- a/mi/micoord.h |
|
194 +++ b/mi/micoord.h |
|
195 @@ -48,7 +48,7 @@ #if defined(mips) || defined(sgi) || \ |
|
196 defined(__alpha) || defined(__alpha__) || \ |
|
197 defined(__i386__) || defined(__i386) || defined(__ia64__) || \ |
|
198 defined(__s390x__) || defined(__s390__) || \ |
|
199 - defined(__amd64__) || defined(amd64) || defined(__amd64) || defined(__x86_64__) |
|
200 + defined(__amd64__) || defined(amd64) || defined(__amd64) |
|
201 #define GetHighWord(x) (((int) (x)) >> 16) |
|
202 #else |
|
203 #define GetHighWord(x) (((int) (x)) / 65536) |
|
204 -- |
|
205 1.4.1 |
|
206 |
|