[VODZ] hickup with strtoll() and vasprintf()

Bernhard Fischer rep.nop at aon.at
Wed May 10 09:17:39 PDT 2006


On Wed, May 10, 2006 at 05:57:19PM +0200, walter harms wrote:
>
>
>that strtoll() is missing i would call a bug.
>
>The better way would testing the system for critical stuff like gnu 
>extensions (aka autoconfig) and provide the missing pieces.

Yes, i agree. I was thinking about adding .am and .ac, so you could
either use the manually written Makefiles which are already there or
(optionally) overwrite them by doing the usual configure && make check
install.

I'm pretty sure that some people will dislike even the option to use the
auto-tools, even if they don't have to use it..
>
>
>Bernhard Fischer wrote:
>>On Wed, May 10, 2006 at 03:55:34PM +0200, walter harms wrote:
>>>The only way to make bb work will be providing your own copy of 
>>>(v)asprintf and strtoll.
>>>
>>>a quick look at bb (oder copy) shows strtoll in ash.c
>>>and test.c and in test its enabled only with CONFIG_FEATURE_TEST_64.
>>>I guess you can use that for ash.c also (efectivly make it strtol() ).
>>>
>>>asprintf can be done with snprintf().
>>
>>I've done vasprintf with malloc+vsprintf for now, need to revisit this.
>>
>>
>>The host does support LL, so i take it that i can get away with
>>providing strtoll.
>>
>>Question is if that should be a generic toggle (let's say
>>CONFIG_HAVE_STRTOLL or the like) or not.
>>The reasoning is that on embedded systems, LL operations may be
>>completely unavailable or at least very costy to emulate.
>>So perhaps it's of general use to be able to avoid them?
>>
>>
>>PS: egrep -ri "strto[^ \t\n\(]*ll" *       
>>coreutils/expr.c:#define STRTOL(s, e, b) strtoll(s, e, b)
>>coreutils/test.c:       r = strtoll(s, &p, 10);
>>e2fsprogs/blkid/read.c:#ifdef HAVE_STRTOULL
>>e2fsprogs/blkid/read.c:#define STRTOULL strtoull /* defined in stdlib.h if 
>>you try hard enough */
>>e2fsprogs/blkid/read.c:/* FIXME: need to support real strtoull here */
>>e2fsprogs/blkid/read.c:#define STRTOULL strtoul
>>e2fsprogs/blkid/read.c:         dev->bid_devno = STRTOULL(value, 0, 0);
>>e2fsprogs/e2p/parse_num.c:      num = strtoull(arg, &p, 0);
>>patches/cmp_n.diff:+    r = strtoull(arg, &e, base);
>>Binary file scripts/bb_mkdep matches
>>scripts/bb_mkdep.c:#define strtoll strtol
>>scripts/bb_mkdep.c:                     numstackptr->val = strtoll(expr, 
>>(char **) &expr, 0);
>>shell/ash.c:                    numstackptr->val = strtoll(expr, (char **) 
>>&expr, 0);
>>
>>
>>
>>
>_______________________________________________
>busybox mailing list
>busybox at busybox.net
>http://busybox.net/cgi-bin/mailman/listinfo/busybox
>


More information about the busybox mailing list