[m-rev.] diff: avoid warnings / errors in configure tests.

Julien Fischer jfischer at opturion.com
Wed Oct 14 21:42:24 AEDT 2020


This probably fixes Mantis #524.  I don't have a system with Xcode 12
installed to test that on though.

-------------------------------------

Avoid warnings / errors in configure tests.

configure.ac:
     Avoid implicit declarations for exit().  Xcode 12 treats
     them as an error by default.

Julien.

diff --git a/configure.ac b/configure.ac
index 0b60e2e05..532f86c29 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2043,6 +2043,7 @@ AC_MSG_CHECKING(whether architecture is big-endian)
  AC_CACHE_VAL(mercury_cv_is_bigender,
      AC_TRY_RUN(
          [
+            #include <stdlib.h>
              int main() {
                  int     x = 1;
                  unsigned char   *x_p;
@@ -2070,6 +2071,7 @@ AC_MSG_CHECKING(whether architecture is little-endian)
  AC_CACHE_VAL(mercury_cv_is_littleender,
      AC_TRY_RUN(
          [
+            #include <stdlib.h>
              int main() {
                  int     x = 1;
                  unsigned char   *x_p;
@@ -2196,6 +2198,7 @@ AC_CACHE_VAL(mercury_cv_can_do_pending_io,
              #endif
              #include <sys/types.h>
              #include <sys/time.h>
+            #include <stdlib.h>
              int main() {
                  fd_set f;
                  struct timeval zero;


More information about the reviews mailing list