unix-2.8.3.0: POSIX functionality
Copyright(c) The University of Glasgow 2002
LicenseBSD-style (see the file libraries/base/LICENSE)
Maintainerlibraries@haskell.org
Stabilityprovisional
Portabilitynon-portable (requires POSIX)
Safe HaskellSafe
LanguageHaskell2010

System.Posix

Description

POSIX.1-2008 support

Synopsis

Documentation

data DL Source #

Flags for dlsym. Notice that Next might not be available on your particular platform! Use haveRtldNext.

If RTLD_DEFAULT is not defined on your platform, packDL Default reduces to nullPtr.

Constructors

Null 
Next 
DLHandle (Ptr ()) 

Instances

Instances details
Show DL Source # 
Instance details

Defined in System.Posix.DynamicLinker.Prim

Methods

showsPrec :: Int -> DL -> ShowS #

show :: DL -> String #

showList :: [DL] -> ShowS #

c_dlsym :: Ptr () -> CString -> IO (FunPtr a) Source #

haveRtldNext :: Bool Source #

On some hosts (e.g. SuSe and Ubuntu Linux) RTLD_NEXT (and RTLD_DEFAULT) are not visible without setting the macro _GNU_SOURCE. Since we don't want to define this macro, you can use the function haveRtldNext to check whether the flag Next is 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.

haveRtldLocal :: Bool Source #

Deprecated: defaults to True

packDL :: DL -> Ptr () Source #

dlsym :: DL -> String -> IO (FunPtr a) Source #

dlsym returns the address binding of the symbol described in symbol, as it occurs in the shared object identified by source.

dlclose :: DL -> IO () Source #

withDL :: FilePath -> [RTLDFlags] -> (DL -> IO a) -> IO a Source #

withDL_ :: FilePath -> [RTLDFlags] -> (DL -> IO a) -> IO () Source #

undl :: DL -> Ptr () Source #

undl obtains the raw handle. You mustn't do something like withDL mod flags $ liftM undl >>= p -> use p