This is the mail archive of the newlib@sources.redhat.com 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]: Fix printf positional arguments breakage


Patch checked in. Thanks.

-- Jeff J.

Nicholas Wourms wrote:
Hi,

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.

Cheers,
Nicholas

__________________________________________________________________
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


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