diff options
author | Torsten Schoenfeld <kaffeetisch@gmx.de> | 2006-07-25 20:01:22 +0000 |
---|---|---|
committer | Andreas Tobler <andreast@gcc.gnu.org> | 2006-07-25 22:01:22 +0200 |
commit | cb4132fe11e1852aa1bb108d69ace94f09296c5b (patch) | |
tree | 75a10258420b179909b785eb7bb52eb01ba11601 /libffi/include | |
parent | 6583cf153de60fde983298105321deb3e5b0b3cd (diff) | |
download | gcc-cb4132fe11e1852aa1bb108d69ace94f09296c5b.tar.gz |
ffi.h.in (ffi_type_ulong, [...]): Define correctly for 32-bit architectures.
2006-07-25 Torsten Schoenfeld <kaffeetisch@gmx.de>
* include/ffi.h.in (ffi_type_ulong, ffi_type_slong): Define correctly
for 32-bit architectures.
* testsuite/libffi.call/return_ul.c: New test case.
From-SVN: r115739
Diffstat (limited to 'libffi/include')
-rw-r--r-- | libffi/include/ffi.h.in | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/libffi/include/ffi.h.in b/libffi/include/ffi.h.in index 42600458689..f6f6e1a2e10 100644 --- a/libffi/include/ffi.h.in +++ b/libffi/include/ffi.h.in @@ -112,16 +112,24 @@ extern "C" { #error "int size not supported" #endif -#define ffi_type_ulong ffi_type_uint64 -#define ffi_type_slong ffi_type_sint64 #if LONG_MAX == 2147483647 # if FFI_LONG_LONG_MAX != 9223372036854775807 - #error "no 64-bit data type supported" + #error "no 64-bit data type supported" # endif #elif LONG_MAX != 9223372036854775807 #error "long size not supported" #endif +#if LONG_MAX == 2147483647 +# define ffi_type_ulong ffi_type_uint32 +# define ffi_type_slong ffi_type_sint32 +#elif LONG_MAX == 9223372036854775807 +# define ffi_type_ulong ffi_type_uint64 +# define ffi_type_slong ffi_type_sint64 +#else + #error "long size not supported" +#endif + /* The closure code assumes that this works on pointers, i.e. a size_t */ /* can hold a pointer. */ |