From 2cc8afea83f12179fc462fe0b0c464ed760eba76 Mon Sep 17 00:00:00 2001 From: Leon Anavi Date: Fri, 11 Sep 2026 13:49:43 +0300 Subject: [PATCH] bitwise: Upgrade 0.50 -> 0.70 Upgrade to release 0.70: - this release changes how &, ^ and | bind against each other. If you have expressions that mix them without parentheses, check them: 3 ^ 1 & 2 now gives 3, the same as a C compiler, where earlier releases gave 2. Enhancements: - Unary plus and minus in expressions: -5, 5 * -2 and 10 - -2 evaluate instead of being rejected. On the command line, separate a leading minus with --: bitwise -- '-5' - README documents the operators that actually exist, with their precedence, and which C operators are not supported - Added CONTRIBUTING.md, and filled in ChangeLog, NEWS and AUTHORS Bug Fixes: - &, ^ and | now have the C precedence order, where & and ^ used to share a level - Numbers that don't parse cleanly are now refused instead of guessing: 12a used to evaluate as 12, a bare 0x or 0b as 0, and a literal past UINT64_MAX as UINT64_MAX - Shifts and BIT() at or past the width of the value give 0, instead of an answer computed from a masked shift count: 1 << 64 used to be 1, and 1 << 200 used to be 256 - Fixed a stack buffer overflow on tokens longer than 64 characters, reachable from both the command line and the : prompt - Radix64 output now matches the system l64a(); a fallback shim was overriding libc and printing a different alphabet - Parse errors no longer corrupt the curses display - Fixed the ASCII line of the conversion output on big-endian hosts Build and testing: - make distcheck works; VPATH builds could not find the headers in inc/ at all - -Wall -Wextra are on by default, and --enable-asan, --enable-ubsan and --enable-fuzzer join the existing options - Tests for number parsing, shift edges and long tokens, plus a libFuzzer harness over the expression parser - CI builds on Linux, macOS and Windows/msys2, and runs distcheck, the sanitizers and a bounded fuzzing run on every push Drop 0001-makefile.am-Fix-build-when-build-dir-is-not-same-as-.patch because v0.70 Makefile.am already includes a similar fix to put $(top_srcdir)/inc on the include path from git commit f4b9fa1. Fix Big-endian and Little-endian output in ptest.out.expected. Signed-off-by: Leon Anavi Signed-off-by: Khem Raj --- .../{bitwise_0.50.bb => bitwise_0.70.bb} | 3 +- ...build-when-build-dir-is-not-same-as-.patch | 31 ------------------- .../bitwise/files/ptest.out.expected | 4 +-- 3 files changed, 3 insertions(+), 35 deletions(-) rename meta-oe/recipes-extended/bitwise/{bitwise_0.50.bb => bitwise_0.70.bb} (85%) delete mode 100644 meta-oe/recipes-extended/bitwise/files/0001-makefile.am-Fix-build-when-build-dir-is-not-same-as-.patch diff --git a/meta-oe/recipes-extended/bitwise/bitwise_0.50.bb b/meta-oe/recipes-extended/bitwise/bitwise_0.70.bb similarity index 85% rename from meta-oe/recipes-extended/bitwise/bitwise_0.50.bb rename to meta-oe/recipes-extended/bitwise/bitwise_0.70.bb index 397829c87b..f295a96805 100644 --- a/meta-oe/recipes-extended/bitwise/bitwise_0.50.bb +++ b/meta-oe/recipes-extended/bitwise/bitwise_0.70.bb @@ -11,11 +11,10 @@ LICENSE = "GPL-3.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464" SRC_URI = "https://github.com/mellowcandle/bitwise/releases/download/v${PV}/bitwise-v${PV}.tar.gz \ - file://0001-makefile.am-Fix-build-when-build-dir-is-not-same-as-.patch \ file://run-ptest \ file://ptest.out.expected \ " -SRC_URI[sha256sum] = "806271fa5bf31de0600315e8720004a8f529954480e991ca84a9868dc1cae97e" +SRC_URI[sha256sum] = "b8f41f49b9b73ac3abb1e7533a410504f759673fc6e7f35acf56fc82e39cdf37" UPSTREAM_CHECK_URI = "https://github.com/mellowcandle/bitwise/releases" UPSTREAM_CHECK_REGEX = "releases/tag/v(?P\d+(\.\d+)+)" diff --git a/meta-oe/recipes-extended/bitwise/files/0001-makefile.am-Fix-build-when-build-dir-is-not-same-as-.patch b/meta-oe/recipes-extended/bitwise/files/0001-makefile.am-Fix-build-when-build-dir-is-not-same-as-.patch deleted file mode 100644 index 76d12f9cd8..0000000000 --- a/meta-oe/recipes-extended/bitwise/files/0001-makefile.am-Fix-build-when-build-dir-is-not-same-as-.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 2089b514045d2de64a5d9c54e241731e85d77df2 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Mon, 14 Dec 2020 22:11:59 -0800 -Subject: [PATCH] makefile.am: Fix build when build dir is not same as - sourcedir - -This ensures right include paths are added to compiler - -Signed-off-by: Khem Raj ---- -Upstream-Status: Pending - - Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Makefile.am b/Makefile.am -index eba85a1..da998ff 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -19,7 +19,7 @@ if COND_DEBUG - MAYBE_DEBUG=-g -O0 - endif - --AM_CFLAGS = $(MAYBE_COVERAGE) $(MAYBE_DEBUG) $(MAYBE_TRACE) -+AM_CFLAGS = $(MAYBE_COVERAGE) $(MAYBE_DEBUG) $(MAYBE_TRACE) -I$(srcdir)/inc - - check_PROGRAMS = tests/test-shunting-yard - tests_test_shunting_yard_SOURCES = src/shunting-yard.c inc/shunting-yard.h \ --- -2.29.2 - diff --git a/meta-oe/recipes-extended/bitwise/files/ptest.out.expected b/meta-oe/recipes-extended/bitwise/files/ptest.out.expected index c5ca3e5215..c1c3375fc0 100644 --- a/meta-oe/recipes-extended/bitwise/files/ptest.out.expected +++ b/meta-oe/recipes-extended/bitwise/files/ptest.out.expected @@ -4,8 +4,8 @@ Hexadecimal: 0x42 Octal: 0102 Human: 66 Radix64: 0/ -IPv4 (Network byte order - Big): 66.0.0.0 -IPv4 (Reverwsed byte order - Little): 0.0.0.66 +IPv4 (Network byte order - Big): 0.0.0.66 +IPv4 (Reversed byte order - Little): 66.0.0.0 ASCII: .......B Binary: 0 1 0 0 0 0 1 0