[Top][All Lists]

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

gnulib and static libraries

From: Simon Josefsson
Subject: gnulib and static libraries
Date: Fri, 09 Jul 2010 23:04:54 +0200
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux)

A problem that have been (I believe) ignored for a long time is how to
handle namespace when using gnulib in project that provides static
libraries.  Here is an example of where this causes problems:


In this case, GnuTLS uses the read-file module from gnulib, and it ends
up being exported in a static GnuTLS library.  GNU Wget also has a
function called read_file, and things break when linking.

Should `gnulib-tool --import' create AC_DEFINE's to map each global
gnulib function symbol into some application provided namespace?
E.g. `gnulib-tool --import --symbol-prefix _gnutls'?  This would then
create something like this:

AC_DEFINE([read_file], [__gnutls_read_file])

Maintaining the list of global gnulib functions will be a hassle
though.  Could this be automated?

Are there better solutions?

I have some vague memory that this has been discussed before (I may even
have brought it up) but I can't find anything in the gnulib
documentation around this, so I'm guessing it has not been resolved.
But I am hoping that I'm wrong. :-)


reply via email to

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