apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dr...@apache.org
Subject cvs commit: apr/include apr_portable.h
Date Sun, 22 Apr 2001 21:05:41 GMT
dreid       01/04/22 14:05:41

  Modified:    dso/beos dso.c
               include  apr_portable.h
  Log:
  Add the apr_os_dso_handle_get/set for BeOS and some other pieces of tidying up
  to remove some errors as the handle is an integer not a pointer.  Also add the
  include to apr_portable.h that I missed as pointed out by Peter Schultz.
  
  Submitted by:	Peter Schultz
  Reviewed by:	David Reid <dreid@apache.org>
  
  Revision  Changes    Path
  1.18      +20 -2     apr/dso/beos/dso.c
  
  Index: dso.c
  ===================================================================
  RCS file: /home/cvs/apr/dso/beos/dso.c,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- dso.c	2001/03/05 00:15:46	1.17
  +++ dso.c	2001/04/22 21:05:40	1.18
  @@ -53,6 +53,7 @@
    */
   
   #include "beos/dso.h"
  +#include "apr_portable.h"
   
   #if APR_HAS_DSO
   
  @@ -60,9 +61,9 @@
   {
       apr_dso_handle_t *dso = thedso;
   
  -    if (dso->handle != NULL && unload_add_on(dso->handle) < B_NO_ERROR)
  +    if (dso->handle > 0 && unload_add_on(dso->handle) < B_NO_ERROR)
         return APR_EINIT;
  -    dso->handle = NULL;
  +    dso->handle = -1;
   
       return APR_SUCCESS;
   }
  @@ -110,6 +111,23 @@
   {
       strncpy(buffer, strerror(errno), buflen);
       return buffer;
  +}
  +
  +APR_DECLARE(apr_status_t) apr_os_dso_handle_put(apr_dso_handle_t **aprdso,
  +                                                apr_os_dso_handle_t *osdso,
  +                                                apr_pool_t *pool)
  +{
  +    *aprdso = apr_pcalloc(pool, sizeof **aprdso);
  +    (*aprdso)->handle = *osdso;
  +    (*aprdso)->cont = pool;
  +    return APR_SUCCESS;
  +}
  +
  +APR_DECLARE(apr_status_t) apr_os_dso_handle_get(apr_os_dso_handle_t *osdso,
  +                                                apr_dso_handle_t *aprdso)
  +{
  +    *osdso = aprdso->handle;
  +    return APR_SUCCESS;
   }
   
   #endif
  
  
  
  1.51      +1 -0      apr/include/apr_portable.h
  
  Index: apr_portable.h
  ===================================================================
  RCS file: /home/cvs/apr/include/apr_portable.h,v
  retrieving revision 1.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- apr_portable.h	2001/04/19 14:54:39	1.50
  +++ apr_portable.h	2001/04/22 21:05:41	1.51
  @@ -117,6 +117,7 @@
   
   #elif defined(__BEOS__)
   #include <kernel/OS.h>
  +#include <kernel/image.h>
   
   struct apr_os_lock_t {
   	/* Inter proc */
  
  
  

Mime
View raw message