Debug: feed startup "whats supported" info through normal debug channel
[exim.git] / src / src / lookups / dsearch.c
index 76f52774bc93f835c16c388e22e0ebdee93e941b..80000f14a3575e2ff92cb34045182961e386ef55 100644 (file)
@@ -3,7 +3,7 @@
 *************************************************/
 
 /* Copyright (c) University of Cambridge 1995 - 2015 */
-/* Copyright (c) The Exim Maintainers 2020 */
+/* Copyright (c) The Exim Maintainers 2020 - 2021 */
 /* See the file NOTICE for conditions of use and distribution. */
 
 /* The idea for this code came from Matthew Byng-Maddick, but his original has
@@ -31,9 +31,7 @@ dsearch_open(const uschar * dirname, uschar ** errmsg)
 DIR * dp = exim_opendir(dirname);
 if (!dp)
   {
-  int save_errno = errno;
-  *errmsg = string_open_failed(errno, "%s for directory search", dirname);
-  errno = save_errno;
+  *errmsg = string_open_failed("%s for directory search", dirname);
   return NULL;
   }
 closedir(dp);
@@ -160,12 +158,13 @@ handle = handle;   /* Avoid compiler warning */
 
 #include "../version.h"
 
-void
-dsearch_version_report(FILE *f)
+gstring *
+dsearch_version_report(gstring * g)
 {
 #ifdef DYNLOOKUP
-fprintf(f, "Library version: dsearch: Exim version %s\n", EXIM_VERSION_STR);
+g = string_fmt_append(g, "Library version: dsearch: Exim version %s\n", EXIM_VERSION_STR);
 #endif
+return g;
 }