[BusyBox] Busybox "expr" is broken.
Manuel Novoa III
mjn3 at codepoet.org
Sun Jan 25 19:49:49 UTC 2004
Rob,
On Sun, Jan 25, 2004 at 12:52:31PM -0600, Rob Landley wrote:
> So I'm bashing away on ./configure with busybox in the path, trying to see
> what else is broken. Currently bashing my way through the glibc build, and I
> found a problem with expr. The following works differently with busybox expr
> and gnu expr:
>
> expr "UNKNOWN" \< 5
>
> Gnu returns 0, busybox returns 1. This is what's causing perl not to be
> detected. (`perl -V:apiversion` is returning UNKNOWN, which gets passed to a
> production like the above to see if perl is too old to be usable, and we say
> "yes, UNKNOWN is less than 5!" which causes the ./configure script to disable
> perl.)
>
> For once, it's not a sed problem! :)
I just checked in a fix. expr was coercing any non-empty string to an
integer using atoi(). So "UNKNOWN" was being converted to 0 and an
integer comparison was being done, instead of a string compare.
Manuel
More information about the busybox
mailing list