Related to: <https://fedoraproject.org/wiki/Changes/PortingToModernC> <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>
49 lines
1.2 KiB
Diff
49 lines
1.2 KiB
Diff
Avoid historic C99 incompatibilities. No need to upstream this
|
|
because re-running autoconf with a moderately recent version
|
|
will fix this.
|
|
|
|
diff --git a/configure b/configure
|
|
index e7c4d8c370d8168d..e3670ac596caed52 100755
|
|
--- a/configure
|
|
+++ b/configure
|
|
@@ -3053,7 +3053,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
|
(exit $ac_status); }; }; then
|
|
for ac_declaration in \
|
|
- '' \
|
|
+ '#include <stdlib.h>' \
|
|
'extern "C" void std::exit (int) throw (); using std::exit;' \
|
|
'extern "C" void std::exit (int); using std::exit;' \
|
|
'extern "C" void exit (int) throw ();' \
|
|
@@ -3652,8 +3652,8 @@ main ()
|
|
for (i = 0; i < 256; i++)
|
|
if (XOR (islower (i), ISLOWER (i))
|
|
|| toupper (i) != TOUPPER (i))
|
|
- exit(2);
|
|
- exit (0);
|
|
+ return 2;
|
|
+ return 0;
|
|
}
|
|
_ACEOF
|
|
rm -f conftest$ac_exeext
|
|
@@ -4939,7 +4939,7 @@ main()
|
|
double value;
|
|
value = strtod (string, &term);
|
|
if (value != 69 || term != (string + 4))
|
|
- exit (1);
|
|
+ return 1;
|
|
}
|
|
|
|
{
|
|
@@ -4949,9 +4949,9 @@ main()
|
|
char *term;
|
|
strtod (string, &term);
|
|
if (term != string && *(term - 1) == 0)
|
|
- exit (1);
|
|
+ return 1;
|
|
}
|
|
- exit (0);
|
|
+ return 0;
|
|
}
|
|
|
|
_ACEOF
|