Skip to content

Commit

Permalink
Update bits-info.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
ale5000-git authored Oct 18, 2024
1 parent 501c53f commit 87a543f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tools/bits-info.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ set -u 2> /dev/null || :
case "$(set -o || :)" in *'pipefail'*) set -o pipefail || printf 1>&2 '%s\n' 'Failed: pipefail' ;; *) ;; esac

# The "obosh" shell does NOT support "command" while the "posh" shell does NOT support "type"
{ command 1> /dev/null -v 'command'; } 2> /dev/null || command()
{
command 1> /dev/null -v 'command'
} 2> /dev/null || command()
{
test "${1-}" = '-v' || exit 255
shift
Expand Down Expand Up @@ -909,7 +911,11 @@ main()
done
_shell_arithmetic_bit="$(convert_max_signed_int_to_bit "${_max}")" || _shell_arithmetic_bit='unknown'

tmp_var="$(get_max_unsigned_int_of_shell_printf)" || :
# Some shells do NOT allow this, so we hide the errors
tmp_var="$(printf '%u\n' '-1')" 2> /dev/null || :
echo '---'
echo "${tmp_var}"
echo '---'
_shell_printf_bit="$(convert_max_unsigned_int_to_bit "${tmp_var}")" || :

tmp_var="$(awk -- 'BEGIN { printf "%u\n", "-1" }')" || :
Expand Down

0 comments on commit 87a543f

Please sign in to comment.