Skip to content
Browse files

External API function linkage decoration adjustment

  • Loading branch information...
1 parent 9cac6a4 commit de18bf75625f52e10c562637ca1e4edc7084e5bc @yangtse yangtse committed Oct 29, 2009
Showing with 11 additions and 9 deletions.
  1. +9 −7 ares.h
  2. +2 −2 configure.ac
View
16 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
View
4 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"

0 comments on commit de18bf7

Please sign in to comment.
Something went wrong with that request. Please try again.