summaryrefslogtreecommitdiffstats
path: root/libffi/include/ffi.h.in
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2007-04-06 16:24:16 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2007-04-06 16:24:16 +0000
commitea4d299a259d8cc08aefa91e797ec4a6e5bf4053 (patch)
tree430f3d3b8444386a212bcbe6f9a70261cfb97d01 /libffi/include/ffi.h.in
parent8ac34e6dbde42bf7267604428d5418cb79c1fa7e (diff)
downloadppe42-gcc-ea4d299a259d8cc08aefa91e797ec4a6e5bf4053.tar.gz
ppe42-gcc-ea4d299a259d8cc08aefa91e797ec4a6e5bf4053.zip
* 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: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123622 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libffi/include/ffi.h.in')
-rw-r--r--libffi/include/ffi.h.in31
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
-
OpenPOWER on IntegriCloud