Explicitly specify that Darwin, Linux and Solaris platforms have dladdr()
authorIvan Maidanski <ivmai@mail.ru>
Fri, 13 Sep 2013 19:33:32 +0000 (23:33 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Sat, 14 Sep 2013 07:22:46 +0000 (11:22 +0400)
* include/private/gcconfig.h (HAVE_DLADDR): Define also for DARWIN
(conditionally), LINUX and SOLARIS (conditionally).

include/private/gcconfig.h

index 83a4444..0b4e02b 100644 (file)
 # define NEED_CALLINFO
 #endif
 
-#if defined(FREEBSD) && !defined(HAVE_DLADDR)
-  /* TODO: Define for Darwin, Linux, Solaris. */
-  /* TODO: Detect dladdr() presence by configure. */
+#if (defined(FREEBSD) || (defined(DARWIN) && !defined(_POSIX_C_SOURCE)) \
+        || (defined(SOLARIS) && (!defined(_XOPEN_SOURCE) \
+                                 || defined(__EXTENSIONS__))) \
+        || defined(LINUX)) && !defined(HAVE_DLADDR)
 # define HAVE_DLADDR
 #endif