You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by bn...@apache.org on 2002/01/08 22:00:38 UTC

cvs commit: apr/locks/netware proc_mutex.c

bnicholes    02/01/08 13:00:37

  Modified:    threadproc/netware signals.c proc.c
               locks/netware proc_mutex.c
  Log:
  Cleanup work on the proc stubs that are unused in NetWare
  
  Revision  Changes    Path
  1.3       +3 -14     apr/threadproc/netware/signals.c
  
  Index: signals.c
  ===================================================================
  RCS file: /home/cvs/apr/threadproc/netware/signals.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- signals.c	6 Aug 2001 21:54:32 -0000	1.2
  +++ signals.c	8 Jan 2002 21:00:37 -0000	1.3
  @@ -67,20 +67,9 @@
   #include <pthread.h>
   #endif
   
  -apr_status_t apr_proc_kill(apr_proc_t *proc, int signum)
  +APR_DECLARE(apr_status_t) apr_proc_kill(apr_proc_t *proc, int signum)
   {
  -#ifndef NETWARE
  -    if (kill(proc->pid, signum) == -1) {
  -        return errno;
  -    }
  -#endif
  -
  -    //srj need to find equal to kill or use sigterm in nks
  -	//srj windows is using TerminateProcess here
  -    //srj if ( NXThreadExit(proc->pid) != 0) {
  -    //srj    return errno;
  -    //srj }
  -    return APR_SUCCESS;
  +    return APR_ENOTIMPL;
   }
   
   
  @@ -116,7 +105,7 @@
       return NULL;
   }
   
  -apr_status_t apr_setup_signal_thread(void)
  +APR_DECLARE(apr_status_t) apr_setup_signal_thread(void)
   {
       int rv = 0;
   
  
  
  
  1.4       +22 -16    apr/threadproc/netware/proc.c
  
  Index: proc.c
  ===================================================================
  RCS file: /home/cvs/apr/threadproc/netware/proc.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- proc.c	23 Oct 2001 17:30:08 -0000	1.3
  +++ proc.c	8 Jan 2002 21:00:37 -0000	1.4
  @@ -62,7 +62,7 @@
    * Knowledge Base article: Q190351
    *
    */
  -apr_status_t apr_procattr_create(apr_procattr_t **new,apr_pool_t *cont)
  +APR_DECLARE(apr_status_t) apr_procattr_create(apr_procattr_t **new,apr_pool_t *cont)
   {
       (*new) = (apr_procattr_t *)apr_pcalloc(cont, sizeof(apr_procattr_t));
   
  @@ -75,7 +75,7 @@
   
   }
   
  -apr_status_t apr_procattr_io_set(apr_procattr_t *attr, apr_int32_t in, 
  +APR_DECLARE(apr_status_t) apr_procattr_io_set(apr_procattr_t *attr, apr_int32_t in, 
                                    apr_int32_t out, apr_int32_t err)
   {
       apr_status_t status;
  @@ -140,7 +140,7 @@
   }
   
   
  -apr_status_t apr_procattr_child_in_set(apr_procattr_t *attr, apr_file_t *child_in,
  +APR_DECLARE(apr_status_t) apr_procattr_child_in_set(apr_procattr_t *attr, apr_file_t *child_in,
                                      apr_file_t *parent_in)
   {
       if (attr->child_in == NULL && attr->parent_in == NULL)
  @@ -156,7 +156,7 @@
   }
   
   
  -apr_status_t apr_procattr_child_out_set(apr_procattr_t *attr, apr_file_t *child_out,
  +APR_DECLARE(apr_status_t) apr_procattr_child_out_set(apr_procattr_t *attr, apr_file_t *child_out,
                                       apr_file_t *parent_out)
   {
       if (attr->child_out == NULL && attr->parent_out == NULL)
  @@ -172,7 +172,7 @@
   }
   
   
  -apr_status_t apr_procattr_child_err_set(apr_procattr_t *attr, apr_file_t *child_err,
  +APR_DECLARE(apr_status_t) apr_procattr_child_err_set(apr_procattr_t *attr, apr_file_t *child_err,
                                      apr_file_t *parent_err)
   {
       if (attr->child_err == NULL && attr->parent_err == NULL)
  @@ -188,7 +188,7 @@
   }
   
   
  -apr_status_t apr_procattr_dir_set(apr_procattr_t *attr, 
  +APR_DECLARE(apr_status_t) apr_procattr_dir_set(apr_procattr_t *attr, 
                                  const char *dir) 
   {
       attr->currdir = apr_pstrdup(attr->cntxt, dir);
  @@ -198,22 +198,22 @@
       return APR_ENOMEM;
   }
   
  -apr_status_t apr_procattr_cmdtype_set(apr_procattr_t *attr,
  +APR_DECLARE(apr_status_t) apr_procattr_cmdtype_set(apr_procattr_t *attr,
                                        apr_cmdtype_e cmd) 
   {
       attr->cmdtype = cmd;
       return APR_SUCCESS;
   }
   
  -apr_status_t apr_procattr_detach_set(apr_procattr_t *attr, apr_int32_t detach) 
  +APR_DECLARE(apr_status_t) apr_procattr_detach_set(apr_procattr_t *attr, apr_int32_t detach) 
   {
       attr->detached = detach;
       return APR_SUCCESS;
   }
   
  -apr_status_t apr_proc_fork(apr_proc_t *proc, apr_pool_t *cont)
  +#if APR_HAS_FORK
  +APR_DECLARE(apr_status_t) apr_proc_fork(apr_proc_t *proc, apr_pool_t *cont)
   {
  -#if 0
       int pid;
       
       if ((pid = fork()) < 0) {
  @@ -230,9 +230,9 @@
       proc->in = NULL; 
       proc->out = NULL; 
       proc->err = NULL; 
  -#endif
       return APR_INPARENT;
   }
  +#endif
   
   static apr_status_t limit_proc(apr_procattr_t *attr)
   {
  @@ -279,7 +279,7 @@
       return APR_SUCCESS;
   }
   
  -apr_status_t apr_proc_create(apr_proc_t *new,
  +APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new,
   									const char *progname, 
   									const char * const *args, 
   									const char * const *env,
  @@ -368,8 +368,10 @@
       if (attr->child_err) {
           apr_file_close(attr->child_err);
       }
  -#endif
       return APR_SUCCESS;
  +#else
  +    return APR_ENOTIMPL;
  +#endif
   }
   
   APR_DECLARE(apr_status_t) apr_proc_wait_all_procs(apr_proc_t *proc,
  @@ -391,8 +393,10 @@
       else if (proc->pid == 0) {
           return APR_CHILD_NOTDONE;
       }
  -#endif
       return errno;
  +#else
  +    return APR_ENOTIMPL;
  +#endif
   } 
   
   APR_DECLARE(apr_status_t) apr_proc_wait(apr_proc_t *proc,
  @@ -417,11 +421,13 @@
       else if (status == 0) {
           return APR_CHILD_NOTDONE;
       }
  -#endif
       return errno;
  +#else
  +    return APR_ENOTIMPL;
  +#endif
   } 
   
  -apr_status_t apr_procattr_limit_set(apr_procattr_t *attr, apr_int32_t what, 
  +APR_DECLARE(apr_status_t) apr_procattr_limit_set(apr_procattr_t *attr, apr_int32_t what, 
                             struct rlimit *limit)
   {
       switch(what) {
  
  
  
  1.5       +2 -12     apr/locks/netware/proc_mutex.c
  
  Index: proc_mutex.c
  ===================================================================
  RCS file: /home/cvs/apr/locks/netware/proc_mutex.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- proc_mutex.c	29 Dec 2001 23:14:21 -0000	1.4
  +++ proc_mutex.c	8 Jan 2002 21:00:37 -0000	1.5
  @@ -101,23 +101,13 @@
   apr_status_t apr_os_proc_mutex_get(apr_os_proc_mutex_t *ospmutex,
                                      apr_proc_mutex_t *pmutex)
   {
  -    ospmutex = pmutex->mutex;
  -    return APR_SUCCESS;
  +    return APR_ENOTIMPL;
   }
   
   apr_status_t apr_os_proc_mutex_put(apr_proc_mutex_t **pmutex,
                                      apr_os_proc_mutex_t *ospmutex,
                                      apr_pool_t *pool)
   {
  -    if (pool == NULL) {
  -        return APR_ENOPOOL;
  -    }
  -    if ((*pmutex) == NULL) {
  -        (*pmutex) = (apr_proc_mutex_t *)apr_palloc(pool,
  -                                                   sizeof(apr_proc_mutex_t));
  -        (*pmutex)->pool = pool;
  -    }
  -    (*pmutex)->mutex = ospmutex;
  -    return APR_SUCCESS;
  +    return APR_ENOTIMPL;
   }