On 01/09/2012 06: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?
Agreed regarding the CYGWIN usage. It is documented as a GNU extension
in glibc.
My tendency is to preserve things as-is when something optional is
introduced. Thus, a platform that has severe space constraints isn't
forced to adopt a new feature their users don't use or need that may add
to the module size.
So, in this case, I would recommend that a platform needs to explicitly
specify the desire to add _GLIBC_EXTENSIONS.