[PATCH]: Enable positional arguments by default for cygwin's printf

Christopher Faylor cgf@redhat.com
Wed Nov 19 18:59:00 GMT 2003


On Wed, Nov 19, 2003 at 03:48:30PM +0100, Corinna Vinschen wrote:
>On Tue, Nov 18, 2003 at 02:34:37PM -0500, Nicholas Wourms wrote:
>> objection to doing this.  Since noone expressed any, I think we should enable
>> this since it will enhance our printf and improve compatibility w.r.t. sources
>> from other *nixes.  As mentioned before in my message to the devel list, it
>> also is specifed as a standard for Unix98.  However, I was required to fix what
>> appeared to be a typo in vfprintf.c for %n when the argument is a long long.
>> The pointer quad_ptr_t was already defined with the *, so the extra * after
>> quad_ptr_t is extraneous and causes the CPP concatination to fail when
>> positional args are enabled.
>> 
>> In any event, after fixing that up, I sucessfully compiled the Cygwin dll.  I
>> ran a few tests, including some portions of the glibc printf test.  The results
>> were as expected and confirmed that positional arguments were functioning
>> properly.  For reference, I have attached a small, working testcase to
>> demonstrate postional arguments and prove they work on Cygwin.  Also attached
>> is the patch adding -DWANT_IO_POS_ARGS to Cygwin's line in configure.host and
>> fixing the aforementioned problem in vfprintf.c.
>> 
>> Of course, this is up to Chris or Corinna to approve, so I await their
>> comments/criticism.
>
>Good idea, IMHO.

Fine with me.

cgf



More information about the Newlib mailing list