Do not define _POSIX_THREADS if unistd.h defines it.
Check for pthread_sigmask before using it. Fixes remaining problem in #470781.
diff --git a/pyconfig.h.in b/pyconfig.h.in
index 749666f..7057895 100644
--- a/pyconfig.h.in
+++ b/pyconfig.h.in
@@ -477,6 +477,9 @@
 /* Define if you have the pthread_init function.  */
 #undef HAVE_PTHREAD_INIT
 
+/* Define if you have the pthread_sigmask function.  */
+#undef HAVE_PTHREAD_SIGMASK
+
 /* Define if you have the putenv function.  */
 #undef HAVE_PUTENV