From 916cad78643f772aa4efaa340011b37d32996680 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 6 Apr 2007 16:24:16 +0000 Subject: * configure.ac: Tidy target case. (HAVE_LONG_DOUBLE): Allow the target to override. * configure: Regenerate. * include/ffi.h.in: Don't define ffi_type_foo if LIBFFI_HIDE_BASIC_TYPES is defined. (ffi_type_longdouble): If not HAVE_LONG_DOUBLE, define to ffi_type_double. * types.c (LIBFFI_HIDE_BASIC_TYPES): Define. (FFI_TYPEDEF, ffi_type_void): Mark the data const. (ffi_type_longdouble): Special case for Alpha. Don't define if long double == double. * src/alpha/ffi.c (FFI_TYPE_LONGDOUBLE): Assert unique value. (ffi_prep_cif_machdep): Handle it as the 128-bit type. (ffi_call, ffi_closure_osf_inner): Likewise. (ffi_closure_osf_inner): Likewise. Mark hidden. (ffi_call_osf, ffi_closure_osf): Mark hidden. * src/alpha/ffitarget.h (FFI_LAST_ABI): Tidy definition. * src/alpha/osf.S (ffi_call_osf, ffi_closure_osf): Mark hidden. (load_table): Handle 128-bit long double. * testsuite/libffi.call/float4.c: Add -mieee for alpha. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@123622 138bc75d-0d04-0410-961f-82ee72b054a4 --- libffi/include/ffi.h.in | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) (limited to 'libffi/include') 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 - -- cgit v1.2.3