This patch sets the dso/aix subdirectory to be used for older versions
of AIX and fixes a number of bugs the dso code in that directory.
Index: apr/configure.in
===================================================================
RCS file: /cvs/apache/apr/configure.in,v
retrieving revision 1.263
diff -u -d -r1.263 configure.in
--- configure.in 2001/03/29 15:50:29 1.263
+++ configure.in 2001/03/30 08:37:25
@@ -120,6 +120,12 @@
esac
case "$OS" in
+ i386-ibm-aix* | *-ibm-aix[1-2].* | *-ibm-aix3.* | *-ibm-aix4.1 |
*-ibm-aix4.1.* | *-ibm-aix4.2 | *-ibm-aix4.2.*)
+ OSDIR="aix"
+ config_subdirs="shmem/unix/mm"
+ USE_MM=yes
+ eolstr="\\n"
+ ;;
*-os2*)
CFLAGS="$CFLAGS -DOS2 -Zmt"
OSDIR="os2"
Index: apr/dso/aix/dso.c
===================================================================
RCS file: /cvs/apache/apr/dso/aix/dso.c,v
retrieving revision 1.13
diff -u -d -r1.13 dso.c
--- dso.c 2001/02/16 04:15:32 1.13
+++ dso.c 2001/03/30 08:37:25
@@ -148,8 +148,10 @@
{
void *os_handle = dlopen((char *)path, RTLD_NOW | RTLD_GLOBAL);
- if(os_handle == NULL)
+ 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;
@@ -171,13 +173,24 @@
{
void *retval = dlsym(handle->handle, symname);
- if (retval == NULL)
+ if (retval == NULL) {
+ handle->errormsg = dlerror();
return APR_EINIT;
-
- ressym = retval;
+ }
+
+ *ressym = retval;
return APR_SUCCESS;
}
+APR_DECLARE(const char *) apr_dso_error(apr_dso_handle_t *dso, char *buffer,
apr_size_t buflen)
+{
+ if (dso->errormsg) {
+ apr_cpystrn(buffer, dso->errormsg, buflen);
+ return dso->errormsg;
+ }
+ return "No Error";
+}
+
/*
@@ -282,7 +295,7 @@
* load should be declared load(const char *...). Thus we
* cast the path to a normal char *. Ugly.
*/
- if ((mp->entry = (void *) load((char *) path, L_NOAUTODEFER, NULL)) ==
NULL) {
+ if ((mp->entry = (void *) loadAndInit((char *) path, L_NOAUTODEFER, NULL))
== NULL) {
free(mp->name);
free(mp);
errvalid++;
Index: apr/include/arch/aix/dso.h
===================================================================
RCS file: /cvs/apache/apr/include/arch/aix/dso.h,v
retrieving revision 1.7
diff -u -d -r1.7 dso.h
--- dso.h 2001/02/16 04:15:49 1.7
+++ dso.h 2001/03/30 08:37:28
@@ -55,7 +55,7 @@
#ifndef DSO_H
#define DSO_H
-#include "apr_private.h"
+#include "../unix/apr_private.h"
#include "apr_general.h"
#include "apr_pools.h"
#include "apr_dso.h"
@@ -71,6 +71,7 @@
struct apr_dso_handle_t {
apr_pool_t *cont;
void *handle;
+ const char *errormsg;
};
#endif
Victor
--
Victor J. Orlikowski
======================
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]