apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r151766 - apr/apr/trunk/include/apr_general.h apr/apr/trunk/include/apr_release.h apr/apr/trunk/include/apr_version.h
Date Mon, 07 Feb 2005 22:44:12 GMT
Author: wrowe
Date: Mon Feb  7 14:44:09 2005
New Revision: 151766

URL: http://svn.apache.org/viewcvs?view=rev&rev=151766
Log:

  In order to remove the win32ver.awk generation of .rc files for apr,
  it's necessary to have a 'vanilla' c preprocessor file which doesn't
  have all the extra apr.h or other function declaration cruft.

  ap_release.h is the httpd project's convention, and it seems to fit
  the bill.  Provide "big red warnings" (tm) to not use this new file
  directly, if the user wants to retain compatibility with APR 0.x/1.x.

Added:
    apr/apr/trunk/include/apr_release.h   (with props)
Modified:
    apr/apr/trunk/include/apr_general.h
    apr/apr/trunk/include/apr_version.h

Modified: apr/apr/trunk/include/apr_general.h
URL: http://svn.apache.org/viewcvs/apr/apr/trunk/include/apr_general.h?view=diff&r1=151765&r2=151766
==============================================================================
--- apr/apr/trunk/include/apr_general.h (original)
+++ apr/apr/trunk/include/apr_general.h Mon Feb  7 14:44:09 2005
@@ -144,10 +144,13 @@
  * String and memory functions
  */
 
+/* APR_STRINGIFY is defined here, and also in apr_revision.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)

Added: apr/apr/trunk/include/apr_release.h
URL: http://svn.apache.org/viewcvs/apr/apr/trunk/include/apr_release.h?view=auto&rev=151766
==============================================================================
--- apr/apr/trunk/include/apr_release.h (added)
+++ apr/apr/trunk/include/apr_release.h Mon Feb  7 14:44:09 2005
@@ -0,0 +1,93 @@
+/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * 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
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+#ifndef APR_RELEASE_H
+#define APR_RELEASE_H
+
+/**
+ * @file apr_release.h
+ * @brief APR Versioning Constants
+ * 
+ * APR's Versioning Constants
+ *
+ * This file was introduced to support C Preprocessing without the 
+ * heavyweight C API or apr.h prerequisite, and can only be expected 
+ * to exist in 1.2, 2.x and later versions of APR.
+ *
+ * Do NOT directly include this file when targeting APR 0.x or 1.x,
+ * include apr_version.h instead.  
+ */
+
+/* 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
+
+#endif /* ndef APR_RELEASE_H */
\ No newline at end of file

Propchange: apr/apr/trunk/include/apr_release.h
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: apr/apr/trunk/include/apr_version.h
URL: http://svn.apache.org/viewcvs/apr/apr/trunk/include/apr_version.h?view=diff&r1=151765&r2=151766
==============================================================================
--- apr/apr/trunk/include/apr_version.h (original)
+++ apr/apr/trunk/include/apr_version.h Mon Feb  7 14:44:09 2005
@@ -19,6 +19,8 @@
 
 #include "apr.h"
 
+#include "apr_release.h"
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -43,39 +45,6 @@
  *     http://apr.apache.org/versioning.html
  */
 
-/* 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 API changes that do not cause binary compatibility problems.
- * Should be reset to 0 when upgrading APR_MAJOR_VERSION
- */
-#define APR_MINOR_VERSION       2
-
-/** patch level */
-#define APR_PATCH_VERSION       0
-
-/**
- * This symbol is defined for internal, "development" copies of APR.
- * This symbol should be #undef'd for releases.
- */
-#define APR_IS_DEV_VERSION
-
-/** 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
-
 
 /** 
  * The numeric version information is broken out into fields within this 
@@ -99,13 +68,6 @@
 /** 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
 }



Mime
View raw message