Replacing all the zos pthread defines (PTHREAD_ATTR_SETDETACHSTATE_ARG2_ADDR, PTHREAD_SETS_ERRNO, PTHREAD_DETACH_ARG1_ADDR and the proposed PTHREAD_YIELD_HAS_NULL_ARG) with the single HAVE_ZOS_PTHREADS.
Separated into 3 patches:
zos_pthreads.apr12x.patch replaces all zos pthread defines that can be backported to 1.2.x
zos_pthreads.385523.patch replaces a PTHREAD_SETS_ERRNO introduced in rev 385523 in locks/unix/proc_mutex.c
zos_pthreads.418351.patch adds a ifdef HAVE_ZOS_PTHREADS around the pthread_yield introduced in rev 418351 in threadproc/unix/thread.c
On Wed, Nov 14, 2007 at 11:02:22AM -0500, David Jones wrote:IMO AC_DEFINE(HAVE_ZOS_PTHREADS) in apr_hints.m4 already and get rid of
> in trunk Revision 418351 introduced a pthread_yield() call, on zOS, however
> pthread_yield has to be passed in a null arg, i.e. pthread_yield(NULL)
> I've added further checking to 418351's patch to do a
> APR_TRY_COMPILE_NO_WARNING, to see if pthread_yield needs be called with ()
> or (NULL) args. Patch let zOS and linux compile correctly, but
> didn't try other platforms.
PTHREAD_ATTR_SETDETACHSTATE_ARG2_ADDR, PTHREAD_SETS_ERRNO and
PTHREAD_DETACH_ARG1_ADDR. Call a spade a spade. These aren't lots of
ways in which various POSIX implementations might happen to differ, they
are all factors of *one* implementation which is uniquely non-standard.