Fix some typical C99 compatibility issues in old configure scripts. diff --git a/src/sed/config/getline.m4 b/src/sed/config/getline.m4 index ff8b5f4b..52d2e3e7 100644 --- a/src/sed/config/getline.m4 +++ b/src/sed/config/getline.m4 @@ -27,7 +27,7 @@ AC_DEFUN([AM_FUNC_GETLINE], if (!in) return 1; len = getline (&line, &siz, in); - exit ((len == 4 && line && strcmp (line, "foo\n") == 0) ? 0 : 1); + return (len == 4 && line && strcmp (line, "foo\n") == 0) ? 0 : 1; } ], am_cv_func_working_getline=yes dnl The library version works. , am_cv_func_working_getline=no dnl The library version does NOT work. diff --git a/src/sed/configure b/src/sed/configure index 0b01618f..b1172113 100755 --- a/src/sed/configure +++ b/src/sed/configure @@ -2593,7 +2593,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 ();' \ @@ -3378,8 +3378,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 @@ -5747,7 +5747,7 @@ cat >>conftest.$ac_ext <<_ACEOF if (!in) return 1; len = getline (&line, &siz, in); - exit ((len == 4 && line && strcmp (line, "foo\n") == 0) ? 0 : 1); + return (len == 4 && line && strcmp (line, "foo\n") == 0) ? 0 : 1; } _ACEOF