pbms on freebsd w/ threads
- From: Emmanuel DELOGET <pixel DotCom FR>
- To: gtk-list redhat com (general list [gtk])
- Cc: gtk-devel-list redhat com
- Subject: pbms on freebsd w/ threads
- Date: Thu, 29 Apr 1999 12:42:59 +0200 (MET DST)
Hi, Lords,
Everything below apply to freebsd boxes (tested on
2.2.8, but should apply to 2.2.x and 3.x)
I have it. Before anything, a fast rewind :
after a succesfull install of gtk-1.2.2 on my freebsd
2.2.8 box, I experienced some problems in some
configure scripts (such as the one of the gimp 1.0.4,
imlib 1.9.4, and so on...). These configure script failed
on the version detection, giving the message "success in
compil, failed to run.". The problem was not related to
a bad install, but to some nasty side-effect of a
'thread-enable' compilation of gdk.
In fact, using the D_THREAD_SAFE and D_REENTRANT flags
to compile code that use getc() produce an inline function
_getc_locked() that is use instead of getc(). This
_getc_locked() func uses an extern variable called __isthreaded,
that is defined in the c_r library (the thread safe c library
on freebsd). So, using getc() in any code that is compiled using
the two flags above result in an obligation for the output
object to be linked with the thread safe c lib...
Such linking is not needed for non-threaded programs.
The solution for this is to not use getc() in any portion of
gtk/gdk, and define another gthread_ function that do the
same. If _THREAD_SAFE is not defined, a new version of the
function (probably inlined) is defined in glib.h.
This solution fits all the architecture, and eliminates the
freebsd problem. I'll post some diff in a few days (need some
tests).
--
__________________________________________________________________________
Emmanuel DELOGET [pixel] pixel@{dotcom.fr,epita.fr} ---- DotCom SA
http://www.epita.fr/~pixel | http://www.dotcom.fr/~pixel
"On the last day, God created Linux. And Microsoft won its antitrust case"
--------------------------------------------------------------------------
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]