On Jan 20, 2007, at 2:20 PM, Reid Spencer wrote: > I think it would be more appropriate to add a test for > pthread_mutexattr_setpshared in the configure script. On Linux, > PTHREAD_PROCESS_PRIVATE is both an enumerator and a #define. If its > only > an enumerator on some system, that check would be bad. Furthermore, a > pthread.h could define the macro while not defining the function > (which > would be a bug, but it could happen). The check for the function > is the > safest.
It is also a macro on macos. I believe that it is standard for these things to be macros to allow #ifdef conditionals. Why don't we just do this for now, and switch to a full autoconf test if we find that to be insufficient? -Chris > Reid. > > Perhaps, but what if PTHREAD_PROCESS_PRIVATE is defined in a header > file > and > On Sat, 2007-01-20 at 14:13 -0800, Chris Lattner wrote: >>> For PR808: http://llvm.org/PR808 : >>> NetBSD also doesn't have pthread_mutexattr_setpshared >> >>> >>> -#if !defined(__FreeBSD__) && !defined(__OpenBSD__) >>> +#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined >>> (__NetBSD__) >>> // Make it a process local mutex >>> errorcode = pthread_mutexattr_setpshared(&attr, >>> PTHREAD_PROCESS_PRIVATE); >>> #endif >> >> Can't we just change this to: >> >> #ifdef PTHREAD_PROCESS_PRIVATE >> >> ? >> >> -Chris >> _______________________________________________ >> llvm-commits mailing list >> llvm-commits@cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits > _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits