svn commit: r310138 - head/lib/libc/stdio

Juli Mallett juli at clockworksquid.com
Wed Dec 21 02:12:25 UTC 2016


On Tue, Dec 20, 2016 at 6:04 PM, Conrad Meyer <cem at freebsd.org> wrote:
> Hi Adrian,
>
> On Tue, Dec 20, 2016 at 5:56 PM, Adrian Chadd <adrian.chadd at gmail.com> wrote:
>> Here's my reason for removal.
>>
>> Plenty of us are looking to be able to build bits of the BSD source
>> tree as part of other non FreeBSD systems, especially if they're
>> involved in bootstrapping.
>
> Understood, however:
>
>> That means that it needs to be compilable
>> by a non-FreeBSD-modified compiler. Ideally this means we'd stick to
>> mostly POSIX options source code that we can compile with unmodified
>> compilers, and we push non-standard stuff into otherly-named
>> functions.
>
> Yeah, this isn't actually a problem.  printf("%b", foo) compiles fine
> with non-modified compilers.

I want FreeBSD tools to avoid non-standard extensions to standard APIs
where possible.  Non-standard APIs are fine, because they're easy to
provide one's own implementations along with portable software, but
building in quirky behaviour to core POSIX/C/whatever interfaces
invites pain.  In this case, the cost-benefit ratio is all out of
whack.  Now, %b is unusual enough that I don't have to worry that,
say, a bootstrap tool will use it, but it's also unusual enough that
the benefit here is elusive.

I would love to see this reverted and snprintb instead.


More information about the svn-src-all mailing list