This is the mail archive of the newlib@sourceware.org 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: missing stdio.h prototypes


Shaun Jackman wrote:
On 5/20/06, Dave Murphy <wintermute2k4@ntlworld.com> wrote:

Hi,

I noticed a couple of missing prototypes in stdio.h, siscanf and
viprintf, the attached patch adds these.

newlib 1.14.0 added a dprintf prototype which I commented locally. Is
this a standard function? This is a name I've used for quite some time
for debug output and usually define as a macro.

Dave


dprintf is provided by GNU glibc. It is not a standard function, but
it is commonly used. The manual page mentions that fdprintf would have
been a better name, but it is too late for that now.

Cheers,
Shaun

Dave, I checked in a patch on May 18 so the prototypes are already in place.


Regarding dprintf, I think a reasonable solution would be to protect the dprintf prototype with

#ifndef dprintf

The glibc man pages admit that dprintf may be commonly used externally in macro form. This solves that particular conflict. There are no internal references in newlib and there are sufficient alternatives.

-- Jeff J.



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