mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Remove HAVE_LONG_LONG_INT
The presence of long long int is now implied in the requirement for C99 and the configure check for the same. We keep the define hard-coded in ecpg_config.h for backward compatibility with ecpg-using user code. Discussion: https://www.postgresql.org/message-id/flat/5cdd6a2b-b2c7-c6f6-344c-a406d5c1a254%402ndquadrant.com
This commit is contained in:
117
configure
vendored
117
configure
vendored
@ -14170,123 +14170,6 @@ fi
|
||||
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
|
||||
$as_echo_n "checking for unsigned long long int... " >&6; }
|
||||
if ${ac_cv_type_unsigned_long_long_int+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_cv_type_unsigned_long_long_int=yes
|
||||
if test "x${ac_cv_prog_cc_c99-no}" = xno; then
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
/* For now, do not test the preprocessor; as of 2007 there are too many
|
||||
implementations with broken preprocessors. Perhaps this can
|
||||
be revisited in 2012. In the meantime, code should not expect
|
||||
#if to work with literals wider than 32 bits. */
|
||||
/* Test literals. */
|
||||
long long int ll = 9223372036854775807ll;
|
||||
long long int nll = -9223372036854775807LL;
|
||||
unsigned long long int ull = 18446744073709551615ULL;
|
||||
/* Test constant expressions. */
|
||||
typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
|
||||
? 1 : -1)];
|
||||
typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
|
||||
? 1 : -1)];
|
||||
int i = 63;
|
||||
int
|
||||
main ()
|
||||
{
|
||||
/* Test availability of runtime routines for shift and division. */
|
||||
long long int llmax = 9223372036854775807ll;
|
||||
unsigned long long int ullmax = 18446744073709551615ull;
|
||||
return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
|
||||
| (llmax / ll) | (llmax % ll)
|
||||
| (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
|
||||
| (ullmax / ull) | (ullmax % ull));
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
|
||||
else
|
||||
ac_cv_type_unsigned_long_long_int=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
fi
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
|
||||
$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
|
||||
if test $ac_cv_type_unsigned_long_long_int = yes; then
|
||||
|
||||
$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
|
||||
$as_echo_n "checking for long long int... " >&6; }
|
||||
if ${ac_cv_type_long_long_int+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_cv_type_long_long_int=yes
|
||||
if test "x${ac_cv_prog_cc_c99-no}" = xno; then
|
||||
ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
|
||||
if test $ac_cv_type_long_long_int = yes; then
|
||||
if test "$cross_compiling" = yes; then :
|
||||
:
|
||||
else
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <limits.h>
|
||||
#ifndef LLONG_MAX
|
||||
# define HALF \
|
||||
(1LL << (sizeof (long long int) * CHAR_BIT - 2))
|
||||
# define LLONG_MAX (HALF - 1 + HALF)
|
||||
#endif
|
||||
int
|
||||
main ()
|
||||
{
|
||||
long long int n = 1;
|
||||
int i;
|
||||
for (i = 0; ; i++)
|
||||
{
|
||||
long long int m = n << i;
|
||||
if (m >> i != n)
|
||||
return 1;
|
||||
if (LLONG_MAX / 2 < m)
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_run "$LINENO"; then :
|
||||
|
||||
else
|
||||
ac_cv_type_long_long_int=no
|
||||
fi
|
||||
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
|
||||
conftest.$ac_objext conftest.beam conftest.$ac_ext
|
||||
fi
|
||||
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
|
||||
$as_echo "$ac_cv_type_long_long_int" >&6; }
|
||||
if test $ac_cv_type_long_long_int = yes; then
|
||||
|
||||
$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
|
||||
$as_echo_n "checking for locale_t... " >&6; }
|
||||
if ${pgac_cv_type_locale_t+:} false; then :
|
||||
|
Reference in New Issue
Block a user