1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

Introducing ares_version(), so that we can have apps get version info about

what particular ares version that is being used.
This commit is contained in:
Daniel Stenberg 2003-10-24 20:28:04 +00:00
parent d46afd2b6a
commit a9d74e6c97
3 changed files with 29 additions and 1 deletions

View File

@ -24,7 +24,7 @@ OBJS= ares__close_sockets.o ares__get_hostent.o ares__read_line.o \
ares_free_hostent.o ares_free_string.o ares_gethostbyaddr.o \
ares_gethostbyname.o ares_init.o ares_mkquery.o ares_parse_a_reply.o \
ares_parse_ptr_reply.o ares_process.o ares_query.o ares_search.o \
ares_send.o ares_strerror.o ares_timeout.o
ares_send.o ares_strerror.o ares_timeout.o ares_version.o
all: libares.a adig ahost

11
ares/ares_version.c Normal file
View File

@ -0,0 +1,11 @@
/* $Id$ */
#include "ares_version.h"
char *ares_version(int *version)
{
if(version)
*version = ARES_VERSION;
return ARES_VERSION_STR;
}

17
ares/ares_version.h Normal file
View File

@ -0,0 +1,17 @@
/* $Id$ */
#ifndef ARES__VERSION_H
#define ARES__VERSION_H
#define ARES_VERSION_MAJOR 1
#define ARES_VERSION_MINOR 0
#define ARES_VERSION_PATCH 0
#define ARES_VERSION ((ARES_VERSION_MAJOR<<16)|\
(ARES_VERSION_MINOR<<8)|\
(ARES_VERSION_PATCH))
#define ARES_VERSION_STR "1.0.0"
char *ares_version(int *version);
#endif