summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2009-10-29 01:02:54 +0000
committerYang Tse <yangsita@gmail.com>2009-10-29 01:02:54 +0000
commit57eeee2ec37618dd90f2978a5426631214c18280 (patch)
tree142d988d8eadfee96404e40f7d23bfd9619128dc
parent6a79b0e8591ec94adcc49809bf1ab8cf66f1bb41 (diff)
downloadgnurl-57eeee2ec37618dd90f2978a5426631214c18280.tar.gz
gnurl-57eeee2ec37618dd90f2978a5426631214c18280.tar.bz2
gnurl-57eeee2ec37618dd90f2978a5426631214c18280.zip
External API function linkage decoration adjustment
-rw-r--r--ares/ares.h16
-rw-r--r--ares/configure.ac4
2 files changed, 11 insertions, 9 deletions
diff --git a/ares/ares.h b/ares/ares.h
index c5ff24266..88805e316 100644
--- a/ares/ares.h
+++ b/ares/ares.h
@@ -27,8 +27,9 @@
* Define WIN32 when build target is Win32 API
*/
-#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
-#define WIN32
+#if (defined(_WIN32) || defined(__WIN32__)) && \
+ !defined(WIN32) && !defined(__SYMBIAN32__)
+# define WIN32
#endif
#include <sys/types.h>
@@ -69,19 +70,20 @@ extern "C" {
*/
#if !defined(CARES_STATICLIB) && \
- (defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__))
+ (defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__))
/* __declspec function decoration for Win32 and Symbian DLL's */
-# if defined(CARES_BUILDING_LIB)
+# if defined(CARES_BUILDING_LIBRARY)
# define CARES_EXTERN __declspec(dllexport)
# else
# define CARES_EXTERN __declspec(dllimport)
# endif
#else
/* visibility function decoration for other cases */
-# ifdef CARES_HIDDEN_SYMBOLS
-# define CARES_EXTERN CARES_EXTERN_SYMBOL
-# else
+# if !defined(CARES_HIDDEN_SYMBOLS) || \
+ defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__)
# define CARES_EXTERN
+# else
+# define CARES_EXTERN CARES_EXTERN_SYMBOL
# endif
#endif
diff --git a/ares/configure.ac b/ares/configure.ac
index 92db52eb0..722da4c8c 100644
--- a/ares/configure.ac
+++ b/ares/configure.ac
@@ -111,10 +111,10 @@ esac
dnl libtool setup
AC_PROG_LIBTOOL
-AC_MSG_CHECKING([if we need CARES_BUILDING_LIB])
+AC_MSG_CHECKING([if we need CARES_BUILDING_LIBRARY])
case $host in
*-*-mingw*)
- AC_DEFINE(CARES_BUILDING_LIB, 1, [when building c-ares library])
+ AC_DEFINE(CARES_BUILDING_LIBRARY, 1, [when building c-ares library])
AC_MSG_RESULT(yes)
AC_MSG_CHECKING([if we need CARES_STATICLIB])
if test "X$enable_shared" = "Xno"