This is the mail archive of the newlib@sourceware.org mailing list for the newlib 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 v2] Support %m in printf functions


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__).

-- 
Eric Blake   eblake@redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


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