Do not define _POSIX_THREADS if unistd.h defines it.
Check for pthread_sigmask before using it. Fixes remaining problem in #470781.
4 files changed