Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Jan 1998 17:20:19 -0800
From:      John Polstra <jdp@polstra.com>
To:        Nate Williams <nate@mt.sri.com>
Cc:        hackers@FreeBSD.ORG
Subject:   Re: dladdr: Hel-lo-o-o? 
Message-ID:  <199801290120.RAA01616@austin.polstra.com>
In-Reply-To: Your message of "Wed, 28 Jan 1998 18:13:58 MST." <199801290113.SAA07616@mt.sri.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
> >     struct dl_info;
> > 
> >     #pragma weak dladdr
> >     extern int dladdr(void *, struct dl_info *);
> > 
> >     if (&dladdr == 0)
> > 	/* It's not available. */
> >     else
> > 	/* It is available. */
> 
> Let me try this one.  Is there any include files I need to get the
> definitions for dl_info and dladdr?

Will you always be building on a machine that has dladdr?  If so,
then you can get rid of the lines:

    struct dl_info;
    extern int dladdr(void *, struct dl_info *);

and include <dlfcn.h> instead.

If the code might be built on an older system, then you'll need to
grab the definition of "struct dl_info" from the patches I posted.

John
--
   John Polstra                                       jdp@polstra.com
   John D. Polstra & Co., Inc.                Seattle, Washington USA
   "Self-knowledge is always bad news."                 -- John Barth



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199801290120.RAA01616>