This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
stderr with ARM not working
- From: Michael Ambrus <ambrmi09 at yahoo dot com>
- To: newlib at sourceware dot org
- Date: Fri, 7 Apr 2006 04:43:58 -0700 (PDT)
- Subject: stderr with ARM not working
According to the patch:
http://sourceware.org/ml/newlib-cvs/2005-q3/msg00028.html
syscalls.c was modified to handle stderr in libgloss
(but seems not to be in libc).
I'm using newlib-1.14.0 for ARM7 (LPC2129) and I could
use stderr in my application. But fprintf(stderr,...)
outputs to stdout instead of stderr and works only for
a short while (then the application breaks).
At the other end of AngelSWI traps I can verify that
stderr is never opened and that fh #1 is used for
stderr for writing. I suppose that some wrapping in
newlib is taking place, but I would prefer this to be
handled at a lower level.
The syscalls used are in
/newlib/libc/sys/arm/syscalls.c where stderr is never
initialized (i.e. opened).
Questions:
* Is there a reason for not handling stderr in the
libc-version (or maybe it is, but I just don't see
it)?
* When would one use libgloss instead of libc?
* How can one distinguish between between the two
without recompiling newlib?
WKR
/Michael
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com