busybox-1.3.0 and nonstd APIs, installment 2
Bernhard Fischer
rep.nop at aon.at
Tue Dec 19 21:13:53 UTC 2006
On Tue, Dec 19, 2006 at 09:35:41PM +0100, Denis Vlasenko wrote:
>On Tuesday 19 December 2006 01:27, sampo at symlabs.com wrote:
>> Denis Vlasenko writes:
>> > On Monday 18 December 2006 07:09, sampo at symlabs.com wrote:
>> >> 2. Replace use of nonstandard fdprintf() with busybox's built-in
>> >> full_write(). The fdprintf() under dietlibc() apparently
>> >> gets somehow aliased to dprintf() which is equally bad. glibc
>> >> man page provides long explanation why dprintf() is a historical
>> >> error and should not be used. Neither fdprintf() nor dprintf()
>> >> is compliant with any known standard.
>> >
>> > But it is neat. Does attached patch work for you?
>>
>> It would be neat if it was standard.
>>
>> I am not convinced about why you are trying to patch in
>> an implementation of dprintf() when I supplied you
>> a perfectly good patch that elimitated the dprintf()
>> dependency entirely from the busybox. Try (after my patch)
>>
>> busybox-1.3.0 0$ grep -r dprintf .
>>
>> and you see the entire need for dprintf() has been eliminated.
>
>The goal of the project is to be _small_.
>It means "use fdprintf() where it makes code smaller,
>and provide fdprintf() for libc's where it is missing"
I beg to disagree since i personally detest fdprintf and dprintf,
likewise. Wipe them, even if it costs a couple of bytes. They are
non-standard and ought to be distincted in any project that aims to be
_somewhat_ sane (and platform agnostic).
>
>> Using the internal full_write() means less bloat. dprintf()
>> was only ever used by ash.c and elimiating it entirely will
>> shave couple hundred bytes from binary size.
>
>In static link only.
It's a matter of standards, portability and sanity, really. I vote for
removing and sanctionizing dprintf, fdprintf, fwiw.
More information about the busybox
mailing list