diff options
author | pquerna <pquerna@13f79535-47bb-0310-9956-ffa450edef68> | 2005-03-15 22:22:03 +0000 |
---|---|---|
committer | pquerna <pquerna@13f79535-47bb-0310-9956-ffa450edef68> | 2005-03-15 22:22:03 +0000 |
commit | 7f9dcc6f9475950de3e0c18f1e6f97e1afed078d (patch) | |
tree | 7953f8b542c621650badaf0917478ed544431bd2 /include | |
parent | b58f19075745b483206de3c23e7939c2df5abf16 (diff) | |
download | libapr-7f9dcc6f9475950de3e0c18f1e6f97e1afed078d.tar.gz |
blind backport attempting to fix 1.1.x, based on wrowe's changes between r151766 and r151806 in trunk.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.1.x@157596 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include')
-rw-r--r-- | include/apr_general.h | 3 | ||||
-rw-r--r-- | include/apr_version.h | 71 |
2 files changed, 53 insertions, 21 deletions
diff --git a/include/apr_general.h b/include/apr_general.h index 3b6caaceb..da2b34c08 100644 --- a/include/apr_general.h +++ b/include/apr_general.h @@ -143,10 +143,13 @@ int strncasecmp(const char *a, const char *b, size_t n); * String and memory functions */ +/* APR_STRINGIFY is defined here, and also in apr_release.h, so wrap it */ +#ifndef APR_STRINGIFY /** Properly quote a value as a string in the C preprocessor */ #define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n) /** Helper macro for APR_STRINGIFY */ #define APR_STRINGIFY_HELPER(n) #n +#endif #if (!APR_HAVE_MEMMOVE) #define memmove(a,b,c) bcopy(b,a,c) diff --git a/include/apr_version.h b/include/apr_version.h index 2ba92434c..c65cda2cc 100644 --- a/include/apr_version.h +++ b/include/apr_version.h @@ -16,12 +16,6 @@ #ifndef APR_VERSION_H #define APR_VERSION_H -#include "apr.h" - -#ifdef __cplusplus -extern "C" { -#endif - /** * @file apr_version.h * @brief APR Versioning Interface @@ -42,6 +36,7 @@ extern "C" { * http://apr.apache.org/versioning.html */ + /* The numeric compile-time version constants. These constants are the * authoritative version numbers for APR. */ @@ -53,21 +48,41 @@ extern "C" { */ #define APR_MAJOR_VERSION 1 -/** +/** minor version * Minor API changes that do not cause binary compatibility problems. - * Should be reset to 0 when upgrading APR_MAJOR_VERSION + * Reset to 0 when upgrading APR_MAJOR_VERSION */ #define APR_MINOR_VERSION 1 -/** patch level */ +/** patch level + * The Patch Level never includes API changes, simply bug fixes. + * Reset to 0 when upgrading APR_MINOR_VERSION + */ #define APR_PATCH_VERSION 1 -/** - * This symbol is defined for internal, "development" copies of APR. - * This symbol should be #undef'd for releases. +/** + * The symbol APR_IS_DEV_VERSION is only defined for internal, + * "development" copies of APR. It is undefined for released versions + * of APR. */ #define APR_IS_DEV_VERSION + +#if defined(APR_IS_DEV_VERSION) || defined(DOXYGEN) +/** Internal: string form of the "is dev" flag */ +#define APR_IS_DEV_STRING "-dev" +#else +#define APR_IS_DEV_STRING "" +#endif + +/* APR_STRINGIFY is defined here, and also in apr_general.h, so wrap it */ +#ifndef APR_STRINGIFY +/** Properly quote a value as a string in the C preprocessor */ +#define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n) +/** Helper macro for APR_STRINGIFY */ +#define APR_STRINGIFY_HELPER(n) #n +#endif + /** The formatted string of APR's version */ #define APR_VERSION_STRING \ APR_STRINGIFY(APR_MAJOR_VERSION) "." \ @@ -75,6 +90,26 @@ extern "C" { APR_STRINGIFY(APR_PATCH_VERSION) \ APR_IS_DEV_STRING +/** An alternative formatted string of APR's version */ +/* macro for Win32 .rc files using numeric csv representation */ +#define APR_VERSION_STRING_CSV APR_MAJOR_VERSION ##, \ + ##APR_MINOR_VERSION ##, \ + ##APR_PATCH_VERSION + + +#ifndef APR_VERSION_ONLY + +/* The C language API to access the version at run time, + * as opposed to compile time. APR_VERSION_ONLY may be defined + * externally when preprocessing apr_version.h to obtain strictly + * the C Preprocessor macro declarations. + */ + +#include "apr.h" + +#ifdef __cplusplus +extern "C" { +#endif /** * The numeric version information is broken out into fields within this @@ -98,16 +133,10 @@ APR_DECLARE(void) apr_version(apr_version_t *pvsn); /** Return APR's version information as a string. */ APR_DECLARE(const char *) apr_version_string(void); - -/** Internal: string form of the "is dev" flag */ -#ifdef APR_IS_DEV_VERSION -#define APR_IS_DEV_STRING "-dev" -#else -#define APR_IS_DEV_STRING "" -#endif - #ifdef __cplusplus } #endif -#endif /* APR_VERSION_H */ +#endif /* ndef APR_VERSION_ONLY */ + +#endif /* ndef APR_VERSION_H */ |