httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@locus.apache.org
Subject cvs commit: apache-2.0/src/lib/apr/threadproc/unix thread.c
Date Sun, 07 May 2000 01:47:09 GMT
trawick     00/05/06 18:47:09

  Modified:    src/lib/apr configure.in threads.m4
               src/lib/apr/threadproc/unix thread.c
  Log:
  Check for the flavor of pthread_attr_getdetachstate(); normally
  it has 2 parms; on OS/390 it has one parm (based on some earlier
  POSIX threads draft?).
  
  Revision  Changes    Path
  1.89      +1 -0      apache-2.0/src/lib/apr/configure.in
  
  Index: configure.in
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/configure.in,v
  retrieving revision 1.88
  retrieving revision 1.89
  diff -u -r1.88 -r1.89
  --- configure.in	2000/05/04 03:43:48	1.88
  +++ configure.in	2000/05/07 01:47:08	1.89
  @@ -356,6 +356,7 @@
   fi
   
   APR_CHECK_PTHREAD_GETSPECIFIC_TWO_ARGS
  +APR_CHECK_PTHREAD_ATTR_GETDETACHSTATE_ONE_ARG
   
   ac_cv_define_READDIR_IS_THREAD_SAFE=no
   AC_CHECK_LIB(c_r, readdir, AC_DEFINE(READDIR_IS_THREAD_SAFE))
  
  
  
  1.8       +20 -0     apache-2.0/src/lib/apr/threads.m4
  
  Index: threads.m4
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/threads.m4,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- threads.m4	2000/05/04 03:43:48	1.7
  +++ threads.m4	2000/05/07 01:47:08	1.8
  @@ -54,6 +54,26 @@
   fi
   
   ])dnl
  +
  +AC_DEFUN(APR_CHECK_PTHREAD_ATTR_GETDETACHSTATE_ONE_ARG, [
  +AC_CACHE_CHECK(whether pthread_attr_getdetachstate takes one argument, ac_cv_pthread_attr_getdetachstate_one_arg,[
  +AC_TRY_COMPILE([
  +#include <pthread.h>
  +],[
  +pthread_attr_t *attr;
  +pthread_attr_getdetachstate(attr);
  +],[
  +    ac_cv_pthread_attr_getdetachstate_one_arg=yes
  +],[
  +    ac_cv_pthread_attr_getdetachstate_one_arg=no
  +])
  +])
  +
  +if test "$ac_cv_pthread_attr_getdetachstate_one_arg" = "yes"; then
  +  AC_DEFINE(PTHREAD_ATTR_GETDETACHSTATE_TAKES_ONE_ARG, 1, [Define if pthread_attr_getdetachstate()
has one arg])
  +fi
  +
  +])dnl
   dnl
   dnl PTHREADS_CHECK_COMPILE
   dnl
  
  
  
  1.21      +4 -0      apache-2.0/src/lib/apr/threadproc/unix/thread.c
  
  Index: thread.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/threadproc/unix/thread.c,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- thread.c	2000/04/30 21:17:57	1.20
  +++ thread.c	2000/05/07 01:47:08	1.21
  @@ -93,7 +93,11 @@
   {
       int state;
   
  +#ifdef PTHREAD_ATTR_GETDETACHSTATE_TAKES_ONE_ARG
  +    state = pthread_attr_getdetachstate(attr->attr);
  +#else
       pthread_attr_getdetachstate(attr->attr, &state);
  +#endif
       if (state == 1)
           return APR_DETACH;
       return APR_NOTDETACH;
  
  
  

Mime
View raw message