minor portability fixes; printf now uses double for floating point conversions by default in posix mode

This commit is contained in:
Chet Ramey
2022-04-12 09:57:43 -04:00
parent 0b9a4b3ae0
commit 3be2a2ca9a
14 changed files with 557 additions and 360 deletions
Vendored
+60 -23
View File
@@ -1,5 +1,5 @@
#! /bin/sh
# From configure.ac for Bash 5.2, version 5.039.
# From configure.ac for Bash 5.2, version 5.040.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.71 for bash 5.2-beta.
#
@@ -6659,6 +6659,11 @@ fi
# codeset.m4 serial 5 (gettext-0.18.2)
@@ -15503,19 +15508,6 @@ else $as_nop
;;
esac
fi
ac_fn_c_check_func "$LINENO" "strtoimax" "ac_cv_func_strtoimax"
if test "x$ac_cv_func_strtoimax" = xyes
then :
printf "%s\n" "#define HAVE_STRTOIMAX 1" >>confdefs.h
else $as_nop
case " $LIBOBJS " in
*" strtoimax.$ac_objext "* ) ;;
*) LIBOBJS="$LIBOBJS strtoimax.$ac_objext"
;;
esac
fi
ac_fn_c_check_func "$LINENO" "strtoumax" "ac_cv_func_strtoumax"
if test "x$ac_cv_func_strtoumax" = xyes
@@ -15711,15 +15703,6 @@ printf "%s\n" "$bash_cv_strtold_broken" >&6; }
fi
ac_fn_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_strtoimax" = xyes
then :
ac_have_decl=1
else $as_nop
ac_have_decl=0
fi
printf "%s\n" "#define HAVE_DECL_STRTOIMAX $ac_have_decl" >>confdefs.h
ac_fn_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_strtol" = xyes
then :
@@ -20417,6 +20400,60 @@ printf "%s\n" "#define HAVE_VSNPRINTF 0" >>confdefs.h
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for usable strtoimax" >&5
printf %s "checking for usable strtoimax... " >&6; }
if test ${bash_cv_func_strtoimax+y}
then :
printf %s "(cached) " >&6
else $as_nop
HAVE_STRTOIMAX=0 HAVE_DECL_STRTOIMAX=0
ac_fn_c_check_func "$LINENO" "strtoimax" "ac_cv_func_strtoimax"
if test "x$ac_cv_func_strtoimax" = xyes
then :
printf "%s\n" "#define HAVE_STRTOIMAX 1" >>confdefs.h
fi
ac_fn_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
if test "x$ac_cv_have_decl_strtoimax" = xyes
then :
ac_have_decl=1
else $as_nop
ac_have_decl=0
fi
printf "%s\n" "#define HAVE_DECL_STRTOIMAX $ac_have_decl" >>confdefs.h
if test "$ac_cv_func_strtoimax" = "yes" ; then
HAVE_STRTOIMAX=1
fi
if test "$ac_cv_have_decl_strtoimax" = "yes" ; then
HAVE_DECL_STRTOIMAX=1
fi
if test "$HAVE_STRTOIMAX" = 0 || test "$HAVE_DECL_STRTOIMAX" = 0 ; then
bash_cv_func_strtoimax=no REPLACE_STRTOIMAX=1
else
bash_cv_func_strtoimax=yes
fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_strtoimax" >&5
printf "%s\n" "$bash_cv_func_strtoimax" >&6; }
if test $bash_cv_func_strtoimax = yes; then
case " $LIBOBJS " in
*" strtoimax.$ac_objext "* ) ;;
*) LIBOBJS="$LIBOBJS strtoimax.$ac_objext"
;;
esac
fi
if test "$ac_cv_func_putenv" = "yes"; then