On Tue, Jan 19, 1999 at 02:06:13PM +0200, Jeremy Lea wrote: > On Tue, Jan 19, 1999 at 02:45:39AM -0800, br...@worldcontrol.com wrote: > > Gimp (CVS) compiled with > > CFLAGS="-g -D_THREAD_SAFE -I/usr/local/include -L/usr/local/lib -O2 -m486 > > -pipe -lpthread" > > Hmm, if you're using the libpthread from lt.tar.com, and you installed it > according to the instructions, then that should read: > > > CFLAGS="-g -D_THREAD_SAFE -DLINUXTHREADS -I/usr/local/include > > --L/usr/local/lib -O2 -m486 pipe -lpthread" > > So it picks up the correct header. But I doubt you would have got it > compiled without that?
Actually, the new version, in FreeBSD "ports" form, doesn't require -DLINUXTHREADS anymore, but it does require -I/usr/local/include to pick up the right header, since it installs a pthread.h into /usr/local/include. This conflicts with the pthread.h in /usr/include. > Also, are you using glib11-devel/gtk11-devel ports > linked against libpthread? By default the ports link against libc_r. Right. > Also, the linuxthreads stuff needs libc to be reentrant, from what I > understand, and Richard hasn't released (or finished) those patches yet. libc is partly re-entrant, partly not. It depends on what calls you're making. As a rule of thumb, wherever the pthread spec calls for a "_r" function (eg. readdir_r), the underlying function is not thread safe, and either the "_r" function is missing or is not threadsafe itself (eg. localtime_r exists in libc -- recent versions -- but is not thread safe). strrok_r is an exception, I think. -- Richard Seamman, Jr. email: d...@tar.com 5182 N. Maple Lane phone: 414-367-5450 Chenequa WI 53058 fax: 414-367-5852 To Unsubscribe: send mail to majord...@freebsd.org with "unsubscribe freebsd-current" in the body of the message