Always define long double types.
authorAnthony Green <green@moxielogic.org>
Sun, 18 Feb 2024 12:48:51 +0000 (07:48 -0500)
committerAnthony Green <green@moxielogic.org>
Sun, 18 Feb 2024 12:48:51 +0000 (07:48 -0500)
include/ffi.h.in
libffi.map.in
src/types.c

index ecfe60a01981e404c14028dac9ca4885ab1c1a49..e5c1daef3948140a8e79e84050de2f4bc558eeaa 100644 (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 */
 
index 384e44cc731131fb9507ba26815fed512bef6e6e..08c50b22d201ad3988cf5657108d1cbade869aea 100644 (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
 
index 9ec27f6cf37676d83bfb489bbe1bb7c7c7363378..c1c27f38d3463bced9d8f95b232b6d2f49724636 100644 (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