summaryrefslogtreecommitdiff
path: root/dso
diff options
context:
space:
mode:
authorrbb <rbb@13f79535-47bb-0310-9956-ffa450edef68>2000-06-01 01:01:16 +0000
committerrbb <rbb@13f79535-47bb-0310-9956-ffa450edef68>2000-06-01 01:01:16 +0000
commitaa2b9e1841aab6335673d80292423b1971149243 (patch)
treef1f17de04ca92795060b4165adbd69d4b48cc5fa /dso
parent4ae6295dae9e35054f9ff1745d6850d7612a3c71 (diff)
downloadlibapr-aa2b9e1841aab6335673d80292423b1971149243.tar.gz
Fix building with DSO support. If any module is configured to be
compiled for shared support then APR_HAS_DSO is enabled and -ldl is added to the LIBS variable. -ldl may need to be modified based on platform. If no modules are designated as shared then APR_HAS_DSO is disabled and nothing is added to LIBS. In basic testing this compiled without errors or warnings. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60122 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'dso')
-rw-r--r--dso/aix/dso.c4
-rw-r--r--dso/aix/dso.h5
-rw-r--r--dso/beos/dso.c3
-rw-r--r--dso/beos/dso.h5
-rw-r--r--dso/os2/dso.c4
-rw-r--r--dso/os2/dso.h5
-rw-r--r--dso/unix/dso.c4
-rw-r--r--dso/unix/dso.h5
-rw-r--r--dso/win32/dso.c4
-rw-r--r--dso/win32/dso.h5
10 files changed, 44 insertions, 0 deletions
diff --git a/dso/aix/dso.c b/dso/aix/dso.c
index d43c8fdd9..e433985f8 100644
--- a/dso/aix/dso.c
+++ b/dso/aix/dso.c
@@ -87,6 +87,8 @@
#include <a.out.h>
#include "dso.h"
+#if APR_HAS_DSO
+
#undef FREAD
#undef FWRITE
#include <ldfcn.h>
@@ -704,3 +706,5 @@ static void *findMain(void)
free(buf);
return ret;
}
+
+#endif
diff --git a/dso/aix/dso.h b/dso/aix/dso.h
index 392a92015..ae89f9ee5 100644
--- a/dso/aix/dso.h
+++ b/dso/aix/dso.h
@@ -59,6 +59,9 @@
#include "apr_general.h"
#include "apr_pools.h"
#include "apr_dso.h"
+#include "apr.h"
+
+#if APR_HAS_DSO
void *dlopen(const char *path, int mode);
void *dlsym(void *handle, const char *symbol);
@@ -71,3 +74,5 @@ struct ap_dso_handle_t {
};
#endif
+
+#endif
diff --git a/dso/beos/dso.c b/dso/beos/dso.c
index c63102739..acb05b58f 100644
--- a/dso/beos/dso.c
+++ b/dso/beos/dso.c
@@ -54,6 +54,7 @@
#include "dso.h"
+#if APR_HAS_DSO
ap_status_t ap_dso_init(void){
return APR_SUCCESS;
@@ -97,3 +98,5 @@ ap_status_t ap_dso_sym(ap_dso_handle_sym_t *ressym, ap_dso_handle_t *handle,
return APR_SUCCESS;
}
+
+#endif
diff --git a/dso/beos/dso.h b/dso/beos/dso.h
index 2666d779a..27e35f87e 100644
--- a/dso/beos/dso.h
+++ b/dso/beos/dso.h
@@ -60,11 +60,16 @@
#include "apr_pools.h"
#include "apr_errno.h"
#include "apr_dso.h"
+#include "apr.h"
#include <kernel/image.h>
+#if APR_HAS_DSO
+
struct ap_dso_handle_t {
image_id handle; /* Handle to the DSO loaded */
ap_pool_t *cont;
};
#endif
+
+#endif
diff --git a/dso/os2/dso.c b/dso/os2/dso.c
index 4f4f71d62..b95c86801 100644
--- a/dso/os2/dso.c
+++ b/dso/os2/dso.c
@@ -58,6 +58,8 @@
#include <stdio.h>
#include <string.h>
+#if APR_HAS_DSO
+
ap_status_t ap_dso_init()
{
return APR_SUCCESS;
@@ -141,3 +143,5 @@ char *ap_dso_error(ap_dso_handle_t *dso, char *buffer, ap_size_t buflen)
ap_cpystrn(buffer, message, buflen);
return buffer;
}
+
+#endif
diff --git a/dso/os2/dso.h b/dso/os2/dso.h
index 86d82f22a..b37e1a54c 100644
--- a/dso/os2/dso.h
+++ b/dso/os2/dso.h
@@ -62,6 +62,9 @@
#include "apr_general.h"
#include "apr_pools.h"
#include "apr_dso.h"
+#include "apr.h"
+
+#if APR_HAS_DSO
struct ap_dso_handle_t {
ap_pool_t *cont; /* Context for returning error strings */
@@ -71,3 +74,5 @@ struct ap_dso_handle_t {
};
#endif
+
+#endif
diff --git a/dso/unix/dso.c b/dso/unix/dso.c
index a62bd92f5..2ed08958a 100644
--- a/dso/unix/dso.c
+++ b/dso/unix/dso.c
@@ -54,6 +54,8 @@
#include "dso.h"
+#if APR_HAS_DSO
+
ap_status_t ap_dso_init(void){
return APR_SUCCESS;
}
@@ -144,3 +146,5 @@ char *ap_dso_error(ap_dso_handle_t *dso, char *buffer, ap_size_t buflen)
return dso->errormsg;
return "No Error";
}
+
+#endif
diff --git a/dso/unix/dso.h b/dso/unix/dso.h
index 548b2121d..55e7e3246 100644
--- a/dso/unix/dso.h
+++ b/dso/unix/dso.h
@@ -59,6 +59,9 @@
#include "apr_general.h"
#include "apr_pools.h"
#include "apr_dso.h"
+#include "apr.h"
+
+#if APR_HAS_DSO
#ifdef HAVE_DLFCN_H
#include <dlfcn.h>
@@ -89,3 +92,5 @@ struct ap_dso_handle_t {
};
#endif
+
+#endif
diff --git a/dso/win32/dso.c b/dso/win32/dso.c
index d04b6a054..33ad2717f 100644
--- a/dso/win32/dso.c
+++ b/dso/win32/dso.c
@@ -54,6 +54,8 @@
#include "dso.h"
+#if APR_HAS_DSO
+
ap_status_t ap_dso_init(void){
return APR_SUCCESS;
}
@@ -101,3 +103,5 @@ char *ap_dso_error(ap_dso_handle_t *dso, char *buf, ap_size_t bufsize)
{
return ap_strerror(dso->load_error, buf, bufsize);
}
+
+#endif
diff --git a/dso/win32/dso.h b/dso/win32/dso.h
index d4e0df905..73ab8b1ed 100644
--- a/dso/win32/dso.h
+++ b/dso/win32/dso.h
@@ -59,6 +59,9 @@
#include "apr_general.h"
#include "apr_pools.h"
#include "apr_dso.h"
+#include "apr.h"
+
+#if APR_HAS_DSO
struct ap_dso_handle_t {
ap_pool_t *cont;
@@ -67,3 +70,5 @@ struct ap_dso_handle_t {
};
#endif
+
+#endif