> What we really want is for the configure script to _add_ to the existing
> options, and I thought that's what it did. Another bad thing it does is
> if it the supplied port options don't work, it erases them and tries it
> own.
>
> Now, the fact that the configure thread test program worked and reported
> good results means:
>
> o threads work with the supplied options
> o errno is thread-safe
>
> so I think the supplied Darwin options are enough.
>
> Interesting that the acx_pthread.m4 just keep checking options until it
> finds one that succeeds, then stops tryinug any more.
>
> I have to think about this. I think maybe we should add a
> PTHREAD_CPPFLAGS to template port files, and just add that in at the
> end.
>
> They actually have this little port-specific code:
>
> case "${host_cpu}-${host_os}" in
> *-aix* | *-freebsd*) flag="-D_THREAD_SAFE";;
> *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
> esac
>
> and I think we need to remove that and have the template files handle
> such thing.
OK, CVS is ready. I unconditionally defined:
-D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS
for all ports. It can't hurt if they are not supported, but it makes
our job easier for porting. It allowed me to remove almost all the
port-specific thread stuff. The other tests are done by configure and
thread_test.
Should fix Darwin compile and other platforms without mucking with the
thread detection code.
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073