diff options
author | Yang Tse <yangsita@gmail.com> | 2013-03-12 00:24:37 +0100 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2013-03-12 00:27:47 +0100 |
commit | 83a42ee20ea7fc25abb61c0b7ef56ebe712d7093 (patch) | |
tree | c61e79d6ca44352f1e184c305275df1fcb53adb1 /include | |
parent | 90d7d1b727e2deae0ae903f9f39f68e14b284c00 (diff) | |
download | curl-83a42ee20ea7fc25abb61c0b7ef56ebe712d7093.tar.gz |
curl.h: stricter CURL_EXTERN linkage decorations logic
No API change involved.
Info: http://curl.haxx.se/mail/lib-2013-02/0234.html
Diffstat (limited to 'include')
-rw-r--r-- | include/curl/curl.h | 34 |
1 files changed, 13 insertions, 21 deletions
diff --git a/include/curl/curl.h b/include/curl/curl.h index 5b39a24bf..50f40435e 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -93,29 +93,21 @@ extern "C" { typedef void CURL; /* - * Decorate exportable functions for Win32 and Symbian OS DLL linking. - * This avoids using a .def file for building libcurl.dll. + * libcurl external API function linkage decorations. */ -#if (defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__)) && \ - !defined(CURL_STATICLIB) -#if defined(BUILDING_LIBCURL) -#define CURL_EXTERN __declspec(dllexport) -#else -#define CURL_EXTERN __declspec(dllimport) -#endif -#else -#ifdef CURL_HIDDEN_SYMBOLS -/* - * This definition is used to make external definitions visible in the - * shared library when symbols are hidden by default. It makes no - * difference when compiling applications whether this is set or not, - * only when compiling the library. - */ -#define CURL_EXTERN CURL_EXTERN_SYMBOL +#ifdef CURL_STATICLIB +# define CURL_EXTERN +#elif defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__) +# if defined(BUILDING_LIBCURL) +# define CURL_EXTERN __declspec(dllexport) +# else +# define CURL_EXTERN __declspec(dllimport) +# endif +#elif defined(BUILDING_LIBCURL) && defined(CURL_HIDDEN_SYMBOLS) +# define CURL_EXTERN CURL_EXTERN_SYMBOL #else -#define CURL_EXTERN -#endif +# define CURL_EXTERN #endif #ifndef curl_socket_typedef |