summaryrefslogtreecommitdiff
path: root/dso/unix
diff options
context:
space:
mode:
authorJim Jagielski <jim@apache.org>2002-04-22 13:15:48 +0000
committerJim Jagielski <jim@apache.org>2002-04-22 13:15:48 +0000
commit5a94c283cafbd70618ed93f56bac7148ce917beb (patch)
tree24d08c412608a789385d67f4aeaa9366f7932452 /dso/unix
parent2d7ca67400075ff92d6e10506e393edeb434c1dc (diff)
downloadapr-5a94c283cafbd70618ed93f56bac7148ce917beb.tar.gz
To support modules like PHP, which implement their own
loaded extensions, Darwin needs to place their public symbols in the global table. In Rhapsody, we simply set bindNow to False to achieve the same goal. PR: Obtained from: Submitted by: Marko Karppinen <markonen@php.net> Reviewed by: Jim Jagielski, Fred Sanchez git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63294 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'dso/unix')
-rw-r--r--dso/unix/dso.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/dso/unix/dso.c b/dso/unix/dso.c
index 944fafe15..a9b22b28e 100644
--- a/dso/unix/dso.c
+++ b/dso/unix/dso.c
@@ -126,12 +126,18 @@ APR_DECLARE(apr_status_t) apr_dso_load(apr_dso_handle_t **res_handle,
NSModule os_handle = NULL;
char* err_msg = NULL;
if (NSCreateObjectFileImageFromFile(path, &image) == NSObjectFileImageSuccess) {
-#ifdef NSLINKMODULE_OPTION_PRIVATE
+
+/*
+ * Under Darwin, we want/need to place dynamically loaded extensions'
+ * public symbols into the global symbol table. As long as modules
+ * don't have overlapping symbols, we're golden.
+ */
+#if defined(NSLINKMODULE_OPTION_NONE)
os_handle = NSLinkModule(image, path,
- NSLINKMODULE_OPTION_PRIVATE |
+ NSLINKMODULE_OPTION_NONE |
NSLINKMODULE_OPTION_RETURN_ON_ERROR);
#else
- os_handle = NSLinkModule(image, path, TRUE);
+ os_handle = NSLinkModule(image, path, FALSE);
#endif
NSDestroyObjectFileImage(image);
}