From 6011d413604df8224b91ca9f9b3d50663b60e117 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Fri, 20 Sep 2019 18:22:27 +0000 Subject: sysdeps redesign: first part: minimize clr tests Remaining clr: emptyregex: can be safely guessed to no nullispointer: can't be safely guessed, but do we need the test? devurandom: can't be safely guessed malloc0: can more or less be safely guessed to no --- tools/gen-bits.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tools/gen-bits.sh') diff --git a/tools/gen-bits.sh b/tools/gen-bits.sh index 951a7d9..01aa9b8 100755 --- a/tools/gen-bits.sh +++ b/tools/gen-bits.sh @@ -7,6 +7,10 @@ ofmt="$4" xfmt="$5" bfmt="$6" +gen_bits() { + sed -e "s/@BITS@/$1/g; s/@DFMT@/$2/g; s/@OFMT@/$3/g; s/@XFMT@/$4/g; s/@BFMT@/$5/g;" < src/headers/bits-template +} + tools/gen-types-internal.sh "" "" "$bits" < src/headers/bits-header if test "$bits" = 64 ; then @@ -33,5 +37,5 @@ else fi tools/gen-types-internal.sh "" "" "$bits" < src/headers/bits-${endian}endian -tools/gen-bits-internal.sh "$bits" "$dfmt" "$ofmt" "$xfmt" "$bfmt" +gen_bits "$bits" "$dfmt" "$ofmt" "$xfmt" "$bfmt" exec tools/gen-types-internal.sh "" "" "$bits" < src/headers/bits-footer -- cgit v1.2.3