Commit 084447e4 authored by Yang Tse's avatar Yang Tse
Browse files

- Provide in external interface preprocessor symbol definitions for

  CARES_HAVE_ARES_LIBRARY_INIT and CARES_HAVE_ARES_LIBRARY_CLEANUP
  to ease the use of new capabilities.

- Move ares_version() prototype to ares.h
parent 4c9c9f0b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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       \
+4 −2
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@
#ifndef ARES__H
#define ARES__H

#include "ares_version.h"  /* c-ares version defines   */
#include "ares_build.h"    /* c-ares build definitions */
#include "ares_rules.h"    /* c-ares rules enforcement */

@@ -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,
+1 −1
Original line number Diff line number Diff line
/* $Id$ */

#include "setup.h"
#include "ares_version.h"
#include "ares.h"

const char *ares_version(int *version)
{
+6 −9
Original line number Diff line number Diff line
@@ -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