diff options
-rw-r--r-- | include/apr_general.h | 3 | ||||
-rw-r--r-- | include/apr_version.h | 71 | ||||
-rw-r--r-- | libapr.dsp | 35 | ||||
-rw-r--r-- | libapr.rc | 54 |
4 files changed, 109 insertions, 54 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 */ diff --git a/libapr.dsp b/libapr.dsp index 5999c3d29..a4b1d4d33 100644 --- a/libapr.dsp +++ b/libapr.dsp @@ -47,7 +47,7 @@ RSC=rc.exe # 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" +# 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 @@ LINK32=link.exe # 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" +# ADD RSC /l 0x409 /d "_DEBUG" /d "APR_VERSION_ONLY" /I "./include" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo @@ -637,36 +637,5 @@ SOURCE=.\include\apr_want.h SOURCE=.\libapr.rc # End Source File -# Begin Source File - -SOURCE=.\build\win32ver.awk - -!IF "$(CFG)" == "libapr - Win32 Release" - -# PROP Ignore_Default_Tool 1 -USERDEP__WIN32="./include/apr_version.h" -# Begin Custom Build - Creating Version Resource -InputPath=.\build\win32ver.awk - -".\libapr.rc" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - awk -f ./build/win32ver.awk libapr.dll "Apache Portability Runtime Library" ./include/apr_version.h > .\libapr.rc - -# End Custom Build - -!ELSEIF "$(CFG)" == "libapr - Win32 Debug" - -# PROP Ignore_Default_Tool 1 -USERDEP__WIN32="./include/apr_version.h" -# Begin Custom Build - Creating Version Resource -InputPath=.\build\win32ver.awk - -".\libapr.rc" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - awk -f ./build/win32ver.awk libapr.dll "Apache Portability Runtime Library" ./include/apr_version.h > .\libapr.rc - -# End Custom Build - -!ENDIF - -# End Source File # End Target # End Project diff --git a/libapr.rc b/libapr.rc new file mode 100644 index 000000000..1344fc084 --- /dev/null +++ b/libapr.rc @@ -0,0 +1,54 @@ +#include "apr_version.h"
+
+#define APR_COPYRIGHT "Copyright 2000-2005 The Apache Software " \
+ "Foundation or its licensors, as applicable."
+
+#define APR_LICENSE "Licensed under the Apache License, Version 2.0 " \
+ "(the ""License""); you may not use this file except " \
+ "in compliance with the License. You may obtain a " \
+ "copy of the License at\r\n\r\n" \
+ "http://www.apache.org/licenses/LICENSE-2.0\r\n\r\n" \
+ "Unless required by applicable law or agreed to in " \
+ "writing, software distributed under the License is " \
+ "distributed on an ""AS IS"" BASIS, WITHOUT " \
+ "WARRANTIES OR CONDITIONS OF ANY KIND, either " \
+ "express or implied. See the License for the " \
+ "specific language governing permissions and " \
+ "limitations under the License."
+
+#define APR_DLL_BASENAME "libapr-" APR_STRINGIFY(APR_MAJOR_VERSION)
+
+
+1 VERSIONINFO
+ FILEVERSION APR_VERSION_STRING_CSV,0
+ PRODUCTVERSION APR_VERSION_STRING_CSV,0
+ FILEFLAGSMASK 0x3fL
+#if defined(_DEBUG)
+ FILEFLAGS 0x01L
+#else
+ FILEFLAGS 0x00L
+#endif
+ FILEOS 0x40004L
+ FILETYPE 0x1L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904b0"
+ BEGIN
+ VALUE "Comments", APR_LICENSE "\0"
+ VALUE "CompanyName", "Apache Software Foundation\0"
+ VALUE "FileDescription", "Apache Portable Runtime Library\0"
+ VALUE "FileVersion", APR_VERSION_STRING "\0"
+ VALUE "InternalName", APR_DLL_BASENAME "\0"
+ VALUE "LegalCopyright", APR_COPYRIGHT "\0"
+ VALUE "OriginalFilename", APR_DLL_BASENAME ".dll\0"
+ VALUE "ProductName", "Apache Portable Runtime Project\0"
+ VALUE "ProductVersion", APR_VERSION_STRING "\0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1200
+ END
+END
|