[BusyBox] [RFC] enforce using functions from libbb

Jason Schoon floydpink at gmail.com
Mon Aug 15 14:30:22 UTC 2005


I like it, I was wanting to write something very similar myself. There is a 
great deal of space savings that can be had very simply by just utilizing 
the builtin BB functions.

I'll have to give it a test run on my next porting effort.


On 8/15/05, Bernhard Fischer <rep.nop at aon.at> wrote:
> 
> Hi,
> 
> libbb provides a number of wrappers for commonly used functions.
> The attached proposed patch tries to make developers aware to use the
> functions provided by libbb.
> It's config option is located in the "Debugging" section of menuconfig.
> 
> The intention of this patch is to aid folks in porting new applets and
> to encourage people to reuse existing infrastructure.
> Furthermore, docs/contributing.txt in section "Janitorial Work" reads:
> Replace any "naked" calls [...] with the x* equivalents found in libbb
> [...].
> 
> 
> Theory of operation:
> 
> A file include/libbb_overrides.h is generated for the overrides enlisted
> in libbb/Makefile.in.
> For each function in the overrides-list, a non-existing function named
> "please_use_xyz" is defined, -Werror-implicit-function-declaration is
> set in the toplevel Makefile.
> 
> 
> This results in verbose messages whenever a function is called directly
> instead of the wrapper provided by libbb.
> 
> busybox/applets/applets.c: In function 'bb_show_usage':
> busybox/applets/applets.c:109: error: implicit declaration of function 
> 'please_use_bb_fprintf'
> make: *** [busybox/applets/applets.o] Error 1
> 
> 
> Comments?
> 
> 
> _______________________________________________
> busybox mailing list
> busybox at mail.busybox.net
> http://busybox.net/mailman/listinfo/busybox
> 
> 
> 
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.busybox.net/pipermail/busybox/attachments/20050815/9cc572b1/attachment-0001.htm 


More information about the busybox mailing list