On 4-Nov-12, at 2:48 AM, Paul Eggert wrote:
On 11/03/2012 07:35 PM, John David Anglin wrote:
The attached change results in a successful build of sort.
I'm afraid that won't work, because it assumes that the
application uses both threadlib and pthread.
I don't see that it assumes that the application uses both threadlib
and pthreads. As far as I can tell, sort doesn't use threadlib.
It uses pthreads. Thus, a fallback is needed when pthreads
is not available. If we are not using pthreads, we get a trivial
pthread implementation from lib/pthread.h with the change.
It seemed reasonable to base this on the configure variable
USE_POSIX_THREADS. We could get the same result by
modifying the configure result for HAVE_PTHREAD_H, etc,
but the system does have a pthread.h header. It's just not
usable.
Another alternative might be to convert sort to use threadlib.
Dave
--
John David Anglin [email protected]