You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by pq...@apache.org on 2005/03/15 23:22:06 UTC

svn commit: r157596 - in apr/apr/branches/1.1.x: include/apr_general.h include/apr_version.h libapr.dsp libapr.rc

Author: pquerna
Date: Tue Mar 15 14:22:03 2005
New Revision: 157596

URL: http://svn.apache.org/viewcvs?view=rev&rev=157596
Log:
blind backport attempting to fix 1.1.x, based on wrowe's changes between r151766 and r151806 in trunk.

Added:
    apr/apr/branches/1.1.x/libapr.rc
      - copied unchanged from r151806, apr/apr/trunk/libapr.rc
Modified:
    apr/apr/branches/1.1.x/include/apr_general.h
    apr/apr/branches/1.1.x/include/apr_version.h
    apr/apr/branches/1.1.x/libapr.dsp

Modified: apr/apr/branches/1.1.x/include/apr_general.h
URL: http://svn.apache.org/viewcvs/apr/apr/branches/1.1.x/include/apr_general.h?view=diff&r1=157595&r2=157596
==============================================================================
--- apr/apr/branches/1.1.x/include/apr_general.h (original)
+++ apr/apr/branches/1.1.x/include/apr_general.h Tue Mar 15 14:22:03 2005
@@ -143,10 +143,13 @@
  * 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)

Modified: apr/apr/branches/1.1.x/include/apr_version.h
URL: http://svn.apache.org/viewcvs/apr/apr/branches/1.1.x/include/apr_version.h?view=diff&r1=157595&r2=157596
==============================================================================
--- apr/apr/branches/1.1.x/include/apr_version.h (original)
+++ apr/apr/branches/1.1.x/include/apr_version.h Tue Mar 15 14:22:03 2005
@@ -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 @@
  *     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 @@
  */
 #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 @@
      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 @@
 /** 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 */

Modified: apr/apr/branches/1.1.x/libapr.dsp
URL: http://svn.apache.org/viewcvs/apr/apr/branches/1.1.x/libapr.dsp?view=diff&r1=157595&r2=157596
==============================================================================
--- apr/apr/branches/1.1.x/libapr.dsp (original)
+++ apr/apr/branches/1.1.x/libapr.dsp Tue Mar 15 14:22:03 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"
+# 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"
+# ADD RSC /l 0x409 /d "_DEBUG" /d "APR_VERSION_ONLY" /I "./include"
 BSC32=bscmake.exe
 # ADD BASE BSC32 /nologo
 # ADD BSC32 /nologo
@@ -636,37 +636,6 @@
 # Begin Source File
 
 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