apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject cvs commit: apr/threadproc/unix signals.c
Date Wed, 21 Feb 2001 13:21:47 GMT
trawick     01/02/21 05:21:47

  Modified:    include  apr_thread_proc.h
               threadproc/unix signals.c
  Log:
  Get APR apps building on FreeBSD when --enable-threads isn't specified.
  We had unresolved references for pthread_sigmask() and sigwait().
  These thread support functions aren't appropriate anyway if !APR_HAS_THREADS.
  
  Revision  Changes    Path
  1.55      +2 -0      apr/include/apr_thread_proc.h
  
  Index: apr_thread_proc.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_thread_proc.h,v
  retrieving revision 1.54
  retrieving revision 1.55
  diff -u -r1.54 -r1.55
  --- apr_thread_proc.h	2001/02/21 01:15:48	1.54
  +++ apr_thread_proc.h	2001/02/21 13:21:46	1.55
  @@ -584,6 +584,7 @@
   APR_DECLARE(void) apr_pool_note_subprocess(apr_pool_t *a, apr_proc_t *pid,
                                         enum kill_conditions how);
   
  +#if APR_HAS_THREADS
   /**
    * Setup the process for a single thread to be used for all signal handling.
    * @warn This must be called before any threads are created
  @@ -605,6 +606,7 @@
                                                      apr_threadattr_t *tattr,
                                                 int (*signal_handler)(int signum),
                                                      apr_pool_t *p);
  +#endif /* APR_HAS_THREADS */
   
   #ifdef __cplusplus
   }
  
  
  
  1.21      +5 -1      apr/threadproc/unix/signals.c
  
  Index: signals.c
  ===================================================================
  RCS file: /home/cvs/apr/threadproc/unix/signals.c,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- signals.c	2001/02/21 10:44:15	1.20
  +++ signals.c	2001/02/21 13:21:47	1.21
  @@ -63,7 +63,9 @@
   #include "apr_want.h"
   
   #include <assert.h>
  +#if APR_HAS_THREADS && APR_HAVE_PTHREAD_H
   #include <pthread.h>
  +#endif
   
   apr_status_t apr_proc_kill(apr_proc_t *proc, int signum)
   {
  @@ -265,6 +267,7 @@
   
   #endif /* SYS_SIGLIST_DECLARED */
   
  +#if APR_HAS_THREADS
   static void *signal_thread_func(void *signal_handler)
   {
       sigset_t sig_mask;
  @@ -299,7 +302,7 @@
       /* All threads should mask signals out, accoring to sigwait(2) man page */
       sigfillset(&sig_mask);
   
  -#ifdef SIGPROCMASK_SETS_THREAD_MASK
  +#if !APR_HAS_THREADS || defined(SIGPROCMASK_SETS_THREAD_MASK)
       rv = sigprocmask(SIG_SETMASK, &sig_mask, NULL);
   #else
       if ((rv = pthread_sigmask(SIG_SETMASK, &sig_mask, NULL)) != 0) {
  @@ -319,3 +322,4 @@
       return apr_thread_create(td, tattr, signal_thread_func, signal_handler, p);
   }
   
  +#endif
  
  
  

Mime
View raw message