|
From: Carlo W. <li...@us...> - 2001-12-30 21:18:28
|
CVSROOT : /cvsroot/libcw
Module : src
Commit time: 2001-11-30 21:18:26 UTC
Modified files:
libcwd/bfd.cc libcwd/configure.in
Log message:
FreeBSD port: check for _dl_loaded directly instead of just link.h
---------------------- diff included ----------------------
Index: src/libcwd/bfd.cc
diff -u src/libcwd/bfd.cc:1.88 src/libcwd/bfd.cc:1.89
--- src/libcwd/bfd.cc:1.88 Sat Dec 29 20:17:46 2001
+++ src/libcwd/bfd.cc Sun Dec 30 13:18:16 2001
@@ -1,4 +1,4 @@
-// $Header: /cvsroot/l/li/libcw/src/libcwd/bfd.cc,v 1.88 2001/12/30 04:17:46 libcw Exp $
+// $Header: /cvsroot/l/li/libcw/src/libcwd/bfd.cc,v 1.89 2001/12/30 21:18:16 libcw Exp $
//
// Copyright (C) 2000 - 2001, by
//
@@ -39,7 +39,7 @@
#include <cstring>
#include <cstdlib>
#endif
-#ifdef HAVE_LINK_H
+#ifdef HAVE__DL_LOADED
#include <link.h>
extern link_map* _dl_loaded;
#endif
@@ -479,7 +479,7 @@
lbase = val - s_end_vma;
}
else
-#ifdef HAVE_LINK_H
+#ifdef HAVE__DL_LOADED
{
__libcwd_tsd.internal = saved_internal;
for(link_map* p = _dl_loaded; p; p = p->l_next)
@@ -1023,7 +1023,7 @@
load_object_file(fullpath.value->data(), 0);
// Load all shared objects
-#ifndef HAVE_LINK_H
+#ifndef HAVE__DL_LOADED
// Path to `ldd'
char const ldd_prog[] = "/usr/bin/ldd";
@@ -1184,7 +1184,7 @@
BFD_ACQUIRE_READ_LOCK;
object_file_ct* object_file = NEEDS_READ_LOCK_find_object_file(addr);
-#ifdef HAVE_LINK_H
+#ifdef HAVE__DL_LOADED
if (!object_file)
{
set_alloc_checking_off(LIBCWD_TSD);
Index: src/libcwd/configure.in
diff -u src/libcwd/configure.in:1.86 src/libcwd/configure.in:1.87
--- src/libcwd/configure.in:1.86 Sat Dec 29 20:17:46 2001
+++ src/libcwd/configure.in Sun Dec 30 13:18:16 2001
@@ -1,5 +1,5 @@
dnl Process this file with autoconf to produce a configure script.
-AC_REVISION($Revision: 1.86 $)dnl
+AC_REVISION($Revision: 1.87 $)dnl
dnl General intialization of `autoconf' varaibles.
dnl Ensure that the directory specified with --srcdir was correct
@@ -384,6 +384,11 @@
dnl Checks for header files.
AC_HEADER_STAT
AC_CHECK_HEADERS(_G_config.h link.h)
+
+dnl Check for global variable.
+if test "$ac_cv_header_link_h" = yes; then
+ AC_CHECK_FUNCS(_dl_loaded)
+fi
dnl Check for typedefs.
AC_TYPE_UID_T
----------------------- End of diff -----------------------
|