diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2004-02-10 19:55:45 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2004-02-10 19:55:45 +0000 |
| commit | 127ea18f48189d57987b46be30cfa036251bf7e5 (patch) | |
| tree | bb632e02aa866ac88cb1f1c8d2d9b0da8ab23910 /configure.in | |
| parent | feed7cf1c14855c6bd0140b60f6fee1311f37aae (diff) | |
| download | postgresql-127ea18f48189d57987b46be30cfa036251bf7e5.tar.gz | |
Add configure support for determining UINT64_FORMAT, the appropriate
snprintf format for uint64 items.
Diffstat (limited to 'configure.in')
| -rw-r--r-- | configure.in | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/configure.in b/configure.in index 6f90cbfa5a..3f7994fbbf 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -dnl $PostgreSQL: pgsql/configure.in,v 1.313 2004/02/02 22:20:32 momjian Exp $ +dnl $PostgreSQL: pgsql/configure.in,v 1.314 2004/02/10 19:55:45 tgl Exp $ dnl dnl Developers, please strive to achieve this order: dnl @@ -1063,9 +1063,8 @@ fi # If we found "long int" is 64 bits, assume snprintf handles it. If # we found we need to use "long long int", better check. We cope with -# snprintfs that use either %lld, %qd, or %I64d as the format. If -# neither works, fall back to our own snprintf emulation (which we -# know uses %lld). +# snprintfs that use %lld, %qd, or %I64d as the format. If none of these +# work, fall back to our own snprintf emulation (which we know uses %lld). if test "$HAVE_LONG_LONG_INT_64" = yes ; then if test $pgac_need_repl_snprintf = no; then @@ -1079,15 +1078,21 @@ if test "$HAVE_LONG_LONG_INT_64" = yes ; then # Here if we previously decided we needed to use our own snprintf LONG_LONG_INT_FORMAT='%lld' fi + LONG_LONG_UINT_FORMAT=`echo "$LONG_LONG_INT_FORMAT" | sed 's/d$/u/'` INT64_FORMAT="\"$LONG_LONG_INT_FORMAT\"" + UINT64_FORMAT="\"$LONG_LONG_UINT_FORMAT\"" else # Here if we are not using 'long long int' at all INT64_FORMAT='"%ld"' + UINT64_FORMAT='"%lu"' fi AC_DEFINE_UNQUOTED(INT64_FORMAT, $INT64_FORMAT, [Define to the appropriate snprintf format for 64-bit ints, if any.]) +AC_DEFINE_UNQUOTED(UINT64_FORMAT, $UINT64_FORMAT, + [Define to the appropriate snprintf format for unsigned 64-bit ints, if any.]) + if test $pgac_need_repl_snprintf = yes; then AC_LIBOBJ(snprintf) fi |
