summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/src/buildconfig.c2
-rw-r--r--src/src/exim.c15
-rw-r--r--src/src/lookups/whoson.c2
-rw-r--r--src/src/mytypes.h2
4 files changed, 19 insertions, 2 deletions
diff --git a/src/src/buildconfig.c b/src/src/buildconfig.c
index c012fb7d4..56939770d 100644
--- a/src/src/buildconfig.c
+++ b/src/src/buildconfig.c
@@ -103,8 +103,10 @@ main(int argc, char **argv)
{
off_t test_off_t = 0;
time_t test_time_t = 0;
+#if ! (__STDC_VERSION__ >= 199901L)
size_t test_size_t = 0;
unsigned long test_ulong_t = 0L;
+#endif
long test_long_t = 0;
FILE *base;
FILE *new;
diff --git a/src/src/exim.c b/src/src/exim.c
index f086a00e8..3592f30dd 100644
--- a/src/src/exim.c
+++ b/src/src/exim.c
@@ -926,6 +926,21 @@ DEBUG(D_any) do {
int i;
+/* clang defines __GNUC__ (at least, for me) so test for it first */
+#if defined(__clang__)
+ fprintf(f, "Compiler: CLang [%s]\n", __clang_version__);
+#elif defined(__GNUC__)
+ fprintf(f, "Compiler: GCC [%s]\n",
+# ifdef __VERSION__
+ __VERSION__
+# else
+ "? unknown version ?"
+# endif
+ );
+#else
+ fprintf(f, "Compiler: <unknown>\n");
+#endif
+
#ifdef AUTH_CYRUS_SASL
auth_cyrus_sasl_version_report(f);
#endif
diff --git a/src/src/lookups/whoson.c b/src/src/lookups/whoson.c
index b4527a95c..4a9f01bbe 100644
--- a/src/src/lookups/whoson.c
+++ b/src/src/lookups/whoson.c
@@ -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 */
diff --git a/src/src/mytypes.h b/src/src/mytypes.h
index abf1f5333..7a83da83f 100644
--- a/src/src/mytypes.h
+++ b/src/src/mytypes.h
@@ -31,7 +31,7 @@ local_scan.h includes it and exim.h includes them both (to get this earlier). */
/* If gcc is being used to compile Exim, we can use its facility for checking
the arguments of printf-like functions. This is done by a macro. */
-#ifdef __GNUC__
+#if defined(__GNUC__) || defined(__clang__)
#define PRINTF_FUNCTION(A,B) __attribute__((format(printf,A,B)))
#else
#define PRINTF_FUNCTION(A,B)