|Copyright||(c) Volker Stolz <email@example.com> 2003|
|License||BSD-style (see the file libraries/base/LICENSE)|
|Portability||non-portable (requires POSIX)|
DLOpen and friend Derived from GModule.chs by M.Weber & M.Chakravarty which is part of c2hs I left the API more or less the same, mostly the flags are different.
- c_dlopen :: CString -> CInt -> IO (Ptr ())
- c_dlsym :: Ptr () -> CString -> IO (FunPtr a)
- c_dlerror :: IO CString
- c_dlclose :: Ptr () -> IO CInt
- haveRtldNext :: Bool
- haveRtldLocal :: Bool
- packRTLDFlags :: [RTLDFlags] -> CInt
- data RTLDFlags
- packDL :: DL -> Ptr ()
- data DL
low level API
On some hosts (e.g. SuSe and Ubuntu Linux)
RTLD_DEFAULT) are not visible without setting the macro
_GNU_SOURCE. Since we don't want to define this macro, you can use
haveRtldNext to check wether the flag
available. Ideally, this will be optimized by the compiler so that it
should be as efficient as an #ifdef.
If you fail to test the flag and use it although it is undefined,
packDL will throw an error.