Assume dlerror() function is always available when dlopen() is

Remove separate checks for dlerror() which don't seem to be needed under
any platform any longer.

No real changes, just slim down configure/CMake a tiny bit.
This commit is contained in:
Vadim Zeitlin
2020-05-15 00:00:06 +02:00
parent fea8c608b1
commit 7a82a0bbf5
7 changed files with 0 additions and 74 deletions

View File

@@ -614,7 +614,6 @@ set(CMAKE_REQUIRED_LIBRARIES dl)
check_symbol_exists(dlopen dlfcn.h HAVE_DLOPEN)
cmake_pop_check_state()
if(HAVE_DLOPEN)
check_symbol_exists(dlerror dlfcn.h HAVE_DLERROR)
check_symbol_exists(dladdr dlfcn.h HAVE_DLADDR)
endif()
check_function_exists(gettimeofday HAVE_GETTIMEOFDAY)

View File

@@ -1086,9 +1086,6 @@
/* Define if wchar_t is distinct type in your compiler. */
#cmakedefine wxWCHAR_T_IS_REAL_TYPE 1
/* Define if you have the dlerror function. */
#cmakedefine HAVE_DLERROR 1
/* Define if you have the dladdr function. */
#cmakedefine HAVE_DLADDR 1

57
configure vendored
View File

@@ -32744,63 +32744,6 @@ done
if test "$HAVE_DL_FUNCS" = 1; then
for ac_func in dlerror
do :
ac_fn_c_check_func "$LINENO" "dlerror" "ac_cv_func_dlerror"
if test "x$ac_cv_func_dlerror" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_DLERROR 1
_ACEOF
$as_echo "#define HAVE_DLERROR 1" >>confdefs.h
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlerror in -ldl" >&5
$as_echo_n "checking for dlerror in -ldl... " >&6; }
if ${ac_cv_lib_dl_dlerror+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldl $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char dlerror ();
int
main ()
{
return dlerror ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_dl_dlerror=yes
else
ac_cv_lib_dl_dlerror=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlerror" >&5
$as_echo "$ac_cv_lib_dl_dlerror" >&6; }
if test "x$ac_cv_lib_dl_dlerror" = xyes; then :
$as_echo "#define HAVE_DLERROR 1" >>confdefs.h
fi
fi
done
for ac_func in dladdr
do :
ac_fn_c_check_func "$LINENO" "dladdr" "ac_cv_func_dladdr"

View File

@@ -5390,12 +5390,6 @@ if test "$TOOLKIT" != "MSW"; then
dnl check also for dlerror()
if test "$HAVE_DL_FUNCS" = 1; then
AC_CHECK_FUNCS(dlerror,
AC_DEFINE(HAVE_DLERROR),
[
AC_CHECK_LIB(dl, dlerror, AC_DEFINE(HAVE_DLERROR))
]
)
AC_CHECK_FUNCS(dladdr,
AC_DEFINE(HAVE_DLADDR),
[

View File

@@ -87,7 +87,6 @@
#define SIZEOF_LONG_LONG 8
#define wxSIZE_T_IS_ULONG 1
#define wxWCHAR_T_IS_REAL_TYPE 1
#define HAVE_DLERROR 1
#define HAVE_FCNTL 1
#define HAVE_GETHOSTBYNAME 1
#define HAVE_GETSERVBYNAME 1

View File

@@ -1086,9 +1086,6 @@
/* Define if wchar_t is distinct type in your compiler. */
#undef wxWCHAR_T_IS_REAL_TYPE
/* Define if you have the dlerror function. */
#undef HAVE_DLERROR
/* Define if you have the dladdr function. */
#undef HAVE_DLADDR

View File

@@ -1194,9 +1194,6 @@ typedef pid_t GPid;
/* Define if wchar_t is distinct type in your compiler. */
#define wxWCHAR_T_IS_REAL_TYPE 1
/* Define if you have the dlerror function. */
#define HAVE_DLERROR 1
/* Define if you have the dladdr function. */
#undef HAVE_DLADDR