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

@ -23,7 +23,7 @@
***************************************************************************/
#include "first.h"
#ifdef HAVE_PTHREAD_H
#ifdef HAVE_THREADS_POSIX
#define CONN_NUM 3
#define TIME_BETWEEN_START_SECS 2

View file

@ -84,7 +84,7 @@ cleanup:
return result;
}
#elif defined(HAVE_PTHREAD_H)
#elif defined(HAVE_THREADS_POSIX)
static void *t3026_run_thread(void *ptr)
{