build: drop redundant HAVE_PTHREAD_H guard

Prior to this patch code used either `HAVE_PTHREAD_H`, or
`HAVE_THREADS_POSIX`, or both, to decide if POSIX Threads support is
present. In effect requiring both to be defined for a consistent build.

Drop detecting and guarding for `pthread.h`, and assume it present when
`HAVE_THREADS_POSIX` is set.

OS/400 had `HAVE_PTHREAD_H` set, but not `HAVE_THREADS_POSIX`, which
possibly left threading disabled in most sources.

Ref: https://pubs.opengroup.org/onlinepubs/009695399/basedefs/pthread.h.html
Ref: 930f2e8227 #21144

Closes #21158
This commit is contained in:
Viktor Szakats 2026-03-28 23:39:41 +01:00
parent 9f7295fb23
commit ce6c441cf2
No known key found for this signature in database
9 changed files with 7 additions and 14 deletions

View file

@ -35,7 +35,7 @@
* https://github.com/curl/curl/blob/curl-7_88_1/docs/examples/threaded-ssl.c
*/
/* Requires: HAVE_PTHREAD_H */
/* Requires: HAVE_THREADS_POSIX */
/* Also requires TLS support to run */
#include <stdio.h>