Author: rhuijben
Date: Fri Sep 11 18:30:19 2015
New Revision: 1702533
URL: http://svn.apache.org/r1702533
Log:
Expose ut8proc version information in 'svn --version --verbose'
* subversion/include/private/svn_utf_private.h
(svn_utf__utf8proc_version): Separate into...
(svn_utf__utf8proc_compiled_version,
svn_utf__utf8proc_runtime_version): These functions.
* subversion/libsvn_subr/sysinfo.c
(includes): Add svn_utf_private.h.
(svn_sysinfo__linked_libs): Expose utf8proc version.
* subversion/libsvn_subr/utf8proc.c
(svn_utf__utf8proc_compiled_version): New function.
(svn_utf__utf8proc_version): Rename to...
(svn_utf__utf8proc_runtime_version): ... this.
* subversion/libsvn_subr/utf8proc/utf8proc.h
(UTF8PROC_VERSION_*): Add definition in the same way as latest utf8proc
defines these macros.
Modified:
subversion/trunk/subversion/include/private/svn_utf_private.h
subversion/trunk/subversion/libsvn_subr/sysinfo.c
subversion/trunk/subversion/libsvn_subr/utf8proc.c
subversion/trunk/subversion/libsvn_subr/utf8proc/utf8proc.h
Modified: subversion/trunk/subversion/include/private/svn_utf_private.h
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_utf_private.h?rev=1702533&r1=1702532&r2=1702533&view=diff
==============================================================================
--- subversion/trunk/subversion/include/private/svn_utf_private.h (original)
+++ subversion/trunk/subversion/include/private/svn_utf_private.h Fri Sep 11
18:30:19 2015
@@ -206,7 +206,10 @@ svn_utf__glob(svn_boolean_t *match,
/* Return the version of the wrapped utf8proc library. */
const char *
-svn_utf__utf8proc_version(void);
+svn_utf__utf8proc_compiled_version(void);
+
+const char *
+svn_utf__utf8proc_runtime_version(void);
/* Convert an UTF-16 (or UCS-2) string to UTF-8, returning the pointer
* in RESULT. If BIG_ENDIAN is set, then UTF16STR is big-endian;
Modified: subversion/trunk/subversion/libsvn_subr/sysinfo.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/sysinfo.c?rev=1702533&r1=1702532&r2=1702533&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/sysinfo.c (original)
+++ subversion/trunk/subversion/libsvn_subr/sysinfo.c Fri Sep 11 18:30:19 2015
@@ -46,6 +46,7 @@
#include "private/svn_sqlite.h"
#include "private/svn_subr_private.h"
+#include "private/svn_utf_private.h"
#include "sysinfo.h"
#include "svn_private_config.h"
@@ -126,7 +127,7 @@ const apr_array_header_t *
svn_sysinfo__linked_libs(apr_pool_t *pool)
{
svn_version_ext_linked_lib_t *lib;
- apr_array_header_t *array = apr_array_make(pool, 5, sizeof(*lib));
+ apr_array_header_t *array = apr_array_make(pool, 6, sizeof(*lib));
lib = &APR_ARRAY_PUSH(array, svn_version_ext_linked_lib_t);
lib->name = "APR";
@@ -157,6 +158,11 @@ svn_sysinfo__linked_libs(apr_pool_t *poo
#endif
lib = &APR_ARRAY_PUSH(array, svn_version_ext_linked_lib_t);
+ lib->name = "Utf8proc";
+ lib->compiled_version = apr_pstrdup(pool,
svn_utf__utf8proc_compiled_version());
+ lib->runtime_version = apr_pstrdup(pool,
svn_utf__utf8proc_runtime_version());
+
+ lib = &APR_ARRAY_PUSH(array, svn_version_ext_linked_lib_t);
lib->name = "ZLib";
lib->compiled_version = apr_pstrdup(pool, svn_zlib__compiled_version());
lib->runtime_version = apr_pstrdup(pool, svn_zlib__runtime_version());
Modified: subversion/trunk/subversion/libsvn_subr/utf8proc.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/utf8proc.c?rev=1702533&r1=1702532&r2=1702533&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/utf8proc.c (original)
+++ subversion/trunk/subversion/libsvn_subr/utf8proc.c Fri Sep 11 18:30:19 2015
@@ -37,7 +37,19 @@
#undef strlen
-const char *svn_utf__utf8proc_version(void)
+
+const char *
+svn_utf__utf8proc_compiled_version(void)
+{
+ static const char utf8proc_version[] =
+ APR_STRINGIFY(UTF8PROC_VERSION_MAJOR) "."
+ APR_STRINGIFY(UTF8PROC_VERSION_MINOR) "."
+ APR_STRINGIFY(UTF8PROC_VERSION_PATCH);
+ return utf8proc_version;
+}
+
+const char *
+svn_utf__utf8proc_runtime_version(void)
{
/* Unused static function warning removal hack. */
SVN_UNUSED(utf8proc_NFD);
Modified: subversion/trunk/subversion/libsvn_subr/utf8proc/utf8proc.h
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/utf8proc/utf8proc.h?rev=1702533&r1=1702532&r2=1702533&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/utf8proc/utf8proc.h (original)
+++ subversion/trunk/subversion/libsvn_subr/utf8proc/utf8proc.h Fri Sep 11
18:30:19 2015
@@ -51,6 +51,27 @@
#ifndef UTF8PROC_H
#define UTF8PROC_H
+/** @name API version
+ *
+ * The utf8proc API version MAJOR.MINOR.PATCH, following
+ * semantic-versioning rules (http://semver.org) based on API
+ * compatibility.
+ *
+ * This is also returned at runtime by @ref utf8proc_version; however, the
+ * runtime version may append a string like "-dev" to the version number
+ * for prerelease versions.
+ *
+ * @note The shared-library version number in the Makefile may be different,
+ * being based on ABI compatibility rather than API compatibility.
+ */
+/** @{ */
+/** The MAJOR version number (increased when backwards API compatibility is
broken). */
+#define UTF8PROC_VERSION_MAJOR 1
+/** The MINOR version number (increased when new functionality is added in a
backwards-compatible manner). */
+#define UTF8PROC_VERSION_MINOR 1
+/** The PATCH version (increased for fixes that do not change the API). */
+#define UTF8PROC_VERSION_PATCH 5
+/** @} */
/*
* Define UTF8PROC_INLINE and include utf8proc.c to embed a static