@@ -15100,7 +15100,12 @@ if test x"$pgac_cv__128bit_int" = xyes ; then
15100
15100
# If not cross-compiling, we can test for bugs and disable use of __int128
15101
15101
# with buggy compilers. If cross-compiling, hope for the best.
15102
15102
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83925
15103
- AC_RUN_IFELSE([AC_LANG_PROGRAM([
15103
+ if test " $cross_compiling " = yes; then :
15104
+ pgac_cv__128bit_int_bug=" assuming ok"
15105
+ else
15106
+ cat confdefs.h - << _ACEOF >conftest.$ac_ext
15107
+ /* end confdefs.h. */
15108
+
15104
15109
/* This must match the corresponding code in c.h: */
15105
15110
#if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__IBMC__)
15106
15111
#define pg_attribute_aligned(a) __attribute__((aligned(a)))
@@ -15112,17 +15117,31 @@ pg_attribute_aligned(8)
15112
15117
;
15113
15118
int128a holder;
15114
15119
void pass_by_val(void *buffer, int128a par) { holder = par; }
15115
- ],[
15120
+
15121
+ int
15122
+ main ()
15123
+ {
15124
+
15116
15125
long int i64 = 97656225L << 12;
15117
15126
int128a q;
15118
15127
pass_by_val(main, (int128a) i64);
15119
15128
q = (int128a) i64;
15120
15129
if (q != holder)
15121
15130
return 1;
15122
- ])],
15123
- [pgac_cv__128bit_int_bug= ok],
15124
- [pgac_cv__128bit_int_bug= broken],
15125
- [pgac_cv__128bit_int_bug= " assuming ok" ]))
15131
+
15132
+ ;
15133
+ return 0;
15134
+ }
15135
+ _ACEOF
15136
+ if ac_fn_c_try_run " $LINENO " ; then :
15137
+ pgac_cv__128bit_int_bug=ok
15138
+ else
15139
+ pgac_cv__128bit_int_bug=broken
15140
+ fi
15141
+ rm -f core * .core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15142
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
15143
+ fi
15144
+ )
15126
15145
if test x" $pgac_cv__128bit_int_bug " ! = xbroken ; then
15127
15146
15128
15147
$as_echo " #define PG_INT128_TYPE __int128" >> confdefs.h
0 commit comments