On 07/05/2012 04:35 AM, Bruno Haible wrote: > Hi Paul, > >> OK, thanks, I pushed it. > > This change makes it work for FreeBSD 9, but reverts the fixes done for > IRIX 6.5 and OSF/1 on 2011-09-01 and 2011-09-08. Can you make a fix that > works on all three platforms? Here's the situation: > > On Mac OS X, Solaris, Cygwin: > pthread_create and pthread_join in libc. > LIB_PTHREAD ought to be set to "". > > On glibc, FreeBSD 6, NetBSD, OpenBSD, AIX: > pthread_create and pthread_join in libpthread. > LIB_PTHREAD ought to be set to "-lpthread". > > On FreeBSD 9: pthread_create in libpthread, pthread_join in libc. > LIB_PTHREAD ought to be set to "-lpthread". > > On IRIX 6.5: pthread_create in libc, pthread_join in libpthread. > LIB_PTHREAD ought to be set to "-lpthread". > > On OSF/1: pthread_create and pthread_join are macros that expand to > __pthread_create and __pthread_join, respectively, which are both found > in libpthread (not libc). > LIB_PTHREAD ought to be set to "-lpthread". > > Bruno >
It sounds like we need a test for pthread_create() and another for pthread_join(). If either test finds a symbol in libpthread, we should set LIB_PTHREAD. Otherwise, we should leave it unset. The original test that worked on OSF/1 could be used in conjunction with an additional test for pthread_create(). Note that I originally sent this only to Bruno by mistake. I am resending it to everyone on CC.
signature.asc
Description: OpenPGP digital signature