1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-11 03:55:03 -05:00

External API function linkage decoration adjustment

This commit is contained in:
Yang Tse 2009-10-29 01:02:54 +00:00
parent 6a79b0e859
commit 57eeee2ec3
2 changed files with 11 additions and 9 deletions

View File

@ -27,8 +27,9 @@
* Define WIN32 when build target is Win32 API * Define WIN32 when build target is Win32 API
*/ */
#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32) #if (defined(_WIN32) || defined(__WIN32__)) && \
#define WIN32 !defined(WIN32) && !defined(__SYMBIAN32__)
# define WIN32
#endif #endif
#include <sys/types.h> #include <sys/types.h>
@ -71,17 +72,18 @@ extern "C" {
#if !defined(CARES_STATICLIB) && \ #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 */ /* __declspec function decoration for Win32 and Symbian DLL's */
# if defined(CARES_BUILDING_LIB) # if defined(CARES_BUILDING_LIBRARY)
# define CARES_EXTERN __declspec(dllexport) # define CARES_EXTERN __declspec(dllexport)
# else # else
# define CARES_EXTERN __declspec(dllimport) # define CARES_EXTERN __declspec(dllimport)
# endif # endif
#else #else
/* visibility function decoration for other cases */ /* visibility function decoration for other cases */
# ifdef CARES_HIDDEN_SYMBOLS # if !defined(CARES_HIDDEN_SYMBOLS) || \
# define CARES_EXTERN CARES_EXTERN_SYMBOL defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__)
# else
# define CARES_EXTERN # define CARES_EXTERN
# else
# define CARES_EXTERN CARES_EXTERN_SYMBOL
# endif # endif
#endif #endif

View File

@ -111,10 +111,10 @@ esac
dnl libtool setup dnl libtool setup
AC_PROG_LIBTOOL AC_PROG_LIBTOOL
AC_MSG_CHECKING([if we need CARES_BUILDING_LIB]) AC_MSG_CHECKING([if we need CARES_BUILDING_LIBRARY])
case $host in case $host in
*-*-mingw*) *-*-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_RESULT(yes)
AC_MSG_CHECKING([if we need CARES_STATICLIB]) AC_MSG_CHECKING([if we need CARES_STATICLIB])
if test "X$enable_shared" = "Xno" if test "X$enable_shared" = "Xno"