g++ (egcs 1.1.2), gtk and threads on SunOS

Volker Borchert bt@Gaia.teknon.de
Thu Oct 7 06:14:00 GMT 1999


Without details on compiler options, one can only shoot into
the dark. Run for cover, I'll have a go ;-)


Do man strlen. On SunOS 5.6, the NOTES section contains the
following paragraph:

     When compiling  multi-thread  applications,  the  _REENTRANT
     flag  must be defined on the compile line.  This flag should
     only be used in multi-thread applications.

and the NOTES on printf read:

     The sprintf() function is MT-Safe in  multi-thread  applica-
     tions.   The printf and fprintf functions can be used safely
     in a multi-thread application, as long as  setlocale(3C)  is
     not being called to change the locale.

Check the gtk docs on whether you should -D_REENTRANT when
compiling gtk, and whether it does setlocale()..

-- 

"I'm a doctor, not a mechanic." Dr Leonard McCoy <mccoy@ncc1701.starfleet.fed>
"I'm a mechanic, not a doctor." Volker Borchert  <bt@teknon.de>


More information about the Gcc-help mailing list