diff options
author | schmonz <schmonz@pkgsrc.org> | 2018-07-29 08:41:18 +0000 |
---|---|---|
committer | schmonz <schmonz@pkgsrc.org> | 2018-07-29 08:41:18 +0000 |
commit | efab53cd03d60c95aa95daee7421aaa4473bb968 (patch) | |
tree | ba382352f54ec0953ae40cbd52df609dce87ac87 /mail/spamdyke | |
parent | 1b2a422a27c88280131ef67053a32bf9790208e9 (diff) | |
download | pkgsrc-efab53cd03d60c95aa95daee7421aaa4473bb968.tar.gz |
Apply patch from joerg@ to build with clang (by removing anonymous inner
functions). Bump PKGREVISION.
Diffstat (limited to 'mail/spamdyke')
-rw-r--r-- | mail/spamdyke/Makefile | 7 | ||||
-rw-r--r-- | mail/spamdyke/distinfo | 7 | ||||
-rw-r--r-- | mail/spamdyke/patches/patch-configuration.c | 516 | ||||
-rw-r--r-- | mail/spamdyke/patches/patch-configure | 112 | ||||
-rw-r--r-- | mail/spamdyke/patches/patch-configure.ac | 44 | ||||
-rw-r--r-- | mail/spamdyke/patches/patch-spamdyke.h | 28 |
6 files changed, 706 insertions, 8 deletions
diff --git a/mail/spamdyke/Makefile b/mail/spamdyke/Makefile index f168a321032..0a62e809d9c 100644 --- a/mail/spamdyke/Makefile +++ b/mail/spamdyke/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.36 2017/07/09 16:16:32 schmonz Exp $ +# $NetBSD: Makefile,v 1.37 2018/07/29 08:41:18 schmonz Exp $ # DISTNAME= spamdyke-5.0.1 -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= mail MASTER_SITES= ${HOMEPAGE}releases/ EXTRACT_SUFX= .tgz @@ -19,9 +19,6 @@ BUILD_TARGET= ${PKGBASE} MAKE_FLAGS+= CFLAGS=${CFLAGS:Q} MAKE_FLAGS+= LDFLAGS=${LDFLAGS:Q} -# anonymous inner functions -ONLY_FOR_COMPILER= gcc - SUBST_CLASSES+= paths SUBST_FILES.paths= spamdyke.h SUBST_SED.paths= -e 's,@PREFIX@,${PREFIX:Q},g' diff --git a/mail/spamdyke/distinfo b/mail/spamdyke/distinfo index d25a82edf39..32dd7de92a7 100644 --- a/mail/spamdyke/distinfo +++ b/mail/spamdyke/distinfo @@ -1,8 +1,11 @@ -$NetBSD: distinfo,v 1.32 2017/07/09 16:16:32 schmonz Exp $ +$NetBSD: distinfo,v 1.33 2018/07/29 08:41:18 schmonz Exp $ SHA1 (spamdyke-5.0.1.tgz) = 4de76158a98b3ee33e7002160446ae36de7c96d2 RMD160 (spamdyke-5.0.1.tgz) = 7237108ebf0ff2a5c02b7e305985a11e93720f8d SHA512 (spamdyke-5.0.1.tgz) = a022c8a8d4a8d74f5249f8e2d901d3de423ee853bbaffaf7e86cece1d19880d9039135892ef6ccb8a2a0fb11532c487402dc97a8dd6d89c9de431752c55f6eb9 Size (spamdyke-5.0.1.tgz) = 383720 bytes +SHA1 (patch-configuration.c) = 81548b8a7cc557446d3ecfca3546a129b04a2173 +SHA1 (patch-configure) = 0ff7ecd6b73445664243918001368a73186159b3 +SHA1 (patch-configure.ac) = 5b932db1992c268e80fced15d032d369d1dc40ce SHA1 (patch-md5.c) = f61cd888b6739c014a6de72d55589672d65c25cc -SHA1 (patch-spamdyke.h) = fe76ef41ba4e1ce231d578368642a18fbca12050 +SHA1 (patch-spamdyke.h) = 689d4774d78b60a4dd2fbb62a99b218aca9b500b diff --git a/mail/spamdyke/patches/patch-configuration.c b/mail/spamdyke/patches/patch-configuration.c new file mode 100644 index 00000000000..f5c69229e4f --- /dev/null +++ b/mail/spamdyke/patches/patch-configuration.c @@ -0,0 +1,516 @@ +$NetBSD: patch-configuration.c,v 1.1 2018/07/29 08:41:18 schmonz Exp $ + +Remove anonymous inner functions to build with clang. + +--- configuration.c.orig 2018-07-08 20:20:10.283510612 +0000 ++++ configuration.c +@@ -359,6 +359,140 @@ int copy_base_options(struct filter_sett + * Return value: + * exit value for main() + */ ++CONFIG_ACTION_PREDEF(smtp_auth_level, if (((current_settings->current_options->smtp_auth_level & SMTP_AUTH_LEVEL_MASK) != SMTP_AUTH_LEVEL_VALUE_NONE) && (current_settings->current_options->filter_grace < FILTER_GRACE_AFTER_FROM)) current_settings->current_options->filter_grace = FILTER_GRACE_AFTER_FROM) ++CONFIG_ACTION_PREDEF(smtp_auth_verification, if (((current_settings->current_options->smtp_auth_level & SMTP_AUTH_SET_MASK) == SMTP_AUTH_SET_VALUE_UNSET) && (current_settings->current_options->smtp_auth_command != NULL) && (current_settings->current_options->smtp_auth_command[0] != NULL)) { current_settings->current_options->smtp_auth_level = SMTP_AUTH_LEVEL_VALUE_ON_DEMAND | SMTP_AUTH_SET_VALUE_SET; if (current_settings->current_options->filter_grace < FILTER_GRACE_AFTER_FROM) current_settings->current_options->filter_grace = FILTER_GRACE_AFTER_FROM; }) ++CONFIG_ACCESSOR_STRING_ARRAY_PREDEF(blacklist_sender) ++CONFIG_ACCESSOR_STRING_ARRAY_PREDEF(blacklist_sender_file) ++CONFIG_ACCESSOR_STRING_ARRAY_PREDEF(whitelist_sender) ++CONFIG_ACCESSOR_STRING_ARRAY_PREDEF(whitelist_sender_file) ++CONFIG_ACCESSOR_STRING_ARRAY_PREDEF(smtp_auth_command) ++CONFIG_ACCESSOR_INTEGER_PREDEF(smtp_auth_level) ++CONFIG_ACCESSOR_STRING_PREDEF(tls_certificate_file) ++CONFIG_ACCESSOR_STRING_PREDEF(tls_cipher_list) ++CONFIG_ACCESSOR_STRING_PREDEF(tls_dhparams_file) ++CONFIG_ACCESSOR_INTEGER_PREDEF(tls_level) ++CONFIG_ACCESSOR_STRING_PREDEF(tls_privatekey_file) ++CONFIG_ACCESSOR_STRING_PREDEF(tls_privatekey_password) ++CONFIG_ACCESSOR_STRING_PREDEF(tls_privatekey_password_file) ++CONFIG_ACCESSOR_STRING_PREDEF(run_user) ++CONFIG_ACCESSOR_INTEGER_PREDEF(relay_level) ++CONFIG_ACCESSOR_STRING_ARRAY_PREDEF(rhsbl_fqdn) ++CONFIG_ACCESSOR_STRING_ARRAY_PREDEF(rhsbl_fqdn_file) ++CONFIG_ACCESSOR_STRING_ARRAY_PREDEF(rhswl_fqdn) ++CONFIG_ACCESSOR_STRING_ARRAY_PREDEF(rhswl_fqdn_file) ++CONFIG_ACCESSOR_STRING_PREDEF(local_server_name) ++CONFIG_ACCESSOR_STRING_PREDEF(local_server_name_command) ++CONFIG_ACCESSOR_STRING_PREDEF(local_server_name_file) ++CONFIG_ACCESSOR_INTEGER_PREDEF(timeout_command) ++CONFIG_ACCESSOR_STRING_ARRAY_PREDEF(blacklist_ip) ++CONFIG_ACCESSOR_STRING_ARRAY_PREDEF(blacklist_ip_file) ++CONFIG_ACCESSOR_STRING_ARRAY_PREDEF(blacklist_rdns_keyword) ++CONFIG_ACCESSOR_STRING_ARRAY_PREDEF(blacklist_rdns_keyword_file) ++CONFIG_ACCESSOR_STRING_ARRAY_PREDEF(whitelist_rdns_keyword) ++CONFIG_ACCESSOR_STRING_ARRAY_PREDEF(whitelist_rdns_keyword_file) ++CONFIG_ACCESSOR_STRING_ARRAY_PREDEF(relay_ip) ++CONFIG_ACCESSOR_STRING_ARRAY_PREDEF(relay_ip_file) ++CONFIG_ACCESSOR_STRING_ARRAY_PREDEF(whitelist_ip) ++CONFIG_ACCESSOR_STRING_ARRAY_PREDEF(whitelist_ip_file) ++CONFIG_ACCESSOR_INTEGER_PREDEF(log_level) ++CONFIG_ACCESSOR_INTEGER_PREDEF(check_earlytalker) ++CONFIG_ACCESSOR_INTEGER_PREDEF(configuration_dir_search) ++CONFIG_ACCESSOR_INTEGER_PREDEF(filter_level) ++CONFIG_ACCESSOR_INTEGER_PREDEF(graylist_level) ++CONFIG_ACCESSOR_INTEGER_PREDEF(graylist_max_secs) ++CONFIG_ACCESSOR_INTEGER_PREDEF(graylist_min_secs) ++CONFIG_ACCESSOR_INTEGER_PREDEF(nihdns_attempts_primary) ++CONFIG_ACCESSOR_INTEGER_PREDEF(nihdns_attempts_total) ++CONFIG_ACCESSOR_INTEGER_PREDEF(nihdns_level) ++CONFIG_ACCESSOR_INTEGER_PREDEF(nihdns_query_type_a) ++CONFIG_ACCESSOR_INTEGER_PREDEF(nihdns_query_type_mx) ++CONFIG_ACCESSOR_INTEGER_PREDEF(nihdns_query_type_ptr) ++CONFIG_ACCESSOR_INTEGER_PREDEF(nihdns_query_type_rbl) ++CONFIG_ACCESSOR_INTEGER_PREDEF(nihdns_spoof) ++CONFIG_ACCESSOR_INTEGER_PREDEF(nihdns_tcp) ++CONFIG_ACCESSOR_INTEGER_PREDEF(nihdns_timeout_total_secs_parameter) ++CONFIG_ACCESSOR_INTEGER_PREDEF(timeout_connection) ++CONFIG_ACCESSOR_STRING_ARRAY_PREDEF(config_file) ++CONFIG_ACCESSOR_STRING_ARRAY_PREDEF(configuration_dir) ++CONFIG_ACCESSOR_STRING_ARRAY_PREDEF(dnsrbl_fqdn) ++CONFIG_ACCESSOR_STRING_ARRAY_PREDEF(dnsrbl_fqdn_file) ++CONFIG_ACCESSOR_STRING_ARRAY_PREDEF(dnsrwl_fqdn) ++CONFIG_ACCESSOR_STRING_ARRAY_PREDEF(dnsrwl_fqdn_file) ++CONFIG_ACCESSOR_STRING_ARRAY_PREDEF(graylist_dir) ++CONFIG_ACCESSOR_STRING_ARRAY_PREDEF(graylist_exception_ip) ++CONFIG_ACCESSOR_STRING_ARRAY_PREDEF(graylist_exception_ip_file) ++CONFIG_ACCESSOR_STRING_ARRAY_PREDEF(graylist_exception_rdns) ++CONFIG_ACCESSOR_STRING_ARRAY_PREDEF(graylist_exception_rdns_dir) ++CONFIG_ACCESSOR_STRING_ARRAY_PREDEF(graylist_exception_rdns_file) ++CONFIG_ACCESSOR_STRING_ARRAY_PREDEF(nihdns_primary_server_list) ++CONFIG_ACCESSOR_STRING_ARRAY_PREDEF(nihdns_resolv_conf) ++CONFIG_ACCESSOR_STRING_ARRAY_PREDEF(nihdns_secondary_server_list) ++CONFIG_ACCESSOR_STRING_PREDEF(log_dir) ++CONFIG_ACCESSOR_STRING_PREDEF(test_smtp_auth_password) ++CONFIG_ACCESSOR_STRING_PREDEF(test_smtp_auth_username) ++CONFIG_SET_ACTION_PREDEF(loglevel, if (current_settings->current_options->log_level == 0) current_settings->current_options->log_level = LOG_LEVEL_ERROR) ++CONFIG_SET_ACTION_PREDEF(relay_level_unset, if (current_settings->current_options->relay_level == RELAY_LEVEL_UNSET) current_settings->current_options->relay_level = RELAY_LEVEL_NORMAL;) ++CONFIG_SET_ACTION_PREDEF(strlen_policy_location, current_settings->current_options->strlen_policy_location = (current_settings->current_options->policy_location != NULL) ? strlen(current_settings->current_options->policy_location) : 0) ++CONFIG_SET_ACTION_PREDEF(strlen_tls_privatekey_password, current_settings->current_options->strlen_tls_privatekey_password = (current_settings->current_options->tls_privatekey_password != NULL) ? strlen(current_settings->current_options->tls_privatekey_password) : 0) ++CONFIG_SET_ACTION_PREDEF(usage_brief, usage(current_settings, USAGE_LEVEL_BRIEF, NULL)) ++CONFIG_SET_ACTION_PREDEF(usage_long, usage(current_settings, USAGE_LEVEL_LONG, NULL)) ++CONFIG_SET_ACTION_PREDEF(usage_short, usage(current_settings, USAGE_LEVEL_SHORT, NULL)) ++CONFIG_ACCESSOR_INTEGER_PREDEF(log_target) ++CONFIG_ACCESSOR_INTEGER_PREDEF(max_rcpt_to) ++CONFIG_ACCESSOR_STRING_PREDEF(policy_location) ++CONFIG_ACCESSOR_STRING_ARRAY_PREDEF(qmail_morercpthosts_cdb) ++CONFIG_ACCESSOR_STRING_ARRAY_PREDEF(qmail_rcpthosts_file) ++CONFIG_ACCESSOR_STRING_ARRAY_PREDEF(blacklist_rdns_dir) ++CONFIG_ACCESSOR_STRING_ARRAY_PREDEF(blacklist_rdns) ++CONFIG_ACCESSOR_STRING_ARRAY_PREDEF(blacklist_rdns_file) ++CONFIG_ACCESSOR_STRING_ARRAY_PREDEF(relay_rdns) ++CONFIG_ACCESSOR_STRING_ARRAY_PREDEF(relay_rdns_file) ++CONFIG_ACCESSOR_STRING_ARRAY_PREDEF(whitelist_rdns_dir) ++CONFIG_ACCESSOR_STRING_ARRAY_PREDEF(whitelist_rdns) ++CONFIG_ACCESSOR_STRING_ARRAY_PREDEF(whitelist_rdns_file) ++CONFIG_ACCESSOR_STRING_ARRAY_PREDEF(blacklist_recipient) ++CONFIG_ACCESSOR_STRING_ARRAY_PREDEF(blacklist_recipient_file) ++CONFIG_ACCESSOR_STRING_ARRAY_PREDEF(whitelist_recipient) ++CONFIG_ACCESSOR_STRING_ARRAY_PREDEF(whitelist_recipient_file) ++CONFIG_ACCESSOR_INTEGER_PREDEF(check_rdns_exist) ++CONFIG_ACCESSOR_INTEGER_PREDEF(check_ip_in_rdns_cc) ++CONFIG_ACCESSOR_INTEGER_PREDEF(reject_recipient) ++CONFIG_ACCESSOR_INTEGER_PREDEF(reject_sender) ++CONFIG_ACCESSOR_INTEGER_PREDEF(check_rdns_resolve) ++CONFIG_ACCESSOR_STRING_ARRAY_PREDEF(recipient_validation_command) ++CONFIG_ACCESSOR_STRING_ARRAY_MEMBER_PREDEF(rejection_text, REJECTION_SMTP_AUTH_FAILURE) ++CONFIG_ACCESSOR_STRING_ARRAY_MEMBER_PREDEF(rejection_text, REJECTION_SMTP_AUTH_UNKNOWN) ++CONFIG_ACCESSOR_STRING_ARRAY_MEMBER_PREDEF(rejection_text, REJECTION_RBL) ++CONFIG_ACCESSOR_STRING_ARRAY_MEMBER_PREDEF(rejection_text, REJECTION_EARLYTALKER) ++CONFIG_ACCESSOR_STRING_ARRAY_MEMBER_PREDEF(rejection_text, REJECTION_RDNS_MISSING) ++CONFIG_ACCESSOR_STRING_ARRAY_MEMBER_PREDEF(rejection_text, REJECTION_GRAYLISTED) ++CONFIG_ACCESSOR_STRING_ARRAY_MEMBER_PREDEF(rejection_text, REJECTION_HEADER_BLACKLISTED) ++CONFIG_ACCESSOR_STRING_ARRAY_MEMBER_PREDEF(rejection_text, REJECTION_BLACKLIST_IP) ++CONFIG_ACCESSOR_STRING_ARRAY_MEMBER_PREDEF(rejection_text, REJECTION_IP_IN_NAME_CC) ++CONFIG_ACCESSOR_STRING_ARRAY_MEMBER_PREDEF(rejection_text, REJECTION_IP_IN_NAME) ++CONFIG_ACCESSOR_STRING_ARRAY_MEMBER_PREDEF(rejection_text, REJECTION_RCPT_TO_LOCAL) ++CONFIG_ACCESSOR_STRING_ARRAY_MEMBER_PREDEF(rejection_text, REJECTION_RCPT_TO) ++CONFIG_ACCESSOR_STRING_ARRAY_MEMBER_PREDEF(rejection_text, REJECTION_BLACKLIST_NAME) ++CONFIG_ACCESSOR_STRING_ARRAY_MEMBER_PREDEF(rejection_text, REJECTION_RECIPIENT_BLACKLISTED) ++CONFIG_ACCESSOR_STRING_ARRAY_MEMBER_PREDEF(rejection_text, REJECTION_INVALID_RECIPIENT) ++CONFIG_ACCESSOR_STRING_ARRAY_MEMBER_PREDEF(rejection_text, REJECTION_IDENTICAL_FROM_TO) ++CONFIG_ACCESSOR_STRING_ARRAY_MEMBER_PREDEF(rejection_text, REJECTION_UNAVAILABLE_RECIPIENT) ++CONFIG_ACCESSOR_STRING_ARRAY_MEMBER_PREDEF(rejection_text, REJECTION_UNCONDITIONAL) ++CONFIG_ACCESSOR_STRING_ARRAY_MEMBER_PREDEF(rejection_text, REJECTION_RELAYING_DENIED) ++CONFIG_ACCESSOR_STRING_ARRAY_MEMBER_PREDEF(rejection_text, REJECTION_RHSBL) ++CONFIG_ACCESSOR_STRING_ARRAY_MEMBER_PREDEF(rejection_text, REJECTION_SENDER_NOT_AUTH) ++CONFIG_ACCESSOR_STRING_ARRAY_MEMBER_PREDEF(rejection_text, REJECTION_SENDER_BLACKLISTED) ++CONFIG_ACCESSOR_STRING_ARRAY_MEMBER_PREDEF(rejection_text, REJECTION_SENDER_NO_MX) ++CONFIG_ACCESSOR_STRING_ARRAY_MEMBER_PREDEF(rejection_text, REJECTION_SENDER_NOT_LOCAL) ++CONFIG_ACCESSOR_STRING_ARRAY_MEMBER_PREDEF(rejection_text, REJECTION_AUTH_REQUIRED) ++CONFIG_ACCESSOR_STRING_ARRAY_MEMBER_PREDEF(rejection_text, REJECTION_TIMEOUT) ++CONFIG_ACCESSOR_STRING_ARRAY_MEMBER_PREDEF(rejection_text, FAILURE_TLS) ++CONFIG_ACCESSOR_STRING_ARRAY_MEMBER_PREDEF(rejection_text, REJECTION_RDNS_RESOLVE) ++CONFIG_ACCESSOR_STRING_ARRAY_MEMBER_PREDEF(rejection_text, REJECTION_ZERO_RECIPIENTS) ++ ++static char ***predef_access_string_array_blacklist_header(struct option_set *current_options, int current_options_only) { return(current_options_only ? NULL : ¤t_options->container->blacklist_header); } ++static char ***predef_access_string_array_blacklist_header_file(struct option_set *current_options, int current_options_only) { return(current_options_only ? NULL : ¤t_options->container->blacklist_header_file); } ++ + int prepare_settings(int argc, char *argv[], char *envp[], int (*main_function)(struct filter_settings *, int, char **)) + { + int return_value; +@@ -706,7 +840,7 @@ int prepare_settings(int argc, char *arg + FILTER_DECISION_CONFIG_TEST, + FILTER_GRACE_NONE, + NULL, +- CONFIG_SET_ACTION(if (current_settings->current_options->log_level == 0) current_settings->current_options->log_level = LOG_LEVEL_ERROR), ++ CONFIG_SET_ACTION(loglevel, if (current_settings->current_options->log_level == 0) current_settings->current_options->log_level = LOG_LEVEL_ERROR), + NULL, + NULL, + "Tests the configuration as much as possible and reports any errors that can be discovered without actually accepting an incoming message." +@@ -1436,7 +1570,7 @@ int prepare_settings(int argc, char *arg + { "header-blacklist-entry", required_argument, NULL, -1 }, + { .string_value = NULL }, + { .string_value = NULL }, +- { .get_string_array = ({ char ***access_string_array(struct option_set *current_options, int current_options_only) { return(current_options_only ? NULL : ¤t_options->container->blacklist_header); } &access_string_array; }) }, ++ { .get_string_array = predef_access_string_array_blacklist_header }, + { .max_strlen = 0 }, + FILTER_DECISION_UNDECIDED, + FILTER_GRACE_NONE, +@@ -1453,7 +1587,7 @@ int prepare_settings(int argc, char *arg + { "header-blacklist-file", required_argument, NULL, -1 }, + { .string_value = NULL }, + { .string_value = NULL }, +- { .get_string_array = ({ char ***access_string_array(struct option_set *current_options, int current_options_only) { return(current_options_only ? NULL : ¤t_options->container->blacklist_header_file); } &access_string_array; }) }, ++ { .get_string_array = predef_access_string_array_blacklist_header_file }, + { .max_strlen = 0 }, + FILTER_DECISION_UNDECIDED, + FILTER_GRACE_NONE, +@@ -1475,7 +1609,7 @@ int prepare_settings(int argc, char *arg + FILTER_DECISION_ERROR, + FILTER_GRACE_NONE, + NULL, +- CONFIG_SET_ACTION(usage(current_settings, USAGE_LEVEL_BRIEF, NULL)), ++ CONFIG_SET_ACTION(usage_brief, usage(current_settings, USAGE_LEVEL_BRIEF, NULL)), + NULL, + NULL, + "Displays a (shorter) option summary and exits." +@@ -1802,7 +1936,7 @@ int prepare_settings(int argc, char *arg + FILTER_DECISION_ERROR, + FILTER_GRACE_NONE, + NULL, +- CONFIG_SET_ACTION(usage(current_settings, USAGE_LEVEL_LONG, NULL)), ++ CONFIG_SET_ACTION(usage_long, usage(current_settings, USAGE_LEVEL_LONG, NULL)), + NULL, + NULL, + "Displays this help screen and exits." +@@ -1819,7 +1953,7 @@ int prepare_settings(int argc, char *arg + FILTER_DECISION_UNDECIDED, + FILTER_GRACE_NONE, + NULL, +- CONFIG_SET_ACTION(current_settings->current_options->strlen_policy_location = (current_settings->current_options->policy_location != NULL) ? strlen(current_settings->current_options->policy_location) : 0), ++ CONFIG_SET_ACTION(strlen_policy_location, current_settings->current_options->strlen_policy_location = (current_settings->current_options->policy_location != NULL) ? strlen(current_settings->current_options->policy_location) : 0), + NULL, + "URL", + "Append URL to the rejection message to explain why the rejection occurred. NOTE: most servers hide rejection messages from their users and most users don't read bounce messages." +@@ -1837,7 +1971,7 @@ int prepare_settings(int argc, char *arg + FILTER_DECISION_UNDECIDED, + FILTER_GRACE_NONE, + &config_test_cdb, +- CONFIG_SET_ACTION(if (current_settings->current_options->relay_level == RELAY_LEVEL_UNSET) current_settings->current_options->relay_level = RELAY_LEVEL_NORMAL;), ++ CONFIG_SET_ACTION(relay_level_unset, if (current_settings->current_options->relay_level == RELAY_LEVEL_UNSET) current_settings->current_options->relay_level = RELAY_LEVEL_NORMAL;), + NULL, + "CDB", + "Search CDB to determine if mail for a domain is accepted here. NOTE: In order for recipient validation to work correctly, spamdyke needs to use the same input" +@@ -1855,7 +1989,7 @@ int prepare_settings(int argc, char *arg + FILTER_DECISION_UNDECIDED, + FILTER_GRACE_NONE, + &config_test_qmail_option, +- CONFIG_SET_ACTION(if (current_settings->current_options->relay_level == RELAY_LEVEL_UNSET) current_settings->current_options->relay_level = RELAY_LEVEL_NORMAL;), ++ CONFIG_SET_ACTION(relay_level_unset, if (current_settings->current_options->relay_level == RELAY_LEVEL_UNSET) current_settings->current_options->relay_level = RELAY_LEVEL_NORMAL;), + NULL, + "FILE", + "Search FILE to determine if mail for a domain is accepted here. NOTE: In order for recipient validation to work correctly, spamdyke needs to use the same input" +@@ -2196,7 +2330,7 @@ int prepare_settings(int argc, char *arg + { "rejection-text-auth-failure", required_argument, NULL, -1 }, + { .string_value = NULL }, + { .string_value = NULL }, +- { .get_string = CONFIG_ACCESSOR_STRING(rejection_text[REJECTION_SMTP_AUTH_FAILURE]) }, ++ { .get_string = CONFIG_ACCESSOR_STRING_ARRAY_MEMBER(rejection_text, REJECTION_SMTP_AUTH_FAILURE) }, + { .max_strlen = 100 }, + FILTER_DECISION_UNDECIDED, + FILTER_GRACE_NONE, +@@ -2213,7 +2347,7 @@ int prepare_settings(int argc, char *arg + { "rejection-text-auth-unknown", required_argument, NULL, -1 }, + { .string_value = NULL }, + { .string_value = NULL }, +- { .get_string = CONFIG_ACCESSOR_STRING(rejection_text[REJECTION_SMTP_AUTH_UNKNOWN]) }, ++ { .get_string = CONFIG_ACCESSOR_STRING_ARRAY_MEMBER(rejection_text, REJECTION_SMTP_AUTH_UNKNOWN) }, + { .max_strlen = 100 }, + FILTER_DECISION_UNDECIDED, + FILTER_GRACE_NONE, +@@ -2231,7 +2365,7 @@ int prepare_settings(int argc, char *arg + { "rejection-text-dns-blacklist", required_argument, NULL, -1 }, + { .string_value = NULL }, + { .string_value = NULL }, +- { .get_string = CONFIG_ACCESSOR_STRING(rejection_text[REJECTION_RBL]) }, ++ { .get_string = CONFIG_ACCESSOR_STRING_ARRAY_MEMBER(rejection_text, REJECTION_RBL) }, + { .max_strlen = 100 }, + FILTER_DECISION_UNDECIDED, + FILTER_GRACE_NONE, +@@ -2249,7 +2383,7 @@ int prepare_settings(int argc, char *arg + { "rejection-text-earlytalker", required_argument, NULL, -1 }, + { .string_value = NULL }, + { .string_value = NULL }, +- { .get_string = CONFIG_ACCESSOR_STRING(rejection_text[REJECTION_EARLYTALKER]) }, ++ { .get_string = CONFIG_ACCESSOR_STRING_ARRAY_MEMBER(rejection_text, REJECTION_EARLYTALKER) }, + { .max_strlen = 100 }, + FILTER_DECISION_UNDECIDED, + FILTER_GRACE_NONE, +@@ -2266,7 +2400,7 @@ int prepare_settings(int argc, char *arg + { "rejection-text-empty-rdns", required_argument, NULL, -1 }, + { .string_value = NULL }, + { .string_value = NULL }, +- { .get_string = CONFIG_ACCESSOR_STRING(rejection_text[REJECTION_RDNS_MISSING]) }, ++ { .get_string = CONFIG_ACCESSOR_STRING_ARRAY_MEMBER(rejection_text, REJECTION_RDNS_MISSING) }, + { .max_strlen = 100 }, + FILTER_DECISION_UNDECIDED, + FILTER_GRACE_NONE, +@@ -2283,7 +2417,7 @@ int prepare_settings(int argc, char *arg + { "rejection-text-graylist", required_argument, NULL, -1 }, + { .string_value = NULL }, + { .string_value = NULL }, +- { .get_string = CONFIG_ACCESSOR_STRING(rejection_text[REJECTION_GRAYLISTED]) }, ++ { .get_string = CONFIG_ACCESSOR_STRING_ARRAY_MEMBER(rejection_text, REJECTION_GRAYLISTED) }, + { .max_strlen = 100 }, + FILTER_DECISION_UNDECIDED, + FILTER_GRACE_NONE, +@@ -2305,7 +2439,7 @@ int prepare_settings(int argc, char *arg + { "rejection-text-header-blacklist", required_argument, NULL, -1 }, + { .string_value = NULL }, + { .string_value = NULL }, +- { .get_string = CONFIG_ACCESSOR_STRING(rejection_text[REJECTION_HEADER_BLACKLISTED]) }, ++ { .get_string = CONFIG_ACCESSOR_STRING_ARRAY_MEMBER(rejection_text, REJECTION_HEADER_BLACKLISTED) }, + { .max_strlen = 100 }, + FILTER_DECISION_UNDECIDED, + FILTER_GRACE_NONE, +@@ -2322,7 +2456,7 @@ int prepare_settings(int argc, char *arg + { "rejection-text-ip-blacklist", required_argument, NULL, -1 }, + { .string_value = NULL }, + { .string_value = NULL }, +- { .get_string = CONFIG_ACCESSOR_STRING(rejection_text[REJECTION_BLACKLIST_IP]) }, ++ { .get_string = CONFIG_ACCESSOR_STRING_ARRAY_MEMBER(rejection_text, REJECTION_BLACKLIST_IP) }, + { .max_strlen = 100 }, + FILTER_DECISION_UNDECIDED, + FILTER_GRACE_NONE, +@@ -2339,7 +2473,7 @@ int prepare_settings(int argc, char *arg + { "rejection-text-ip-in-cc-rdns", required_argument, NULL, -1 }, + { .string_value = NULL }, + { .string_value = NULL }, +- { .get_string = CONFIG_ACCESSOR_STRING(rejection_text[REJECTION_IP_IN_NAME_CC]) }, ++ { .get_string = CONFIG_ACCESSOR_STRING_ARRAY_MEMBER(rejection_text, REJECTION_IP_IN_NAME_CC) }, + { .max_strlen = 100 }, + FILTER_DECISION_UNDECIDED, + FILTER_GRACE_NONE, +@@ -2356,7 +2490,7 @@ int prepare_settings(int argc, char *arg + { "rejection-text-ip-in-rdns-keyword-blacklist", required_argument, NULL, -1 }, + { .string_value = NULL }, + { .string_value = NULL }, +- { .get_string = CONFIG_ACCESSOR_STRING(rejection_text[REJECTION_IP_IN_NAME]) }, ++ { .get_string = CONFIG_ACCESSOR_STRING_ARRAY_MEMBER(rejection_text, REJECTION_IP_IN_NAME) }, + { .max_strlen = 100 }, + FILTER_DECISION_UNDECIDED, + FILTER_GRACE_NONE, +@@ -2373,7 +2507,7 @@ int prepare_settings(int argc, char *arg + { "rejection-text-local-recipient", required_argument, NULL, -1 }, + { .string_value = NULL }, + { .string_value = NULL }, +- { .get_string = CONFIG_ACCESSOR_STRING(rejection_text[REJECTION_RCPT_TO_LOCAL]) }, ++ { .get_string = CONFIG_ACCESSOR_STRING_ARRAY_MEMBER(rejection_text, REJECTION_RCPT_TO_LOCAL) }, + { .max_strlen = 100 }, + FILTER_DECISION_UNDECIDED, + FILTER_GRACE_NONE, +@@ -2390,7 +2524,7 @@ int prepare_settings(int argc, char *arg + { "rejection-text-max-recipients", required_argument, NULL, -1 }, + { .string_value = NULL }, + { .string_value = NULL }, +- { .get_string = CONFIG_ACCESSOR_STRING(rejection_text[REJECTION_RCPT_TO]) }, ++ { .get_string = CONFIG_ACCESSOR_STRING_ARRAY_MEMBER(rejection_text, REJECTION_RCPT_TO) }, + { .max_strlen = 100 }, + FILTER_DECISION_UNDECIDED, + FILTER_GRACE_NONE, +@@ -2407,7 +2541,7 @@ int prepare_settings(int argc, char *arg + { "rejection-text-rdns-blacklist", required_argument, NULL, -1 }, + { .string_value = NULL }, + { .string_value = NULL }, +- { .get_string = CONFIG_ACCESSOR_STRING(rejection_text[REJECTION_BLACKLIST_NAME]) }, ++ { .get_string = CONFIG_ACCESSOR_STRING_ARRAY_MEMBER(rejection_text, REJECTION_BLACKLIST_NAME) }, + { .max_strlen = 100 }, + FILTER_DECISION_UNDECIDED, + FILTER_GRACE_NONE, +@@ -2424,7 +2558,7 @@ int prepare_settings(int argc, char *arg + { "rejection-text-recipient-blacklist", required_argument, NULL, -1 }, + { .string_value = NULL }, + { .string_value = NULL }, +- { .get_string = CONFIG_ACCESSOR_STRING(rejection_text[REJECTION_RECIPIENT_BLACKLISTED]) }, ++ { .get_string = CONFIG_ACCESSOR_STRING_ARRAY_MEMBER(rejection_text, REJECTION_RECIPIENT_BLACKLISTED) }, + { .max_strlen = 100 }, + FILTER_DECISION_UNDECIDED, + FILTER_GRACE_NONE, +@@ -2441,7 +2575,7 @@ int prepare_settings(int argc, char *arg + { "rejection-text-recipient-invalid", required_argument, NULL, -1 }, + { .string_value = NULL }, + { .string_value = NULL }, +- { .get_string = CONFIG_ACCESSOR_STRING(rejection_text[REJECTION_INVALID_RECIPIENT]) }, ++ { .get_string = CONFIG_ACCESSOR_STRING_ARRAY_MEMBER(rejection_text, REJECTION_INVALID_RECIPIENT) }, + { .max_strlen = 100 }, + FILTER_DECISION_UNDECIDED, + FILTER_GRACE_NONE, +@@ -2458,7 +2592,7 @@ int prepare_settings(int argc, char *arg + { "rejection-text-recipient-same-as-sender", required_argument, NULL, -1 }, + { .string_value = NULL }, + { .string_value = NULL }, +- { .get_string = CONFIG_ACCESSOR_STRING(rejection_text[REJECTION_IDENTICAL_FROM_TO]) }, ++ { .get_string = CONFIG_ACCESSOR_STRING_ARRAY_MEMBER(rejection_text, REJECTION_IDENTICAL_FROM_TO) }, + { .max_strlen = 100 }, + FILTER_DECISION_UNDECIDED, + FILTER_GRACE_NONE, +@@ -2475,7 +2609,7 @@ int prepare_settings(int argc, char *arg + { "rejection-text-recipient-unavailable", required_argument, NULL, -1 }, + { .string_value = NULL }, + { .string_value = NULL }, +- { .get_string = CONFIG_ACCESSOR_STRING(rejection_text[REJECTION_UNAVAILABLE_RECIPIENT]) }, ++ { .get_string = CONFIG_ACCESSOR_STRING_ARRAY_MEMBER(rejection_text, REJECTION_UNAVAILABLE_RECIPIENT) }, + { .max_strlen = 100 }, + FILTER_DECISION_UNDECIDED, + FILTER_GRACE_NONE, +@@ -2492,7 +2626,7 @@ int prepare_settings(int argc, char *arg + { "rejection-text-reject-all", required_argument, NULL, -1 }, + { .string_value = NULL }, + { .string_value = NULL }, +- { .get_string = CONFIG_ACCESSOR_STRING(rejection_text[REJECTION_UNCONDITIONAL]) }, ++ { .get_string = CONFIG_ACCESSOR_STRING_ARRAY_MEMBER(rejection_text, REJECTION_UNCONDITIONAL) }, + { .max_strlen = 100 }, + FILTER_DECISION_UNDECIDED, + FILTER_GRACE_NONE, +@@ -2509,7 +2643,7 @@ int prepare_settings(int argc, char *arg + { "rejection-text-relaying-denied", required_argument, NULL, -1 }, + { .string_value = NULL }, + { .string_value = NULL }, +- { .get_string = CONFIG_ACCESSOR_STRING(rejection_text[REJECTION_RELAYING_DENIED]) }, ++ { .get_string = CONFIG_ACCESSOR_STRING_ARRAY_MEMBER(rejection_text, REJECTION_RELAYING_DENIED) }, + { .max_strlen = 100 }, + FILTER_DECISION_UNDECIDED, + FILTER_GRACE_NONE, +@@ -2526,7 +2660,7 @@ int prepare_settings(int argc, char *arg + { "rejection-text-rhs-blacklist", required_argument, NULL, -1 }, + { .string_value = NULL }, + { .string_value = NULL }, +- { .get_string = CONFIG_ACCESSOR_STRING(rejection_text[REJECTION_RHSBL]) }, ++ { .get_string = CONFIG_ACCESSOR_STRING_ARRAY_MEMBER(rejection_text, REJECTION_RHSBL) }, + { .max_strlen = 100 }, + FILTER_DECISION_UNDECIDED, + FILTER_GRACE_NONE, +@@ -2544,7 +2678,7 @@ int prepare_settings(int argc, char *arg + { "rejection-text-sender-authentication-mismatch", required_argument, NULL, -1 }, + { .string_value = NULL }, + { .string_value = NULL }, +- { .get_string = CONFIG_ACCESSOR_STRING(rejection_text[REJECTION_SENDER_NOT_AUTH]) }, ++ { .get_string = CONFIG_ACCESSOR_STRING_ARRAY_MEMBER(rejection_text, REJECTION_SENDER_NOT_AUTH) }, + { .max_strlen = 100 }, + FILTER_DECISION_UNDECIDED, + FILTER_GRACE_NONE, +@@ -2561,7 +2695,7 @@ int prepare_settings(int argc, char *arg + { "rejection-text-sender-blacklist", required_argument, NULL, -1 }, + { .string_value = NULL }, + { .string_value = NULL }, +- { .get_string = CONFIG_ACCESSOR_STRING(rejection_text[REJECTION_SENDER_BLACKLISTED]) }, ++ { .get_string = CONFIG_ACCESSOR_STRING_ARRAY_MEMBER(rejection_text, REJECTION_SENDER_BLACKLISTED) }, + { .max_strlen = 100 }, + FILTER_DECISION_UNDECIDED, + FILTER_GRACE_NONE, +@@ -2578,7 +2712,7 @@ int prepare_settings(int argc, char *arg + { "rejection-text-sender-no-mx", required_argument, NULL, -1 }, + { .string_value = NULL }, + { .string_value = NULL }, +- { .get_string = CONFIG_ACCESSOR_STRING(rejection_text[REJECTION_SENDER_NO_MX]) }, ++ { .get_string = CONFIG_ACCESSOR_STRING_ARRAY_MEMBER(rejection_text, REJECTION_SENDER_NO_MX) }, + { .max_strlen = 100 }, + FILTER_DECISION_UNDECIDED, + FILTER_GRACE_NONE, +@@ -2595,7 +2729,7 @@ int prepare_settings(int argc, char *arg + { "rejection-text-sender-not-local", required_argument, NULL, -1 }, + { .string_value = NULL }, + { .string_value = NULL }, +- { .get_string = CONFIG_ACCESSOR_STRING(rejection_text[REJECTION_SENDER_NOT_LOCAL]) }, ++ { .get_string = CONFIG_ACCESSOR_STRING_ARRAY_MEMBER(rejection_text, REJECTION_SENDER_NOT_LOCAL) }, + { .max_strlen = 100 }, + FILTER_DECISION_UNDECIDED, + FILTER_GRACE_NONE, +@@ -2612,7 +2746,7 @@ int prepare_settings(int argc, char *arg + { "rejection-text-smtp-auth-required", required_argument, NULL, -1 }, + { .string_value = NULL }, + { .string_value = NULL }, +- { .get_string = CONFIG_ACCESSOR_STRING(rejection_text[REJECTION_AUTH_REQUIRED]) }, ++ { .get_string = CONFIG_ACCESSOR_STRING_ARRAY_MEMBER(rejection_text, REJECTION_AUTH_REQUIRED) }, + { .max_strlen = 100 }, + FILTER_DECISION_UNDECIDED, + FILTER_GRACE_NONE, +@@ -2629,7 +2763,7 @@ int prepare_settings(int argc, char *arg + { "rejection-text-timeout", required_argument, NULL, -1 }, + { .string_value = NULL }, + { .string_value = NULL }, +- { .get_string = CONFIG_ACCESSOR_STRING(rejection_text[REJECTION_TIMEOUT]) }, ++ { .get_string = CONFIG_ACCESSOR_STRING_ARRAY_MEMBER(rejection_text, REJECTION_TIMEOUT) }, + { .max_strlen = 100 }, + FILTER_DECISION_UNDECIDED, + FILTER_GRACE_NONE, +@@ -2646,7 +2780,7 @@ int prepare_settings(int argc, char *arg + { "rejection-text-tls-failure", required_argument, NULL, -1 }, + { .string_value = NULL }, + { .string_value = NULL }, +- { .get_string = CONFIG_ACCESSOR_STRING(rejection_text[FAILURE_TLS]) }, ++ { .get_string = CONFIG_ACCESSOR_STRING_ARRAY_MEMBER(rejection_text, FAILURE_TLS) }, + { .max_strlen = 100 }, + FILTER_DECISION_UNDECIDED, + FILTER_GRACE_NONE, +@@ -2663,7 +2797,7 @@ int prepare_settings(int argc, char *arg + { "rejection-text-unresolvable-rdns", required_argument, NULL, -1 }, + { .string_value = NULL }, + { .string_value = NULL }, +- { .get_string = CONFIG_ACCESSOR_STRING(rejection_text[REJECTION_RDNS_RESOLVE]) }, ++ { .get_string = CONFIG_ACCESSOR_STRING_ARRAY_MEMBER(rejection_text, REJECTION_RDNS_RESOLVE) }, + { .max_strlen = 100 }, + FILTER_DECISION_UNDECIDED, + FILTER_GRACE_NONE, +@@ -2680,7 +2814,7 @@ int prepare_settings(int argc, char *arg + { "rejection-text-zero-recipients", required_argument, NULL, -1 }, + { .string_value = NULL }, + { .string_value = NULL }, +- { .get_string = CONFIG_ACCESSOR_STRING(rejection_text[REJECTION_ZERO_RECIPIENTS]) }, ++ { .get_string = CONFIG_ACCESSOR_STRING_ARRAY_MEMBER(rejection_text, REJECTION_ZERO_RECIPIENTS) }, + { .max_strlen = 100 }, + FILTER_DECISION_UNDECIDED, + FILTER_GRACE_NONE, +@@ -2888,7 +3022,7 @@ int prepare_settings(int argc, char *arg + FILTER_GRACE_NONE, + &config_test_noop, + NULL, +- CONFIG_ACTION(if (((current_settings->current_options->smtp_auth_level & SMTP_AUTH_SET_MASK) == SMTP_AUTH_SET_VALUE_UNSET) && (current_settings->current_options->smtp_auth_command != NULL) && (current_settings->current_options->smtp_auth_command[0] != NULL)) { current_settings->current_options->smtp_auth_level = SMTP_AUTH_LEVEL_VALUE_ON_DEMAND | SMTP_AUTH_SET_VALUE_SET; if (current_settings->current_options->filter_grace < FILTER_GRACE_AFTER_FROM) current_settings->current_options->filter_grace = FILTER_GRACE_AFTER_FROM; }), ++ CONFIG_ACTION(smtp_auth_verification, if (((current_settings->current_options->smtp_auth_level & SMTP_AUTH_SET_MASK) == SMTP_AUTH_SET_VALUE_UNSET) && (current_settings->current_options->smtp_auth_command != NULL) && (current_settings->current_options->smtp_auth_command[0] != NULL)) { current_settings->current_options->smtp_auth_level = SMTP_AUTH_LEVEL_VALUE_ON_DEMAND | SMTP_AUTH_SET_VALUE_SET; if (current_settings->current_options->filter_grace < FILTER_GRACE_AFTER_FROM) current_settings->current_options->filter_grace = FILTER_GRACE_AFTER_FROM; }), + "COMMAND", + "Perform SMTP AUTH verification using COMMAND. spamdyke will only advertise cleartext authentication methods (unless qmail has been patched to advertise encrypted methods)." + " If the authentication is valid, all filters will be bypassed. Most often, COMMAND is \"/bin/checkpassword /bin/true\". If \"smtp-auth-level\" is not given, \"smtp-auth-command\"" +@@ -2912,7 +3046,7 @@ int prepare_settings(int argc, char *arg + FILTER_GRACE_NONE, + &config_test_smtpauth, + NULL, +- CONFIG_ACTION(if (((current_settings->current_options->smtp_auth_level & SMTP_AUTH_LEVEL_MASK) != SMTP_AUTH_LEVEL_VALUE_NONE) && (current_settings->current_options->filter_grace < FILTER_GRACE_AFTER_FROM)) current_settings->current_options->filter_grace = FILTER_GRACE_AFTER_FROM), ++ CONFIG_ACTION(smtp_auth_level, if (((current_settings->current_options->smtp_auth_level & SMTP_AUTH_LEVEL_MASK) != SMTP_AUTH_LEVEL_VALUE_NONE) && (current_settings->current_options->filter_grace < FILTER_GRACE_AFTER_FROM)) current_settings->current_options->filter_grace = FILTER_GRACE_AFTER_FROM), + "LEVEL", + "Support SMTP AUTH at LEVEL. LEVEL must be one of: none = do not allow or support SMTP AUTH, even if qmail supports it; observe" + " = observe and honor authentication with qmail but qmail must offer it; ondemand = observe and honor authentication with qmail or offer and process" +@@ -3030,7 +3164,7 @@ int prepare_settings(int argc, char *arg + FILTER_DECISION_UNDECIDED, + FILTER_GRACE_NONE, + &config_test_tls_password, +- CONFIG_SET_ACTION(current_settings->current_options->strlen_tls_privatekey_password = (current_settings->current_options->tls_privatekey_password != NULL) ? strlen(current_settings->current_options->tls_privatekey_password) : 0), ++ CONFIG_SET_ACTION(strlen_tls_privatekey_password, current_settings->current_options->strlen_tls_privatekey_password = (current_settings->current_options->tls_privatekey_password != NULL) ? strlen(current_settings->current_options->tls_privatekey_password) : 0), + NULL, + "PASSWORD", + "Use PASSWORD to decrypt the SSL private key (from \"tls-certificate-file\" or \"tls-privatekey-file\"), if necessary. NOTE: this option reveals the password in the process list!" +@@ -3066,7 +3200,7 @@ int prepare_settings(int argc, char *arg + FILTER_DECISION_ERROR, + FILTER_GRACE_NONE, + NULL, +- CONFIG_SET_ACTION(usage(current_settings, USAGE_LEVEL_SHORT, NULL)), ++ CONFIG_SET_ACTION(usage_short, usage(current_settings, USAGE_LEVEL_SHORT, NULL)), + NULL, + NULL, + "Displays the version number and copyright statement, then exits." diff --git a/mail/spamdyke/patches/patch-configure b/mail/spamdyke/patches/patch-configure new file mode 100644 index 00000000000..dd7a850ef0f --- /dev/null +++ b/mail/spamdyke/patches/patch-configure @@ -0,0 +1,112 @@ +$NetBSD: patch-configure,v 1.1 2018/07/29 08:41:18 schmonz Exp $ + +Remove anonymous inner functions to build with clang. + +--- configure.orig 2018-07-08 21:13:24.635573514 +0000 ++++ configure +@@ -4389,105 +4389,6 @@ fi + + fi + +- +-# Checks for the flag to compile anonymous inner functions. +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether anonymous inner functions are supported by default" >&5 +-$as_echo_n "checking whether anonymous inner functions are supported by default... " >&6; } +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +- +-int +-main () +-{ +- int (*bar)(int) = ({ int tmp_action(int foo) { foo++; return(0); } &tmp_action; }); (*bar)(0); +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-$as_echo "yes" >&6; } +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +- OLD_CFLAGS=$CFLAGS +- CFLAGS="$OLD_CFLAGS -fnested-functions" +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether anonymous inner functions are supported with -fnested-functions" >&5 +-$as_echo_n "checking whether anonymous inner functions are supported with -fnested-functions... " >&6; } +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +- +-int +-main () +-{ +- int (*bar)(int) = ({ int tmp_action(int foo) { foo++; return(0); } &tmp_action; }); (*bar)(0); +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-$as_echo "yes" >&6; } +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +- CFLAGS="$OLD_CFLAGS -ftrampolines" +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether anonymous inner functions are supported with -ftrampolines" >&5 +-$as_echo_n "checking whether anonymous inner functions are supported with -ftrampolines... " >&6; } +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +- +-int +-main () +-{ +- int (*bar)(int) = ({ int tmp_action(int foo) { foo++; return(0); } &tmp_action; }); (*bar)(0); +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-$as_echo "yes" >&6; } +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +- CFLAGS="$OLD_CFLAGS -Wp,-Wno-trampolines" +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether anonymous inner functions are supported with -Wp,-Wno-trampolines" >&5 +-$as_echo_n "checking whether anonymous inner functions are supported with -Wp,-Wno-trampolines... " >&6; } +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +- +-int +-main () +-{ +- int (*bar)(int) = ({ int tmp_action(int foo) { foo++; return(0); } &tmp_action; }); (*bar)(0); +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-$as_echo "yes" >&6; } +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +-as_fn_error $? "Unable to compile without anonymous inner function support. +-See \`config.log' for more details" "$LINENO" 5; } +- +-fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- +-fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- +-fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- +-fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct option is defined in getopt.h" >&5 + $as_echo_n "checking whether struct option is defined in getopt.h... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext diff --git a/mail/spamdyke/patches/patch-configure.ac b/mail/spamdyke/patches/patch-configure.ac new file mode 100644 index 00000000000..3244e4f6b2a --- /dev/null +++ b/mail/spamdyke/patches/patch-configure.ac @@ -0,0 +1,44 @@ +$NetBSD: patch-configure.ac,v 1.1 2018/07/29 08:41:18 schmonz Exp $ + +Remove anonymous inner functions to build with clang. + +--- configure.ac.orig 2018-07-08 21:13:05.924307278 +0000 ++++ configure.ac +@@ -188,37 +188,6 @@ AC_SEARCH_LIBS([getopt_long], + [ AC_MSG_FAILURE([unable to compile without getopt_long(), you may need to install the libgnugetopt package/port]) ]) + ]) + +-# Checks for the flag to compile anonymous inner functions. +-AC_MSG_CHECKING([whether anonymous inner functions are supported by default]) +-AC_TRY_COMPILE([], +- [ int (*bar)(int) = ({ int tmp_action(int foo) { foo++; return(0); } &tmp_action; }); (*bar)(0); ], +- [ AC_MSG_RESULT([yes]) ], +- [ AC_MSG_RESULT([no]) +- OLD_CFLAGS=$CFLAGS +- CFLAGS="$OLD_CFLAGS -fnested-functions" +- AC_MSG_CHECKING([whether anonymous inner functions are supported with -fnested-functions]) +- AC_TRY_COMPILE([], +- [ int (*bar)(int) = ({ int tmp_action(int foo) { foo++; return(0); } &tmp_action; }); (*bar)(0); ], +- [ AC_MSG_RESULT([yes]) ], +- [ AC_MSG_RESULT([no]) +- CFLAGS="$OLD_CFLAGS -ftrampolines" +- AC_MSG_CHECKING([whether anonymous inner functions are supported with -ftrampolines]) +- AC_TRY_COMPILE([], +- [ int (*bar)(int) = ({ int tmp_action(int foo) { foo++; return(0); } &tmp_action; }); (*bar)(0); ], +- [ AC_MSG_RESULT([yes]) ], +- [ AC_MSG_RESULT([no]) +- CFLAGS="$OLD_CFLAGS -Wp,-Wno-trampolines" +- AC_MSG_CHECKING([whether anonymous inner functions are supported with -Wp,-Wno-trampolines]) +- AC_TRY_COMPILE([], +- [ int (*bar)(int) = ({ int tmp_action(int foo) { foo++; return(0); } &tmp_action; }); (*bar)(0); ], +- [ AC_MSG_RESULT([yes]) ], +- [ AC_MSG_RESULT([no]) +- AC_MSG_FAILURE([Unable to compile without anonymous inner function support.]) +- ]) +- ]) +- ]) +- ]) +- + AC_MSG_CHECKING([whether struct option is defined in getopt.h]) + AC_TRY_COMPILE([ #define _GNU_SOURCE + #include <stdio.h> diff --git a/mail/spamdyke/patches/patch-spamdyke.h b/mail/spamdyke/patches/patch-spamdyke.h index 7b96eed560b..04fdb11b3f1 100644 --- a/mail/spamdyke/patches/patch-spamdyke.h +++ b/mail/spamdyke/patches/patch-spamdyke.h @@ -1,6 +1,7 @@ -$NetBSD: patch-spamdyke.h,v 1.1 2017/07/09 16:16:32 schmonz Exp $ +$NetBSD: patch-spamdyke.h,v 1.2 2018/07/29 08:41:18 schmonz Exp $ Substitute paths. +Remove anonymous inner functions to build with clang. --- spamdyke.h.orig 2015-04-30 00:53:36.000000000 +0000 +++ spamdyke.h @@ -13,3 +14,28 @@ Substitute paths. #define DEFAULT_NIHDNS_RESOLVER_FILENAME "/etc/resolv.conf" #define DEFAULT_NIHDNS_PORT 53 #define DEFAULT_TIMEOUT_NIHDNS_TOTAL_SECS 30 +@@ -1524,11 +1524,19 @@ struct rejection_data + #define CONFIG_LOCATION_GLOBAL_FILE 0x02 + #define CONFIG_LOCATION_DIR 0x10 + +-#define CONFIG_SET_ACTION(CMD) ({ int action(struct filter_settings *current_settings, int current_return_value, char *input_value, struct previous_action *history) { CMD; return(current_return_value); } &action; }) +-#define CONFIG_ACTION(CMD) ({ int action(struct filter_settings *current_settings, int current_return_value) { CMD; return(current_return_value); } &action; }) +-#define CONFIG_ACCESSOR_INTEGER(MEMBER) ({ int *access_integer(struct option_set *current_options) { return(¤t_options->MEMBER); } &access_integer; }) +-#define CONFIG_ACCESSOR_STRING(MEMBER) ({ char **access_string(struct option_set *current_options, int current_options_only) { return(¤t_options->MEMBER); } &access_string; }) +-#define CONFIG_ACCESSOR_STRING_ARRAY(MEMBER) ({ char ***access_string_array(struct option_set *current_options, int current_options_only) { return(¤t_options->MEMBER); } &access_string_array; }) ++#define CONFIG_SET_ACTION_PREDEF(NAME, CMD) static int predef_set_action_ ## NAME(struct filter_settings *current_settings, int current_return_value, char *input_value, struct previous_action *history) { CMD; return(current_return_value); } ++#define CONFIG_ACTION_PREDEF(NAME, CMD) static int predef_action_ ## NAME(struct filter_settings *current_settings, int current_return_value) { CMD; return(current_return_value); } ++#define CONFIG_ACCESSOR_INTEGER_PREDEF(MEMBER) static int *predef_access_integer_ ## MEMBER(struct option_set *current_options) { return(¤t_options->MEMBER); } ++#define CONFIG_ACCESSOR_STRING_PREDEF(MEMBER) static char **predef_access_string_ ## MEMBER(struct option_set *current_options, int current_options_only) { return(¤t_options->MEMBER); } ++#define CONFIG_ACCESSOR_STRING_ARRAY_PREDEF(MEMBER) static char ***predef_access_string_array_ ## MEMBER(struct option_set *current_options, int current_options_only) { return(¤t_options->MEMBER); } ++#define CONFIG_ACCESSOR_STRING_ARRAY_MEMBER_PREDEF(ARRAY, MEMBER) static char **predef_access_string_ ## ARRAY ## _ ## MEMBER(struct option_set *current_options, int current_options_only) { return(¤t_options->ARRAY[MEMBER]); } ++ ++#define CONFIG_SET_ACTION(NAME, CMD) predef_set_action_ ## NAME ++#define CONFIG_ACTION(NAME, CMD) predef_action_ ## NAME ++#define CONFIG_ACCESSOR_INTEGER(MEMBER) predef_access_integer_ ## MEMBER ++#define CONFIG_ACCESSOR_STRING(MEMBER) predef_access_string_ ## MEMBER ++#define CONFIG_ACCESSOR_STRING_ARRAY(MEMBER) predef_access_string_array_ ## MEMBER ++#define CONFIG_ACCESSOR_STRING_ARRAY_MEMBER(ARRAY, MEMBER) predef_access_string_ ## ARRAY ## _ ## MEMBER + + #define ES_TYPE_NONE 0 + #define ES_TYPE_SEND 1 |