This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v3] Make fprintf() function to multithread-safe
On Tue, Jul 24, 2012 at 09:30:23AM -0500, Ryan S. Arnold wrote:
> On Mon, Jul 23, 2012 at 8:39 PM, Rich Felker <dalias@aerifal.cx> wrote:
> > The most likely _candidate_ usage case would be when the format
> > specifier is registered from a constructor or explicit init function
> > in a library that's loaded with dlopen rather than at program startup.
> > But is it really reasonable design for libraries to be registering
> > printf specifiers anyway?
>
> Initialization from a library constructor is exactly how Libdfp
> registers printf hooks for the ISO C DFP TR format specifiers
> %H,%D,%DD.
Apologies, I assumed the purpose of registering new formats was for
application/library programmers to give ridiculous near-first-class
status to their own homebrew types, not for implementing DFP TR and
similar. I do wonder if it wouldn't make more sense to just use weak
symbols to link in DFP support instead of this generic registration
API though...
Rich