From 973ae30e7c4f7a1afb385dd3d8eeea178f981445 Mon Sep 17 00:00:00 2001 From: Jannis Hoffmann Date: Mon, 8 Jul 2024 13:24:39 +0200 Subject: fix deprecated prototypes --- src/meson.build | 124 +++++++++++++++++++++----------------------------------- 1 file changed, 47 insertions(+), 77 deletions(-) (limited to 'src/meson.build') diff --git a/src/meson.build b/src/meson.build index 8f9af12..6244403 100644 --- a/src/meson.build +++ b/src/meson.build @@ -1,64 +1,11 @@ -inc = 'include' - -subdir(inc) - -config = configuration_data() -cc = meson.get_compiler('c') - -if cc.has_member('struct sockaddr', 'sa_len', prefix : '#include ') - config.set('HASSALEN', true) -endif - -if cc.has_function('getspnam', prefix : '#include ') - config.set('HASGETSPNAM', true) -elif cc.has_function('getuserpw', prefix : '#include ') - config.set('HASGETUSERPW', true) -endif - -if cc.has_function('mkfifo', prefix : '#include ') - config.set('HASMKFIFO', true) -endif - -if cc.has_header('utmp.h') - config.set('HASUTMP', true) -endif - -if idn2_dep.found() - config.set('IDN2', true) -endif - -auto_qmail = run_command('head', '-n1', '../conf-home', check : true).stdout().strip() -config.set('auto_qmail', auto_qmail) - -config.set('auto_usera', 'alias') - -config.set('auto_split', get_option('split')) -config.set('auto_patrn', get_option('patrn')) -config.set('auto_spawn', get_option('spawn')) - -user_groups = [ - 'alias', 'qmaild', 'qmaill', 'qmailp', 'qmailq', 'qmailr', 'qmails', - 'sqmail', 'nofiles', -] - -foreach id : user_groups - config.set(id, get_option(id)) -endforeach - -configure_file( - configuration : config, - input : inc / 'fehsqm-config.h.in', - output : 'fehsqm-config.h', - install_dir : get_option('includedir') / sqmail_hdrs_subdir, - install_tag : 'devel') - -add_project_arguments('-DUSE_CONFIG', language : 'c') +subdir('include') auto_break = get_option('break') assert(auto_break[0] == auto_break) assert(auto_break not in ['"', '\\']) -auto_break_c = custom_target(output : 'auto_break.c', - command : ['echo', 'char', 'auto_break', '[]', '=', f'"@auto_break@"', ';'], +auto_break_c = custom_target( + output : 'auto_break.c', + command : ['echo', f'char auto_break[] = "@auto_break@";'], capture : true) @@ -98,14 +45,20 @@ if get_option('build-user') install : true, dependencies : qlibs_dep) - executable('qmail-newu', 'qmail-newu.c', dependencies : qlibs_dep, install : true) + executable('qmail-newu', 'qmail-newu.c', + include_directories : inc, + dependencies : qlibs_dep, + install : true) executable('qmail-pw2u', 'qmail-pw2u.c', 'constmap.c', 'control.c', auto_break_c, include_directories : inc, install : true, dependencies : qlibs_dep) - executable('qmail-newmrh', 'qmail-newmrh.c', dependencies : qlibs_dep, install : true) + executable('qmail-newmrh', 'qmail-newmrh.c', + include_directories : inc, + dependencies : qlibs_dep, + install : true) endif @@ -128,7 +81,7 @@ if get_option('build-server') dependencies : qlibs_dep) executable('qmail-smtpd', - 'qmail-smtpd.c', 'rcpthosts.c', 'commands.c', 'ipme.c', 'ipalloc.c', + 'qmail-smtpd.c', 'rcpthosts.c', 'commands.c', 'ipme.c', 'constmap.c', 'control.c', 'received.c', 'recipients.c', 'mfrules.c', 'tls_start.c', 'smtpdlog.c', 'dns.c', 'date822fmt.c', 'now.c', 'qmail.c', 'wildmat.c', 'spf.c', 'spfdnsip.c', 'base64.c', auto_break_c, @@ -155,7 +108,10 @@ if get_option('build-queue') link_with : datetime_slib, dependencies : qlibs_dep) - executable('qmail-tcpok', 'qmail-tcpok.c', dependencies : qlibs_dep, install : true) + executable('qmail-tcpok', 'qmail-tcpok.c', + include_directories : inc, + dependencies : qlibs_dep, + install : true) endif @@ -170,7 +126,7 @@ if get_option('build-pam') dependencies : [qlibs_dep, crypt_dep]) executable('qmail-smtpam', - 'qmail-smtpam.c', 'control.c', 'now.c', 'dns.c', 'constmap.c', 'ipalloc.c', + 'qmail-smtpam.c', 'control.c', 'now.c', 'dns.c', 'constmap.c', 'ipme.c', 'quote.c', 'tcpto.c', 'tls_timeoutio.c', 'tls_errors.c', 'tls_remote.c', 'dns_tlsa.c', include_directories : inc, @@ -202,16 +158,24 @@ endif if get_option('build-control') executable('qmail-badmimetypes', 'qmail-badmimetypes.c', + include_directories : inc, install : true, dependencies : qlibs_dep) executable('qmail-badloadertypes', 'qmail-badloadertypes.c', + include_directories : inc, install : true, dependencies : qlibs_dep) - executable('qmail-mfrules', 'qmail-mfrules.c', dependencies : qlibs_dep, install : true) + executable('qmail-mfrules', 'qmail-mfrules.c', + include_directories : inc, + dependencies : qlibs_dep, + install : true) - executable('qmail-recipients', 'qmail-recipients.c', dependencies : qlibs_dep, install : true) + executable('qmail-recipients', 'qmail-recipients.c', + include_directories : inc, + dependencies : qlibs_dep, + install : true) executable('qmail-showctl', 'qmail-showctl.c', 'control.c', auto_break_c, include_directories : inc, @@ -290,50 +254,50 @@ endif if get_option('build-dns') - executable('dnscname', 'dnscname.c', 'dns.c', 'ipalloc.c', + executable('dnscname', 'dnscname.c', 'dns.c', include_directories : inc, install : true, dependencies : [qlibs_dep, dnsresolv_dep]) - executable('dnsptr', 'dnsptr.c', 'dns.c', 'ipalloc.c', + executable('dnsptr', 'dnsptr.c', 'dns.c', include_directories : inc, install : true, dependencies : [qlibs_dep, dnsresolv_dep]) - executable('dnsip', 'dnsip.c', 'dns.c', 'ipalloc.c', + executable('dnsip', 'dnsip.c', 'dns.c', include_directories : inc, install : true, dependencies : [qlibs_dep, dnsresolv_dep]) - executable('dnsmxip', 'dnsmxip.c', 'ipalloc.c', 'dns.c', + executable('dnsmxip', 'dnsmxip.c', 'dns.c', include_directories : inc, install : true, dependencies : [qlibs_dep, dnsresolv_dep]) - executable('dnsfq', 'dnsfq.c', 'dns.c', 'ipalloc.c', + executable('dnsfq', 'dnsfq.c', 'dns.c', include_directories : inc, install : true, dependencies : [qlibs_dep, dnsresolv_dep]) - executable('dnstlsa', 'dnstlsa.c', 'dns_tlsa.c', 'ipalloc.c', 'dns.c', + executable('dnstlsa', 'dnstlsa.c', 'dns_tlsa.c', 'dns.c', include_directories : inc, install : true, dependencies : [qlibs_dep, dnsresolv_dep]) - executable('dnstxt', 'dnstxt.c', 'ipalloc.c', 'dns.c', + executable('dnstxt', 'dnstxt.c', 'dns.c', include_directories : inc, install : true, dependencies : [qlibs_dep, dnsresolv_dep]) executable('hostname', 'hostname.c', dependencies : [qlibs_dep, dnsresolv_dep], install : true) - executable('ipmeprint', 'ipmeprint.c', 'ipme.c', 'ipalloc.c', + executable('ipmeprint', 'ipmeprint.c', 'ipme.c', include_directories : inc, install : true, dependencies : [qlibs_dep, dnsresolv_dep]) executable('spfquery', - 'spfquery.c', 'spf.c', 'ipme.c', 'ipalloc.c', 'now.c', 'dns.c', 'spfdnsip.c', + 'spfquery.c', 'spf.c', 'ipme.c', 'now.c', 'dns.c', 'spfdnsip.c', include_directories : inc, install : true, link_with : datetime_slib, @@ -369,7 +333,7 @@ endif if get_option('build-clients') executable('qmail-remote', - 'qmail-remote.c', 'control.c', 'tcpto.c', 'now.c', 'dns.c', 'ipalloc.c', + 'qmail-remote.c', 'control.c', 'tcpto.c', 'now.c', 'dns.c', 'ipme.c', 'quote.c', 'tls_timeoutio.c', 'tls_errors.c', 'tls_remote.c', 'dns_tlsa.c', 'base64.c', 'constmap.c', 'md5c.c', 'hmac_md5.c', include_directories : inc, @@ -381,7 +345,10 @@ if get_option('build-clients') install : true, dependencies : qlibs_dep) - executable('sendmail', 'sendmail.c', dependencies : qlibs_dep, install : true) + executable('sendmail', 'sendmail.c', + include_directories : inc, + dependencies : qlibs_dep, + install : true) endif @@ -476,10 +443,13 @@ if get_option('build-base') install : true, dependencies : qlibs_dep) - executable('qmail-start', 'qmail-start.c', dependencies : qlibs_dep, install : true) + executable('qmail-start', 'qmail-start.c', + include_directories : inc, + dependencies : qlibs_dep, + install : true) executable('qmail-queue', - 'qmail-queue.c', 'triggerpull.c', 'fmtqfn.c', 'now.c', 'date822fmt.c', + 'qmail-queue.c', 'trigger.c', 'fmtqfn.c', 'now.c', 'date822fmt.c', include_directories : inc, install : true, link_with : datetime_slib, -- cgit v1.2.3