summaryrefslogtreecommitdiff
path: root/sci-mathematics/unuran/files/unuran-1.9.0-configure-clang16.patch
blob: 66a9d44538bb821d809d4035bfedd1da13c6eeb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
https://src.fedoraproject.org/rpms/unuran/blob/4e6e6392ad892454339458b655fd0324e58de3b7/f/unuran-configure-c99.patch
https://bugzilla.redhat.com/show_bug.cgi?id=2150308

Avoid calling the undeclared exit function.  Instead return
from main.  Implicit function declarations were removed from C99,
and future compilers are likely to reject them.

--- a/acinclude.m4
+++ b/acinclude.m4
@@ -14,7 +14,7 @@ int main (void)
    nan = inf / inf;
    /* nan = 0.0 / 0.0; */
    status = (nan == nan);
-   exit (status);
+   return status;
 }]])],
 [ac_cv_c_ieee_comparisons="yes"],
 [ac_cv_c_ieee_comparisons="no"],
@@ -43,7 +43,7 @@ int main (void)
    double x = 0.0;
    double inf = 1.0 / x;
    int status = (inf < DBL_MAX/2.);
-   exit (status);
+   return status;
 }]])],
 [ac_cv_c_divide_by_zero="yes"],
 [ac_cv_c_divide_by_zero="no"],