mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Factor out the code that detects the long long int snprintf format into a
separate macro. Also add support for %I64d which is the way on Windows. The code that checks for the 64-bit int type now gives more reasonable results when cross-compiling: In that case we just take the compiler's information and trust that the arithmetic works. Disabling int64 is too pessimistic.
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
# Macros to detect C compiler features
|
||||
# $Header: /cvsroot/pgsql/config/c-compiler.m4,v 1.5 2002/03/29 17:32:53 petere Exp $
|
||||
# $Header: /cvsroot/pgsql/config/c-compiler.m4,v 1.6 2003/01/28 21:57:12 petere Exp $
|
||||
|
||||
|
||||
# PGAC_C_SIGNED
|
||||
@ -54,9 +54,11 @@ main() {
|
||||
}],
|
||||
[Ac_cachevar=yes],
|
||||
[Ac_cachevar=no],
|
||||
[Ac_cachevar=no
|
||||
dnl We will do better here with Autoconf 2.50
|
||||
AC_MSG_WARN([64 bit arithmetic disabled when cross-compiling])])])
|
||||
[# If cross-compiling, check the size reported by the compiler and
|
||||
# trust that the arithmetic works.
|
||||
AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([], [sizeof($1) == 8])],
|
||||
Ac_cachevar=yes,
|
||||
Ac_cachevar=no)])])
|
||||
|
||||
Ac_define=$Ac_cachevar
|
||||
if test x"$Ac_cachevar" = xyes ; then
|
||||
|
Reference in New Issue
Block a user