Report compiler in -d -bV. Clang compat.
[exim.git] / src / src / lookups / whoson.c
index d1979058fa3f32ee80cd1f1c549ba711b5aad3d7..4a9f01bbea70776430029611cd7f75c844cfb68a 100644 (file)
@@ -47,7 +47,7 @@ length = length;
 errmsg = errmsg;
 do_cache = do_cache;
 
-switch (wso_query(query, CS buffer, sizeof(buffer)))
+switch (wso_query(CS query, CS buffer, sizeof(buffer)))
   {
   case 0:
   *result = string_copy(buffer);    /* IP in database; return name of user */
@@ -62,6 +62,25 @@ switch (wso_query(query, CS buffer, sizeof(buffer)))
   }
 }
 
+
+
+/*************************************************
+*         Version reporting entry point          *
+*************************************************/
+
+/* See local README for interface description. */
+
+#include "../version.h"
+
+void
+whoson_version_report(FILE *f)
+{
+fprintf(f, "Library version: Whoson: Runtime: %s\n", wso_version());
+#ifdef DYNLOOKUP
+fprintf(f, "                         Exim version %s\n", EXIM_VERSION_STR);
+#endif
+}
+
 static lookup_info _lookup_info = {
   US"whoson",                    /* lookup name */
   lookup_querystyle,             /* query-style lookup */
@@ -70,7 +89,8 @@ static lookup_info _lookup_info = {
   whoson_find,                   /* find function */
   NULL,                          /* no close function */
   NULL,                          /* no tidy function */
-  NULL                           /* no quoting function */
+  NULL,                          /* no quoting function */
+  whoson_version_report          /* version reporting */
 };
 
 #ifdef DYNLOOKUP