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]

Bug (?) in sprintf family?


I am not sure whether or not this is a bug; my goal is to find out.

I have a call to vsnprintf. This is failing because isatty() is not yet
defined by our libc port.  The call to isatty() is being made from
within __smakebuf_r. There are also references to the reentrant versions
of close, read, write, sbrk, fstat, and lseek.

Now I do understand that all of these are required to do anything
significant with stdio, but it is somewhat surprising that they are
required for sprintf, which really doesn't need to touch the
file-oriented logic at all.

Is the implementation of sprintf deficient, or does the libc standard
not require any independence between sprintf and the file system?

I can either stub out the missing routines or supply a replacement for
vsnprintf in our coyotos-specific library, but before I do I would like
to understand whether this should be viewed as a newlib bug.

Heck, vsnprintf doesn't have a FILE* to work with, so there isn't any
fd, so I'm not entirely sure what these routines could possibly be
getting called *on* in this case. The program makes no other use of
stdio.


shap


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