summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dso/os2/dso.c2
-rw-r--r--dso/unix/dso.c2
-rw-r--r--dso/win32/dso.c2
-rw-r--r--include/apr_dso.h2
-rw-r--r--misc/unix/errorcodes.c3
5 files changed, 6 insertions, 5 deletions
diff --git a/dso/os2/dso.c b/dso/os2/dso.c
index 90f4069ce..e9129fe13 100644
--- a/dso/os2/dso.c
+++ b/dso/os2/dso.c
@@ -130,7 +130,7 @@ ap_status_t ap_dso_sym(ap_dso_handle_sym_t *ressym,
/* Just a stub, it will never be called because we never return APR_EDSOOPEN */
-char *ap_dso_error()
+char *ap_dso_error(char *buf, int bufsize, ap_status_t errcode)
{
return NULL;
}
diff --git a/dso/unix/dso.c b/dso/unix/dso.c
index 390566b0e..4357edb37 100644
--- a/dso/unix/dso.c
+++ b/dso/unix/dso.c
@@ -134,7 +134,7 @@ ap_status_t ap_dso_sym(ap_dso_handle_sym_t *ressym,
return APR_SUCCESS;
}
-char *ap_dso_error(void)
+char *ap_dso_error(char *buf, int bufsize, ap_status_t errcode)
{
#if defined(HPUX) || defined(HPUX10) || defined(HPUX11)
return strerror(errno);
diff --git a/dso/win32/dso.c b/dso/win32/dso.c
index a741276b3..8e64a56d7 100644
--- a/dso/win32/dso.c
+++ b/dso/win32/dso.c
@@ -94,7 +94,7 @@ ap_status_t ap_dso_sym(ap_dso_handle_sym_t *ressym,
return APR_SUCCESS;
}
-char *ap_dso_error(void)
+char *ap_dso_error(char *buf, int bufsize, ap_status_t errcode)
{
return "An error occured loading a DLL.";
}
diff --git a/include/apr_dso.h b/include/apr_dso.h
index a3c3ed6a3..052798b4e 100644
--- a/include/apr_dso.h
+++ b/include/apr_dso.h
@@ -117,7 +117,7 @@ B<Load a symbol from a DSO handle.>
ap_status_t ap_dso_sym(ap_dso_handle_sym_t *ressym, ap_dso_handle_t *handle,
const char *symname);
-char *ap_dso_error(void);
+char *ap_dso_error(char *buf, int bufsize, ap_status_t errcode);
#ifdef __cplusplus
}
diff --git a/misc/unix/errorcodes.c b/misc/unix/errorcodes.c
index f1f2d8acb..ce6d7eeb6 100644
--- a/misc/unix/errorcodes.c
+++ b/misc/unix/errorcodes.c
@@ -74,6 +74,7 @@ static char *stuffbuffer(char *buf, ap_size_t bufsize, const char *s)
static char *apr_error_string(ap_status_t statcode)
{
+ char buf[256];
switch (statcode) {
case APR_ENOPOOL:
return "A new pool could not be created.";
@@ -102,7 +103,7 @@ static char *apr_error_string(ap_status_t statcode)
case APR_ENOSHMAVAIL:
return "No shared memory is currently available";
case APR_EDSOOPEN:
- return ap_dso_error();
+ return ap_dso_error(buf, sizeof(buf), APR_EDSOOPEN);
case APR_INCHILD:
return
"Your code just forked, and you are currently executing in the "