apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r892984 - in /apr/apr/trunk: crypto/apr_crypto.c dbd/apr_dbd.c dbd/apr_dbd_mysql.c dbd/apr_dbd_odbc.c dbm/apr_dbm.c include/apu_version.h
Date Mon, 21 Dec 2009 21:25:46 GMT
Author: wrowe
Date: Mon Dec 21 21:25:45 2009
New Revision: 892984

URL: http://svn.apache.org/viewvc?rev=892984&view=rev
Log:
Refactor away apu_version legacy cruft

Modified:
    apr/apr/trunk/crypto/apr_crypto.c
    apr/apr/trunk/dbd/apr_dbd.c
    apr/apr/trunk/dbd/apr_dbd_mysql.c
    apr/apr/trunk/dbd/apr_dbd_odbc.c
    apr/apr/trunk/dbm/apr_dbm.c
    apr/apr/trunk/include/apu_version.h

Modified: apr/apr/trunk/crypto/apr_crypto.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/crypto/apr_crypto.c?rev=892984&r1=892983&r2=892984&view=diff
==============================================================================
--- apr/apr/trunk/crypto/apr_crypto.c (original)
+++ apr/apr/trunk/crypto/apr_crypto.c Mon Dec 21 21:25:45 2009
@@ -1,7 +1,7 @@
 /* Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
+ * The ASF licenses this file to You under the Apache License, 3 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
  *
@@ -31,7 +31,7 @@
 #include "apu_internal.h"
 #include "apr_crypto_internal.h"
 #include "apr_crypto.h"
-#include "apu_version.h"
+#include "apr_version.h"
 
 static apr_hash_t *drivers = NULL;
 
@@ -135,9 +135,9 @@
     apr_snprintf(modname, sizeof(modname), "crypto%s.nlm", name);
 #elif defined(WIN32)
     apr_snprintf(modname, sizeof(modname),
-            "apr_crypto_%s-" APU_STRINGIFY(APU_MAJOR_VERSION) ".dll", name);
+            "apr_crypto_%s-" APR_STRINGIFY(APR_MAJOR_VERSION) ".dll", name);
 #else
-    apr_snprintf(modname, sizeof(modname), "apr_crypto_%s-" APU_STRINGIFY(APU_MAJOR_VERSION)
".so", name);
+    apr_snprintf(modname, sizeof(modname), "apr_crypto_%s-" APR_STRINGIFY(APR_MAJOR_VERSION)
".so", name);
 #endif
     apr_snprintf(symname, sizeof(symname), "apr_crypto_%s_driver", name);
     rv = apu_dso_load(&dso, &symbol, modname, symname, pool);

Modified: apr/apr/trunk/dbd/apr_dbd.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/dbd/apr_dbd.c?rev=892984&r1=892983&r2=892984&view=diff
==============================================================================
--- apr/apr/trunk/dbd/apr_dbd.c (original)
+++ apr/apr/trunk/dbd/apr_dbd.c Mon Dec 21 21:25:45 2009
@@ -30,7 +30,6 @@
 #include "apu_internal.h"
 #include "apr_dbd_internal.h"
 #include "apr_dbd.h"
-#include "apu_version.h"
 
 static apr_hash_t *drivers = NULL;
 static apr_uint32_t initialised = 0, in_init = 1;
@@ -185,10 +184,10 @@
     apr_snprintf(modname, sizeof(modname), "dbd%s.nlm", name);
 #elif defined(WIN32)
     apr_snprintf(modname, sizeof(modname),
-                 "apr_dbd_%s-" APU_STRINGIFY(APU_MAJOR_VERSION) ".dll", name);
+                 "apr_dbd_%s-" APR_STRINGIFY(APR_MAJOR_VERSION) ".dll", name);
 #else
     apr_snprintf(modname, sizeof(modname),
-                 "apr_dbd_%s-" APU_STRINGIFY(APU_MAJOR_VERSION) ".so", name);
+                 "apr_dbd_%s-" APR_STRINGIFY(APR_MAJOR_VERSION) ".so", name);
 #endif
     apr_snprintf(symname, sizeof(symname), "apr_dbd_%s_driver", name);
     rv = apu_dso_load(NULL, &symbol, modname, symname, pool);

Modified: apr/apr/trunk/dbd/apr_dbd_mysql.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/dbd/apr_dbd_mysql.c?rev=892984&r1=892983&r2=892984&view=diff
==============================================================================
--- apr/apr/trunk/dbd/apr_dbd_mysql.c (original)
+++ apr/apr/trunk/dbd/apr_dbd_mysql.c Mon Dec 21 21:25:45 2009
@@ -18,7 +18,6 @@
 
 #if APU_HAVE_MYSQL
 
-#include "apu_version.h"
 #include "apr_private.h"
 
 #include <ctype.h>

Modified: apr/apr/trunk/dbd/apr_dbd_odbc.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/dbd/apr_dbd_odbc.c?rev=892984&r1=892983&r2=892984&view=diff
==============================================================================
--- apr/apr/trunk/dbd/apr_dbd_odbc.c (original)
+++ apr/apr/trunk/dbd/apr_dbd_odbc.c Mon Dec 21 21:25:45 2009
@@ -26,7 +26,7 @@
 #include "apr_file_info.h"
 #include "apr_dbd_internal.h"
 #include "apr_thread_proc.h"
-#include "apu_version.h"
+#include "apr_version.h"
 
 #include <stdlib.h>
 
@@ -949,18 +949,18 @@
 {
     SQLRETURN rc;
     char *step;
-    apr_version_t apuver;
+    apr_version_t aprver;
     
-    apu_version(&apuver);
-    if (apuver.major != DRIVER_APU_VERSION_MAJOR 
-        || apuver.minor != DRIVER_APU_VERSION_MINOR) {
+    apr_version(&aprver);
+    if (aprver.major != DRIVER_APR_VERSION_MAJOR 
+        || aprver.minor != DRIVER_APR_VERSION_MINOR) {
             apr_file_t *se;
 
             apr_file_open_stderr(&se, pool);
             apr_file_printf(se, "Incorrect " ODBC_DRIVER_STRING " dbd driver version\n"
-                "Attempt to load APU version %d.%d driver with APU version %d.%d\n",
-                DRIVER_APU_VERSION_MAJOR, DRIVER_APU_VERSION_MINOR, 
-                apuver.major, apuver.minor);
+                "Attempt to load APR version %d.%d driver with APR version %d.%d\n",
+                DRIVER_APR_VERSION_MAJOR, DRIVER_APR_VERSION_MINOR, 
+                aprver.major, aprver.minor);
         abort();
     }
 

Modified: apr/apr/trunk/dbm/apr_dbm.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/dbm/apr_dbm.c?rev=892984&r1=892983&r2=892984&view=diff
==============================================================================
--- apr/apr/trunk/dbm/apr_dbm.c (original)
+++ apr/apr/trunk/dbm/apr_dbm.c Mon Dec 21 21:25:45 2009
@@ -29,7 +29,7 @@
 #include "apu.h"
 #include "apr_private.h"
 #include "apu_internal.h"
-#include "apu_version.h"
+#include "apr_version.h"
 #include "apr_dbm_private.h"
 #include "apu_select_dbm.h"
 #include "apr_dbm.h"
@@ -164,10 +164,10 @@
     apr_snprintf(modname, sizeof(modname), "dbm%s.nlm", type);
 #elif defined(WIN32)
     apr_snprintf(modname, sizeof(modname),
-                 "apr_dbm_%s-" APU_STRINGIFY(APU_MAJOR_VERSION) ".dll", type);
+                 "apr_dbm_%s-" APR_STRINGIFY(APR_MAJOR_VERSION) ".dll", type);
 #else
     apr_snprintf(modname, sizeof(modname),
-                 "apr_dbm_%s-" APU_STRINGIFY(APU_MAJOR_VERSION) ".so", type);
+                 "apr_dbm_%s-" APR_STRINGIFY(APR_MAJOR_VERSION) ".so", type);
 #endif
     apr_snprintf(symname, sizeof(symname), "apr_dbm_type_%s", type);
 

Modified: apr/apr/trunk/include/apu_version.h
URL: http://svn.apache.org/viewvc/apr/apr/trunk/include/apu_version.h?rev=892984&r1=892983&r2=892984&view=diff
==============================================================================
--- apr/apr/trunk/include/apu_version.h (original)
+++ apr/apr/trunk/include/apu_version.h Mon Dec 21 21:25:45 2009
@@ -38,36 +38,48 @@
  */
 
 
