diff options
-rw-r--r-- | ares/Makefile.vc6 | 2 | ||||
-rw-r--r-- | ares/ares.h | 6 | ||||
-rw-r--r-- | ares/ares_version.c | 2 | ||||
-rw-r--r-- | ares/ares_version.h | 15 |
4 files changed, 12 insertions, 13 deletions
diff --git a/ares/Makefile.vc6 b/ares/Makefile.vc6 index 7fb275421..949059dcf 100644 --- a/ares/Makefile.vc6 +++ b/ares/Makefile.vc6 @@ -221,7 +221,7 @@ $(OBJ_DIR)\ares_destroy.obj: ares_destroy.c setup.h setup_once.h ares.h \ $(OBJ_DIR)\ares_mkquery.obj: ares_mkquery.c setup.h setup_once.h nameser.h \ ares.h ares_dns.h ares_build.h ares_rules.h -$(OBJ_DIR)\ares_version.obj: ares_version.c setup.h setup_once.h \ +$(OBJ_DIR)\ares_version.obj: ares_version.c setup.h setup_once.h ares.h \ ares_version.h ares_build.h ares_rules.h $(OBJ_DIR)\ares_expand_name.obj: ares_expand_name.c setup.h setup_once.h \ diff --git a/ares/ares.h b/ares/ares.h index e942d2def..9d09a7ada 100644 --- a/ares/ares.h +++ b/ares/ares.h @@ -19,8 +19,9 @@ #ifndef ARES__H #define ARES__H -#include "ares_build.h" /* c-ares build definitions */ -#include "ares_rules.h" /* c-ares rules enforcement */ +#include "ares_version.h" /* c-ares version defines */ +#include "ares_build.h" /* c-ares build definitions */ +#include "ares_rules.h" /* c-ares rules enforcement */ /* * Define WIN32 when build target is Win32 API @@ -248,6 +249,7 @@ typedef int (*ares_sock_create_callback)(ares_socket_t socket_fd, int ares_library_init(int flags); void ares_library_cleanup(void); +const char *ares_version(int *version); int ares_init(ares_channel *channelptr); int ares_init_options(ares_channel *channelptr, struct ares_options *options, diff --git a/ares/ares_version.c b/ares/ares_version.c index 8aa195226..25f8e77cb 100644 --- a/ares/ares_version.c +++ b/ares/ares_version.c @@ -1,7 +1,7 @@ /* $Id$ */ #include "setup.h" -#include "ares_version.h" +#include "ares.h" const char *ares_version(int *version) { diff --git a/ares/ares_version.h b/ares/ares_version.h index 281084534..66d4bcc78 100644 --- a/ares/ares_version.h +++ b/ares/ares_version.h @@ -11,15 +11,12 @@ (ARES_VERSION_PATCH)) #define ARES_VERSION_STR "1.6.1-CVS" -#ifdef __cplusplus -extern "C" { -#endif - -const char *ares_version(int *version); - -#ifdef __cplusplus -} +#if (ARES_VERSION >= 0x010601) +# define CARES_HAVE_ARES_LIBRARY_INIT 1 +# define CARES_HAVE_ARES_LIBRARY_CLEANUP 1 +#else +# undef CARES_HAVE_ARES_LIBRARY_INIT +# undef CARES_HAVE_ARES_LIBRARY_CLEANUP #endif #endif - |