DB: show the Berkeley DB runtime library version, for "-d -bV"
authorJeremy Harris <jgh146exb@wizmail.org>
Wed, 17 Jan 2018 11:46:01 +0000 (11:46 +0000)
committerJeremy Harris <jgh146exb@wizmail.org>
Wed, 17 Jan 2018 11:46:01 +0000 (11:46 +0000)
doc/doc-txt/ChangeLog
src/src/exim.c
test/runtest

index 2c2448537abf4baddcb216c7553564f948e70259..88f113cc443e2a935e1215c5f84eea8e4e5170fc 100644 (file)
@@ -58,6 +58,9 @@ JH/09 The "aveserver", "kavdaemon" and "mksd" interfaces are now not included
 JH/10 Bug 2223: Fix mysql lookup returns for the no-data case (when the number of
       rows affected is given instead).
 
+JH/11 The runtime Berkeley DB library version is now additionally output by
+      "exim -d -bV".  Previously only the compile-time version was shown.
+
 
 Exim version 4.90
 -----------------
index 01c0e306a91fcb64877ffbb88965e0667dffee6b..d8411082abebb56b25767edd4758488eb3face68 100644 (file)
@@ -743,26 +743,26 @@ else
 *          Show supported features               *
 *************************************************/
 
-/* This function is called for -bV/--version and for -d to output the optional
-features of the current Exim binary.
-
-Arguments:  a FILE for printing
-Returns:    nothing
-*/
-
 static void
-show_whats_supported(FILE *f)
+show_db_version(FILE * f)
 {
-  auth_info *authi;
-
 #ifdef DB_VERSION_STRING
-fprintf(f, "Berkeley DB: %s\n", DB_VERSION_STRING);
+DEBUG(D_any)
+  {
+  fprintf(f, "Library version: BDB: Compile: %s\n", DB_VERSION_STRING);
+  fprintf(f, "                      Runtime: %s\n",
+    db_version(NULL, NULL, NULL));
+  }
+else
+  fprintf(f, "Berkeley DB: %s\n", DB_VERSION_STRING);
+
 #elif defined(BTREEVERSION) && defined(HASHVERSION)
   #ifdef USE_DB
   fprintf(f, "Probably Berkeley DB version 1.8x (native mode)\n");
   #else
   fprintf(f, "Probably Berkeley DB version 1.8x (compatibility mode)\n");
   #endif
+
 #elif defined(_DBM_RDONLY) || defined(dbm_dirfno)
 fprintf(f, "Probably ndbm\n");
 #elif defined(USE_TDB)
@@ -774,6 +774,22 @@ fprintf(f, "Using tdb\n");
   fprintf(f, "Probably GDBM (compatibility mode)\n");
   #endif
 #endif
+}
+
+
+/* This function is called for -bV/--version and for -d to output the optional
+features of the current Exim binary.
+
+Arguments:  a FILE for printing
+Returns:    nothing
+*/
+
+static void
+show_whats_supported(FILE * f)
+{
+auth_info * authi;
+
+DEBUG(D_any) {} else show_db_version(f);
 
 fprintf(f, "Support for:");
 #ifdef SUPPORT_CRYPTEQ
@@ -980,6 +996,8 @@ DEBUG(D_any) do {
                gnu_get_libc_version());
 #endif
 
+show_db_version(f);
+
 #ifdef SUPPORT_TLS
   tls_version_report(f);
 #endif
index a6844bebbbd65c10cb43bf684340843247e0bb7c..89625e90deb032633d9076adf589abfcbadb0cab 100755 (executable)
@@ -2783,6 +2783,7 @@ while (<EXIMINFO>)
   my(@temp);
 
   if (/^(Exim|Library) version/) { print; }
+  if (/Runtime: /) {print; }
 
   elsif (/^Size of off_t: (\d+)/)
     {