RFC: Enabling positional args for printf & friends

Nicholas Wourms nwourms@netscape.net
Fri Nov 14 17:49:00 GMT 2003


Hi all,

Last year, about this time, Jeff J. implemented "optional" positional 
argument support for the printf() family [1] and enabled it on x86-linux 
by default (thus, it is disabled for all other platforms by default). 
Enabling this support would bring our printf more in line with the 
UNIX98 standard as well as making it more compatible with a multitude of 
other libc's (including glibc).  FWICT, enabling it does not adversely 
affect performance in any noticeable manner, so I assume the "optional" 
nature of this support was mainly intended for embedded folk.  Of course 
my observations are highly subjective and unscientific, so YMMV. 
However, as one of our goals is being standards compliant (as is 
feasible), I should think that enabling this would be beneficial to the 
Cygwin project.  Also, it should, in certain cases, eliminate the need 
to use package-provided printf libraries (like trio, snprintfv, etc.) 
when building those packages which rely on extended printf functionality.

I have a very simple patch to newlib's configure.hosts which adds 
"-DWANT_IO_POS_ARGS" to the existing cflags list for Cygwin.  Thoughts? 
Concerns? Objections? Flames?

Cheers,
Nicholas

[1] http://sources.redhat.com/ml/newlib/2002/msg00392.html



More information about the Cygwin-developers mailing list