1 Index: libffi/ChangeLog
2 ===================================================================
3 --- libffi.orig/ChangeLog
6 * testsuite/libffi.call/cls_longdouble.c: Likewise.
7 * testsuite/libffi.call/huge_struct.c: Likewise.
9 +2010-07-22 Dan Witte <dwitte@mozilla.com>
11 + * src/*/ffitarget.h: Make FFI_LAST_ABI one past the last valid ABI.
12 + * src/prep_cif.c: Fix ABI assertion.
13 + * src/cris/ffi.c: Ditto.
15 2010-07-10 Evan Phoenix <evan@fallingsnow.net>
17 * src/closures.c (selinux_enabled_check): Fix strncmp usage bug.
18 Index: libffi/src/avr32/ffitarget.h
19 ===================================================================
20 --- libffi.orig/src/avr32/ffitarget.h
21 +++ libffi/src/avr32/ffitarget.h
22 @@ -34,8 +34,8 @@ typedef signed long ffi_sarg;
23 typedef enum ffi_abi {
26 - FFI_DEFAULT_ABI = FFI_SYSV,
27 - FFI_LAST_ABI = FFI_DEFAULT_ABI + 1
29 + FFI_DEFAULT_ABI = FFI_SYSV
33 Index: libffi/src/cris/ffi.c
34 ===================================================================
35 --- libffi.orig/src/cris/ffi.c
36 +++ libffi/src/cris/ffi.c
37 @@ -163,7 +163,7 @@ ffi_prep_cif (ffi_cif * cif,
40 FFI_ASSERT (cif != NULL);
41 - FFI_ASSERT ((abi > FFI_FIRST_ABI) && (abi <= FFI_DEFAULT_ABI));
42 + FFI_ASSERT (abi > FFI_FIRST_ABI && abi < FFI_LAST_ABI);
45 cif->arg_types = atypes;
46 Index: libffi/src/cris/ffitarget.h
47 ===================================================================
48 --- libffi.orig/src/cris/ffitarget.h
49 +++ libffi/src/cris/ffitarget.h
50 @@ -34,8 +34,8 @@ typedef signed long ffi_sarg;
51 typedef enum ffi_abi {
54 - FFI_DEFAULT_ABI = FFI_SYSV,
55 - FFI_LAST_ABI = FFI_DEFAULT_ABI + 1
57 + FFI_DEFAULT_ABI = FFI_SYSV
61 Index: libffi/src/frv/ffitarget.h
62 ===================================================================
63 --- libffi.orig/src/frv/ffitarget.h
64 +++ libffi/src/frv/ffitarget.h
65 @@ -35,13 +35,9 @@ typedef signed long ffi_sarg;
67 typedef enum ffi_abi {
72 - FFI_DEFAULT_ABI = FFI_EABI,
75 - FFI_LAST_ABI = FFI_DEFAULT_ABI + 1
77 + FFI_DEFAULT_ABI = FFI_EABI
81 Index: libffi/src/ia64/ffitarget.h
82 ===================================================================
83 --- libffi.orig/src/ia64/ffitarget.h
84 +++ libffi/src/ia64/ffitarget.h
85 @@ -34,8 +34,8 @@ typedef signed long long ffi_
86 typedef enum ffi_abi {
88 FFI_UNIX, /* Linux and all Unix variants use the same conventions */
89 - FFI_DEFAULT_ABI = FFI_UNIX,
90 - FFI_LAST_ABI = FFI_DEFAULT_ABI + 1
92 + FFI_DEFAULT_ABI = FFI_UNIX
96 Index: libffi/src/m32r/ffitarget.h
97 ===================================================================
98 --- libffi.orig/src/m32r/ffitarget.h
99 +++ libffi/src/m32r/ffitarget.h
100 @@ -36,8 +36,8 @@ typedef enum ffi_abi
104 - FFI_DEFAULT_ABI = FFI_SYSV,
105 - FFI_LAST_ABI = FFI_DEFAULT_ABI + 1
107 + FFI_DEFAULT_ABI = FFI_SYSV
111 Index: libffi/src/m68k/ffitarget.h
112 ===================================================================
113 --- libffi.orig/src/m68k/ffitarget.h
114 +++ libffi/src/m68k/ffitarget.h
115 @@ -34,8 +34,8 @@ typedef signed long ffi_sarg;
116 typedef enum ffi_abi {
119 - FFI_DEFAULT_ABI = FFI_SYSV,
120 - FFI_LAST_ABI = FFI_DEFAULT_ABI + 1
122 + FFI_DEFAULT_ABI = FFI_SYSV
126 Index: libffi/src/mips/ffitarget.h
127 ===================================================================
128 --- libffi.orig/src/mips/ffitarget.h
129 +++ libffi/src/mips/ffitarget.h
130 @@ -186,30 +186,29 @@ typedef enum ffi_abi {
137 #ifdef __mips_soft_float
138 - FFI_DEFAULT_ABI = FFI_O32_SOFT_FLOAT,
139 + FFI_DEFAULT_ABI = FFI_O32_SOFT_FLOAT
141 - FFI_DEFAULT_ABI = FFI_O32,
142 + FFI_DEFAULT_ABI = FFI_O32
145 # if _MIPS_SIM==_ABI64
146 # ifdef __mips_soft_float
147 - FFI_DEFAULT_ABI = FFI_N64_SOFT_FLOAT,
148 + FFI_DEFAULT_ABI = FFI_N64_SOFT_FLOAT
150 - FFI_DEFAULT_ABI = FFI_N64,
151 + FFI_DEFAULT_ABI = FFI_N64
154 # ifdef __mips_soft_float
155 - FFI_DEFAULT_ABI = FFI_N32_SOFT_FLOAT,
156 + FFI_DEFAULT_ABI = FFI_N32_SOFT_FLOAT
158 - FFI_DEFAULT_ABI = FFI_N32,
159 + FFI_DEFAULT_ABI = FFI_N32
164 - FFI_LAST_ABI = FFI_DEFAULT_ABI + 1
167 #define FFI_EXTRA_CIF_FIELDS unsigned rstruct_flag
168 Index: libffi/src/moxie/ffitarget.h
169 ===================================================================
170 --- libffi.orig/src/moxie/ffitarget.h
171 +++ libffi/src/moxie/ffitarget.h
172 @@ -35,13 +35,9 @@ typedef signed long ffi_sarg;
174 typedef enum ffi_abi {
179 - FFI_DEFAULT_ABI = FFI_EABI,
182 - FFI_LAST_ABI = FFI_DEFAULT_ABI + 1
184 + FFI_DEFAULT_ABI = FFI_EABI
188 Index: libffi/src/pa/ffitarget.h
189 ===================================================================
190 --- libffi.orig/src/pa/ffitarget.h
191 +++ libffi/src/pa/ffitarget.h
192 @@ -38,21 +38,22 @@ typedef enum ffi_abi {
196 - FFI_DEFAULT_ABI = FFI_PA32,
198 + FFI_DEFAULT_ABI = FFI_PA32
203 - FFI_DEFAULT_ABI = FFI_PA32,
205 + FFI_DEFAULT_ABI = FFI_PA32
209 #error "PA64_HPUX FFI is not yet implemented"
211 - FFI_DEFAULT_ABI = FFI_PA64,
213 + FFI_DEFAULT_ABI = FFI_PA64
216 - FFI_LAST_ABI = FFI_DEFAULT_ABI + 1
220 Index: libffi/src/prep_cif.c
221 ===================================================================
222 --- libffi.orig/src/prep_cif.c
223 +++ libffi/src/prep_cif.c
224 @@ -93,7 +93,7 @@ ffi_status ffi_prep_cif(ffi_cif *cif, ff
227 FFI_ASSERT(cif != NULL);
228 - FFI_ASSERT((abi > FFI_FIRST_ABI) && (abi <= FFI_DEFAULT_ABI));
229 + FFI_ASSERT(abi > FFI_FIRST_ABI && abi < FFI_LAST_ABI);
232 cif->arg_types = atypes;
233 Index: libffi/src/s390/ffitarget.h
234 ===================================================================
235 --- libffi.orig/src/s390/ffitarget.h
236 +++ libffi/src/s390/ffitarget.h
237 @@ -42,8 +42,8 @@ typedef signed long ffi_sarg;
238 typedef enum ffi_abi {
241 - FFI_DEFAULT_ABI = FFI_SYSV,
242 - FFI_LAST_ABI = FFI_DEFAULT_ABI + 1
244 + FFI_DEFAULT_ABI = FFI_SYSV
248 Index: libffi/src/sh/ffitarget.h
249 ===================================================================
250 --- libffi.orig/src/sh/ffitarget.h
251 +++ libffi/src/sh/ffitarget.h
252 @@ -36,8 +36,8 @@ typedef signed long ffi_sarg;
253 typedef enum ffi_abi {
256 - FFI_DEFAULT_ABI = FFI_SYSV,
257 - FFI_LAST_ABI = FFI_DEFAULT_ABI + 1
259 + FFI_DEFAULT_ABI = FFI_SYSV
263 Index: libffi/src/sh64/ffitarget.h
264 ===================================================================
265 --- libffi.orig/src/sh64/ffitarget.h
266 +++ libffi/src/sh64/ffitarget.h
267 @@ -36,8 +36,8 @@ typedef signed long ffi_sarg;
268 typedef enum ffi_abi {
271 - FFI_DEFAULT_ABI = FFI_SYSV,
272 - FFI_LAST_ABI = FFI_DEFAULT_ABI + 1
274 + FFI_DEFAULT_ABI = FFI_SYSV
277 #define FFI_EXTRA_CIF_FIELDS long long flags2
278 Index: libffi/src/sparc/ffitarget.h
279 ===================================================================
280 --- libffi.orig/src/sparc/ffitarget.h
281 +++ libffi/src/sparc/ffitarget.h
282 @@ -44,12 +44,12 @@ typedef enum ffi_abi {
288 - FFI_DEFAULT_ABI = FFI_V9,
289 + FFI_DEFAULT_ABI = FFI_V9
291 - FFI_DEFAULT_ABI = FFI_V8,
292 + FFI_DEFAULT_ABI = FFI_V8
294 - FFI_LAST_ABI = FFI_DEFAULT_ABI + 1
298 Index: libffi/src/x86/ffitarget.h
299 ===================================================================
300 --- libffi.orig/src/x86/ffitarget.h
301 +++ libffi/src/x86/ffitarget.h
302 @@ -64,28 +64,29 @@ typedef enum ffi_abi {
307 /* TODO: Add fastcall support for the sake of completeness */
308 - FFI_DEFAULT_ABI = FFI_SYSV,
309 + FFI_DEFAULT_ABI = FFI_SYSV
314 - FFI_DEFAULT_ABI = FFI_WIN64,
316 + FFI_DEFAULT_ABI = FFI_WIN64
319 /* ---- Intel x86 and AMD x86-64 - */
320 #if !defined(X86_WIN32) && (defined(__i386__) || defined(__x86_64__) || defined(__i386) || defined(__amd64))
322 FFI_UNIX64, /* Unix variants all use the same ABI for x86-64 */
324 #if defined(__i386__) || defined(__i386)
325 - FFI_DEFAULT_ABI = FFI_SYSV,
326 + FFI_DEFAULT_ABI = FFI_SYSV
328 - FFI_DEFAULT_ABI = FFI_UNIX64,
329 + FFI_DEFAULT_ABI = FFI_UNIX64
332 #endif /* X86_WIN64 */
334 - FFI_LAST_ABI = FFI_DEFAULT_ABI + 1