1.22.0 builds still broken due to strchrnul mis-declaration on FreeBSD

Denys Vlasenko vda.linux at googlemail.com
Fri Jan 10 10:57:47 UTC 2014


On Thu, Jan 9, 2014 at 8:14 PM, Matthias Andree <mandree at freebsd.org> wrote:
> The attached patch (for git am) achieves all that and enables the
> current busybox Git master to build on FreeBSD without further ado.

-sed -n -e 's@^//usage:\([ \t].*\)$@\1 \\@p' -e 's@^//usage:\([^
\t].*\)$@\n\1 \\@p' \
+TAB="$(printf '\tX')" ; TAB="${TAB%X}"
+sed -n -e 's@^//usage:\([ '"$TAB"'].*\)$@\1 \\@p' -e 's@^//usage:\([^
'"$TAB"']..*\)$@\
+\1 \\@p' \ ///vda


Why   .*   turned into    ..*    ?

Figuring out that second sed -e CMD has an embedded newline
took some time.

I'm going with this:

TAB="$(printf '\tX')"
TAB="${TAB%X}"
LF="$(printf '\nX')"
LF="${LF%X}"
sed -n -e 's@^//usage:\([ '"$TAB"'].*\)$@\1 \\@p' \
       -e 's@^//usage:\([^ '"$TAB"'].*\)$@\'"$LF"'\1 \\@p' \
        "$srctree"/*/*.c "$srctree"/*/*/*.c \


More information about the busybox mailing list