summaryrefslogtreecommitdiffstats
path: root/sal
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2007-11-22 15:51:15 +0000
committerIvo Hinkelmann <ihi@openoffice.org>2007-11-22 15:51:15 +0000
commit57830249a0cb28e0c1dd132e3a80befef2eeb644 (patch)
tree8dbec3ad950ffe3497713cb0e74114c0c7dcfb0f /sal
parentINTEGRATION: CWS mipselport02 (1.16.16); FILE MERGED (diff)
downloadcore-57830249a0cb28e0c1dd132e3a80befef2eeb644.tar.gz
core-57830249a0cb28e0c1dd132e3a80befef2eeb644.zip
INTEGRATION: CWS mipselport02 (1.37.16); FILE MERGED
2007/11/16 09:39:18 cmc 1.37.16.1: #i83648# after consultation, this is the perferred solution
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/unx/module.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/sal/osl/unx/module.c b/sal/osl/unx/module.c
index 13996a79a238..e77be46f855f 100644
--- a/sal/osl/unx/module.c
+++ b/sal/osl/unx/module.c
@@ -4,9 +4,9 @@
*
* $RCSfile: module.c,v $
*
- * $Revision: 1.37 $
+ * $Revision: 1.38 $
*
- * last change: $Author: vg $ $Date: 2007-10-15 12:48:36 $
+ * last change: $Author: ihi $ $Date: 2007-11-22 16:51:15 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -127,11 +127,15 @@ oslModule SAL_CALL osl_loadModule(rtl_uString *ustrModuleName, sal_Int32 nRtldMo
oslModule SAL_CALL osl_psz_loadModule(const sal_Char *pszModuleName, sal_Int32 nRtldMode)
{
- sal_Int32 rtld_mode = (nRtldMode == 0) ? RTLD_LAZY : nRtldMode;
-
+ OSL_ASSERT(
+ (nRtldMode & SAL_LOADMODULE_LAZY) == 0 ||
+ (nRtldMode & SAL_LOADMODULE_NOW) == 0); /* only either LAZY or NOW */
if (pszModuleName)
{
#ifndef NO_DL_FUNCTIONS
+ int rtld_mode =
+ ((nRtldMode & SAL_LOADMODULE_NOW) ? RTLD_NOW : RTLD_LAZY) |
+ ((nRtldMode & SAL_LOADMODULE_GLOBAL) ? RTLD_GLOBAL : RTLD_LOCAL);
void* pLib = dlopen(pszModuleName, rtld_mode);
#if OSL_DEBUG_LEVEL > 1