Bug (?) in sprintf family?
Jonathan S. Shapiro
shap@eros-os.com
Mon Apr 7 23:45:00 GMT 2008
On Mon, 2008-04-07 at 13:52 -0700, Brian Dessent wrote:
> The snprintf family of functions are all implemented in terms of
> _vfprintf_r, by constructing a pseudo FILE * to represent the string
> buffer whose _flags indicate that it's really a string buffer (__SSTR)...
>
> I would think that things like calls to isatty() would be guarded by
> !(_flags & __SSTR)...
This is pretty much what I thought was going on. The problem is not that
isatty() is being called. The problem is that it must be resolved at
link time.
What I'm trying to ask is: should sprintf() and friends have any **link
time** dependency on isatty() and friends? Does the C library standard
state any position on this?
shap
More information about the Newlib
mailing list