mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Add configure support for determining UINT64_FORMAT, the appropriate
snprintf format for uint64 items.
This commit is contained in:
14
configure
vendored
14
configure
vendored
@ -13659,9 +13659,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
|
||||
@ -13744,10 +13743,13 @@ esac
|
||||
# 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
|
||||
|
||||
|
||||
@ -13756,6 +13758,12 @@ cat >>confdefs.h <<_ACEOF
|
||||
_ACEOF
|
||||
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define UINT64_FORMAT $UINT64_FORMAT
|
||||
_ACEOF
|
||||
|
||||
|
||||
if test $pgac_need_repl_snprintf = yes; then
|
||||
LIBOBJS="$LIBOBJS snprintf.$ac_objext"
|
||||
fi
|
||||
|
Reference in New Issue
Block a user