[PATCH v2] Support %m in printf functions
Corinna Vinschen
vinschen@redhat.com
Thu Jan 12 10:10:00 GMT 2012
On Jan 9 10:02, Eric Blake wrote:
> On 01/09/2012 04:51 AM, Corinna Vinschen wrote:
> > On Jan 6 01:00, Yaakov (Cygwin/X) wrote:
> >> On Sun, 2012-01-01 at 11:59 -0600, Yaakov (Cygwin/X) wrote:
> >>> This patch adds support for the "%m" conversion specifier in the printf
> >>> and wprintf functions, a GNU extension:
> >>>
> >>> http://www.kernel.org/doc/man-pages/online/pages/man3/printf.3.html
> >>
> >> Thank you all for the comments. The attached revised patch and STC
> >> should take them into account.
> >>
> >> The remaining issue is that of gating, specifically exactly how to do
> >> so. For the moment I'm using __CYGWIN__ until some agreement can be
> >> reached.
> >
> > Jeff, I'd like to get your input on this.
> >
> > IMHO, it doesn't feel right to add __CYGWIN__ here since the %m
> > functionality is sufficiently target agnostic to be useful for everyone
> > who would like to use it. I guess _GLIBC_EXTENSION sounds about right,
> > but maybe it should be _NO_GLIBC_EXTENSIONS instead and only set it
> > for builds which explicitely don't want them?
>
> We should also guard the %s conversion of NULL to "(null)" rather than
> dumping core under the same flag (right now, that appears to be under
> __OPTIMIZE_SIZE__).
Yes, I agree.
Corinna
--
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat
More information about the Newlib
mailing list