missing stdio.h prototypes

Jeff Johnston jjohnstn@redhat.com
Tue May 23 19:37:00 GMT 2006


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.




More information about the Newlib mailing list