diff options
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. */ |