[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: [BusyBox] Busybox "expr" is broken.
From: mjn3 () codepoet ! org (Manuel Novoa III)
Date: 2004-01-25 19:49:49
Message-ID: 20040125194949.GA17078 () codepoet ! org
[Download RAW message or body]
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
_______________________________________________
busybox mailing list
busybox@mail.busybox.net
http://codepoet.org/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic