Skip to content
Snippets Groups Projects
Commit 5e725064 authored by Thomas Miedema's avatar Thomas Miedema
Browse files

Deprecate function `haveRtldLocal`

The function haveRtldLocal was introduced for compatibility with Cygwin
on Mar 28 2002 in GHC commit 4740cf56c774b92e02d31b4666158d70c2e85a8f.

According to https://cygwin.com/viewvc/src/winsup/cygwin/include/dlfcn.h
RTLD_LOCAL has been available on Cygwin since Revision 1.4 (August 9 2010).
parent 827e6757
No related branches found
No related tags found
No related merge requests found
......@@ -51,9 +51,6 @@ import Foreign.C.String ( CString )
--
-- If you fail to test the flag and use it although it is undefined,
-- 'packDL' will throw an error.
--
-- The same applies to RTLD_LOCAL which isn't available on
-- cygwin.
haveRtldNext :: Bool
......@@ -69,12 +66,8 @@ foreign import ccall unsafe "__hsunix_rtldDefault" rtldDefault :: Ptr a
#endif /* HAVE_RTLDDEFAULT */
haveRtldLocal :: Bool
#ifdef HAVE_RTLDLOCAL
haveRtldLocal = True
#else /* HAVE_RTLDLOCAL */
haveRtldLocal = False
#endif /* HAVE_RTLDLOCAL */
{-# DEPRECATED haveRtldLocal "defaults to True" #-}
-- |Flags for 'System.Posix.DynamicLinker.dlopen'.
......@@ -98,12 +91,7 @@ packRTLDFlag :: RTLDFlags -> CInt
packRTLDFlag RTLD_LAZY = #const RTLD_LAZY
packRTLDFlag RTLD_NOW = #const RTLD_NOW
packRTLDFlag RTLD_GLOBAL = #const RTLD_GLOBAL
#ifdef HAVE_RTLDLOCAL
packRTLDFlag RTLD_LOCAL = #const RTLD_LOCAL
#else /* HAVE_RTLDLOCAL */
packRTLDFlag RTLD_LOCAL = error "RTLD_LOCAL not available"
#endif /* HAVE_RTLDLOCAL */
-- |Flags for 'System.Posix.DynamicLinker.dlsym'. Notice that 'Next'
......
......@@ -155,21 +155,6 @@ AC_EGREP_CPP(yes,
AC_MSG_RESULT(no)
])
dnl ** RTLD_LOCAL isn't available on cygwin
AC_MSG_CHECKING(for RTLD_LOCAL from dlfcn.h)
AC_EGREP_CPP(yes,
[
#include <dlfcn.h>
#ifdef RTLD_LOCAL
yes
#endif
], [
AC_MSG_RESULT(yes)
AC_DEFINE([HAVE_RTLDLOCAL], [1], [Define to 1 if RTLD_LOCAL is available.])
], [
AC_MSG_RESULT(no)
])
AC_CHECK_FUNCS(openpty,,
AC_CHECK_LIB(util,openpty,
[AC_DEFINE(HAVE_OPENPTY) EXTRA_LIBS="$EXTRA_LIBS util"],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment