[PATCH]: Fix printf positional arguments breakage

Nicholas Wourms nwourms@netscape.net
Mon Mar 21 15:20:00 GMT 2005


It looks like the move of certain defines from the command line (-DXXXX) to newlib.h has resulted in postional argument support being disabled even when it is explicitly enabled.  The problem is that vprintf.c is expecting that _WANT_IO_POS_ARGS would be defined on the command line, thus it put the #ifdef test before including newlib.h.  IMHO, I find the usage of preprocessor conditionals in newlib to be excessive, almost to the point of being gratuitous.  I also think that putting conditionals before includes is a bad idea, in general.  Be that as it may, I have attached a fix which rectifies the issue at hand.  In addition, I removed a redundant include of reent.h.  However, it might be a good idea to review the other defines moved from the command line to newlib.h, to be sure that this problem isn't silently manifesting itself elsewhere.


Switch to Netscape Internet Service.
As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register

Netscape. Just the Net You Need.

New! Netscape Toolbar for Internet Explorer
Search from anywhere on the Web and block those annoying pop-ups.
Download now at http://channels.netscape.com/ns/search/install.jsp
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ChangeLog.txt
URL: <http://sourceware.org/pipermail/newlib/attachments/20050321/1bd17220/attachment.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: newlib-vprintf-fix-positional-args.patch
URL: <http://sourceware.org/pipermail/newlib/attachments/20050321/1bd17220/attachment.ksh>

More information about the Newlib mailing list