X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsrc%2Fbuildconfig.c;h=71cf97b18d34e6821022890ffae3c666a4bc94f7;hb=87abcb247b4444bab5fd0bcb212ddb26d5fd9191;hp=22fde15ca2732c4ce9d2e76b914e3e4a72fa57f9;hpb=c5db348c5e29e93e51389fa0079f829967c5da82;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/buildconfig.c b/src/src/buildconfig.c index 22fde15ca..71cf97b18 100644 --- a/src/src/buildconfig.c +++ b/src/src/buildconfig.c @@ -2,7 +2,7 @@ * Exim - an Internet mail transport agent * *************************************************/ -/* Copyright (c) University of Cambridge 1995 - 2017 */ +/* Copyright (c) University of Cambridge 1995 - 2018 */ /* See the file NOTICE for conditions of use and distribution. */ @@ -36,6 +36,8 @@ normally called independently. */ #include #include #include +#include +#include #include #include @@ -733,6 +735,7 @@ else if (isgroup) fprintf(new, "#define FIXED_NEVER_USERS %d", j); for (i = 0; i < j; i++) fprintf(new, ", %d", (unsigned int)vector[i]); fprintf(new, "\n"); + free(vector); } continue; } @@ -750,15 +753,15 @@ else if (isgroup) continue; } - /* DISABLE_DKIM is special; must be forced if no SUPPORT_TLS */ + /* DISABLE_DKIM is special; must be forced if DISABLE_TLS */ if (strcmp(name, "DISABLE_DKIM") == 0) { char *d_dkim = getenv("DISABLE_DKIM"); - char *tls = getenv("SUPPORT_TLS"); + char *notls = getenv("DISABLE_TLS"); if (d_dkim) fprintf(new, "#define DISABLE_DKIM yes\n"); - else if (!tls) + else if (notls) fprintf(new, "#define DISABLE_DKIM yes /* forced by lack of TLS */\n"); else fprintf(new, "/* DISABLE_DKIM not set */\n"); @@ -950,9 +953,25 @@ else if (isgroup) defined. */ if (have_auth) - { if (!support_crypteq) fprintf(new, "/* Force SUPPORT_CRYPTEQ for AUTH */\n" "#define SUPPORT_CRYPTEQ\n"); + +/* Check poll() for timer functionality. +Some OS' have released with it broken. */ + + { + struct timeval before, after; + size_t us; + + gettimeofday(&before, NULL); + (void) poll(NULL, 0, 500); + gettimeofday(&after, NULL); + + us = (after.tv_sec - before.tv_sec) * 1000000 + + (after.tv_usec - before.tv_usec); + + if (us < 400000) + fprintf(new, "#define NO_POLL_H\n"); } /* End off */