Re: Linux printf funny
- From: Paul Gotch <paulg@xxxxxxxxxxxxxxxxx>
- Date: 27 Feb 2007 15:24:19 +0000 (GMT)
Vladimir Vassilevsky <antispam_bogus@xxxxxxxxxxx> wrote:
If it is a multithreaded application, this can be the issue with
printf() reentrancy. Many of the stdio.h functions are not reentrant by
default, unless you are linking the appropriate libraries.
...yes you need to pass "-pthread" to GCC which has the effect of defining
_REENTRANT and linking against libpthread.
This is documented as required on some platforms but strangely not for x86 I
don't know if this is a long standing oversight or if it really isn't
needed.
-p
--
"Unix is user friendly, it's just picky about who its friends are."
- Anonymous
--------------------------------------------------------------------
.
- References:
- Linux printf funny
- From: Paul Burke
- Re: Linux printf funny
- From: Vladimir Vassilevsky
- Linux printf funny
- Prev by Date: AVR ISP mkII
- Next by Date: C compiler for Sonix MCU
- Previous by thread: Re: Linux printf funny
- Next by thread: Re: Linux printf funny
- Index(es):
Relevant Pages
|