Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit d15cb38

Browse files
committed
Alter the configure script to fail immediately if the C compiler does not
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.
1 parent a6f56ef commit d15cb38

File tree

3 files changed

+17
-40
lines changed

3 files changed

+17
-40
lines changed

configure

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -22385,6 +22385,7 @@ fi
2238522385

2238622386

2238722387

22388+
2238822389
{ $as_echo "$as_me:$LINENO: checking whether long int is 64 bits" >&5
2238922390
$as_echo_n "checking whether long int is 64 bits... " >&6; }
2239022391
if test "${pgac_cv_type_long_int_64+set}" = set; then
@@ -22657,6 +22658,11 @@ _ACEOF
2265722658

2265822659
fi
2265922660

22661+
if test x"$HAVE_LONG_LONG_INT_64" = x"no" ; then
22662+
{ { $as_echo "$as_me:$LINENO: error: Cannot find a working 64-bit integer type." >&5
22663+
$as_echo "$as_me: error: Cannot find a working 64-bit integer type." >&2;}
22664+
{ (exit 1); exit 1; }; }
22665+
fi
2266022666
fi
2266122667

2266222668

@@ -26542,26 +26548,6 @@ fi
2654226548

2654326549

2654426550

26545-
# If the user did not disable integer datetimes, check that
26546-
# there is a working 64-bit integral type to use.
26547-
if test x"$USE_INTEGER_DATETIMES" = x"yes" &&
26548-
test x"$HAVE_LONG_INT_64" = x"no" &&
26549-
test x"$HAVE_LONG_LONG_INT_64" = x"no" &&
26550-
test x"$HAVE_INT64" = x"no" ; then
26551-
{ { $as_echo "$as_me:$LINENO: error:
26552-
Integer-based datetime support requires a 64-bit integer type,
26553-
but no such type could be found. The --disable-integer-datetimes
26554-
configure option can be used to disable integer-based storage
26555-
of datetime values." >&5
26556-
$as_echo "$as_me: error:
26557-
Integer-based datetime support requires a 64-bit integer type,
26558-
but no such type could be found. The --disable-integer-datetimes
26559-
configure option can be used to disable integer-based storage
26560-
of datetime values." >&2;}
26561-
{ (exit 1); exit 1; }; }
26562-
fi
26563-
26564-
2656526551
if test "$PORTNAME" != "win32"
2656626552
then
2656726553
{ $as_echo "$as_me:$LINENO: checking for POSIX signal interface" >&5

configure.in

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
dnl Process this file with autoconf to produce a configure script.
2-
dnl $PostgreSQL: pgsql/configure.in,v 1.618 2010/01/02 16:57:32 momjian Exp $
2+
dnl $PostgreSQL: pgsql/configure.in,v 1.619 2010/01/07 00:25:04 tgl Exp $
33
dnl
44
dnl Developers, please strive to achieve this order:
55
dnl
@@ -1499,10 +1499,16 @@ dnl If there is no native snprintf() or it does not handle the 64-bit type,
14991499
dnl we force our own version of snprintf() to be used instead.
15001500
dnl Note this test must be run after our initial check for snprintf/vsnprintf.
15011501

1502+
dnl As of Postgres 8.4, we no longer support compilers without a working
1503+
dnl 64-bit type. But we still handle the case of snprintf being broken.
1504+
15021505
PGAC_TYPE_64BIT_INT([long int])
15031506

15041507
if test x"$HAVE_LONG_INT_64" = x"no" ; then
15051508
PGAC_TYPE_64BIT_INT([long long int])
1509+
if test x"$HAVE_LONG_LONG_INT_64" = x"no" ; then
1510+
AC_MSG_ERROR([Cannot find a working 64-bit integer type.])
1511+
fi
15061512
fi
15071513

15081514

@@ -1546,10 +1552,10 @@ else
15461552
fi
15471553

15481554
AC_DEFINE_UNQUOTED(INT64_FORMAT, $INT64_FORMAT,
1549-
[Define to the appropriate snprintf format for 64-bit ints, if any.])
1555+
[Define to the appropriate snprintf format for 64-bit ints.])
15501556

15511557
AC_DEFINE_UNQUOTED(UINT64_FORMAT, $UINT64_FORMAT,
1552-
[Define to the appropriate snprintf format for unsigned 64-bit ints, if any.])
1558+
[Define to the appropriate snprintf format for unsigned 64-bit ints.])
15531559

15541560
# Now we have checked all the reasons to replace snprintf
15551561
if test $pgac_need_repl_snprintf = yes; then
@@ -1632,20 +1638,6 @@ AC_CHECK_TYPES([int8, uint8, int64, uint64], [], [],
16321638
AC_CHECK_TYPES(sig_atomic_t, [], [], [#include <signal.h>])
16331639

16341640

1635-
# If the user did not disable integer datetimes, check that
1636-
# there is a working 64-bit integral type to use.
1637-
if test x"$USE_INTEGER_DATETIMES" = x"yes" &&
1638-
test x"$HAVE_LONG_INT_64" = x"no" &&
1639-
test x"$HAVE_LONG_LONG_INT_64" = x"no" &&
1640-
test x"$HAVE_INT64" = x"no" ; then
1641-
AC_MSG_ERROR([
1642-
Integer-based datetime support requires a 64-bit integer type,
1643-
but no such type could be found. The --disable-integer-datetimes
1644-
configure option can be used to disable integer-based storage
1645-
of datetime values.])
1646-
fi
1647-
1648-
16491641
if test "$PORTNAME" != "win32"
16501642
then
16511643
PGAC_FUNC_POSIX_SIGNALS

src/include/pg_config.h.in

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@
647647
/* Define to 1 if you have the <winldap.h> header file. */
648648
#undef HAVE_WINLDAP_H
649649

650-
/* Define to the appropriate snprintf format for 64-bit ints, if any. */
650+
/* Define to the appropriate snprintf format for 64-bit ints. */
651651
#undef INT64_FORMAT
652652

653653
/* Define to build with Kerberos 5 support. (--with-krb5) */
@@ -732,8 +732,7 @@
732732
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
733733
#undef TM_IN_SYS_TIME
734734

735-
/* Define to the appropriate snprintf format for unsigned 64-bit ints, if any.
736-
*/
735+
/* Define to the appropriate snprintf format for unsigned 64-bit ints. */
737736
#undef UINT64_FORMAT
738737

739738
/* Define to 1 to build with assertion checks. (--enable-cassert) */

0 commit comments

Comments
 (0)