Port configure script to C99, avoding implicit function declarations. Future compilers are likely not to accept them by default. There is no need to upstream this because re-running autotools should rewrite these file sections to use C99-compatible constructs. diff --git a/aclocal.m4 b/aclocal.m4 index 38392ca9cfc50528..bc36662d3857dafa 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -756,10 +756,6 @@ else # endif #endif -#ifdef __cplusplus -extern "C" void exit (int); -#endif - void fnord() { int i=42;} int main () { @@ -773,7 +769,7 @@ int main () /* dlclose (self); */ } - exit (status); + return status; }] EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then diff --git a/configure b/configure index 3008b7005e03f440..764248205d537b62 100755 --- a/configure +++ b/configure @@ -2932,7 +2932,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 ' \ '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 ();' \ @@ -4152,8 +4152,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 @@ -8747,10 +8747,6 @@ else # endif #endif -#ifdef __cplusplus -extern "C" void exit (int); -#endif - void fnord() { int i=42;} int main () { @@ -8764,7 +8760,7 @@ int main () /* dlclose (self); */ } - exit (status); + return status; } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 @@ -8845,10 +8841,6 @@ else # endif #endif -#ifdef __cplusplus -extern "C" void exit (int); -#endif - void fnord() { int i=42;} int main () { @@ -8862,7 +8854,7 @@ int main () /* dlclose (self); */ } - exit (status); + return status; } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 @@ -12451,10 +12443,6 @@ else # endif #endif -#ifdef __cplusplus -extern "C" void exit (int); -#endif - void fnord() { int i=42;} int main () { @@ -12468,7 +12456,7 @@ int main () /* dlclose (self); */ } - exit (status); + return status; } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 @@ -12549,10 +12537,6 @@ else # endif #endif -#ifdef __cplusplus -extern "C" void exit (int); -#endif - void fnord() { int i=42;} int main () { @@ -12566,7 +12550,7 @@ int main () /* dlclose (self); */ } - exit (status); + return status; } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 @@ -17962,10 +17946,6 @@ else # endif #endif -#ifdef __cplusplus -extern "C" void exit (int); -#endif - void fnord() { int i=42;} int main () { @@ -17979,7 +17959,7 @@ int main () /* dlclose (self); */ } - exit (status); + return status; } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 @@ -18060,10 +18040,6 @@ else # endif #endif -#ifdef __cplusplus -extern "C" void exit (int); -#endif - void fnord() { int i=42;} int main () { @@ -18077,7 +18053,7 @@ int main () /* dlclose (self); */ } - exit (status); + return status; } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 @@ -19479,8 +19455,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