+#include "apr_version.h"
+
 /* The numeric compile-time version constants. These constants are the
- * authoritative version numbers for APU. 
+ * authoritative version numbers for APU. This file remains as strictly
+ * a compatibility stub.
  */
 
 /** 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.
+ * In 2.0, for legacy support, this is an identity of the APR version.
+ * @deprecated @see APR_MAJOR_VERSION
  */
-#define APU_MAJOR_VERSION       2
+#define APU_MAJOR_VERSION       APR_MAJOR_VERSION
 
 /** minor version
  * Minor API changes that do not cause binary compatibility problems.
  * Reset to 0 when upgrading APU_MAJOR_VERSION
+ * In 2.0, for legacy support, this is an identity of the APR version.
+ * @deprecated @see APR_MINOR_VERSION
  */
-#define APU_MINOR_VERSION       0
+#define APU_MINOR_VERSION       APR_MINOR_VERSION
 
 /** patch level 
  * The Patch Level never includes API changes, simply bug fixes.
  * Reset to 0 when upgrading APR_MINOR_VERSION
+ * In 2.0, for legacy support, this is an identity of the APR version.
+ * @deprecated @see APR_PATCH_VERSION
  */
-#define APU_PATCH_VERSION       0
+#define APU_PATCH_VERSION       APR_PATCH_VERSION
 
 /** 
  * The symbol APU_IS_DEV_VERSION is only defined for internal,
  * "development" copies of APU.  It is undefined for released versions
  * of APU.
+ * In 2.0, for legacy support, this is an identity of the APR version.
+ * @deprecated @see APR_IS_DEV_VERSION
  */
