Always define long double types.

This commit is contained in:
Anthony Green 2024-02-18 07:48:51 -05:00
parent 012fcaf96c
commit cd78b53912
3 changed files with 5 additions and 20 deletions

View File

@ -1,6 +1,6 @@
/* -----------------------------------------------------------------*-C-*-
libffi @VERSION@
- Copyright (c) 2011, 2014, 2019, 2021, 2022 Anthony Green
- Copyright (c) 2011, 2014, 2019, 2021, 2022, 2024 Anthony Green
- Copyright (c) 1996-2003, 2007, 2008 Red Hat, Inc.
Permission is hereby granted, free of charge, to any person
@ -220,21 +220,12 @@ FFI_EXTERN ffi_type ffi_type_sint64;
FFI_EXTERN ffi_type ffi_type_float;
FFI_EXTERN ffi_type ffi_type_double;
FFI_EXTERN ffi_type ffi_type_pointer;
#if @HAVE_LONG_DOUBLE@
FFI_EXTERN ffi_type ffi_type_longdouble;
#else
#define ffi_type_longdouble ffi_type_double
#endif
#ifdef FFI_TARGET_HAS_COMPLEX_TYPE
FFI_EXTERN ffi_type ffi_type_complex_float;
FFI_EXTERN ffi_type ffi_type_complex_double;
#if @HAVE_LONG_DOUBLE@
FFI_EXTERN ffi_type ffi_type_complex_longdouble;
#else
#define ffi_type_complex_longdouble ffi_type_complex_double
#endif
#endif
#endif /* LIBFFI_HIDE_BASIC_TYPES */

View File

@ -20,9 +20,7 @@ LIBFFI_BASE_8.0 {
ffi_type_sint64;
ffi_type_float;
ffi_type_double;
#if defined(HAVE_LONG_DOUBLE) || defined(HAVE_LONG_DOUBLE_VARIANT)
ffi_type_longdouble;
#endif
ffi_type_pointer;
/* Exported functions. */
@ -54,9 +52,7 @@ LIBFFI_COMPLEX_8.0 {
/* Exported data variables. */
ffi_type_complex_float;
ffi_type_complex_double;
#if defined(HAVE_LONG_DOUBLE) || defined(HAVE_LONG_DOUBLE_VARIANT)
ffi_type_complex_longdouble;
#endif
} LIBFFI_BASE_8.0;
#endif

View File

@ -1,6 +1,6 @@
/* -----------------------------------------------------------------------
types.c - Copyright (c) 1996, 1998 Red Hat, Inc.
types.c - Copyright (c) 1996, 1998, 2024 Red Hat, Inc.
Predefined ffi_types needed by libffi.
Permission is hereby granted, free of charge, to any person obtaining
@ -87,7 +87,7 @@ FFI_TYPEDEF(double, double, FFI_TYPE_DOUBLE, const);
#endif
#ifdef __alpha__
/* Even if we're not configured to default to 128-bit long double,
/* Even if we're not configured to default to 128-bit long double,
maintain binary compatibility, as -mlong-double-128 can be used
at any time. */
/* Validate the hard-coded number below. */
@ -95,14 +95,12 @@ FFI_TYPEDEF(double, double, FFI_TYPE_DOUBLE, const);
# error FFI_TYPE_LONGDOUBLE out of date
# endif
const ffi_type ffi_type_longdouble = { 16, 16, 4, NULL };
#elif FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
#else
FFI_TYPEDEF(longdouble, long double, FFI_TYPE_LONGDOUBLE, FFI_LDBL_CONST);
#endif
#ifdef FFI_TARGET_HAS_COMPLEX_TYPE
FFI_COMPLEX_TYPEDEF(float, float, const);
FFI_COMPLEX_TYPEDEF(double, double, const);
#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
FFI_COMPLEX_TYPEDEF(longdouble, long double, FFI_LDBL_CONST);
#endif
#endif