diff options
author | Daniel Stenberg <daniel@haxx.se> | 2003-10-24 20:28:04 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2003-10-24 20:28:04 +0000 |
commit | cfa535b3a593f08bdee72ff1c8ef393e6d07ac35 (patch) | |
tree | a409fbb211837f997428188eafebacc4903b6f69 | |
parent | d76ed5d861588598fe58287b4a896452ba7950e1 (diff) | |
download | c-ares-cfa535b3a593f08bdee72ff1c8ef393e6d07ac35.tar.gz c-ares-cfa535b3a593f08bdee72ff1c8ef393e6d07ac35.tar.bz2 c-ares-cfa535b3a593f08bdee72ff1c8ef393e6d07ac35.zip |
Introducing ares_version(), so that we can have apps get version info about
what particular ares version that is being used.
-rw-r--r-- | Makefile.in | 2 | ||||
-rw-r--r-- | ares_version.c | 11 | ||||
-rw-r--r-- | ares_version.h | 17 |
3 files changed, 29 insertions, 1 deletions
diff --git a/Makefile.in b/Makefile.in index d307779..2c4bfbb 100644 --- a/Makefile.in +++ b/Makefile.in @@ -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 diff --git a/ares_version.c b/ares_version.c new file mode 100644 index 0000000..04b269e --- /dev/null +++ b/ares_version.c @@ -0,0 +1,11 @@ +/* $Id$ */ + +#include "ares_version.h" + +char *ares_version(int *version) +{ + if(version) + *version = ARES_VERSION; + + return ARES_VERSION_STR; +} diff --git a/ares_version.h b/ares_version.h new file mode 100644 index 0000000..b99fa1b --- /dev/null +++ b/ares_version.h @@ -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 + |