-#define APU_IS_DEV_VERSION
-
+#ifdef APR_IS_DEV_VERSION
+#  define APU_IS_DEV_VERSION
+#endif
 
 #if defined(APU_IS_DEV_VERSION) || defined(DOXYGEN)
 /** Internal: string form of the "is dev" flag */
@@ -76,59 +88,4 @@
 #define APU_IS_DEV_STRING ""
 #endif
 
-
-#ifndef APU_STRINGIFY
-/** Properly quote a value as a string in the C preprocessor */
-#define APU_STRINGIFY(n) APU_STRINGIFY_HELPER(n)
-/** Helper macro for APU_STRINGIFY */
-#define APU_STRINGIFY_HELPER(n) #n
-#endif
-
-/** The formatted string of APU's version */
-#define APU_VERSION_STRING \
-     APU_STRINGIFY(APU_MAJOR_VERSION) "." \
-     APU_STRINGIFY(APU_MINOR_VERSION) "." \
-     APU_STRINGIFY(APU_PATCH_VERSION) \
-     APU_IS_DEV_STRING
-
-/** An alternative formatted string of APR's version */
-/* macro for Win32 .rc files using numeric csv representation */
-#define APU_VERSION_STRING_CSV APU_MAJOR_VERSION ##, \
-                             ##APU_MINOR_VERSION ##, \
-                             ##APU_PATCH_VERSION
-
-
-#ifndef APU_VERSION_ONLY
-
-/* The C language API to access the version at run time, 
- * as opposed to compile time.  APU_VERSION_ONLY may be defined 
- * externally when preprocessing apr_version.h to obtain strictly 
- * the C Preprocessor macro declarations.
- */
-
-#include "apr_version.h"
-
-#include "apu.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * Return APR-util's version information information in a numeric form.
- *
- *  @param pvsn Pointer to a version structure for returning the version
- *              information.
- */
-APR_DECLARE(void) apu_version(apr_version_t *pvsn);
-
-/** Return APU's version information as a string. */
-APR_DECLARE(const char *) apu_version_string(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* ndef APU_VERSION_ONLY */
-
 #endif /* ndef APU_VERSION_H */



Mime
View raw message