diff options
author | André Malo <nd@apache.org> | 2004-01-25 23:03:38 +0100 |
---|---|---|
committer | André Malo <nd@apache.org> | 2004-01-25 23:03:38 +0100 |
commit | 02bc2a93e8936d712822fe0035bea0864233be5a (patch) | |
tree | 535f6aafe99f721fbbaf9598d60003c020205a06 /include | |
parent | EOLs sent by external rewritemaps are now consumed (diff) | |
download | apache2-02bc2a93e8936d712822fe0035bea0864233be5a.tar.xz apache2-02bc2a93e8936d712822fe0035bea0864233be5a.zip |
Add core version query function ap_get_server_revision and
accompanying ap_version_t structure (minor MMN bump).
The function is similar to apr_version() and allow for exact
querying of the core revision level.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102405 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include')
-rw-r--r-- | include/ap_mmn.h | 3 | ||||
-rw-r--r-- | include/ap_release.h | 17 | ||||
-rw-r--r-- | include/httpd.h | 19 |
3 files changed, 35 insertions, 4 deletions
diff --git a/include/ap_mmn.h b/include/ap_mmn.h index 157b1f578d..aafb64586f 100644 --- a/include/ap_mmn.h +++ b/include/ap_mmn.h @@ -118,6 +118,7 @@ * 20030821 (2.1.0-dev) bumped mod_include's entire API * 20030821.1 (2.1.0-dev) added XHTML doctypes * 20030821.2 (2.1.0-dev) added ap_escape_errorlog_item + * 20030821.3 (2.1.0-dev) added ap_get_server_revision / ap_version_t */ #define MODULE_MAGIC_COOKIE 0x41503230UL /* "AP20" */ @@ -125,7 +126,7 @@ #ifndef MODULE_MAGIC_NUMBER_MAJOR #define MODULE_MAGIC_NUMBER_MAJOR 20030821 #endif -#define MODULE_MAGIC_NUMBER_MINOR 2 /* 0...n */ +#define MODULE_MAGIC_NUMBER_MINOR 3 /* 0...n */ /** * Determine if the server's current MODULE_MAGIC_NUMBER is at least a diff --git a/include/ap_release.h b/include/ap_release.h index f6ca9d4b65..28222ec2be 100644 --- a/include/ap_release.h +++ b/include/ap_release.h @@ -59,6 +59,8 @@ #ifndef AP_RELEASE_H #define AP_RELEASE_H +#include "apr_general.h" /* stringify */ + /* * The below defines the base string of the Server: header. Additional * tokens can be added via the ap_add_version_component() API call. @@ -73,9 +75,18 @@ */ #define AP_SERVER_BASEVENDOR "Apache Software Foundation" #define AP_SERVER_BASEPRODUCT "Apache" -#define AP_SERVER_MAJORVERSION "2" -#define AP_SERVER_MINORVERSION "1" -#define AP_SERVER_PATCHLEVEL "0-dev" + +#define AP_SERVER_MAJORVERSION_NUMBER 2 +#define AP_SERVER_MINORVERSION_NUMBER 1 +#define AP_SERVER_PATCHLEVEL_NUMBER 0 +#define AP_SERVER_ADD_STRING "-dev" + +/* keep old macros as well */ +#define AP_SERVER_MAJORVERSION APR_STRINGIFY(AP_SERVER_MAJORVERSION_NUMBER) +#define AP_SERVER_MINORVERSION APR_STRINGIFY(AP_SERVER_MINORVERSION_NUMBER) +#define AP_SERVER_PATCHLEVEL APR_STRINGIFY(AP_SERVER_PATCHLEVEL_NUMBER) \ + AP_SERVER_ADD_STRING + #define AP_SERVER_MINORREVISION AP_SERVER_MAJORVERSION "." AP_SERVER_MINORVERSION #define AP_SERVER_BASEREVISION AP_SERVER_MINORREVISION "." AP_SERVER_PATCHLEVEL #define AP_SERVER_BASEVERSION AP_SERVER_BASEPRODUCT "/" AP_SERVER_BASEREVISION diff --git a/include/httpd.h b/include/httpd.h index c8ed789a7e..43437e29ce 100644 --- a/include/httpd.h +++ b/include/httpd.h @@ -415,6 +415,25 @@ extern "C" { # define AP_CORE_DECLARE_NONSTD AP_DECLARE_NONSTD #endif +/** + * The numeric version information is broken out into fields within this + * structure. + */ +typedef struct { + int major; /**< major number */ + int minor; /**< minor number */ + int patch; /**< patch number */ + const char *add_string; /**< additional string like "-dev" */ +} ap_version_t; + +/** + * Return httpd's version information in a numeric form. + * + * @param version Pointer to a version structure for returning the version + * information. + */ +AP_DECLARE(void) ap_get_server_revision(ap_version_t *version); + /** * Get the server version string * @return The server version string |