From 59582a9d9dccada1cdc492168e089dc91f17b4fe Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Mon, 12 Jun 2006 20:33:04 +0000 Subject: Implemented --enable-hidden-symbols configure option to enable -fvisibility=hidden on gcc >= 4.0. This reduces the size of the libcurl binary and speeds up dynamic linking by hiding all the internal symbols from the symbol table. --- include/curl/curl.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 94c4551e0..bd9236ed3 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -58,7 +58,17 @@ extern "C" { #define CURL_EXTERN __declspec(dllimport) #endif #else -#define CURL_EXTERN + +#ifdef CURL_HIDDEN_SYMBOLS +/* + * On gcc >= 4 if -fvisibility=hidden is given then this is used to cause + * external definitions to be put into the shared library. It makes no + * difference to applications whether this is set or not, only the library. + */ +#define CURL_EXTERN __attribute__ ((visibility ("default"))) +#else +#define CURL_EXTERN +#endif #endif /* -- cgit v1.2.3