trawick 01/04/27 12:00:47
Modified: dso/os390 dso.c
Log:
implement apr_os_dso_handle_get() and apr_os_dso_handle_put() for
OS/390; also, store the pool pointer in the apr_dso_handle_t in an
existing path
Revision Changes Path
1.9 +19 -1 apr/dso/os390/dso.c
Index: dso.c
===================================================================
RCS file: /home/cvs/apr/dso/os390/dso.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- dso.c 2001/02/16 04:15:33 1.8
+++ dso.c 2001/04/27 19:00:46 1.9
@@ -52,6 +52,7 @@
* <http://www.apache.org/>.
*/
+#include "apr_portable.h"
#include "apr_strings.h"
#include "dso.h"
#include <errno.h>
@@ -59,6 +60,23 @@
#if APR_HAS_DSO
+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)->pool = 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;
+}
+
static apr_status_t dso_cleanup(void *thedso)
{
apr_dso_handle_t *dso = thedso;
@@ -84,7 +102,7 @@
int rc;
*res_handle = apr_pcalloc(ctx, sizeof(*res_handle));
-
+ (*res_handle)->pool = ctx;
if ((handle = dllload(path)) != NULL) {
(*res_handle)->handle = handle;
apr_pool_cleanup_register(ctx, *res_handle, dso_cleanup,
apr_pool_cleanup_null);