[PATCH v2] Support %m in printf functions

Corinna Vinschen vinschen@redhat.com
Thu Jan 12 10:03:00 GMT 2012

On Jan 12 09:20, Schwarz, Konrad wrote:
> > > 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
> GLIBC conversion of NULL to "(null)" has delayed detection of a bug in
> code of mine.  I would much prefer %s conversion to dump
> core, either as a side effect of dereferencing NULL or by call of abort().

Strange.  It had already helped me a lot since it doesn't just crash
at some point in the C library, but the unexpected string value showed
pretty clearly what the bug was.


Corinna Vinschen
Cygwin Project Co-Leader
Red Hat

More information about the Newlib mailing list