Subject: Export only public symbols

Export only public symbols

From: Gregor Jasny <jasny_at_vidsoft.de>
Date: Mon, 11 May 2009 13:30:11 +0200

Hi,

during Debian packaging of 1.6.0 I noticed that the shared library
exports public and private symbols. The attached patch uses libtool to
export only symbols named '^ares_[[:alnum:]].*'. At least adig, acountry
and ahost are still working.

Please apply the patch to HEAD, so that I can provide a symbol file for
better backward compatibility of the Debian packages [1].

Thanks,
Gregor

[1] http://wiki.debian.org/UsingSymbolsFiles

? acountry
Index: Makefile.am
===================================================================
RCS file: /cvsroot/curl/curl/ares/Makefile.am,v
retrieving revision 1.31
diff -u -3 -p -r1.31 Makefile.am
--- Makefile.am 30 Apr 2009 10:43:27 -0000 1.31
+++ Makefile.am 11 May 2009 11:22:20 -0000
@@ -87,8 +87,9 @@ if NO_UNDEFINED
 UNDEF = -no-undefined
 endif
 
+EXPORT_SYMBOLS = -export-symbols-regex '^ares_[[:alnum:]].*'
 
-libcares_la_LDFLAGS = $(UNDEF) $(VER)
+libcares_la_LDFLAGS = $(UNDEF) $(VER) $(EXPORT_SYMBOLS)
 
 # Makefile.inc provides the CSOURCES and HHEADERS defines
 include Makefile.inc
Received on 2009-05-11