diff options
author | bojan <bojan@13f79535-47bb-0310-9956-ffa450edef68> | 2008-07-11 00:24:57 +0000 |
---|---|---|
committer | bojan <bojan@13f79535-47bb-0310-9956-ffa450edef68> | 2008-07-11 00:24:57 +0000 |
commit | 09e69511507f973799ca871008ed7800c4be6940 (patch) | |
tree | 0bc5078a7d63b7d7df7110372ce27dcb88125fb4 | |
parent | b791066f74448fa5787a01bd01c416af1efda36d (diff) | |
download | libapr-util-09e69511507f973799ca871008ed7800c4be6940.tar.gz |
When searching for DSOs, look in apr-util-APU_MAJOR_VERSION subdirectory
of each component of APR_DSOPATH.
PR 45327
git-svn-id: http://svn.apache.org/repos/asf/apr/apr-util/trunk@675816 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | CHANGES | 4 | ||||
-rw-r--r-- | misc/apu_dso.c | 13 |
2 files changed, 17 insertions, 0 deletions
@@ -19,6 +19,10 @@ Changes with APR-util 1.4.0 *) Detection of PostgreSQL may fail if LIBS contains all libs returned by pg_config. Use it only as the last resort. [Bojan Smojver] + *) When searching for DSOs, look in apr-util-APU_MAJOR_VERSION subdirectory + of each component of APR_DSOPATH. PR 45327 + [Joe Orton, William Rowe, Bojan Smojver] + Changes with APR-util 1.3.0 *) apr_reslist: destroy all resources in apr_cleanup. diff --git a/misc/apu_dso.c b/misc/apu_dso.c index 1696b373..94c229d4 100644 --- a/misc/apu_dso.c +++ b/misc/apu_dso.c @@ -162,6 +162,19 @@ apr_status_t apu_dso_load(apr_dso_handle_sym_t *dsoptr, const char *module, if (rv == APR_SUCCESS) { /* APR_EDSOOPEN */ break; } + else if (i < paths->nelts - 1) { + /* try with apr-util-APU_MAJOR_VERSION appended */ + eos = apr_cpystrn(eos, + "apr-util-" APU_STRINGIFY(APU_MAJOR_VERSION) "/", + sizeof(path) - (eos - path)); + + apr_cpystrn(eos, module, sizeof(path) - (eos - path)); + + rv = apr_dso_load(&dlhandle, path, global); + if (rv == APR_SUCCESS) { /* APR_EDSOOPEN */ + break; + } + } } if (rv != APR_SUCCESS) /* APR_ESYMNOTFOUND */ |