This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Use C99-compliant scanf under _GNU_SOURCE.


On Mon, 12 Feb 2018, Zack Weinberg wrote:

> Presumably the history here is that we had v{,f,s}scanf before C99 did
> (I haven't checked).  What if we use C99-complaint everything for any
> mode involving __ISOC99_SOURCE, but we also relax the condition for
> declaring v{,f,s}scanf in the first place, from __ISOC99_SOURCE to
> (__ISOC99_SOURCE || !__STRICT_ANSI__)?  In other words, provide
> v{,f,s}scanf under -std=gnu89 as well as under -std={c,gnu}99 and up.

It's odd to use __STRICT_ANSI__ as a condition for whether to declare 
something in a header.  We sometimes use __USE_MISC, but that's only 
defined for _DEFAULT_SOURCE which also implies __USE_ISOC99.

> (I care about this because, if you can't get at the noncompliant
> vscanf without overriding __GLIBC_USE_DEPRECATED_SCANF, then why do we
> have the noncompliant vscanf at all?)

Indeed, it could become a compat symbol and not defined for new ports / 
static linking if there's no longer any way of accessing it.

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]