@@ -14809,6 +14809,68 @@ fi
1480914809# snprintfs that use %lld, %qd, or %I64d as the format. If none of these
1481014810# work, fall back to our own snprintf emulation (which we know uses %lld).
1481114811
14812+ # Also force use of our snprintf if system's doesn't do arg control
14813+ if test $pgac_need_repl_snprintf = no; then
14814+ echo "$as_me:$LINENO: checking whether printf supports argument control" >&5
14815+ echo $ECHO_N "checking whether printf supports argument control... $ECHO_C" >&6
14816+ if test "${pgac_cv_printf_arg_control+set}" = set; then
14817+ echo $ECHO_N "(cached) $ECHO_C" >&6
14818+ else
14819+ if test "$cross_compiling" = yes; then
14820+ pgac_cv_printf_arg_control=cross
14821+ else
14822+ cat >conftest.$ac_ext <<_ACEOF
14823+ #line $LINENO "configure"
14824+ #include "confdefs.h"
14825+ #include <stdio.h>
14826+ #include <string.h>
14827+
14828+ int main()
14829+ {
14830+ char buf[100];
14831+
14832+ /* can it swap arguments? */
14833+ snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
14834+ if (strcmp(buf, "4 3") != 0)
14835+ return 1;
14836+ return 0;
14837+ }
14838+ _ACEOF
14839+ rm -f conftest$ac_exeext
14840+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14841+ (eval $ac_link) 2>&5
14842+ ac_status=$?
14843+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14844+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14845+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14846+ (eval $ac_try) 2>&5
14847+ ac_status=$?
14848+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
14849+ (exit $ac_status); }; }; then
14850+ pgac_cv_printf_arg_control=yes
14851+ else
14852+ echo "$as_me: program exited with status $ac_status" >&5
14853+ echo "$as_me: failed program was:" >&5
14854+ cat conftest.$ac_ext >&5
14855+ ( exit $ac_status )
14856+ pgac_cv_printf_arg_control=no
14857+ fi
14858+ rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14859+ fi
14860+
14861+ fi
14862+ echo "$as_me:$LINENO: result: $pgac_cv_printf_arg_control" >&5
14863+ echo "${ECHO_T}$pgac_cv_printf_arg_control" >&6
14864+
14865+ if test $pgac_cv_printf_arg_control != yes ; then
14866+ pgac_need_repl_snprintf=yes
14867+ fi
14868+ fi
14869+
14870+ if test $pgac_need_repl_snprintf = yes; then
14871+ LIBOBJS="$LIBOBJS snprintf.$ac_objext"
14872+ fi
14873+
1481214874if test "$HAVE_LONG_LONG_INT_64" = yes ; then
1481314875 if test $pgac_need_repl_snprintf = no; then
1481414876 echo "$as_me:$LINENO: checking snprintf format for long long int" >&5
@@ -14911,68 +14973,6 @@ cat >>confdefs.h <<_ACEOF
1491114973_ACEOF
1491214974
1491314975
14914- # Also force use of our snprintf if system's doesn't do arg control
14915- if test $pgac_need_repl_snprintf = no; then
14916- echo "$as_me:$LINENO: checking whether printf supports argument control" >&5
14917- echo $ECHO_N "checking whether printf supports argument control... $ECHO_C" >&6
14918- if test "${pgac_cv_printf_arg_control+set}" = set; then
14919- echo $ECHO_N "(cached) $ECHO_C" >&6
14920- else
14921- if test "$cross_compiling" = yes; then
14922- pgac_cv_printf_arg_control=cross
14923- else
14924- cat >conftest.$ac_ext <<_ACEOF
14925- #line $LINENO "configure"
14926- #include "confdefs.h"
14927- #include <stdio.h>
14928- #include <string.h>
14929-
14930- int main()
14931- {
14932- char buf[100];
14933-
14934- /* can it swap arguments? */
14935- snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
14936- if (strcmp(buf, "4 3") != 0)
14937- return 1;
14938- return 0;
14939- }
14940- _ACEOF
14941- rm -f conftest$ac_exeext
14942- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14943- (eval $ac_link) 2>&5
14944- ac_status=$?
14945- echo "$as_me:$LINENO: \$? = $ac_status" >&5
14946- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14947- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14948- (eval $ac_try) 2>&5
14949- ac_status=$?
14950- echo "$as_me:$LINENO: \$? = $ac_status" >&5
14951- (exit $ac_status); }; }; then
14952- pgac_cv_printf_arg_control=yes
14953- else
14954- echo "$as_me: program exited with status $ac_status" >&5
14955- echo "$as_me: failed program was:" >&5
14956- cat conftest.$ac_ext >&5
14957- ( exit $ac_status )
14958- pgac_cv_printf_arg_control=no
14959- fi
14960- rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14961- fi
14962-
14963- fi
14964- echo "$as_me:$LINENO: result: $pgac_cv_printf_arg_control" >&5
14965- echo "${ECHO_T}$pgac_cv_printf_arg_control" >&6
14966-
14967- if test $pgac_cv_printf_arg_control != yes ; then
14968- pgac_need_repl_snprintf=yes
14969- fi
14970- fi
14971-
14972- if test $pgac_need_repl_snprintf = yes; then
14973- LIBOBJS="$LIBOBJS snprintf.$ac_objext"
14974- fi
14975-
1497614976# Need a #define for the size of Datum (unsigned long)
1497714977echo "$as_me:$LINENO: checking for unsigned long" >&5
1497814978echo $ECHO_N "checking for unsigned long... $ECHO_C" >&6