comparison dynload/dynload_unix.c @ 254:9d70178c1ded

- better cpp checking whether dlinfo() is available, to also cover GLIBC based systems that don't identify as Linux (e.g. debian/k*BSD)
author Tassilo Philipp
date Mon, 15 May 2017 13:06:04 +0200
parents 5cfe4322c500
children f5577f6bf97a
comparison
equal deleted inserted replaced
253:5cfe4322c500 254:9d70178c1ded
77 # define RTLD_LIGHTEST RTLD_LAZY 77 # define RTLD_LIGHTEST RTLD_LAZY
78 #endif 78 #endif
79 79
80 80
81 /* code for dlGetLibraryPath is platform specific - if dlinfo() exists use */ 81 /* code for dlGetLibraryPath is platform specific - if dlinfo() exists use */
82 /* that (checked through existance of RTLD_DI_LINKMAP, usually a #define */ 82 /* that: check for RTLD_DI_LINKMAP (#define for dlinfo()), or if GNU C Lib */
83 /* for dlinfo(), or by OS (always on Solaris where it's from, usually on */ 83 /* is used (where RTLD_DI_LINKMAP is an enum), or by OS (dlinfo comes from */
84 /* Linux, where the flag might be an enum instead, ...) */ 84 /* Solaris), etc. */
85 #if defined(RTLD_DI_LINKMAP) || defined(OS_SunOS) || (defined(OS_Linux) && !defined(DL_DLADDR_TO_LIBPATH)) 85 #if defined(RTLD_DI_LINKMAP) || defined(OS_SunOS) || defined(__GLIBC__) /* @@@ dlinfo() was introduced in glibc 2.3.3 (in 2003), somehow check for that, also */
86 86
87 #include <link.h> 87 #include <link.h>
88 88
89 int dlGetLibraryPath(DLLib* pLib, char* sOut, int bufSize) 89 int dlGetLibraryPath(DLLib* pLib, char* sOut, int bufSize)
90 { 90 {