bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: DEPENDS_ON_* preprocessor symbols


From: Ben Pfaff
Subject: Re: DEPENDS_ON_* preprocessor symbols
Date: Sun, 23 May 2010 15:07:29 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Bruno Haible <address@hidden> writes:

>> > I wish the list of libraries that support this mechanism was
>> > not hard-coded.  Do you have an idea for making it
>> > extensible?
>> 
>> It is not clear to me why this mechanism is here.  I guess that
>> it must be to avoid the need for the caller to also call the
>> individual lib<name>_set_relocation_prefix functions directly.
>
> Yes, exactly. Assume a program links to libgettextpo. libgettextpo
> may or may not be linked to libunistring. libunistring may or may
> not be linked to libiconv. libgettextpo may or may not be linked
> to libintl. => I cannot imagine the horrible #ifdef combinations
> that result from the attempt to call the lib<name>_set_relocation_prefix
> functions directly.

I was imagining that the program would call the functions for any
library that it uses itself, say libX.  If libX uses libY, then
libX_set_relocation_prefix() calls libY_set_relocation_prefix(),
and so on.

> Probably the best is to use dl_iterate_phdr on glibc and Solaris systems,
> _dyld_get_image_name on MacOS X, loadquery on AIX, shl_get on HP-UX,
> ldr_inq_module on OSF/1, VirtualQuery on Woe32.

To me this sounds pretty horrible too.
-- 
I love deadlines.
I love the whooshing noise they make as they go by.
--Douglas Adams



reply via email to

[Prev in Thread] Current Thread [Next in Thread]