summaryrefslogtreecommitdiff
path: root/ares.h
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2013-03-10 21:25:10 +0100
committerYang Tse <yangsita@gmail.com>2013-03-10 21:28:35 +0100
commit127d4cb35798697b8d9a87648dd9af66d4ed9dec (patch)
treedc6c22bb039ec86bd4f3dd5ec5e24d0b1013ccf0 /ares.h
parent8f3f059f33a3d02c84bd2631bb257d5a6b83af5f (diff)
downloadc-ares-127d4cb35798697b8d9a87648dd9af66d4ed9dec.tar.gz
c-ares-127d4cb35798697b8d9a87648dd9af66d4ed9dec.tar.bz2
c-ares-127d4cb35798697b8d9a87648dd9af66d4ed9dec.zip
ares.h: stricter CARES_EXTERN linkage decorations logic
No API change involved.
Diffstat (limited to 'ares.h')
-rw-r--r--ares.h16
1 files changed, 6 insertions, 10 deletions
diff --git a/ares.h b/ares.h
index 694a415..9b3f376 100644
--- a/ares.h
+++ b/ares.h
@@ -75,22 +75,18 @@ extern "C" {
** c-ares external API function linkage decorations.
*/
-#if !defined(CARES_STATICLIB) && \
- (defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__))
- /* __declspec function decoration for Win32 and Symbian DLL's */
+#ifdef CARES_STATICLIB
+# define CARES_EXTERN
+#elif defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__)
# if defined(CARES_BUILDING_LIBRARY)
# define CARES_EXTERN __declspec(dllexport)
# else
# define CARES_EXTERN __declspec(dllimport)
# endif
+#elif defined(CARES_BUILDING_LIBRARY) && defined(CARES_SYMBOL_HIDING)
+# define CARES_EXTERN CARES_SYMBOL_SCOPE_EXTERN
#else
- /* visibility function decoration for other cases */
-# if !defined(CARES_SYMBOL_HIDING) || \
- defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__)
-# define CARES_EXTERN
-# else
-# define CARES_EXTERN CARES_SYMBOL_SCOPE_EXTERN
-# endif
+# define CARES_EXTERN
#endif