summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2001-03-23 18:42:12 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2001-03-23 18:42:12 +0000
commite458ebfd21374588bee185ba0fc2e5eba03da134 (patch)
tree510ff7db605da858ddb7c735790655a45c738a1a /configure.in
parent32924c1c9048a4dbd99f2cfedbd3128b50968c14 (diff)
downloadpostgresql-e458ebfd21374588bee185ba0fc2e5eba03da134.tar.gz
When using 'long long int' for int64 type, check to see if the compiler
accepts nnnLL syntax for long long constants. If so, decorate the CRC64 constants with LL to avoid warnings and/or erroneous results from certain non-standards-compliant compilers.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in13
1 files changed, 13 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index f82e15c7e4..a40695b174 100644
--- a/configure.in
+++ b/configure.in
@@ -979,6 +979,19 @@ if test x"$HAVE_LONG_INT_64" = x"no" ; then
fi
+dnl If we need to use "long long int", figure out whether nnnLL notation works.
+
+if [[ x"$HAVE_LONG_LONG_INT_64" = xyes ]] ; then
+ AC_TRY_COMPILE([
+#define INT64CONST(x) x##LL
+long long int foo = INT64CONST(0x1234567890123456);
+],
+ [],
+ [AC_DEFINE(HAVE_LL_CONSTANTS)],
+ [])
+fi
+
+
dnl If we found "long int" is 64 bits, assume snprintf handles it.
dnl If we found we need to use "long long int", better check.
dnl We cope with snprintfs that use either %lld or %qd as the format.