[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Multiply exported Gnulib symbols
From: |
Ludovic Courtès |
Subject: |
Re: Multiply exported Gnulib symbols |
Date: |
Sat, 25 Aug 2007 10:39:59 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) |
Hi,
Bruno Haible <address@hidden> writes:
> Three possible issues are known:
>
> 1) guile defining (via gnulib) a symbol called 'strcasecmp', which overrides
> the libc's strcasecmp symbol for libraries that come after libguile in the
> executable's link list or are dynamically loaded.
>
> We work around such problems by doing the override at the preprocessor
> level, rather than at the link level. I.e. on a system where strcasecmp
> is or may be defined at libc level, gnulib does
> #define strcasecmp rpl_strcasecmp
> and defines rpl_strcasecmp.
>From what I can see, `strcasecmp ()' is precisely one of the few symbols
not handled this way in `string_.h':
#if ! @HAVE_STRCASECMP@
extern int strcasecmp (char const *s1, char const *s2);
#endif
Was it intended or should it be changed to something similar to, e.g.,
the way `strndup' is handled?
> 3) Two different libraries, say, libguile and libgettextpo, using auxiliary
> functions from gnulib. It may happen that libguile and libgettextpo both
> define rpl_strcasecmp, and that this leads to link-time issues.
>
> For this we have nothing prepackaged in gnulib-tool, but there is a
> Makefile snippet that does the necessary #defines, i.e.
> #define rpl_strcasecmp scm_strcasecmp
> in guile's config.h, and
> #define rpl_strcasecmp libgettextpo_strcasecmp
> in libgettextpo's config.h. You find this code in the 'config.h' rule in
>
> http://cvs.savannah.gnu.org/viewvc/gettext/gettext-tools/libgettextpo/Makefile.am?revision=1.13&root=gettext&view=text
I second Simon's request to integrate it in Gnulib. :-)
Thanks for your help!
Ludovic.