Blob Blame History Raw
Fix an implicit declaration of the exit function in the
libXp/rc=XpQueryVersion autoconf probe.  Future compilers will not
support implicit function declarations by default, causing the probe
to always fail.

Also included are C99 compatibility fixes for historic autoconf
incompatibilities, long since fixed in autoconf upstream.

Submitted upstream: <https://sourceforge.net/p/xbae/patches/3/>

diff --git a/acinclude.m4 b/acinclude.m4
index 36b4569680ea8531..0bda82ef7480beaf 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -334,7 +334,7 @@ Display *display=NULL;
 short   major_version, minor_version;
 Status rc;
 rc=XpQueryVersion(display, &major_version, &minor_version);
-exit(0);
+return 0;
 }
 ],
 lt_cv_libxp=yes,
diff --git a/configure b/configure
index f43d920c33b055ff..5e82cda106a450e8 100755
--- a/configure
+++ b/configure
@@ -2937,7 +2937,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 ();' \
@@ -4120,7 +4120,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 ();' \
@@ -4477,8 +4477,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
@@ -21418,7 +21418,7 @@ Display *display=NULL;
 short   major_version, minor_version;
 Status rc;
 rc=XpQueryVersion(display, &major_version, &minor_version);
-exit(0);
+return 0;
 }
 
   ;