You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by or...@apache.org on 2001/09/25 07:04:58 UTC
cvs commit: apr/include/arch/aix dso.h
orlikowski 01/09/24 22:04:58
Modified: . configure.in
dso/aix dso.c
include/arch/aix dso.h
Log:
AIX emulated dlopen() cleanups...
Revision Changes Path
1.368 +1 -0 apr/configure.in
Index: configure.in
===================================================================
RCS file: /home/cvs/apr/configure.in,v
retrieving revision 1.367
retrieving revision 1.368
diff -u -r1.367 -r1.368
--- configure.in 2001/09/22 20:23:21 1.367
+++ configure.in 2001/09/25 05:04:57 1.368
@@ -210,6 +210,7 @@
case $host in
i386-ibm-aix* | *-ibm-aix[1-2].* | *-ibm-aix3.* | *-ibm-aix4.1 | *-ibm-aix4.1.* | *-ibm-aix4.2 | *-ibm-aix4.2.*)
OSDIR="aix"
+ APR_ADDTO(LDFLAGS,-lld)
eolstr="\\n"
;;
*-os2*)
1.15 +24 -4 apr/dso/aix/dso.c
Index: dso.c
===================================================================
RCS file: /home/cvs/apr/dso/aix/dso.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- dso.c 2001/04/02 19:33:03 1.14
+++ dso.c 2001/09/25 05:04:58 1.15
@@ -85,7 +85,8 @@
#include <sys/types.h>
#include <sys/ldr.h>
#include <a.out.h>
-#include "aix/dso.h"
+#include "dso.h"
+#include "apr_portable.h"
#if APR_HAS_DSO
@@ -132,6 +133,23 @@
* add the basic "wrappers" here.
*/
+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;
@@ -148,14 +166,16 @@
{
void *os_handle = dlopen((char *)path, RTLD_NOW | RTLD_GLOBAL);
+ *res_handle = apr_pcalloc(ctx, sizeof(*res_handle));
+
if(os_handle == NULL) {
(*res_handle)->errormsg = dlerror();
return APR_EDSOOPEN;
}
- *res_handle = apr_pcalloc(ctx, sizeof(*res_handle));
(*res_handle)->handle = (void*)os_handle;
- (*res_handle)->cont = ctx;
+ (*res_handle)->pool = ctx;
+ (*res_handle)->errormsg = NULL;
apr_pool_cleanup_register(ctx, *res_handle, dso_cleanup, apr_pool_cleanup_null);
@@ -164,7 +184,7 @@
APR_DECLARE(apr_status_t) apr_dso_unload(apr_dso_handle_t *handle)
{
- return apr_pool_cleanup_run(handle->cont, handle, dso_cleanup);
+ return apr_pool_cleanup_run(handle->pool, handle, dso_cleanup);
}
APR_DECLARE(apr_status_t) apr_dso_sym(apr_dso_handle_sym_t *ressym,
1.9 +1 -1 apr/include/arch/aix/dso.h
Index: dso.h
===================================================================
RCS file: /home/cvs/apr/include/arch/aix/dso.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- dso.h 2001/04/02 19:33:12 1.8
+++ dso.h 2001/09/25 05:04:58 1.9
@@ -69,7 +69,7 @@
int dlclose(void *handle);
struct apr_dso_handle_t {
- apr_pool_t *cont;
+ apr_pool_t *pool;
void *handle;
const char *errormsg;
};