[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Thread-safe X libraries -- where/how?



You wrote (in your message from Friday 4)
 > First off, I'm sorry if this is a bit newbie-esque for this list -- I
 > wasn't quite sure where it fell.  With that said, does anybody know if I
 > can find a tarball of thread-safe X libs for OpenBSD anywhere?  If not,
 > could someone point me in the right direction for instructions to build
 > them on my own?  (Though I'd prefer not to download and build ALL of
 > XF86.)  If by some chance there's part of the FAQ that addresses this that
 > I just flat out missed, just tell me to RTFM.  Thanks in advance.
 > 

To build thread-safe X libraries, create a xc/config/cf/host.def file
in your X11 tree with the following content:

#define HasPosixThreads		    YES
#define ThreadedX			YES
#define HasThreadSafeAPI		YES
#define SystemMTDefines				-D_REENTRANT
#define ThreadsCompileFlags			-pthread
#define ThreadsLibraries			-lc_r

I've used that for several months to build my private verion of the
OpenBSD X11 tree without noticing any problems with non-threaded
apps. However, I've found very few multi-threaded X applications, to
do some real tests on them. So any feedback on results you get with
these libraries is welcome. 

-- 
					Matthieu