From eaa8503dbf9cb35d14004acbaa68a8c8c16fb051 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Wed, 18 Jan 2023 11:54:04 +0100 Subject: [PATCH] Port configure script to C99 Related to: --- gsl-configure-c99.patch | 49 +++++++++++++++++++++++++++++++++++++++++ gsl.spec | 7 +++++- 2 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 gsl-configure-c99.patch diff --git a/gsl-configure-c99.patch b/gsl-configure-c99.patch new file mode 100644 index 0000000..c0ece16 --- /dev/null +++ b/gsl-configure-c99.patch @@ -0,0 +1,49 @@ +Avoid calling the undeclared exit function and future failures +with compilers which do not support implicit function declarations. + +Submitted upstream: + +diff --git a/configure b/configure +index b593652a6693e702..dac25375fd493823 100755 +--- a/configure ++++ b/configure +@@ -14407,7 +14407,7 @@ int main (void) + inf = exp(1.0e10); + nan = inf / inf ; + status = (nan == nan); +- exit (status); ++ return status; + } + _ACEOF + if ac_fn_c_try_run "$LINENO" +@@ -14452,7 +14452,7 @@ int main (void) + for (i = 0; i < 5; i++) { z = z / 10.0 ; }; + for (i = 0; i < 5; i++) { z = z * 10.0 ; }; + status = (z == 0.0); +- exit (status); ++ return status; + } + _ACEOF + if ac_fn_c_try_run "$LINENO" +diff --git a/configure.ac b/configure.ac +index a2e038f5656e983a..40e7d2a3db3e4d41 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -449,7 +449,7 @@ int main (void) + inf = exp(1.0e10); + nan = inf / inf ; + status = (nan == nan); +- exit (status); ++ return status; + }]])],[ac_cv_c_ieee_comparisons="yes"],[ac_cv_c_ieee_comparisons="no"],[ac_cv_c_ieee_comparisons="yes"]) + ]) + +@@ -469,7 +469,7 @@ int main (void) + for (i = 0; i < 5; i++) { z = z / 10.0 ; }; + for (i = 0; i < 5; i++) { z = z * 10.0 ; }; + status = (z == 0.0); +- exit (status); ++ return status; + }]])],[ac_cv_c_ieee_denormals="yes"],[ac_cv_c_ieee_denormals="no"],[ac_cv_c_ieee_denormals="yes"]) + ]) + diff --git a/gsl.spec b/gsl.spec index e572efc..b6e9c73 100644 --- a/gsl.spec +++ b/gsl.spec @@ -1,7 +1,7 @@ Summary: The GNU Scientific Library for numerical analysis Name: gsl Version: 2.7.1 -Release: 2%{?dist} +Release: 3%{?dist} URL: http://www.gnu.org/software/gsl/ License: GPLv3+ Source: http://ftp.gnu.org/gnu/gsl/%{name}-%{version}.tar.gz @@ -9,6 +9,7 @@ Patch0: gsl-1.10-lib64.patch # http://lists.gnu.org/archive/html/bug-gsl/2015-12/msg00012.html Patch1: gsl-tol.patch Patch2: gsl-test.patch +Patch3: gsl-configure-c99.patch BuildRequires: gcc BuildRequires: pkgconfig @@ -33,6 +34,7 @@ developing programs using the GSL (GNU Scientific Library). %patch0 -p1 -b .lib64 %patch1 -p1 -b .tol %patch2 -p1 -b .test +%patch3 -p1 iconv -f windows-1252 -t utf-8 THANKS > THANKS.aux touch -r THANKS THANKS.aux @@ -81,6 +83,9 @@ rm -r %{buildroot}%{_libdir}/*.a %{_includedir}/gsl/ %changelog +* Wed Jan 18 2023 Florian Weimer - 2.7.1-3 +- Port configure script to C99 + * Tue Aug 23 2022 Mamoru TASAKA - 2.7.1-2 - Rebuild again for bodhi issue