This is the mail archive of the
newlib@sources.redhat.com
mailing list for the newlib project.
Re: [PATCH]: Enable positional arguments by default for Cygwin's printf
- From: Corinna Vinschen <vinschen at redhat dot com>
- To: newlib at sources dot redhat dot com
- Date: Wed, 19 Nov 2003 15:48:30 +0100
- Subject: Re: [PATCH]: Enable positional arguments by default for Cygwin's printf
- References: <Pine.CYG.4.58.0311181301100.107789239@reddragon.clemson.edu>
- Reply-to: newlib at sources dot redhat dot com
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.
Corinna
--
Corinna Vinschen
Cygwin Developer
Red Hat, Inc.