diff options
author | wolfgang <unknown> | 2005-08-04 02:09:36 +0000 |
---|---|---|
committer | wolfgang <unknown> | 2005-08-04 02:09:36 +0000 |
commit | 95fc2f922dac4e380fe492b0a569723176b464b5 (patch) | |
tree | 405e8ea447be6035de6c84ff5733fbf1b23d4df6 /System/Posix/DynamicLinker/Prim.hsc | |
parent | 7fd41f87817cd390d318b16f672cac8a8a809377 (diff) |
[project @ 2005-08-04 02:09:36 by wolfgang]
Check for RTLD_DEFAULT in dlfcn.h and use it if it is available.
(On Mac OS X its value is -2, and using NULL instead does not work.)
MERGE TO STABLE
Diffstat (limited to 'System/Posix/DynamicLinker/Prim.hsc')
-rw-r--r-- | System/Posix/DynamicLinker/Prim.hsc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/System/Posix/DynamicLinker/Prim.hsc b/System/Posix/DynamicLinker/Prim.hsc index 2ab3a20..eb1985e 100644 --- a/System/Posix/DynamicLinker/Prim.hsc +++ b/System/Posix/DynamicLinker/Prim.hsc @@ -62,6 +62,10 @@ foreign import ccall unsafe "__hsunix_rtldNext" rtldNext :: Ptr a haveRtldNext = False #endif /* HAVE_RTLDNEXT */ +#ifdef HAVE_RTLDDEFAULT +foreign import ccall unsafe "__hsunix_rtldDefault" rtldDefault :: Ptr a +#endif /* HAVE_RTLDDEFAULT */ + haveRtldLocal :: Bool #ifdef HAVE_RTLDLOCAL @@ -118,5 +122,9 @@ packDL Next = rtldNext #else packDL Next = error "RTLD_NEXT not available" #endif +#ifdef HAVE_RTLDDEFAULT +packDL Default = rtldDefault +#else packDL Default = nullPtr +#endif packDL (DLHandle h) = h |