diff options
Diffstat (limited to 'libffi/include')
-rw-r--r-- | libffi/include/ffi.h.in | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/libffi/include/ffi.h.in b/libffi/include/ffi.h.in index be32981d53f..bffe7ffc96d 100644 --- a/libffi/include/ffi.h.in +++ b/libffi/include/ffi.h.in @@ -82,6 +82,18 @@ extern "C" { # endif #endif +/* The closure code assumes that this works on pointers, i.e. a size_t */ +/* can hold a pointer. */ + +typedef struct _ffi_type +{ + size_t size; + unsigned short alignment; + unsigned short type; + struct _ffi_type **elements; +} ffi_type; + +#ifndef LIBFFI_HIDE_BASIC_TYPES #if SCHAR_MAX == 127 # define ffi_type_uchar ffi_type_uint8 # define ffi_type_schar ffi_type_sint8 @@ -130,17 +142,6 @@ extern "C" { #error "long size not supported" #endif -/* The closure code assumes that this works on pointers, i.e. a size_t */ -/* can hold a pointer. */ - -typedef struct _ffi_type -{ - size_t size; - unsigned short alignment; - unsigned short type; - struct _ffi_type **elements; -} ffi_type; - /* These are defined in types.c */ extern ffi_type ffi_type_void; extern ffi_type ffi_type_uint8; @@ -153,9 +154,14 @@ extern ffi_type ffi_type_uint64; extern ffi_type ffi_type_sint64; extern ffi_type ffi_type_float; extern ffi_type ffi_type_double; -extern ffi_type ffi_type_longdouble; extern ffi_type ffi_type_pointer; +#if @HAVE_LONG_DOUBLE@ +extern ffi_type ffi_type_longdouble; +#else +#define ffi_type_longdouble ffi_type_double +#endif +#endif /* LIBFFI_HIDE_BASIC_TYPES */ typedef enum { FFI_OK = 0, @@ -342,4 +348,3 @@ void ffi_call(ffi_cif *cif, #endif #endif - |