You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by wr...@apache.org on 2005/02/08 00:40:09 UTC
svn commit: r151788 - in apr/apr/trunk: include/apr_release.h
include/apr_version.h libapr.dsp libapr.rc
Author: wrowe
Date: Mon Feb 7 15:40:06 2005
New Revision: 151788
URL: http://svn.apache.org/viewcvs?view=rev&rev=151788
Log:
Since reaction is negative to a seperate apr_release.h file for
the CPP-only grammer, acknowledge APR_VERSION_ONLY in order to
compile to apr_version.h without including apr.h, nor declaring
the APR C runtime version API.
Removed:
apr/apr/trunk/include/apr_release.h
Modified:
apr/apr/trunk/include/apr_version.h
apr/apr/trunk/libapr.dsp
apr/apr/trunk/libapr.rc
Modified: apr/apr/trunk/include/apr_version.h
URL: http://svn.apache.org/viewcvs/apr/apr/trunk/include/apr_version.h?view=diff&r1=151787&r2=151788
==============================================================================
--- apr/apr/trunk/include/apr_version.h (original)
+++ apr/apr/trunk/include/apr_version.h Mon Feb 7 15:40:06 2005
@@ -17,14 +17,6 @@
#ifndef APR_VERSION_H
#define APR_VERSION_H
-#include "apr.h"
-
-#include "apr_release.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/**
* @file apr_version.h
* @brief APR Versioning Interface
@@ -46,6 +38,80 @@
*/
+/* The numeric compile-time version constants. These constants are the
+ * authoritative version numbers for APR.
+ */
+
+/** major version
+ * Major API changes that could cause compatibility problems for older
+ * programs such as structure size changes. No binary compatibility is
+ * possible across a change in the major version.
+ */
+#define APR_MAJOR_VERSION 1
+
+/** minor version
+ * Minor API changes that do not cause binary compatibility problems.
+ * Reset to 0 when upgrading APR_MAJOR_VERSION
+ */
+#define APR_MINOR_VERSION 2
+
+/** patch level
+ * The Patch Level never includes API changes, simply bug fixes.
+ * Reset to 0 when upgrading APR_MINOR_VERSION
+ */
+#define APR_PATCH_VERSION 0
+
+/**
+ * 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) "." \
+ APR_STRINGIFY(APR_MINOR_VERSION) "." \
+ 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
* structure.
@@ -68,9 +134,10 @@
/** Return APR's version information as a string. */
APR_DECLARE(const char *) apr_version_string(void);
-
#ifdef __cplusplus
}
#endif
-#endif /* APR_VERSION_H */
+#endif /* ndef APR_VERSION_ONLY */
+
+#endif /* ndef APR_VERSION_H */
Modified: apr/apr/trunk/libapr.dsp
URL: http://svn.apache.org/viewcvs/apr/apr/trunk/libapr.dsp?view=diff&r1=151787&r2=151788
==============================================================================
--- apr/apr/trunk/libapr.dsp (original)
+++ apr/apr/trunk/libapr.dsp Mon Feb 7 15:40:06 2005
@@ -47,7 +47,7 @@
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL"
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL"
# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG" /I "./include"
+# ADD RSC /l 0x409 /d "NDEBUG" /d "APR_VERSION_ONLY" /I "./include"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
@@ -73,7 +73,7 @@
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL"
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL"
# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG" /I "./include"
+# ADD RSC /l 0x409 /d "_DEBUG" /d "APR_VERSION_ONLY" /I "./include"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
Modified: apr/apr/trunk/libapr.rc
URL: http://svn.apache.org/viewcvs/apr/apr/trunk/libapr.rc?view=diff&r1=151787&r2=151788
==============================================================================
--- apr/apr/trunk/libapr.rc (original)
+++ apr/apr/trunk/libapr.rc Mon Feb 7 15:40:06 2005
@@ -1,4 +1,4 @@
-#include "apr_release.h"
+#include "apr_version.h"
1 VERSIONINFO
FILEVERSION APR_VERSION_STRING_CSV,0
Re: svn commit: r151788 - in apr/apr/trunk: include/apr_release.h
include/apr_version.h libapr.dsp libapr.rc
Posted by Branko Čibej <br...@xbc.nu>.
wrowe@apache.org wrote:
>Author: wrowe
>Date: Mon Feb 7 15:40:06 2005
>New Revision: 151788
>
>URL: http://svn.apache.org/viewcvs?view=rev&rev=151788
>Log:
>
> Since reaction is negative to a seperate apr_release.h file for
> the CPP-only grammer, acknowledge APR_VERSION_ONLY in order to
> compile to apr_version.h without including apr.h, nor declaring
> the APR C runtime version API.
>
>
I think you're far too paranoid. You don't need this kind of #ifdefing
at all. Thre resource compiler will happily ignore the other cruft.
Witness the fact that we use a similar construct in Subversion, i.e.,
svn.rc includes svn_version.h, and that includes apr_general.h, defines
some types and declares some functions. We don't use the sort of
#ifdefing you put in here, yet the resource compiler happily digests the
file and creates the version resource.
-- Brane