]> granicus.if.org Git - postgresql/commitdiff
Alter the configure script to fail immediately if the C compiler does not
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 7 Jan 2010 00:25:18 +0000 (00:25 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 7 Jan 2010 00:25:18 +0000 (00:25 +0000)
provide a working 64-bit integer datatype.  As recently noted, we've been
broken on such platforms since early in the 8.4 development cycle.  Since
it took nearly two years for anyone to even notice, it seems that the
rationale for continuing to support such platforms has reached the point
of non-existence.  Rather than thrashing around to try to make it work
again, we'll just admit up front that this no longer works.

Back-patch to 8.4 since that branch is also broken.

We should go around to remove INT64_IS_BUSTED support, but just in HEAD,
so that seems like material for a separate commit.

configure
configure.in
src/include/pg_config.h.in

index 98a55b59f6ccc131e064791ee7888727bb1a1286..9d7afbb02231aa6ddf9798681b7fe48716614142 100755 (executable)
--- a/configure
+++ b/configure
@@ -20800,6 +20800,7 @@ fi
 
 
 
+
 { echo "$as_me:$LINENO: checking whether long int is 64 bits" >&5
 echo $ECHO_N "checking whether long int is 64 bits... $ECHO_C" >&6; }
 if test "${pgac_cv_type_long_int_64+set}" = set; then
@@ -21064,6 +21065,11 @@ _ACEOF
 
 fi
 
+  if test x"$HAVE_LONG_LONG_INT_64" = x"no" ; then
+    { { echo "$as_me:$LINENO: error: Cannot find a working 64-bit integer type." >&5
+echo "$as_me: error: Cannot find a working 64-bit integer type." >&2;}
+   { (exit 1); exit 1; }; }
+  fi
 fi
 
 
 
 
 
-# If the user did not disable integer datetimes, check that
-# there is a working 64-bit integral type to use.
-if test x"$USE_INTEGER_DATETIMES" = x"yes" &&
-   test x"$HAVE_LONG_INT_64" = x"no" &&
-   test x"$HAVE_LONG_LONG_INT_64" = x"no" &&
-   test x"$HAVE_INT64" = x"no" ; then
-  { { echo "$as_me:$LINENO: error:
-Integer-based datetime support requires a 64-bit integer type,
-but no such type could be found. The --disable-integer-datetimes
-configure option can be used to disable integer-based storage
-of datetime values." >&5
-echo "$as_me: error:
-Integer-based datetime support requires a 64-bit integer type,
-but no such type could be found. The --disable-integer-datetimes
-configure option can be used to disable integer-based storage
-of datetime values." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
-
 if test "$PORTNAME" != "win32"
 then
 { echo "$as_me:$LINENO: checking for POSIX signal interface" >&5
index 858c107ff0b3f04a8733c67c214bd652aa49d159..f27ceb44bd7111df54f244580bed2f85a3a0be81 100644 (file)
@@ -1,5 +1,5 @@
 dnl Process this file with autoconf to produce a configure script.
-dnl $PostgreSQL: pgsql/configure.in,v 1.602.2.2 2009/12/10 02:56:54 scrappy Exp $
+dnl $PostgreSQL: pgsql/configure.in,v 1.602.2.3 2010/01/07 00:25:17 tgl Exp $
 dnl
 dnl Developers, please strive to achieve this order:
 dnl
@@ -1490,10 +1490,16 @@ dnl If there is no native snprintf() or it does not handle the 64-bit type,
 dnl we force our own version of snprintf() to be used instead.
 dnl Note this test must be run after our initial check for snprintf/vsnprintf.
 
+dnl As of Postgres 8.4, we no longer support compilers without a working
+dnl 64-bit type.  But we still handle the case of snprintf being broken.
+
 PGAC_TYPE_64BIT_INT([long int])
 
 if test x"$HAVE_LONG_INT_64" = x"no" ; then
   PGAC_TYPE_64BIT_INT([long long int])
+  if test x"$HAVE_LONG_LONG_INT_64" = x"no" ; then
+    AC_MSG_ERROR([Cannot find a working 64-bit integer type.])
+  fi
 fi
 
 
@@ -1537,10 +1543,10 @@ else
 fi
 
 AC_DEFINE_UNQUOTED(INT64_FORMAT, $INT64_FORMAT,
-                   [Define to the appropriate snprintf format for 64-bit ints, if any.])
+                   [Define to the appropriate snprintf format for 64-bit ints.])
 
 AC_DEFINE_UNQUOTED(UINT64_FORMAT, $UINT64_FORMAT,
-                   [Define to the appropriate snprintf format for unsigned 64-bit ints, if any.])
+                   [Define to the appropriate snprintf format for unsigned 64-bit ints.])
 
 # Now we have checked all the reasons to replace snprintf
 if test $pgac_need_repl_snprintf = yes; then
@@ -1625,20 +1631,6 @@ AC_CHECK_TYPES([int8, uint8, int64, uint64], [], [],
 AC_CHECK_TYPES(sig_atomic_t, [], [], [#include <signal.h>])
 
 
-# If the user did not disable integer datetimes, check that
-# there is a working 64-bit integral type to use.
-if test x"$USE_INTEGER_DATETIMES" = x"yes" &&
-   test x"$HAVE_LONG_INT_64" = x"no" &&
-   test x"$HAVE_LONG_LONG_INT_64" = x"no" &&
-   test x"$HAVE_INT64" = x"no" ; then
-  AC_MSG_ERROR([
-Integer-based datetime support requires a 64-bit integer type,
-but no such type could be found. The --disable-integer-datetimes
-configure option can be used to disable integer-based storage
-of datetime values.])
-fi
-
-
 if test "$PORTNAME" != "win32"
 then
 PGAC_FUNC_POSIX_SIGNALS
index 34732278277ffce740b98d3ffe02db2c1f67c707..4fd7b4818eda63276d4d838caecd04887929a381 100644 (file)
 /* Define to 1 if you have the <winldap.h> header file. */
 #undef HAVE_WINLDAP_H
 
-/* Define to the appropriate snprintf format for 64-bit ints, if any. */
+/* Define to the appropriate snprintf format for 64-bit ints. */
 #undef INT64_FORMAT
 
 /* Define to build with Kerberos 5 support. (--with-krb5) */
 /* Define to 1 if your <sys/time.h> declares `struct tm'. */
 #undef TM_IN_SYS_TIME
 
-/* Define to the appropriate snprintf format for unsigned 64-bit ints, if any.
-   */
+/* Define to the appropriate snprintf format for unsigned 64-bit ints. */
 #undef UINT64_FORMAT
 
 /* Define to 1 to build with assertion checks. (--enable-cassert) */