-*- coding: utf-8 -*-
Changes with Apache 2.5.0
+ *) core, mod_info: Add compiled and loaded PCRE versions to version
+ number display. [Rainer Jung]
+
*) mpm_winnt: Accept utf-8 (Unicode) service names and descriptions for
internationalization. [William Rowe]
"<dt><strong>Compiled with APU Version:</strong> "
"<tt>%s</tt></dt>\n", APU_VERSION_STRING);
#endif
+ ap_rprintf(r,
+ "<dt><strong>Server loaded PCRE Version:</strong> "
+ "<tt>%s</tt></dt>\n", ap_pcre_version_string(AP_REG_PCRE_LOADED));
+ ap_rprintf(r,
+ "<dt><strong>Compiled with PCRE Version:</strong> "
+ "<tt>%s</tt></dt>\n", ap_pcre_version_string(AP_REG_PCRE_COMPILED));
ap_rprintf(r,
"<dt><strong>Module Magic Number:</strong> "
"<tt>%d:%d</tt></dt>\n", MODULE_MAGIC_NUMBER_MAJOR,
printf("Server's Module Magic Number: %u:%u\n",
MODULE_MAGIC_NUMBER_MAJOR, MODULE_MAGIC_NUMBER_MINOR);
#if APR_MAJOR_VERSION >= 2
- printf("Server loaded: APR %s\n", apr_version_string());
- printf("Compiled using: APR %s\n", APR_VERSION_STRING);
+ printf("Server loaded: APR %s, PCRE %s\n",
+ apr_version_string(), ap_pcre_version_string(AP_REG_PCRE_LOADED));
+ printf("Compiled using: APR %s, PCRE %s\n",
+ APR_VERSION_STRING, ap_pcre_version_string(AP_REG_PCRE_COMPILED));
#else
- printf("Server loaded: APR %s, APR-UTIL %s\n",
- apr_version_string(), apu_version_string());
- printf("Compiled using: APR %s, APR-UTIL %s\n",
- APR_VERSION_STRING, APU_VERSION_STRING);
+ printf("Server loaded: APR %s, APR-UTIL %s, PCRE %s\n",
+ apr_version_string(), apu_version_string(),
+ ap_pcre_version_string(AP_REG_PCRE_LOADED));
+ printf("Compiled using: APR %s, APR-UTIL %s, PCRE %s\n",
+ APR_VERSION_STRING, APU_VERSION_STRING,
+ ap_pcre_version_string(AP_REG_PCRE_COMPILED));
#endif
/* sizeof(foo) is long on some platforms so we might as well
* make it long everywhere to keep the printf format
"match failed" /* AP_REG_NOMATCH */
};
+AP_DECLARE(const char *) ap_pcre_version_string(int which)
+{
+ switch (which) {
+ case AP_REG_PCRE_COMPILED:
+ return APR_STRINGIFY(PCRE_MAJOR) "." APR_STRINGIFY(PCRE_MINOR) " " APR_STRINGIFY(PCRE_DATE);
+ case AP_REG_PCRE_LOADED:
+ return pcre_version();
+ default:
+ return "Unknown";
+ }
+}
+
AP_DECLARE(apr_size_t) ap_regerror(int errcode, const ap_regex_t *preg,
char *errbuf, apr_size_t errbuf_size)
{