+2009-09-03 Loren J. Rittle <ljrittle@acm.org>
+
+ * dyn_load.c (HAVE_DL_ITERATE_PHDR): Break definition from use.
+ Define for FreeBSD 7.0+.
+
2009-08-24 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* configure.ac (AC_PREREQ): Bump to 2.64.
/* It may still not be available in the library on the target system. */
/* Thus we also treat it as a weak symbol. */
#define HAVE_DL_ITERATE_PHDR
+#pragma weak dl_iterate_phdr
+#endif
+
+# if (defined(FREEBSD) && __FreeBSD__ >= 7)
+/* On the FreeBSD system, any target system at major version 7 shall */
+/* have dl_iterate_phdr; therefore, we need not make it weak as above. */
+#define HAVE_DL_ITERATE_PHDR
+#endif
+
+#if defined(HAVE_DL_ITERATE_PHDR)
static int GC_register_dynlib_callback(info, size, ptr)
struct dl_phdr_info * info;
/* Return TRUE if we succeed, FALSE if dl_iterate_phdr wasn't there. */
-#pragma weak dl_iterate_phdr
-
GC_bool GC_register_dynamic_libraries_dl_iterate_phdr()
{
if (dl_iterate_phdr) {