aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2009-03-19 17:52:52 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2009-03-19 17:52:52 +0000
commitcedc02cca9da4469f7f4c20ceb812704814dbf9a (patch)
tree741c5eddf5282546b8f00886016a47b23bb9704f
parent8c0ce170c80f69d548d5b907ec81b6e74b35e17c (diff)
Remove the use of RTLD_NOLOAD, as it is not behaving like expected.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@183241 f38db490-d61c-443f-a65b-d21fe96a405b
-rwxr-xr-xconfigure54
-rw-r--r--configure.ac9
-rw-r--r--include/asterisk/autoconfig.h.in4
-rw-r--r--main/loader.c13
4 files changed, 0 insertions, 80 deletions
diff --git a/configure b/configure
index 0be5b9d21..8eeff7e56 100755
--- a/configure
+++ b/configure
@@ -15912,60 +15912,6 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
-{ echo "$as_me:$LINENO: checking for RTLD_NOLOAD" >&5
-echo $ECHO_N "checking for RTLD_NOLOAD... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <dlfcn.h>
-int
-main ()
-{
-int foo = RTLD_NOLOAD;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
- (eval "$ac_link") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
- { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_RTLD_NOLOAD 1
-_ACEOF
-
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
-
{ echo "$as_me:$LINENO: checking for IP_MTU_DISCOVER" >&5
echo $ECHO_N "checking for IP_MTU_DISCOVER... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
diff --git a/configure.ac b/configure.ac
index f072359cc..aaa48608d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -432,15 +432,6 @@ AC_LINK_IFELSE(
AC_MSG_RESULT(no)
)
-AC_MSG_CHECKING(for RTLD_NOLOAD)
-AC_LINK_IFELSE(
- AC_LANG_PROGRAM([#include <dlfcn.h>],
- [int foo = RTLD_NOLOAD;]),
- AC_MSG_RESULT(yes)
- AC_DEFINE([HAVE_RTLD_NOLOAD], 1, [Define to 1 if your system has a dynamic linker that supports RTLD_NOLOAD.]),
- AC_MSG_RESULT(no)
-)
-
AC_MSG_CHECKING(for IP_MTU_DISCOVER)
AC_LINK_IFELSE(
AC_LANG_PROGRAM([#include <netinet/in.h>],
diff --git a/include/asterisk/autoconfig.h.in b/include/asterisk/autoconfig.h.in
index 1c44abb3b..e3de4487f 100644
--- a/include/asterisk/autoconfig.h.in
+++ b/include/asterisk/autoconfig.h.in
@@ -334,10 +334,6 @@
/* Define to 1 if you have the `rint' function. */
#undef HAVE_RINT
-/* Define to 1 if your system has a dynamic linker that supports RTLD_NOLOAD.
- */
-#undef HAVE_RTLD_NOLOAD
-
/* Define to 1 if your system has /sbin/launchd. */
#undef HAVE_SBIN_LAUNCHD
diff --git a/main/loader.c b/main/loader.c
index 60c8a7676..c579b3af4 100644
--- a/main/loader.c
+++ b/main/loader.c
@@ -386,18 +386,6 @@ static struct ast_module *load_dynamic_module(const char *resource_in, unsigned
return NULL;
}
- /* if the system supports RTLD_NOLOAD, we can just 'promote' the flags
- on the already-opened library to what we want... if not, we have to
- close it and start over
- */
-#if defined(HAVE_RTLD_NOLOAD) && !defined(__Darwin__)
- if (!dlopen(fn, RTLD_NOLOAD | (wants_global ? RTLD_LAZY | RTLD_GLOBAL : RTLD_NOW | RTLD_LOCAL))) {
- ast_log(LOG_WARNING, "Unable to promote flags on module '%s': %s\n", resource_in, dlerror());
- while (!dlclose(lib));
- free(resource_being_loaded);
- return NULL;
- }
-#else
while (!dlclose(lib));
resource_being_loaded = NULL;
@@ -417,7 +405,6 @@ static struct ast_module *load_dynamic_module(const char *resource_in, unsigned
/* since the module was successfully opened, and it registered itself
the previous time we did that, we're going to assume it worked this
time too :) */
-#endif
AST_LIST_LAST(&module_list)->lib = lib;
resource_being_loaded = NULL;