Supplying unavailable functions
Dan Fandrich
dan at coneharvesters.com
Sat Sep 12 07:42:30 UTC 2009
There is half-hearted support in a few places in BusyBox for environments
that don't supply some of the glibc and BSD-specific functions that it
requires. For example, a few functions are reimplemented in the code but
permanently commented out, like this:
#if 0 /* If we will ever meet a libc which hasn't [f]dprintf... */
It would be nice to be able to access these implementations without having
to uncomment the source all over the place. How about putting these
functions into one place, like libbb/platform.c, and using autoconf.h
macros to enable or disable each one as needed? They could be enabled
automatically (where possible) by setting macros like NEEDS_STRCHRNUL
in platform.h depending on things like #if defined(__dietlibc__), or a
section in the menuconfig system could be added for these so they could
be manually selected and saved in the .config file (or both).
Here are some candidate functions for this, some of which already exist:
clrbit
fdprintf
memrchr
mkdtemp
setbit
strcasestr
strchrnul
vasprintf
>>> Dan
--
http://www.MoveAnnouncer.com The web change of address service
Let webmasters know that your web site has moved
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 288 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20090912/c80d3b33/attachment.pgp>
More information about the busybox
mailing list