Merge ~ahasenack/ubuntu/+source/exim4:bionic-exim4-uninitialized-1786508 into ubuntu/+source/exim4:ubuntu/bionic-devel
- Git
- lp:~ahasenack/ubuntu/+source/exim4
- bionic-exim4-uninitialized-1786508
- Merge into ubuntu/bionic-devel
Proposed by
Andreas Hasenack
Status: | Merged |
---|---|
Approved by: | Christian Ehrhardt |
Approved revision: | 191ee014ec2b07202a9bef3f380612b14e4e3178 |
Merge reported by: | Christian Ehrhardt |
Merged at revision: | 191ee014ec2b07202a9bef3f380612b14e4e3178 |
Proposed branch: | ~ahasenack/ubuntu/+source/exim4:bionic-exim4-uninitialized-1786508 |
Merge into: | ubuntu/+source/exim4:ubuntu/bionic-devel |
Diff against target: |
304134 lines (+300414/-0) 620 files modified
Makefile (+115/-0) NOTICE (+152/-0) OS/Makefile-Base (+980/-0) OS/Makefile-Default (+321/-0) OS/Makefile-FreeBSD (+54/-0) OS/Makefile-Linux (+36/-0) OS/Makefile-OpenBSD (+28/-0) OS/Makefile-SunOS5 (+24/-0) OS/eximon.conf-Default (+41/-0) OS/os.Configuring (+215/-0) OS/os.c-FreeBSD (+24/-0) OS/os.c-Linux (+165/-0) OS/os.c-SunOS5 (+16/-0) OS/os.h-FreeBSD (+68/-0) OS/os.h-Linux (+88/-0) OS/os.h-OpenBSD (+56/-0) OS/os.h-SunOS5 (+51/-0) OS/unsupported/Makefile-AIX (+28/-0) OS/unsupported/Makefile-BSDI (+21/-0) OS/unsupported/Makefile-CYGWIN (+113/-0) OS/unsupported/Makefile-DGUX (+32/-0) OS/unsupported/Makefile-Darwin (+29/-0) OS/unsupported/Makefile-DragonFly (+31/-0) OS/unsupported/Makefile-GNU (+29/-0) OS/unsupported/Makefile-GNUkFreeBSD (+29/-0) OS/unsupported/Makefile-GNUkNetBSD (+29/-0) OS/unsupported/Makefile-HI-OSF (+8/-0) OS/unsupported/Makefile-HI-UX (+12/-0) OS/unsupported/Makefile-HP-UX (+27/-0) OS/unsupported/Makefile-HP-UX-9 (+15/-0) OS/unsupported/Makefile-IRIX (+12/-0) OS/unsupported/Makefile-IRIX6 (+13/-0) OS/unsupported/Makefile-IRIX632 (+16/-0) OS/unsupported/Makefile-IRIX65 (+16/-0) OS/unsupported/Makefile-NetBSD (+27/-0) OS/unsupported/Makefile-NetBSD-a.out (+24/-0) OS/unsupported/Makefile-OSF1 (+10/-0) OS/unsupported/Makefile-OpenUNIX (+17/-0) OS/unsupported/Makefile-QNX (+30/-0) OS/unsupported/Makefile-SCO (+28/-0) OS/unsupported/Makefile-SCO_SV (+34/-0) OS/unsupported/Makefile-SunOS4 (+16/-0) OS/unsupported/Makefile-SunOS5-hal (+18/-0) OS/unsupported/Makefile-ULTRIX (+18/-0) OS/unsupported/Makefile-UNIX_SV (+24/-0) OS/unsupported/Makefile-USG (+33/-0) OS/unsupported/Makefile-Unixware7 (+32/-0) OS/unsupported/Makefile-mips (+16/-0) OS/unsupported/README (+14/-0) OS/unsupported/os.c-BSDI (+19/-0) OS/unsupported/os.c-GNU (+55/-0) OS/unsupported/os.c-HI-OSF (+35/-0) OS/unsupported/os.c-HP-UX (+16/-0) OS/unsupported/os.c-IRIX (+118/-0) OS/unsupported/os.c-IRIX6 (+118/-0) OS/unsupported/os.c-IRIX632 (+118/-0) OS/unsupported/os.c-IRIX65 (+118/-0) OS/unsupported/os.c-OSF1 (+36/-0) OS/unsupported/os.c-cygwin (+531/-0) OS/unsupported/os.h-AIX (+27/-0) OS/unsupported/os.h-BSDI (+15/-0) OS/unsupported/os.h-DGUX (+28/-0) OS/unsupported/os.h-Darwin (+48/-0) OS/unsupported/os.h-DragonFly (+13/-0) OS/unsupported/os.h-GNU (+23/-0) OS/unsupported/os.h-GNUkFreeBSD (+25/-0) OS/unsupported/os.h-GNUkNetBSD (+25/-0) OS/unsupported/os.h-HI-OSF (+12/-0) OS/unsupported/os.h-HI-UX (+21/-0) OS/unsupported/os.h-HP-UX (+34/-0) OS/unsupported/os.h-HP-UX-9 (+23/-0) OS/unsupported/os.h-IRIX (+17/-0) OS/unsupported/os.h-IRIX6 (+16/-0) OS/unsupported/os.h-IRIX632 (+18/-0) OS/unsupported/os.h-IRIX65 (+16/-0) OS/unsupported/os.h-NetBSD (+28/-0) OS/unsupported/os.h-NetBSD-a.out (+5/-0) OS/unsupported/os.h-OSF1 (+16/-0) OS/unsupported/os.h-OpenUNIX (+19/-0) OS/unsupported/os.h-QNX (+24/-0) OS/unsupported/os.h-SCO (+21/-0) OS/unsupported/os.h-SCO_SV (+19/-0) OS/unsupported/os.h-SunOS4 (+39/-0) OS/unsupported/os.h-SunOS5-hal (+14/-0) OS/unsupported/os.h-ULTRIX (+18/-0) OS/unsupported/os.h-UNIX_SV (+25/-0) OS/unsupported/os.h-USG (+19/-0) OS/unsupported/os.h-Unixware7 (+18/-0) OS/unsupported/os.h-cygwin (+41/-0) OS/unsupported/os.h-mips (+27/-0) README (+349/-0) README.DSN (+141/-0) README.UPDATING (+790/-0) conf (+2/-0) debian/EDITME.exim4-heavy.diff (+158/-0) debian/EDITME.exim4-light.diff (+229/-0) debian/EDITME.eximon.diff (+10/-0) debian/EDITME.openssl.exim4-light.diff (+19/-0) debian/NEWS (+450/-0) debian/README.Debian.xml (+1961/-0) debian/TODO (+2/-0) debian/changelog (+5626/-0) debian/changelog.Debian.old (+1128/-0) debian/compat (+1/-0) debian/config-custom/create-custom-config-package (+71/-0) debian/config-custom/debian/compat (+1/-0) debian/config-custom/debian/control (+18/-0) debian/config-custom/debian/copyright (+15/-0) debian/config-custom/debian/install (+2/-0) debian/config-custom/debian/rules (+94/-0) debian/control (+251/-0) debian/copyright (+229/-0) debian/create-custom-package (+95/-0) debian/debconf/conf.d/acl/00_exim4-config_header (+8/-0) debian/debconf/conf.d/acl/20_exim4-config_local_deny_exceptions (+49/-0) debian/debconf/conf.d/acl/30_exim4-config_check_mail (+11/-0) debian/debconf/conf.d/acl/30_exim4-config_check_rcpt (+363/-0) debian/debconf/conf.d/acl/40_exim4-config_check_data (+84/-0) debian/debconf/conf.d/auth/00_exim4-config_header (+8/-0) debian/debconf/conf.d/auth/30_exim4-config_examples (+254/-0) debian/debconf/conf.d/main/01_exim4-config_listmacrosdefs (+101/-0) debian/debconf/conf.d/main/02_exim4-config_options (+218/-0) debian/debconf/conf.d/main/03_exim4-config_tlsoptions (+85/-0) debian/debconf/conf.d/main/90_exim4-config_log_selector (+10/-0) debian/debconf/conf.d/retry/00_exim4-config_header (+7/-0) debian/debconf/conf.d/retry/30_exim4-config (+19/-0) debian/debconf/conf.d/rewrite/00_exim4-config_header (+7/-0) debian/debconf/conf.d/rewrite/31_exim4-config_rewriting (+16/-0) debian/debconf/conf.d/router/00_exim4-config_header (+11/-0) debian/debconf/conf.d/router/100_exim4-config_domain_literal (+18/-0) debian/debconf/conf.d/router/150_exim4-config_hubbed_hosts (+18/-0) debian/debconf/conf.d/router/200_exim4-config_primary (+90/-0) debian/debconf/conf.d/router/300_exim4-config_real_local (+22/-0) debian/debconf/conf.d/router/400_exim4-config_system_aliases (+44/-0) debian/debconf/conf.d/router/500_exim4-config_hubuser (+31/-0) debian/debconf/conf.d/router/600_exim4-config_userforward (+51/-0) debian/debconf/conf.d/router/700_exim4-config_procmail (+15/-0) debian/debconf/conf.d/router/800_exim4-config_maildrop (+14/-0) debian/debconf/conf.d/router/850_exim4-config_lowuid (+29/-0) debian/debconf/conf.d/router/900_exim4-config_local_user (+15/-0) debian/debconf/conf.d/router/mmm_mail4root (+17/-0) debian/debconf/conf.d/transport/00_exim4-config_header (+13/-0) debian/debconf/conf.d/transport/10_exim4-config_transport-macros (+16/-0) debian/debconf/conf.d/transport/30_exim4-config_address_file (+11/-0) debian/debconf/conf.d/transport/30_exim4-config_address_pipe (+10/-0) debian/debconf/conf.d/transport/30_exim4-config_address_reply (+8/-0) debian/debconf/conf.d/transport/30_exim4-config_mail_spool (+17/-0) debian/debconf/conf.d/transport/30_exim4-config_maildir_home (+41/-0) debian/debconf/conf.d/transport/30_exim4-config_maildrop_pipe (+12/-0) debian/debconf/conf.d/transport/30_exim4-config_procmail_pipe (+10/-0) debian/debconf/conf.d/transport/30_exim4-config_remote_smtp (+53/-0) debian/debconf/conf.d/transport/30_exim4-config_remote_smtp_smarthost (+47/-0) debian/debconf/conf.d/transport/35_exim4-config_address_directory (+14/-0) debian/debconf/update-exim4.conf (+484/-0) debian/debconf/update-exim4.conf.template (+139/-0) debian/e-n-if-up (+37/-0) debian/email-addresses (+9/-0) debian/example.conf.md5 (+1/-0) debian/exim-adduser (+52/-0) debian/exim-gencert (+78/-0) debian/exim4-base.config (+15/-0) debian/exim4-base.cron.daily (+105/-0) debian/exim4-base.dirs (+5/-0) debian/exim4-base.doc-base.debian (+9/-0) debian/exim4-base.doc-base.filter (+8/-0) debian/exim4-base.doc-base.spec (+8/-0) debian/exim4-base.docs (+15/-0) debian/exim4-base.examples (+5/-0) debian/exim4-base.exim4-paniclog.logrotate (+10/-0) debian/exim4-base.exim4.init (+279/-0) debian/exim4-base.install (+3/-0) debian/exim4-base.links (+3/-0) debian/exim4-base.logrotate (+9/-0) debian/exim4-base.manpages (+12/-0) debian/exim4-base.postinst (+103/-0) debian/exim4-base.postrm (+65/-0) debian/exim4-base.preinst (+35/-0) debian/exim4-base.templates (+17/-0) debian/exim4-config.config (+820/-0) debian/exim4-config.dirs (+6/-0) debian/exim4-config.docs (+1/-0) debian/exim4-config.examples (+1/-0) debian/exim4-config.exim4.ppp.ip-up (+15/-0) debian/exim4-config.install (+3/-0) debian/exim4-config.links (+15/-0) debian/exim4-config.lintian-overrides (+1/-0) debian/exim4-config.manpages (+4/-0) debian/exim4-config.postinst (+408/-0) debian/exim4-config.postrm (+30/-0) debian/exim4-config.preinst (+39/-0) debian/exim4-config.templates (+196/-0) debian/exim4-daemon-custom.dirs (+3/-0) debian/exim4-daemon-custom.docs (+1/-0) debian/exim4-daemon-custom.install (+1/-0) debian/exim4-daemon-custom.links (+18/-0) debian/exim4-daemon-heavy.config (+17/-0) debian/exim4-daemon-heavy.dirs (+4/-0) debian/exim4-daemon-heavy.docs (+1/-0) debian/exim4-daemon-heavy.install (+1/-0) debian/exim4-daemon-heavy.links (+18/-0) debian/exim4-daemon-heavy.lintian-overrides (+2/-0) debian/exim4-daemon-heavy.templates (+5/-0) debian/exim4-daemon-light.config (+17/-0) debian/exim4-daemon-light.dirs (+3/-0) debian/exim4-daemon-light.docs (+1/-0) debian/exim4-daemon-light.install (+1/-0) debian/exim4-daemon-light.links (+18/-0) debian/exim4-daemon-light.lintian-overrides (+1/-0) debian/exim4-daemon-light.postinst (+60/-0) debian/exim4-daemon-light.prerm (+33/-0) debian/exim4-daemon-light.templates (+5/-0) debian/exim4-dev.install (+4/-0) debian/exim4-dev.links (+2/-0) debian/exim4-dev.manpages (+1/-0) debian/exim4-localscan-plugin-config (+12/-0) debian/exim4-localscan-plugin-config.1 (+40/-0) debian/exim4-localscan-plugin-config.1.xml (+82/-0) debian/exim4.config (+17/-0) debian/exim4.install (+1/-0) debian/exim4.links (+1/-0) debian/exim4.postinst (+14/-0) debian/exim4.templates (+5/-0) debian/exim4_refresh_gnutls-params (+52/-0) debian/eximon4.dirs (+2/-0) debian/eximon4.links (+1/-0) debian/eximon4.manpages (+1/-0) debian/eximonconf-patch (+7/-0) debian/gnutls-params-2048 (+31/-0) debian/lynx-dump-postprocess (+49/-0) debian/manpages/exicyclog.8 (+75/-0) debian/manpages/exigrep.8 (+70/-0) debian/manpages/exim4-config_files.5 (+364/-0) debian/manpages/exim_checkaccess.8 (+80/-0) debian/manpages/exim_convert4r4.8 (+73/-0) debian/manpages/exim_db.8 (+193/-0) debian/manpages/exim_dbmbuild.8 (+105/-0) debian/manpages/exim_lock.8 (+137/-0) debian/manpages/eximon.8 (+50/-0) debian/manpages/exinext.8 (+73/-0) debian/manpages/exiqgrep.8 (+88/-0) debian/manpages/exiqsumm.8 (+74/-0) debian/manpages/exiwhat.8 (+102/-0) debian/manpages/update-exim4.conf.8 (+346/-0) debian/manpages/update-exim4.conf.template.8 (+92/-0) debian/manpages/update-exim4defaults.8 (+173/-0) debian/minimaltest (+87/-0) debian/mtalist (+1/-0) debian/passwd.client (+7/-0) debian/patches/31_eximmanpage.dpatch (+250/-0) debian/patches/32_exim4.dpatch (+106/-0) debian/patches/33_eximon.binary.dpatch (+18/-0) debian/patches/34_eximstatsmanpage.dpatch (+20/-0) debian/patches/35_install.dpatch (+49/-0) debian/patches/50_localscan_dlopen.dpatch (+280/-0) debian/patches/60_convert4r4.dpatch (+41/-0) debian/patches/67_unnecessaryCopt.diff (+69/-0) debian/patches/70_remove_exim-users_references.dpatch (+40/-0) debian/patches/eximstats_unitialized_value.patch (+20/-0) debian/patches/fix_smtp_banner.patch (+52/-0) debian/patches/series (+11/-0) debian/po/POTFILES.in (+5/-0) debian/po/ar.po (+627/-0) debian/po/ast.po (+645/-0) debian/po/be.po (+636/-0) debian/po/bg.po (+809/-0) debian/po/bn.po (+614/-0) debian/po/bs.po (+812/-0) debian/po/ca.po (+826/-0) debian/po/cs.po (+685/-0) debian/po/cy.po (+765/-0) debian/po/da.po (+650/-0) debian/po/de.po (+690/-0) debian/po/dz.po (+814/-0) debian/po/el.po (+668/-0) debian/po/eo.po (+631/-0) debian/po/es.po (+936/-0) debian/po/et.po (+751/-0) debian/po/eu.po (+657/-0) debian/po/fi.po (+939/-0) debian/po/fr.po (+682/-0) debian/po/gl.po (+788/-0) debian/po/he.po (+617/-0) debian/po/hr.po (+618/-0) debian/po/hu.po (+880/-0) debian/po/id.po (+830/-0) debian/po/it.po (+628/-0) debian/po/ja.po (+627/-0) debian/po/kk.po (+610/-0) debian/po/km.po (+627/-0) debian/po/ko.po (+782/-0) debian/po/lt.po (+661/-0) debian/po/mk.po (+770/-0) debian/po/ml.po (+631/-0) debian/po/mr.po (+759/-0) debian/po/nb.po (+663/-0) debian/po/ne.po (+611/-0) debian/po/nl.po (+687/-0) debian/po/nn.po (+660/-0) debian/po/pa.po (+609/-0) debian/po/pl.po (+636/-0) debian/po/pt.po (+888/-0) debian/po/pt_BR.po (+673/-0) debian/po/ro.po (+861/-0) debian/po/ru.po (+644/-0) debian/po/sk.po (+638/-0) debian/po/sl.po (+832/-0) debian/po/sq.po (+813/-0) debian/po/sv.po (+747/-0) debian/po/ta.po (+628/-0) debian/po/templates.pot (+518/-0) debian/po/th.po (+752/-0) debian/po/tl.po (+772/-0) debian/po/tr.po (+640/-0) debian/po/uk.po (+682/-0) debian/po/vi.po (+628/-0) debian/po/wo.po (+652/-0) debian/po/zh_CN.po (+602/-0) debian/po/zh_TW.po (+637/-0) debian/rules (+295/-0) debian/script (+28/-0) debian/source/format (+1/-0) debian/syslog2eximlog (+60/-0) debian/tests/CVE-2010-4344.py (+143/-0) debian/tests/control (+3/-0) debian/tests/daemon (+13/-0) debian/tests/security (+6/-0) debian/update-exim4defaults (+284/-0) debian/upstream/signing-key.asc (+777/-0) debian/watch (+3/-0) doc/ChangeLog (+7030/-0) doc/DANE-draft-notes (+11/-0) doc/Exim3.upgrade (+671/-0) doc/Exim4.upgrade (+1730/-0) doc/GnuTLS-FAQ.txt (+410/-0) doc/NewStuff (+1198/-0) doc/OptionLists.txt (+1049/-0) doc/README (+65/-0) doc/README.SIEVE (+343/-0) doc/cve-2016-9663 (+95/-0) doc/dbm.discuss.txt (+320/-0) doc/exim.8 (+1701/-0) doc/experimental-spec.txt (+1080/-0) doc/filter.txt (+1724/-0) doc/openssl.txt (+117/-0) doc/spec.txt (+36673/-0) exim_monitor/EDITME (+179/-0) exim_monitor/em_StripChart.c (+504/-0) exim_monitor/em_TextPop.c (+767/-0) exim_monitor/em_globals.c (+243/-0) exim_monitor/em_hdr.h (+329/-0) exim_monitor/em_init.c (+237/-0) exim_monitor/em_log.c (+410/-0) exim_monitor/em_main.c (+944/-0) exim_monitor/em_menu.c (+994/-0) exim_monitor/em_queue.c (+830/-0) exim_monitor/em_strip.c (+266/-0) exim_monitor/em_text.c (+73/-0) exim_monitor/em_version.c (+50/-0) exim_monitor/em_xs.c (+45/-0) scripts/Configure (+10/-0) scripts/Configure-Makefile (+339/-0) scripts/Configure-config.h (+60/-0) scripts/Configure-eximon (+51/-0) scripts/Configure-os.c (+30/-0) scripts/Configure-os.h (+51/-0) scripts/MakeLinks (+132/-0) scripts/arch-type (+74/-0) scripts/exim_install (+472/-0) scripts/lookups-Makefile (+194/-0) scripts/newer (+21/-0) scripts/os-type (+164/-0) scripts/reversion (+124/-0) scripts/source_checks (+52/-0) src/EDITME (+1415/-0) src/acl.c (+4570/-0) src/aliases.default (+40/-0) src/auths/Makefile (+45/-0) src/auths/README (+98/-0) src/auths/auth-spa.c (+1534/-0) src/auths/auth-spa.h (+92/-0) src/auths/call_pam.c (+205/-0) src/auths/call_pwcheck.c (+120/-0) src/auths/call_radius.c (+237/-0) src/auths/check_serv_cond.c (+130/-0) src/auths/cram_md5.c (+362/-0) src/auths/cram_md5.h (+32/-0) src/auths/cyrus_sasl.c (+545/-0) src/auths/cyrus_sasl.h (+36/-0) src/auths/dovecot.c (+513/-0) src/auths/dovecot.h (+28/-0) src/auths/get_data.c (+47/-0) src/auths/get_no64_data.c (+47/-0) src/auths/gsasl_exim.c (+634/-0) src/auths/gsasl_exim.h (+42/-0) src/auths/heimdal_gssapi.c (+610/-0) src/auths/heimdal_gssapi.h (+39/-0) src/auths/md5.c (+357/-0) src/auths/plaintext.c (+310/-0) src/auths/plaintext.h (+32/-0) src/auths/pwcheck.c (+453/-0) src/auths/pwcheck.h (+27/-0) src/auths/spa.c (+377/-0) src/auths/spa.h (+39/-0) src/auths/tls.c (+94/-0) src/auths/tls.h (+30/-0) src/auths/xtextdecode.c (+57/-0) src/auths/xtextencode.c (+57/-0) src/base64.c (+289/-0) src/blob.h (+15/-0) src/bmi_spam.c (+470/-0) src/bmi_spam.h (+22/-0) src/buildconfig.c (+965/-0) src/child.c (+520/-0) src/config.h.defaults (+211/-0) src/configure.default (+869/-0) src/convert4r3.src (+1382/-0) src/convert4r4.src (+2527/-0) src/crypt16.c (+77/-0) src/daemon.c (+2112/-0) src/dane-gnu.c (+21/-0) src/dane-openssl.c (+1721/-0) src/dane.c (+50/-0) src/danessl.h (+47/-0) src/dbfn.c (+700/-0) src/dbfunctions.h (+33/-0) src/dbstuff.h (+786/-0) src/dcc.c (+512/-0) src/dcc.h (+16/-0) src/debug.c (+271/-0) src/deliver.c (+8592/-0) src/directory.c (+96/-0) src/dkim.c (+763/-0) src/dkim.h (+32/-0) src/dkim_transport.c (+377/-0) src/dmarc.c (+638/-0) src/dmarc.h (+61/-0) src/dns.c (+1228/-0) src/drtables.c (+728/-0) src/dummies.c (+148/-0) src/enq.c (+122/-0) src/environment.c (+72/-0) src/exicyclog.src (+350/-0) src/exigrep.src (+374/-0) src/exim.c (+5850/-0) src/exim.h (+607/-0) src/exim_checkaccess.src (+181/-0) src/exim_dbmbuild.c (+510/-0) src/exim_dbutil.c (+1358/-0) src/exim_lock.c (+664/-0) src/eximon.src (+221/-0) src/eximstats.src (+4246/-0) src/exinext.src (+262/-0) src/exipick.src (+1845/-0) src/exiqgrep.src (+209/-0) src/exiqsumm.src (+178/-0) src/exiwhat.src (+142/-0) src/expand.c (+7998/-0) src/filter.c (+2601/-0) src/filtertest.c (+281/-0) src/functions.h (+546/-0) src/globals.c (+1558/-0) src/globals.h (+984/-0) src/hash.c (+821/-0) src/hash.h (+79/-0) src/header.c (+463/-0) src/host.c (+3360/-0) src/imap_utf7.c (+211/-0) src/ip.c (+806/-0) src/local_scan.c (+64/-0) src/local_scan.h (+195/-0) src/log.c (+1446/-0) src/lookupapi.h (+60/-0) src/lookups/Makefile (+71/-0) src/lookups/README (+175/-0) src/lookups/cdb.c (+513/-0) src/lookups/dbmdb.c (+287/-0) src/lookups/dnsdb.c (+611/-0) src/lookups/dsearch.c (+157/-0) src/lookups/ibase.c (+585/-0) src/lookups/ldap.c (+1684/-0) src/lookups/ldap.h (+13/-0) src/lookups/lf_check_file.c (+113/-0) src/lookups/lf_functions.h (+18/-0) src/lookups/lf_quote.c (+64/-0) src/lookups/lf_sqlperform.c (+138/-0) src/lookups/lmdb.c (+160/-0) src/lookups/lsearch.c (+484/-0) src/lookups/mysql.c (+505/-0) src/lookups/nis.c (+137/-0) src/lookups/nisplus.c (+293/-0) src/lookups/oracle.c (+631/-0) src/lookups/passwd.c (+90/-0) src/lookups/pgsql.c (+510/-0) src/lookups/redis.c (+458/-0) src/lookups/spf.c (+121/-0) src/lookups/sqlite.c (+187/-0) src/lookups/testdb.c (+103/-0) src/lookups/whoson.c (+101/-0) src/lss.c (+142/-0) src/macro_predef.c (+296/-0) src/macro_predef.h (+20/-0) src/macros.h (+995/-0) src/malware.c (+2123/-0) src/match.c (+1344/-0) src/memcheck.h (+277/-0) src/mime.c (+811/-0) src/mime.h (+44/-0) src/moan.c (+773/-0) src/mytypes.h (+120/-0) src/os.c (+970/-0) src/osfunctions.h (+42/-0) src/parse.c (+2241/-0) src/pdkim/Makefile (+19/-0) src/pdkim/README (+9/-0) src/pdkim/config.h (+4/-0) src/pdkim/crypt_ver.h (+26/-0) src/pdkim/pdkim.c (+1838/-0) src/pdkim/pdkim.h (+323/-0) src/pdkim/pdkim_hash.h (+38/-0) src/pdkim/signing.c (+715/-0) src/pdkim/signing.h (+83/-0) src/perl.c (+197/-0) src/queue.c (+1452/-0) src/rda.c (+1002/-0) src/readconf.c (+4528/-0) src/receive.c (+4370/-0) src/regex.c (+211/-0) src/retry.c (+932/-0) src/rewrite.c (+833/-0) src/rfc2047.c (+352/-0) src/route.c (+1931/-0) src/routers/Makefile (+43/-0) src/routers/README (+57/-0) src/routers/accept.c (+141/-0) src/routers/accept.h (+31/-0) src/routers/dnslookup.c (+468/-0) src/routers/dnslookup.h (+40/-0) src/routers/ipliteral.c (+205/-0) src/routers/ipliteral.h (+34/-0) src/routers/iplookup.c (+420/-0) src/routers/iplookup.h (+41/-0) src/routers/manualroute.c (+493/-0) src/routers/manualroute.h (+39/-0) src/routers/queryprogram.c (+559/-0) src/routers/queryprogram.h (+40/-0) src/routers/redirect.c (+941/-0) src/routers/redirect.h (+77/-0) src/routers/rf_change_domain.c (+85/-0) src/routers/rf_expand_data.c (+48/-0) src/routers/rf_functions.h (+31/-0) src/routers/rf_get_errors_address.c (+131/-0) src/routers/rf_get_munge_headers.c (+121/-0) src/routers/rf_get_transport.c (+90/-0) src/routers/rf_get_ugid.c (+80/-0) src/routers/rf_lookup_hostlist.c (+252/-0) src/routers/rf_queue_add.c (+108/-0) src/routers/rf_self_action.c (+141/-0) src/routers/rf_set_ugid.c (+44/-0) src/search.c (+828/-0) src/setenv.c (+59/-0) src/sha_ver.h (+42/-0) src/sieve.c (+3677/-0) src/smtp_in.c (+5752/-0) src/smtp_out.c (+699/-0) src/spam.c (+650/-0) src/spam.h (+38/-0) src/spf.c (+142/-0) src/spf.h (+35/-0) src/spool_in.c (+950/-0) src/spool_mbox.c (+247/-0) src/spool_out.c (+531/-0) src/srs.c (+230/-0) src/srs.h (+29/-0) src/std-crypto.c (+1022/-0) src/store.c (+580/-0) src/store.h (+53/-0) src/string.c (+1720/-0) src/structs.h (+884/-0) src/tls-gnu.c (+2635/-0) src/tls-openssl.c (+3127/-0) src/tls.c (+361/-0) src/tlscert-gnu.c (+485/-0) src/tlscert-openssl.c (+532/-0) src/tod.c (+225/-0) src/transport-filter.src (+93/-0) src/transport.c (+2281/-0) src/transports/Makefile (+27/-0) src/transports/README (+41/-0) src/transports/appendfile.c (+3425/-0) src/transports/appendfile.h (+99/-0) src/transports/autoreply.c (+883/-0) src/transports/autoreply.h (+45/-0) src/transports/lmtp.c (+806/-0) src/transports/lmtp.h (+32/-0) src/transports/pipe.c (+1167/-0) src/transports/pipe.h (+51/-0) src/transports/queuefile.c (+272/-0) src/transports/queuefile.h (+29/-0) src/transports/smtp.c (+4688/-0) src/transports/smtp.h (+187/-0) src/transports/smtp_socks.c (+420/-0) src/transports/tf_maildir.c (+600/-0) src/transports/tf_maildir.h (+20/-0) src/tree.c (+365/-0) src/utf8.c (+273/-0) src/valgrind.h (+4797/-0) src/verify.c (+3865/-0) src/version.c (+68/-0) src/version.sh (+4/-0) util/.gitignore (+2/-0) util/README (+40/-0) util/chunking_fixqueue_finalnewlines.pl (+160/-0) util/cramtest.pl (+60/-0) util/gen_pkcs3.c (+266/-0) util/logargs.sh (+26/-0) util/mkcdb.pl (+93/-0) util/ocsp_fetch.pl (+84/-0) util/proxy_protocol_client.pl (+251/-0) util/ratelimit.pl (+159/-0) util/unknownuser.sh (+32/-0) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Christian Ehrhardt (community) | Approve | ||
Canonical Server packageset reviewers | Pending | ||
Review via email: mp+356437@code.launchpad.net |
Commit message
Description of the change
The launchpad diff is incorrect, please use git for the review.
Fix a warning in the eximstats tool that could become really annoying when the daily cron job is configured to send out a statistics report.
Bileto ticket: https:/
PPA: ppa:ci-
The bug has been updated with the SRU template and has detailed testing instructions.
To post a comment you must log in.
Revision history for this message
Andreas Hasenack (ahasenack) wrote : | # |
Thanks, tagged and uploaded.
Revision history for this message
Christian Ehrhardt (paelzer) wrote : | # |
This is in binic-updates, setting MP to merged state
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | diff --git a/Makefile b/Makefile | |||
2 | 0 | new file mode 100644 | 0 | new file mode 100644 |
3 | index 0000000..9583062 | |||
4 | --- /dev/null | |||
5 | +++ b/Makefile | |||
6 | @@ -0,0 +1,115 @@ | |||
7 | 1 | # Top-level makefile for Exim; handles creating a build directory with | ||
8 | 2 | # appropriate links, and then creating and running the main makefile in that | ||
9 | 3 | # directory. | ||
10 | 4 | |||
11 | 5 | # Copyright (c) University of Cambridge, 1995 - 2017 | ||
12 | 6 | # See the file NOTICE for conditions of use and distribution. | ||
13 | 7 | |||
14 | 8 | # IRIX make uses the shell that is in the SHELL variable, which often defaults | ||
15 | 9 | # to csh, so put this in to make it use the Bourne shell. In systems where | ||
16 | 10 | # /bin/sh is not a Bourne-compatible shell, this line will have to be edited, | ||
17 | 11 | # or "make" must be called with a different SHELL= setting. | ||
18 | 12 | |||
19 | 13 | SHELL=/bin/sh | ||
20 | 14 | RM_COMMAND=/bin/rm | ||
21 | 15 | |||
22 | 16 | # If a build name has not been specified by running this make file via a | ||
23 | 17 | # command of the form "make build=xxxx", then determine the name of the | ||
24 | 18 | # operating system and the machine architecture and use that. This does not | ||
25 | 19 | # provide an override for the OS type and architecture type; they still have | ||
26 | 20 | # to be used for the OS-specific files. To override them, you can set the | ||
27 | 21 | # shell variables OSTYPE and ARCHTYPE when running make. | ||
28 | 22 | # | ||
29 | 23 | # EXIM_BUILD_SUFFIX should be used to enable parallel builds on a file | ||
30 | 24 | # system shared among different Linux distros (same os-type, same | ||
31 | 25 | # arch-type). The ../test/runtest script is expected to honour the | ||
32 | 26 | # EXIM_BUILD_SUFFIX when searching the Exim binary. | ||
33 | 27 | # NOTE: EXIM_BUILD_SUFFIX is considered *experimental*. | ||
34 | 28 | |||
35 | 29 | buildname=$${build:-`$(SHELL) scripts/os-type`-`$(SHELL) scripts/arch-type`}$${EXIM_BUILD_SUFFIX:+.$$EXIM_BUILD_SUFFIX} | ||
36 | 30 | |||
37 | 31 | # The default target checks for the existence of Local/Makefile, that the main | ||
38 | 32 | # makefile is built and up-to-date, and then it runs it. | ||
39 | 33 | |||
40 | 34 | all: Local/Makefile configure | ||
41 | 35 | @cd build-$(buildname); $(MAKE) SHELL=$(SHELL) $(MFLAGS) | ||
42 | 36 | |||
43 | 37 | |||
44 | 38 | # This pair for the convenience of of the Debian maintainers | ||
45 | 39 | exim: Local/Makefile configure | ||
46 | 40 | @cd build-$(buildname); $(MAKE) SHELL=$(SHELL) $(MFLAGS) exim | ||
47 | 41 | utils: Local/Makefile configure | ||
48 | 42 | @cd build-$(buildname); $(MAKE) SHELL=$(SHELL) $(MFLAGS) utils | ||
49 | 43 | |||
50 | 44 | |||
51 | 45 | Local/Makefile: | ||
52 | 46 | @echo "" | ||
53 | 47 | @echo "*** Please create Local/Makefile by copying src/EDITME and making" | ||
54 | 48 | @echo "*** appropriate changes for your site." | ||
55 | 49 | @echo "" | ||
56 | 50 | @test ! -d Local && mkdir Local | ||
57 | 51 | @false | ||
58 | 52 | |||
59 | 53 | # This is separated off so that "make build-directory" can be obeyed on | ||
60 | 54 | # its own if necessary. | ||
61 | 55 | |||
62 | 56 | build-directory: | ||
63 | 57 | @builddir=build-$(buildname); \ | ||
64 | 58 | case "$$builddir" in *UnKnown*) exit 1;; esac; \ | ||
65 | 59 | $(SHELL) -c "test -d $$builddir -a -r $$builddir/version.c || \ | ||
66 | 60 | (mkdir $$builddir; cd $$builddir; $(SHELL) ../scripts/MakeLinks)"; | ||
67 | 61 | |||
68 | 62 | checks: | ||
69 | 63 | $(SHELL) scripts/source_checks | ||
70 | 64 | |||
71 | 65 | # The "configure" target ensures that the build directory exists, then arranges | ||
72 | 66 | # to build the main makefile from inside the build directory, by calling the | ||
73 | 67 | # Configure-Makefile script. This does its own dependency checking because of | ||
74 | 68 | # the optional files. | ||
75 | 69 | |||
76 | 70 | configure: checks build-directory | ||
77 | 71 | @cd build-$(buildname); \ | ||
78 | 72 | build=$(build) $(SHELL) ../scripts/Configure-Makefile | ||
79 | 73 | |||
80 | 74 | # The "makefile" target forces a rebuild of the makefile (as opposed to | ||
81 | 75 | # "configure", which doesn't force it). | ||
82 | 76 | |||
83 | 77 | makefile: build-directory | ||
84 | 78 | @cd build-$(buildname); $(RM_COMMAND) -f Makefile; \ | ||
85 | 79 | build=$(build) $(SHELL) ../scripts/Configure-Makefile | ||
86 | 80 | |||
87 | 81 | # The installation commands are kept in a separate script, which expects | ||
88 | 82 | # to be run from inside the build directory. | ||
89 | 83 | |||
90 | 84 | install: all | ||
91 | 85 | @cd build-$(buildname); \ | ||
92 | 86 | build=$(build) $(SHELL) ../scripts/exim_install $(INSTALL_ARG) | ||
93 | 87 | |||
94 | 88 | # Tidy-up targets | ||
95 | 89 | |||
96 | 90 | clean:; @echo ""; echo '*** "make clean" just removes all .o and .a files' | ||
97 | 91 | @echo '*** Use "make makefile" to force a rebuild of the makefile' | ||
98 | 92 | @echo "" | ||
99 | 93 | cd build-$(buildname); \ | ||
100 | 94 | $(RM_COMMAND) -f *.o lookups/*.o lookups/*.a auths/*.o auths/*.a \ | ||
101 | 95 | routers/*.o routers/*.a transports/*.o transports/*.a \ | ||
102 | 96 | pdkim/*.o pdkim/*.a | ||
103 | 97 | |||
104 | 98 | clean_exim:; cd build-$(buildname); \ | ||
105 | 99 | $(RM_COMMAND) -f *.o lookups/*.o lookups/*.a auths/*.o auths/*.a \ | ||
106 | 100 | routers/*.o routers/*.a transports/*.o transports/*.a lookups/*.so | ||
107 | 101 | |||
108 | 102 | distclean:; $(RM_COMMAND) -rf build-* cscope* | ||
109 | 103 | |||
110 | 104 | cscope.files: FRC | ||
111 | 105 | echo "-q" > $@ | ||
112 | 106 | echo "-p3" >> $@ | ||
113 | 107 | find src Local OS exim_monitor -name "*.[cshyl]" -print \ | ||
114 | 108 | -o -name "os.[ch]*" -print \ | ||
115 | 109 | -o -name "*akefile*" -print \ | ||
116 | 110 | -o -name config.h.defaults -print \ | ||
117 | 111 | -o -name EDITME -print >> $@ | ||
118 | 112 | |||
119 | 113 | FRC: | ||
120 | 114 | |||
121 | 115 | # End of top-level makefile | ||
122 | diff --git a/NOTICE b/NOTICE | |||
123 | 0 | new file mode 100644 | 116 | new file mode 100644 |
124 | index 0000000..b4a5c40 | |||
125 | --- /dev/null | |||
126 | +++ b/NOTICE | |||
127 | @@ -0,0 +1,152 @@ | |||
128 | 1 | THE EXIM MAIL TRANSFER AGENT | ||
129 | 2 | ---------------------------- | ||
130 | 3 | |||
131 | 4 | Copyright (c) 2004 University of Cambridge | ||
132 | 5 | |||
133 | 6 | This program is free software; you can redistribute it and/or modify | ||
134 | 7 | it under the terms of the GNU General Public License as published by | ||
135 | 8 | the Free Software Foundation; either version 2 of the License, or | ||
136 | 9 | (at your option) any later version. | ||
137 | 10 | |||
138 | 11 | In addition, for the avoidance of any doubt, permission is granted to | ||
139 | 12 | link this program with OpenSSL or any other library package and to | ||
140 | 13 | (re)distribute the binaries produced as the result of such linking. | ||
141 | 14 | |||
142 | 15 | This program is distributed in the hope that it will be useful, | ||
143 | 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
144 | 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
145 | 18 | GNU General Public License for more details. | ||
146 | 19 | |||
147 | 20 | You should have received a copy of the GNU General Public License | ||
148 | 21 | along with this program; if not, write to the Free Software | ||
149 | 22 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
150 | 23 | |||
151 | 24 | |||
152 | 25 | UNSOLICITED EMAIL | ||
153 | 26 | ----------------- | ||
154 | 27 | |||
155 | 28 | The use, supply or promotion of Exim for the purpose of sending bulk, | ||
156 | 29 | unsolicited electronic mail is incompatible with the basic aims of the program, | ||
157 | 30 | which revolve around the free provision of a service that enhances the quality | ||
158 | 31 | of personal communications. The author of Exim regards indiscriminate | ||
159 | 32 | mass-mailing as an antisocial, irresponsible abuse of the Internet. | ||
160 | 33 | |||
161 | 34 | |||
162 | 35 | INCORPORATED CODE | ||
163 | 36 | ----------------- | ||
164 | 37 | |||
165 | 38 | A number of pieces of external code are included in the Exim distribution. | ||
166 | 39 | |||
167 | 40 | . Support for the cdb (Constant DataBase) lookup method is provided by code | ||
168 | 41 | contributed by Nigel Metheringham of Planet Online Ltd. which contains | ||
169 | 42 | the following statements: | ||
170 | 43 | _________________________________________________________________________ | ||
171 | 44 | |||
172 | 45 | Copyright (c) 1998 Nigel Metheringham, Planet Online Ltd | ||
173 | 46 | |||
174 | 47 | This program is free software; you can redistribute it and/or modify it | ||
175 | 48 | under the terms of the GNU General Public License as published by the | ||
176 | 49 | Free Software Foundation; either version 2 of the License, or (at your | ||
177 | 50 | option) any later version. | ||
178 | 51 | |||
179 | 52 | This code implements Dan Bernstein's Constant DataBase (cdb) spec. | ||
180 | 53 | Information, the spec and sample code for cdb can be obtained from | ||
181 | 54 | http://www.pobox.com/~djb/cdb.html. This implementation borrows some code | ||
182 | 55 | from Dan Bernstein's implementation (which has no license restrictions | ||
183 | 56 | applied to it). | ||
184 | 57 | _________________________________________________________________________ | ||
185 | 58 | |||
186 | 59 | The implementation is completely contained within the code of Exim. It | ||
187 | 60 | does not link against an external cdb library. | ||
188 | 61 | |||
189 | 62 | . Client support for Microsoft's "Secure Password Authentication" is pro- | ||
190 | 63 | vided by code contributed by Marc Prud'hommeaux. Server support was | ||
191 | 64 | contributed by Tom Kistner. This includes code taken from the Samba | ||
192 | 65 | project, which is released under the Gnu GPL. | ||
193 | 66 | |||
194 | 67 | |||
195 | 68 | . Support for calling the Cyrus "pwcheck" and "saslauthd" daemons is | ||
196 | 69 | provided by code taken from the Cyrus-SASL library and adapted by | ||
197 | 70 | Alexander S. Sabourenkov. The permission notice appears below, in | ||
198 | 71 | accordance with the conditions expressed therein. | ||
199 | 72 | |||
200 | 73 | _________________________________________________________________________ | ||
201 | 74 | |||
202 | 75 | Copyright (c) 2001 Carnegie Mellon University. All rights reserved. | ||
203 | 76 | |||
204 | 77 | Redistribution and use in source and binary forms, with or without | ||
205 | 78 | modification, are permitted provided that the following conditions are | ||
206 | 79 | met: | ||
207 | 80 | |||
208 | 81 | 1. Redistributions of source code must retain the above copyright | ||
209 | 82 | notice, this list of conditions and the following disclaimer. | ||
210 | 83 | |||
211 | 84 | 2. Redistributions in binary form must reproduce the above copyright | ||
212 | 85 | notice, this list of conditions and the following disclaimer in the | ||
213 | 86 | documentation and/or other materials provided with the distribution. | ||
214 | 87 | |||
215 | 88 | 3. The name 'Carnegie Mellon University' must not be used to endorse or | ||
216 | 89 | promote products derived from this software without prior written | ||
217 | 90 | permission. For permission or any other legal details, please | ||
218 | 91 | contact | ||
219 | 92 | |||
220 | 93 | Office of Technology Transfer | ||
221 | 94 | Carnegie Mellon University | ||
222 | 95 | 5000 Forbes Avenue | ||
223 | 96 | Pittsburgh, PA 15213-3890 | ||
224 | 97 | (412) 268-4387, fax: (412) 268-7395 | ||
225 | 98 | tech-transfer@andrew.cmu.edu | ||
226 | 99 | |||
227 | 100 | 4. Redistributions of any form whatsoever must retain the following | ||
228 | 101 | acknowledgment: | ||
229 | 102 | This product includes software developed by Computing Services at | ||
230 | 103 | Carnegie Mellon University (http://www.cmu.edu/computing/). | ||
231 | 104 | |||
232 | 105 | CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS | ||
233 | 106 | SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND | ||
234 | 107 | FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE FOR ANY | ||
235 | 108 | SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER | ||
236 | 109 | RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF | ||
237 | 110 | CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN | ||
238 | 111 | CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
239 | 112 | _________________________________________________________________________ | ||
240 | 113 | |||
241 | 114 | |||
242 | 115 | . The Exim Monitor program, which is an X-Window application, includes | ||
243 | 116 | modified versions of the Athena StripChart and TextPop widgets. This code | ||
244 | 117 | is copyright by DEC and MIT, and their permission notice appears below, | ||
245 | 118 | in accordance with the conditions expressed therein. | ||
246 | 119 | |||
247 | 120 | _________________________________________________________________________ | ||
248 | 121 | |||
249 | 122 | Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, | ||
250 | 123 | Massachusetts, and the Massachusetts Institute of Technology, Cambridge, | ||
251 | 124 | Massachusetts. | ||
252 | 125 | |||
253 | 126 | All Rights Reserved | ||
254 | 127 | |||
255 | 128 | Permission to use, copy, modify, and distribute this software and its | ||
256 | 129 | documentation for any purpose and without fee is hereby granted, provided | ||
257 | 130 | that the above copyright notice appear in all copies and that both that | ||
258 | 131 | copyright notice and this permission notice appear in supporting documen- | ||
259 | 132 | tation, and that the names of Digital or MIT not be used in advertising | ||
260 | 133 | or publicity pertaining to distribution of the software without specific, | ||
261 | 134 | written prior permission. | ||
262 | 135 | |||
263 | 136 | DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING | ||
264 | 137 | ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL | ||
265 | 138 | DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR | ||
266 | 139 | ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, | ||
267 | 140 | WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, | ||
268 | 141 | ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS | ||
269 | 142 | SOFTWARE. | ||
270 | 143 | _________________________________________________________________________ | ||
271 | 144 | |||
272 | 145 | |||
273 | 146 | . Some of the code to support the use of maildirsize files for maildir | ||
274 | 147 | deliveries is taken from the Courier Imapd source code. This code is | ||
275 | 148 | released under the GPL. | ||
276 | 149 | _________________________________________________________________________ | ||
277 | 150 | |||
278 | 151 | -- | ||
279 | 152 | Philip Hazel University of Cambridge Computing Service, | ||
280 | diff --git a/OS/Makefile-Base b/OS/Makefile-Base | |||
281 | 0 | new file mode 100644 | 153 | new file mode 100644 |
282 | index 0000000..dcd87c2 | |||
283 | --- /dev/null | |||
284 | +++ b/OS/Makefile-Base | |||
285 | @@ -0,0 +1,980 @@ | |||
286 | 1 | # This file is the basis of the main makefile for Exim and friends. The | ||
287 | 2 | # makefile at the top level arranges to build the main makefile by calling | ||
288 | 3 | # scripts/Configure-Makefile from within the build directory. This | ||
289 | 4 | # concatenates the configuration settings from Local/Makefile and other, | ||
290 | 5 | # optional, Local/* files at the front of this file, to create Makefile in the | ||
291 | 6 | # build directory. | ||
292 | 7 | # | ||
293 | 8 | # Copyright (c) The Exim Maintainers 2017 | ||
294 | 9 | |||
295 | 10 | SHELL = $(MAKE_SHELL) | ||
296 | 11 | SCRIPTS = ../scripts | ||
297 | 12 | O = ../OS | ||
298 | 13 | EDITME = ../Local/Makefile | ||
299 | 14 | EXIMON_EDITME = ../Local/eximon.conf | ||
300 | 15 | |||
301 | 16 | # The compiler used for linking is normally the same as the compiler used for | ||
302 | 17 | # compiling. However, by giving it a different name, we can override it from | ||
303 | 18 | # the command line, and this is helpful for certain types of testing. | ||
304 | 19 | |||
305 | 20 | LNCC = $(CC) | ||
306 | 21 | |||
307 | 22 | # The compile commands can be very long. To make the output look better, | ||
308 | 23 | # they are not normally echoed in full. To get full echoing, the caller | ||
309 | 24 | # must set FULLECHO='' on the command line and call make with -e. We default | ||
310 | 25 | # FULLECHO to '@' to suppress the full echo. Then define an abbreviation. | ||
311 | 26 | |||
312 | 27 | FULLECHO = @ | ||
313 | 28 | FE = $(FULLECHO) | ||
314 | 29 | |||
315 | 30 | # The default target double-checks the existence of $(EDITME) and then arranges | ||
316 | 31 | # to touch it if it exists and any of the optional configuration files, which | ||
317 | 32 | # depend on the os or the architecture, have been altered. The same sub-target | ||
318 | 33 | # does the same thing for the eximon configuration file if it exists. Then | ||
319 | 34 | # there is a check that the Makefile (the one built from this file) is | ||
320 | 35 | # up-to-date. Then the os-specific source files and the C configuration file | ||
321 | 36 | # are set up, and finally it goes to the main Exim target. | ||
322 | 37 | |||
323 | 38 | all: utils exim | ||
324 | 39 | config: $(EDITME) checklocalmake Makefile os.c config.h version.h version.sh macro.c | ||
325 | 40 | |||
326 | 41 | checklocalmake: | ||
327 | 42 | @if $(SHELL) $(SCRIPTS)/newer $(EDITME)-$(OSTYPE) $(EDITME) || \ | ||
328 | 43 | $(SHELL) $(SCRIPTS)/newer $(EDITME)-$(ARCHTYPE) $(EDITME) || \ | ||
329 | 44 | $(SHELL) $(SCRIPTS)/newer $(EDITME)-$(OSTYPE)-$(ARCHTYPE) $(EDITME); \ | ||
330 | 45 | then \ | ||
331 | 46 | touch $(EDITME); \ | ||
332 | 47 | fi | ||
333 | 48 | @if $(SHELL) $(SCRIPTS)/newer $(EXIMON_EDITME)-$(OSTYPE) $(EXIMON_EDITME) || \ | ||
334 | 49 | $(SHELL) $(SCRIPTS)/newer $(EXIMON_EDITME)-$(ARCHTYPE) $(EXIMON_EDITME) || \ | ||
335 | 50 | $(SHELL) $(SCRIPTS)/newer $(EXIMON_EDITME)-$(OSTYPE)-$(ARCHTYPE) $(EXIMON_EDITME); \ | ||
336 | 51 | then \ | ||
337 | 52 | if [ -f $(EXIMON_EDITME) ]; then touch $(EXIMON_EDITME); fi \ | ||
338 | 53 | fi | ||
339 | 54 | |||
340 | 55 | $(EDITME): | ||
341 | 56 | @echo " " | ||
342 | 57 | @echo "*** Please create Local/Makefile by copying src/EDITME and making" | ||
343 | 58 | @echo "*** appropriate changes for your site." | ||
344 | 59 | @echo " " | ||
345 | 60 | @false | ||
346 | 61 | |||
347 | 62 | $(EXIMON_EDITME): | ||
348 | 63 | @echo " " | ||
349 | 64 | @echo "*** Please create Local/eximon.conf by copying exim_monitor/EDITME and making" | ||
350 | 65 | @echo "*** appropriate changes for your site." | ||
351 | 66 | @echo " " | ||
352 | 67 | @test ! -d ../Local && mkdir ../Local | ||
353 | 68 | @false | ||
354 | 69 | |||
355 | 70 | # Check that the local Makefile is up-to-date | ||
356 | 71 | |||
357 | 72 | Makefile: ../OS/Makefile-Base ../OS/Makefile-Default \ | ||
358 | 73 | $(SCRIPTS)/Configure $(SCRIPTS)/Configure-Makefile $(EDITME) | ||
359 | 74 | @echo " " | ||
360 | 75 | @echo "*** Makefile needs rebuilding" | ||
361 | 76 | @echo "*** Please run \"make makefile\" at top level" | ||
362 | 77 | @echo " " | ||
363 | 78 | @false | ||
364 | 79 | |||
365 | 80 | # Build (link) the os.h file | ||
366 | 81 | |||
367 | 82 | #os.h: $(SCRIPTS)/Configure-os.h \ | ||
368 | 83 | # $(O)/os.h-AIX $(O)/os.h-BSDI $(O)/os.h-cygwin \ | ||
369 | 84 | # $(O)/os.h-Darwin $(O)/os.h-DGUX $(O)/os.h-DragonFly \ | ||
370 | 85 | # $(O)/os.h-FreeBSD $(O)/os.h-GNU $(O)/os.h-GNUkFreeBSD \ | ||
371 | 86 | # $(O)/os.h-GNUkNetBSD $(O)/os.h-HI-OSF \ | ||
372 | 87 | # $(O)/os.h-HI-UX $(O)/os.h-HP-UX $(O)/os.h-HP-UX-9 \ | ||
373 | 88 | # $(O)/os.h-IRIX $(O)/os.h-IRIX6 $(O)/os.h-IRIX632 \ | ||
374 | 89 | # $(O)/os.h-IRIX65 $(O)/os.h-Linux $(O)/os.h-mips \ | ||
375 | 90 | # $(O)/os.h-NetBSD $(O)/os.h-NetBSD-a.out \ | ||
376 | 91 | # $(O)/os.h-OpenBSD $(O)/os.h-OpenUNIX $(O)/os.h-OSF1 \ | ||
377 | 92 | # $(O)/os.h-QNX $(O)/os.h-SCO $(O)/os.h-SCO_SV \ | ||
378 | 93 | # $(O)/os.h-SunOS4 $(O)/os.h-SunOS5 $(O)/os.h-SunOS5-hal \ | ||
379 | 94 | # $(O)/os.h-ULTRIX $(O)/os.h-UNIX_SV \ | ||
380 | 95 | # $(O)/os.h-Unixware7 $(O)/os.h-USG | ||
381 | 96 | # $(SHELL) $(SCRIPTS)/Configure-os.h | ||
382 | 97 | |||
383 | 98 | os.h: $(SCRIPTS)/Configure-os.h \ | ||
384 | 99 | $(O)/os.h-FreeBSD \ | ||
385 | 100 | $(O)/os.h-Linux \ | ||
386 | 101 | $(O)/os.h-OpenBSD \ | ||
387 | 102 | $(O)/os.h-SunOS5 | ||
388 | 103 | $(SHELL) $(SCRIPTS)/Configure-os.h | ||
389 | 104 | |||
390 | 105 | # Build the os.c file | ||
391 | 106 | |||
392 | 107 | #os.c: ../src/os.c \ | ||
393 | 108 | # $(SCRIPTS)/Configure-os.c \ | ||
394 | 109 | # $(O)/os.c-cygwin $(O)/os.c-GNU $(O)/os.c-HI-OSF \ | ||
395 | 110 | # $(O)/os.c-IRIX $(O)/os.c-IRIX6 $(O)/os.c-IRIX632 \ | ||
396 | 111 | # $(O)/os.c-IRIX65 $(O)/os.c-Linux $(O)/os.c-OSF1 | ||
397 | 112 | # $(SHELL) $(SCRIPTS)/Configure-os.c | ||
398 | 113 | |||
399 | 114 | os.c: ../src/os.c \ | ||
400 | 115 | $(SCRIPTS)/Configure-os.c \ | ||
401 | 116 | $(O)/os.c-Linux | ||
402 | 117 | $(SHELL) $(SCRIPTS)/Configure-os.c | ||
403 | 118 | |||
404 | 119 | # Build the config.h file. | ||
405 | 120 | |||
406 | 121 | config.h: Makefile buildconfig ../src/config.h.defaults $(EDITME) | ||
407 | 122 | $(SHELL) $(SCRIPTS)/Configure-config.h "$(MAKE)" | ||
408 | 123 | |||
409 | 124 | # Build the builtin-macros data struct | ||
410 | 125 | |||
411 | 126 | MACRO_HSRC = macro_predef.h os.h globals.h config.h \ | ||
412 | 127 | routers/accept.h routers/dnslookup.h routers/ipliteral.h \ | ||
413 | 128 | routers/iplookup.h routers/manualroute.h routers/queryprogram.h \ | ||
414 | 129 | routers/redirect.h | ||
415 | 130 | |||
416 | 131 | OBJ_MACRO = macro_predef.o \ | ||
417 | 132 | macro-globals.o macro-readconf.o macro-route.o macro-transport.o macro-drtables.o \ | ||
418 | 133 | macro-appendfile.o macro-autoreply.o macro-lmtp.o macro-pipe.o macro-queuefile.o \ | ||
419 | 134 | macro-smtp.o macro-accept.o macro-dnslookup.o macro-ipliteral.o macro-iplookup.o \ | ||
420 | 135 | macro-manualroute.o macro-queryprogram.o macro-redirect.o \ | ||
421 | 136 | macro-auth-spa.o macro-cram_md5.o macro-cyrus_sasl.o macro-dovecot.o macro-gsasl_exim.o \ | ||
422 | 137 | macro-heimdal_gssapi.o macro-plaintext.o macro-spa.o macro-tls.o\ | ||
423 | 138 | macro-dkim.o | ||
424 | 139 | |||
425 | 140 | $(OBJ_MACRO): $(MACRO_HSRC) | ||
426 | 141 | |||
427 | 142 | macro_predef.o : macro_predef.c | ||
428 | 143 | @echo "$(CC) -DMACRO_PREDEF macro_predef.c" | ||
429 | 144 | $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ macro_predef.c | ||
430 | 145 | macro-globals.o : globals.c | ||
431 | 146 | @echo "$(CC) -DMACRO_PREDEF globals.c" | ||
432 | 147 | $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ globals.c | ||
433 | 148 | macro-readconf.o : readconf.c | ||
434 | 149 | @echo "$(CC) -DMACRO_PREDEF readconf.c" | ||
435 | 150 | $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ readconf.c | ||
436 | 151 | macro-route.o : route.c | ||
437 | 152 | @echo "$(CC) -DMACRO_PREDEF route.c" | ||
438 | 153 | $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ route.c | ||
439 | 154 | macro-transport.o: transport.c | ||
440 | 155 | @echo "$(CC) -DMACRO_PREDEF transport.c" | ||
441 | 156 | $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ transport.c | ||
442 | 157 | macro-drtables.o : drtables.c | ||
443 | 158 | @echo "$(CC) -DMACRO_PREDEF drtables.c" | ||
444 | 159 | $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ drtables.c | ||
445 | 160 | macro-appendfile.o : transports/appendfile.c | ||
446 | 161 | @echo "$(CC) -DMACRO_PREDEF transports/appendfile.c" | ||
447 | 162 | $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ transports/appendfile.c | ||
448 | 163 | macro-autoreply.o : transports/autoreply.c | ||
449 | 164 | @echo "$(CC) -DMACRO_PREDEF transports/autoreply.c" | ||
450 | 165 | $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ transports/autoreply.c | ||
451 | 166 | macro-lmtp.o: transports/lmtp.c | ||
452 | 167 | @echo "$(CC) -DMACRO_PREDEF transports/lmtp.c" | ||
453 | 168 | $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ transports/lmtp.c | ||
454 | 169 | macro-pipe.o : transports/pipe.c | ||
455 | 170 | @echo "$(CC) -DMACRO_PREDEF transports/pipe.c" | ||
456 | 171 | $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ transports/pipe.c | ||
457 | 172 | macro-queuefile.o : transports/queuefile.c | ||
458 | 173 | @echo "$(CC) -DMACRO_PREDEF transports/queuefile.c" | ||
459 | 174 | $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ transports/queuefile.c | ||
460 | 175 | macro-smtp.o : transports/smtp.c | ||
461 | 176 | @echo "$(CC) -DMACRO_PREDEF transports/smtp.c" | ||
462 | 177 | $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ transports/smtp.c | ||
463 | 178 | macro-accept.o : routers/accept.c | ||
464 | 179 | @echo "$(CC) -DMACRO_PREDEF routers/accept.c" | ||
465 | 180 | $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ routers/accept.c | ||
466 | 181 | macro-dnslookup.o : routers/dnslookup.c | ||
467 | 182 | @echo "$(CC) -DMACRO_PREDEF routers/dnslookup.c" | ||
468 | 183 | $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ routers/dnslookup.c | ||
469 | 184 | macro-ipliteral.o : routers/ipliteral.c | ||
470 | 185 | @echo "$(CC) -DMACRO_PREDEF routers/ipliteral.c" | ||
471 | 186 | $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ routers/ipliteral.c | ||
472 | 187 | macro-iplookup.o : routers/iplookup.c | ||
473 | 188 | @echo "$(CC) -DMACRO_PREDEF routers/iplookup.c" | ||
474 | 189 | $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ routers/iplookup.c | ||
475 | 190 | macro-manualroute.o : routers/manualroute.c | ||
476 | 191 | @echo "$(CC) -DMACRO_PREDEF routers/manualroute.c" | ||
477 | 192 | $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ routers/manualroute.c | ||
478 | 193 | macro-queryprogram.o : routers/queryprogram.c | ||
479 | 194 | @echo "$(CC) -DMACRO_PREDEF routers/queryprogram.c" | ||
480 | 195 | $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ routers/queryprogram.c | ||
481 | 196 | macro-redirect.o : routers/redirect.c | ||
482 | 197 | @echo "$(CC) -DMACRO_PREDEF routers/redirect.c" | ||
483 | 198 | $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ routers/redirect.c | ||
484 | 199 | macro-auth-spa.o : auths/auth-spa.c | ||
485 | 200 | @echo "$(CC) -DMACRO_PREDEF auths/auth-spa.c" | ||
486 | 201 | $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ auths/auth-spa.c | ||
487 | 202 | macro-cram_md5.o : auths/cram_md5.c | ||
488 | 203 | @echo "$(CC) -DMACRO_PREDEF auths/cram_md5.c" | ||
489 | 204 | $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ auths/cram_md5.c | ||
490 | 205 | macro-cyrus_sasl.o : auths/cyrus_sasl.c | ||
491 | 206 | @echo "$(CC) -DMACRO_PREDEF auths/cyrus_sasl.c" | ||
492 | 207 | $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ auths/cyrus_sasl.c | ||
493 | 208 | macro-dovecot.o: auths/dovecot.c | ||
494 | 209 | @echo "$(CC) -DMACRO_PREDEF auths/dovecot.c" | ||
495 | 210 | $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ auths/dovecot.c | ||
496 | 211 | macro-gsasl_exim.o : auths/gsasl_exim.c | ||
497 | 212 | @echo "$(CC) -DMACRO_PREDEF auths/gsasl_exim.c" | ||
498 | 213 | $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ auths/gsasl_exim.c | ||
499 | 214 | macro-heimdal_gssapi.o: auths/heimdal_gssapi.c | ||
500 | 215 | @echo "$(CC) -DMACRO_PREDEF auths/heimdal_gssapi.c" | ||
501 | 216 | $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ auths/heimdal_gssapi.c | ||
502 | 217 | macro-plaintext.o : auths/plaintext.c | ||
503 | 218 | @echo "$(CC) -DMACRO_PREDEF auths/plaintext.c" | ||
504 | 219 | $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ auths/plaintext.c | ||
505 | 220 | macro-spa.o : auths/spa.c | ||
506 | 221 | @echo "$(CC) -DMACRO_PREDEF auths/spa.c" | ||
507 | 222 | $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ auths/spa.c | ||
508 | 223 | macro-tls.o: auths/tls.c | ||
509 | 224 | @echo "$(CC) -DMACRO_PREDEF auths/tls.c" | ||
510 | 225 | $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ auths/tls.c | ||
511 | 226 | macro-dkim.o: dkim.c | ||
512 | 227 | @echo "$(CC) -DMACRO_PREDEF dkim.c" | ||
513 | 228 | $(FE)$(CC) -c $(CFLAGS) -DMACRO_PREDEF $(INCLUDE) -o $@ dkim.c | ||
514 | 229 | |||
515 | 230 | macro_predef: $(OBJ_MACRO) | ||
516 | 231 | @echo "$(LNCC) -o $@" | ||
517 | 232 | $(FE)$(LNCC) -o $@ $(LFLAGS) $(OBJ_MACRO) | ||
518 | 233 | |||
519 | 234 | macro.c: macro_predef | ||
520 | 235 | ./macro_predef > macro.c | ||
521 | 236 | |||
522 | 237 | # This target is recognized specially by GNU make. It records those targets | ||
523 | 238 | # that do not correspond to files that are being built and which should | ||
524 | 239 | # therefore always be run, even if the files exist. This shouldn't in fact be a | ||
525 | 240 | # problem, but it does no harm. Other make programs will just ignore this. | ||
526 | 241 | |||
527 | 242 | .PHONY: all config utils \ | ||
528 | 243 | buildauths buildlookups buildpdkim buildrouters \ | ||
529 | 244 | buildtransports checklocalmake clean | ||
530 | 245 | |||
531 | 246 | |||
532 | 247 | utils: $(EXIM_MONITOR) exicyclog exinext exiwhat \ | ||
533 | 248 | exigrep eximstats exipick exiqgrep exiqsumm \ | ||
534 | 249 | transport-filter.pl convert4r3 convert4r4 \ | ||
535 | 250 | exim_checkaccess \ | ||
536 | 251 | exim_dbmbuild exim_dumpdb exim_fixdb exim_tidydb exim_lock | ||
537 | 252 | |||
538 | 253 | |||
539 | 254 | # Targets for special-purpose configuration header builders | ||
540 | 255 | buildconfig: buildconfig.c | ||
541 | 256 | @echo "$(CC) buildconfig.c" | ||
542 | 257 | $(FE)$(CC) $(CFLAGS) $(INCLUDE) -o buildconfig buildconfig.c $(LIBS) | ||
543 | 258 | |||
544 | 259 | |||
545 | 260 | # Target for the exicyclog utility script | ||
546 | 261 | exicyclog: config ../src/exicyclog.src | ||
547 | 262 | @rm -f exicyclog | ||
548 | 263 | @. ./version.sh && sed \ | ||
549 | 264 | -e "s?PROCESSED_FLAG?This file has been so processed.?"\ | ||
550 | 265 | -e "/^# /p" \ | ||
551 | 266 | -e "/^# /d" \ | ||
552 | 267 | -e "s?CONFIGURE_FILE_USE_NODE?$(CONFIGURE_FILE_USE_NODE)?" \ | ||
553 | 268 | -e "s?CONFIGURE_FILE_USE_EUID?$(CONFIGURE_FILE_USE_EUID)?" \ | ||
554 | 269 | -e "s?CONFIGURE_FILE?$(CONFIGURE_FILE)?" \ | ||
555 | 270 | -e "s?BIN_DIRECTORY?$(BIN_DIRECTORY)?" \ | ||
556 | 271 | -e "s?EXICYCLOG_MAX?$(EXICYCLOG_MAX)?" \ | ||
557 | 272 | -e "s?COMPRESS_COMMAND?$(COMPRESS_COMMAND)?" \ | ||
558 | 273 | -e "s?COMPRESS_SUFFIX?$(COMPRESS_SUFFIX)?" \ | ||
559 | 274 | -e "s?CHGRP_COMMAND?$(CHGRP_COMMAND)?" \ | ||
560 | 275 | -e "s?CHMOD_COMMAND?$(CHMOD_COMMAND)?" \ | ||
561 | 276 | -e "s?CHOWN_COMMAND?$(CHOWN_COMMAND)?" \ | ||
562 | 277 | -e "s?MV_COMMAND?$(MV_COMMAND)?" \ | ||
563 | 278 | -e "s?RM_COMMAND?$(RM_COMMAND)?" \ | ||
564 | 279 | -e "s?TOUCH_COMMAND?$(TOUCH_COMMAND)?" \ | ||
565 | 280 | -e "s?EXIM_RELEASE_VERSION?$${EXIM_RELEASE_VERSION}?" \ | ||
566 | 281 | -e "s?EXIM_VARIANT_VERSION?$${EXIM_VARIANT_VERSION}?" \ | ||
567 | 282 | ../src/exicyclog.src > exicyclog-t | ||
568 | 283 | @mv exicyclog-t exicyclog | ||
569 | 284 | @chmod a+x exicyclog | ||
570 | 285 | @echo ">>> exicyclog script built" | ||
571 | 286 | |||
572 | 287 | # Target for the exinext utility script | ||
573 | 288 | exinext: config ../src/exinext.src | ||
574 | 289 | @rm -f exinext | ||
575 | 290 | @. ./version.sh && sed \ | ||
576 | 291 | -e "s?PROCESSED_FLAG?This file has been so processed.?"\ | ||
577 | 292 | -e "/^# /p" \ | ||
578 | 293 | -e "/^# /d" \ | ||
579 | 294 | -e "s?CONFIGURE_FILE_USE_NODE?$(CONFIGURE_FILE_USE_NODE)?" \ | ||
580 | 295 | -e "s?CONFIGURE_FILE?$(CONFIGURE_FILE)?" \ | ||
581 | 296 | -e "s?BIN_DIRECTORY?$(BIN_DIRECTORY)?" \ | ||
582 | 297 | -e "s?EXIM_RELEASE_VERSION?$${EXIM_RELEASE_VERSION}?" \ | ||
583 | 298 | -e "s?EXIM_VARIANT_VERSION?$${EXIM_VARIANT_VERSION}?" \ | ||
584 | 299 | ../src/exinext.src > exinext-t | ||
585 | 300 | @mv exinext-t exinext | ||
586 | 301 | @chmod a+x exinext | ||
587 | 302 | @echo ">>> exinext script built" | ||
588 | 303 | |||
589 | 304 | # Target for the exiwhat utility script | ||
590 | 305 | exiwhat: config ../src/exiwhat.src | ||
591 | 306 | @rm -f exiwhat | ||
592 | 307 | @. ./version.sh && sed \ | ||
593 | 308 | -e "s?PROCESSED_FLAG?This file has been so processed.?"\ | ||
594 | 309 | -e "/^# /p" \ | ||
595 | 310 | -e "/^# /d" \ | ||
596 | 311 | -e "s?CONFIGURE_FILE_USE_NODE?$(CONFIGURE_FILE_USE_NODE)?" \ | ||
597 | 312 | -e "s?CONFIGURE_FILE?$(CONFIGURE_FILE)?" \ | ||
598 | 313 | -e "s?BIN_DIRECTORY?$(BIN_DIRECTORY)?" \ | ||
599 | 314 | -e "s?EXIWHAT_PS_CMD?$(EXIWHAT_PS_CMD)?" \ | ||
600 | 315 | -e "s?EXIWHAT_PS_ARG?$(EXIWHAT_PS_ARG)?" \ | ||
601 | 316 | -e "s?EXIWHAT_KILL_SIGNAL?$(EXIWHAT_KILL_SIGNAL)?" \ | ||
602 | 317 | -e "s?EXIWHAT_EGREP_ARG?$(EXIWHAT_EGREP_ARG)?" \ | ||
603 | 318 | -e "s?EXIWHAT_MULTIKILL_CMD?$(EXIWHAT_MULTIKILL_CMD)?" \ | ||
604 | 319 | -e "s?EXIWHAT_MULTIKILL_ARG?$(EXIWHAT_MULTIKILL_ARG)?" \ | ||
605 | 320 | -e "s?EXIM_RELEASE_VERSION?$${EXIM_RELEASE_VERSION}?" \ | ||
606 | 321 | -e "s?EXIM_VARIANT_VERSION?$${EXIM_VARIANT_VERSION}?" \ | ||
607 | 322 | ../src/exiwhat.src > exiwhat-t | ||
608 | 323 | @mv exiwhat-t exiwhat | ||
609 | 324 | @chmod a+x exiwhat | ||
610 | 325 | @echo ">>> exiwhat script built" | ||
611 | 326 | |||
612 | 327 | # Target for the exim_checkaccess utility script | ||
613 | 328 | exim_checkaccess: config ../src/exim_checkaccess.src | ||
614 | 329 | @rm -f exim_checkaccess | ||
615 | 330 | @. ./version.sh && sed \ | ||
616 | 331 | -e "s?PROCESSED_FLAG?This file has been so processed.?"\ | ||
617 | 332 | -e "/^# /p" \ | ||
618 | 333 | -e "/^# /d" \ | ||
619 | 334 | -e "s?CONFIGURE_FILE_USE_NODE?$(CONFIGURE_FILE_USE_NODE)?" \ | ||
620 | 335 | -e "s?CONFIGURE_FILE?$(CONFIGURE_FILE)?" \ | ||
621 | 336 | -e "s?BIN_DIRECTORY?$(BIN_DIRECTORY)?" \ | ||
622 | 337 | -e "s?PERL_COMMAND?$(PERL_COMMAND)?" \ | ||
623 | 338 | -e "s?EXIM_RELEASE_VERSION?$${EXIM_RELEASE_VERSION}?" \ | ||
624 | 339 | -e "s?EXIM_VARIANT_VERSION?$${EXIM_VARIANT_VERSION}?" \ | ||
625 | 340 | ../src/exim_checkaccess.src > exim_checkaccess-t | ||
626 | 341 | @mv exim_checkaccess-t exim_checkaccess | ||
627 | 342 | @chmod a+x exim_checkaccess | ||
628 | 343 | @echo ">>> exim_checkaccess script built"; echo "" | ||
629 | 344 | |||
630 | 345 | # Target for the Exim monitor start-up script | ||
631 | 346 | eximon: config ../src/eximon.src ../OS/eximon.conf-Default \ | ||
632 | 347 | ../Local/eximon.conf | ||
633 | 348 | @rm -f eximon | ||
634 | 349 | $(SHELL) $(SCRIPTS)/Configure-eximon | ||
635 | 350 | @. ./version.sh && sed \ | ||
636 | 351 | -e "s?PROCESSED_FLAG?This file has been so processed.?"\ | ||
637 | 352 | -e "/^# /p" \ | ||
638 | 353 | -e "/^# /d" \ | ||
639 | 354 | -e "s?CONFIGURE_FILE_USE_NODE?$(CONFIGURE_FILE_USE_NODE)?" \ | ||
640 | 355 | -e "s?CONFIGURE_FILE?$(CONFIGURE_FILE)?" \ | ||
641 | 356 | -e "s?BIN_DIRECTORY?$(BIN_DIRECTORY)?" \ | ||
642 | 357 | -e "s?BASENAME_COMMAND?$(BASENAME_COMMAND)?" \ | ||
643 | 358 | -e "s?HOSTNAME_COMMAND?$(HOSTNAME_COMMAND)?" \ | ||
644 | 359 | -e "s?X11_LD_LIBRARY?$(X11_LD_LIB)?" \ | ||
645 | 360 | -e "s?EXIM_RELEASE_VERSION?$${EXIM_RELEASE_VERSION}?" \ | ||
646 | 361 | -e "s?EXIM_VARIANT_VERSION?$${EXIM_VARIANT_VERSION}?" \ | ||
647 | 362 | ../src/eximon.src >> eximon | ||
648 | 363 | @echo ">>> eximon script built"; echo "" | ||
649 | 364 | |||
650 | 365 | # Targets for utilities; these are all Perl scripts that have to get the | ||
651 | 366 | # location of Perl put in them. A few need other things as well. | ||
652 | 367 | |||
653 | 368 | exigrep: config ../src/exigrep.src | ||
654 | 369 | @rm -f exigrep | ||
655 | 370 | @. ./version.sh && sed \ | ||
656 | 371 | -e "s?PROCESSED_FLAG?This file has been so processed.?"\ | ||
657 | 372 | -e "/^# /p" \ | ||
658 | 373 | -e "/^# /d" \ | ||
659 | 374 | -e "s?PERL_COMMAND?$(PERL_COMMAND)?" \ | ||
660 | 375 | -e "s?ZCAT_COMMAND?$(ZCAT_COMMAND)?" \ | ||
661 | 376 | -e "s?COMPRESS_SUFFIX?$(COMPRESS_SUFFIX)?" \ | ||
662 | 377 | -e "s?EXIM_RELEASE_VERSION?$${EXIM_RELEASE_VERSION}?" \ | ||
663 | 378 | -e "s?EXIM_VARIANT_VERSION?$${EXIM_VARIANT_VERSION}?" \ | ||
664 | 379 | ../src/exigrep.src > exigrep-t | ||
665 | 380 | @mv exigrep-t exigrep | ||
666 | 381 | @chmod a+x exigrep | ||
667 | 382 | @echo ">>> exigrep script built" | ||
668 | 383 | |||
669 | 384 | eximstats: config ../src/eximstats.src | ||
670 | 385 | @rm -f eximstats | ||
671 | 386 | @. ./version.sh && sed \ | ||
672 | 387 | -e "s?PERL_COMMAND?$(PERL_COMMAND)?" \ | ||
673 | 388 | -e "s?EXIM_RELEASE_VERSION?$${EXIM_RELEASE_VERSION}?" \ | ||
674 | 389 | -e "s?EXIM_VARIANT_VERSION?$${EXIM_VARIANT_VERSION}?" \ | ||
675 | 390 | ../src/eximstats.src > eximstats-t | ||
676 | 391 | @mv eximstats-t eximstats | ||
677 | 392 | @chmod a+x eximstats | ||
678 | 393 | @echo ">>> eximstats script built" | ||
679 | 394 | |||
680 | 395 | exiqgrep: config ../src/exiqgrep.src | ||
681 | 396 | @rm -f exiqgrep | ||
682 | 397 | @. ./version.sh && sed \ | ||
683 | 398 | -e "s?PROCESSED_FLAG?This file has been so processed.?"\ | ||
684 | 399 | -e "/^# /p" \ | ||
685 | 400 | -e "/^# /d" \ | ||
686 | 401 | -e "s?BIN_DIRECTORY?$(BIN_DIRECTORY)?" \ | ||
687 | 402 | -e "s?PERL_COMMAND?$(PERL_COMMAND)?" \ | ||
688 | 403 | -e "s?EXIM_RELEASE_VERSION?$${EXIM_RELEASE_VERSION}?" \ | ||
689 | 404 | -e "s?EXIM_VARIANT_VERSION?$${EXIM_VARIANT_VERSION}?" \ | ||
690 | 405 | ../src/exiqgrep.src > exiqgrep-t | ||
691 | 406 | @mv exiqgrep-t exiqgrep | ||
692 | 407 | @chmod a+x exiqgrep | ||
693 | 408 | @echo ">>> exiqgrep script built" | ||
694 | 409 | |||
695 | 410 | exiqsumm: config ../src/exiqsumm.src | ||
696 | 411 | @rm -f exiqsumm | ||
697 | 412 | @. ./version.sh && sed \ | ||
698 | 413 | -e "s?PERL_COMMAND?$(PERL_COMMAND)?" \ | ||
699 | 414 | -e "s?EXIM_RELEASE_VERSION?$${EXIM_RELEASE_VERSION}?" \ | ||
700 | 415 | -e "s?EXIM_VARIANT_VERSION?$${EXIM_VARIANT_VERSION}?" \ | ||
701 | 416 | ../src/exiqsumm.src > exiqsumm-t | ||
702 | 417 | @mv exiqsumm-t exiqsumm | ||
703 | 418 | @chmod a+x exiqsumm | ||
704 | 419 | @echo ">>> exiqsumm script built" | ||
705 | 420 | |||
706 | 421 | exipick: config ../src/exipick.src | ||
707 | 422 | @rm -f exipick | ||
708 | 423 | @. ./version.sh && sed \ | ||
709 | 424 | -e "s?PERL_COMMAND?$(PERL_COMMAND)?" \ | ||
710 | 425 | -e "s?SPOOL_DIRECTORY?$(SPOOL_DIRECTORY)?" \ | ||
711 | 426 | -e "s?BIN_DIRECTORY?$(BIN_DIRECTORY)?" \ | ||
712 | 427 | -e "s?EXIM_RELEASE_VERSION?$${EXIM_RELEASE_VERSION}?" \ | ||
713 | 428 | -e "s?EXIM_VARIANT_VERSION?$${EXIM_VARIANT_VERSION}?" \ | ||
714 | 429 | ../src/exipick.src > exipick-t | ||
715 | 430 | @mv exipick-t exipick | ||
716 | 431 | @chmod a+x exipick | ||
717 | 432 | @echo ">>> exipick script built" | ||
718 | 433 | |||
719 | 434 | transport-filter.pl: config ../src/transport-filter.src | ||
720 | 435 | @rm -f transport-filter.pl | ||
721 | 436 | @. ./version.sh && sed \ | ||
722 | 437 | -e "s?PERL_COMMAND?$(PERL_COMMAND)?" \ | ||
723 | 438 | -e "s?EXIM_RELEASE_VERSION?$${EXIM_RELEASE_VERSION}?" \ | ||
724 | 439 | -e "s?EXIM_VARIANT_VERSION?$${EXIM_VARIANT_VERSION}?" \ | ||
725 | 440 | ../src/transport-filter.src > transport-filter.pl-t | ||
726 | 441 | @mv transport-filter.pl-t transport-filter.pl | ||
727 | 442 | @chmod a+x transport-filter.pl | ||
728 | 443 | @echo ">>> transport-filter.pl script built" | ||
729 | 444 | |||
730 | 445 | convert4r3: config ../src/convert4r3.src | ||
731 | 446 | @rm -f convert4r3 | ||
732 | 447 | @. ./version.sh && sed \ | ||
733 | 448 | -e "s?PERL_COMMAND?$(PERL_COMMAND)?" \ | ||
734 | 449 | -e "s?EXIM_RELEASE_VERSION?$${EXIM_RELEASE_VERSION}?" \ | ||
735 | 450 | -e "s?EXIM_VARIANT_VERSION?$${EXIM_VARIANT_VERSION}?" \ | ||
736 | 451 | ../src/convert4r3.src > convert4r3-t | ||
737 | 452 | @mv convert4r3-t convert4r3 | ||
738 | 453 | @chmod a+x convert4r3 | ||
739 | 454 | @echo ">>> convert4r3 script built" | ||
740 | 455 | |||
741 | 456 | convert4r4: config ../src/convert4r4.src | ||
742 | 457 | @rm -f convert4r4 | ||
743 | 458 | @. ./version.sh && sed \ | ||
744 | 459 | -e "s?PERL_COMMAND?$(PERL_COMMAND)?" \ | ||
745 | 460 | -e "s?EXIM_RELEASE_VERSION?$${EXIM_RELEASE_VERSION}?" \ | ||
746 | 461 | -e "s?EXIM_VARIANT_VERSION?$${EXIM_VARIANT_VERSION}?" \ | ||
747 | 462 | ../src/convert4r4.src > convert4r4-t | ||
748 | 463 | @mv convert4r4-t convert4r4 | ||
749 | 464 | @chmod a+x convert4r4 | ||
750 | 465 | @echo ">>> convert4r4 script built" | ||
751 | 466 | |||
752 | 467 | |||
753 | 468 | # These are objects of optional features. They are always compiled, but | ||
754 | 469 | # if the corresponding #defines are not set, they wind up empty and | ||
755 | 470 | # are thrown away by the linker. | ||
756 | 471 | |||
757 | 472 | OBJ_WITH_CONTENT_SCAN = malware.o mime.o regex.o spam.o spool_mbox.o | ||
758 | 473 | OBJ_EXPERIMENTAL = bmi_spam.o \ | ||
759 | 474 | dane.o \ | ||
760 | 475 | dcc.o \ | ||
761 | 476 | dmarc.o \ | ||
762 | 477 | imap_utf7.o \ | ||
763 | 478 | spf.o \ | ||
764 | 479 | srs.o \ | ||
765 | 480 | utf8.o | ||
766 | 481 | |||
767 | 482 | # Targets for final binaries; the main one has a build number which is | ||
768 | 483 | # updated each time. We don't bother with that for the auxiliaries. | ||
769 | 484 | |||
770 | 485 | OBJ_LOOKUPS = lookups/lf_quote.o lookups/lf_check_file.o lookups/lf_sqlperform.o | ||
771 | 486 | |||
772 | 487 | OBJ_EXIM = acl.o base64.o child.o crypt16.o daemon.o dbfn.o debug.o deliver.o \ | ||
773 | 488 | directory.o dns.o drtables.o enq.o exim.o expand.o filter.o \ | ||
774 | 489 | filtertest.o globals.o dkim.o dkim_transport.o hash.o \ | ||
775 | 490 | header.o host.o ip.o log.o lss.o match.o moan.o \ | ||
776 | 491 | os.o parse.o queue.o \ | ||
777 | 492 | rda.o readconf.o receive.o retry.o rewrite.o rfc2047.o \ | ||
778 | 493 | route.o search.o sieve.o smtp_in.o smtp_out.o spool_in.o spool_out.o \ | ||
779 | 494 | std-crypto.o store.o string.o tls.o tod.o transport.o tree.o verify.o \ | ||
780 | 495 | environment.o macro.o \ | ||
781 | 496 | $(OBJ_LOOKUPS) \ | ||
782 | 497 | local_scan.o $(EXIM_PERL) $(OBJ_WITH_CONTENT_SCAN) \ | ||
783 | 498 | $(OBJ_EXPERIMENTAL) | ||
784 | 499 | |||
785 | 500 | exim: buildlookups buildauths pdkim/pdkim.a \ | ||
786 | 501 | buildrouters buildtransports \ | ||
787 | 502 | $(OBJ_EXIM) version.o | ||
788 | 503 | @echo "$(LNCC) -o exim" | ||
789 | 504 | $(FE)$(PURIFY) $(LNCC) -o exim $(LFLAGS) $(OBJ_EXIM) version.o \ | ||
790 | 505 | routers/routers.a transports/transports.a lookups/lookups.a \ | ||
791 | 506 | auths/auths.a pdkim/pdkim.a \ | ||
792 | 507 | $(LIBRESOLV) $(LIBS) $(LIBS_EXIM) $(IPV6_LIBS) $(EXTRALIBS) \ | ||
793 | 508 | $(EXTRALIBS_EXIM) $(DBMLIB) $(LOOKUP_LIBS) $(AUTH_LIBS) \ | ||
794 | 509 | $(PERL_LIBS) $(TLS_LIBS) $(PCRE_LIBS) $(LDFLAGS) | ||
795 | 510 | @if [ x"$(STRIP_COMMAND)" != x"" ]; then \ | ||
796 | 511 | echo $(STRIP_COMMAND) exim; \ | ||
797 | 512 | $(STRIP_COMMAND) exim; \ | ||
798 | 513 | fi | ||
799 | 514 | $(EXIM_CHMOD) | ||
800 | 515 | @echo " " | ||
801 | 516 | @echo ">>> exim binary built" | ||
802 | 517 | @echo " " | ||
803 | 518 | |||
804 | 519 | # The utility for dumping the contents of an exim database | ||
805 | 520 | |||
806 | 521 | OBJ_DUMPDB = exim_dumpdb.o util-os.o util-store.o | ||
807 | 522 | |||
808 | 523 | exim_dumpdb: $(OBJ_DUMPDB) | ||
809 | 524 | @echo "$(LNCC) -o exim_dumpdb" | ||
810 | 525 | $(FE)$(LNCC) $(CFLAGS) $(INCLUDE) -o exim_dumpdb $(LFLAGS) $(OBJ_DUMPDB) \ | ||
811 | 526 | $(LIBS) $(EXTRALIBS) $(DBMLIB) | ||
812 | 527 | @if [ x"$(STRIP_COMMAND)" != x"" ]; then \ | ||
813 | 528 | echo $(STRIP_COMMAND) exim_dumpdb; \ | ||
814 | 529 | $(STRIP_COMMAND) exim_dumpdb; \ | ||
815 | 530 | fi | ||
816 | 531 | @echo ">>> exim_dumpdb utility built" | ||
817 | 532 | @echo " " | ||
818 | 533 | |||
819 | 534 | # The utility for interrogating/fixing the contents of an exim database | ||
820 | 535 | |||
821 | 536 | OBJ_FIXDB = exim_fixdb.o util-os.o util-store.o | ||
822 | 537 | |||
823 | 538 | exim_fixdb: $(OBJ_FIXDB) buildauths | ||
824 | 539 | @echo "$(LNCC) -o exim_fixdb" | ||
825 | 540 | $(FE)$(LNCC) $(CFLAGS) $(INCLUDE) -o exim_fixdb $(LFLAGS) $(OBJ_FIXDB) \ | ||
826 | 541 | auths/auths.a $(LIBS) $(EXTRALIBS) $(DBMLIB) | ||
827 | 542 | @if [ x"$(STRIP_COMMAND)" != x"" ]; then \ | ||
828 | 543 | echo $(STRIP_COMMAND) exim_fixdb; \ | ||
829 | 544 | $(STRIP_COMMAND) exim_fixdb; \ | ||
830 | 545 | fi | ||
831 | 546 | @echo ">>> exim_fixdb utility built" | ||
832 | 547 | @echo " " | ||
833 | 548 | |||
834 | 549 | # The utility for tidying the contents of an exim database | ||
835 | 550 | |||
836 | 551 | OBJ_TIDYDB = exim_tidydb.o util-os.o util-store.o | ||
837 | 552 | |||
838 | 553 | exim_tidydb: $(OBJ_TIDYDB) | ||
839 | 554 | @echo "$(LNCC) -o exim_tidydb" | ||
840 | 555 | $(FE)$(LNCC) $(CFLAGS) $(INCLUDE) -o exim_tidydb $(LFLAGS) $(OBJ_TIDYDB) \ | ||
841 | 556 | $(LIBS) $(EXTRALIBS) $(DBMLIB) | ||
842 | 557 | @if [ x"$(STRIP_COMMAND)" != x"" ]; then \ | ||
843 | 558 | echo $(STRIP_COMMAND) exim_tidydb; \ | ||
844 | 559 | $(STRIP_COMMAND) exim_tidydb; \ | ||
845 | 560 | fi | ||
846 | 561 | @echo ">>> exim_tidydb utility built" | ||
847 | 562 | @echo " " | ||
848 | 563 | |||
849 | 564 | # The utility for building dbm files | ||
850 | 565 | |||
851 | 566 | exim_dbmbuild: exim_dbmbuild.o | ||
852 | 567 | @echo "$(LNCC) -o exim_dbmbuild" | ||
853 | 568 | $(FE)$(LNCC) $(CFLAGS) $(INCLUDE) -o exim_dbmbuild $(LFLAGS) exim_dbmbuild.o \ | ||
854 | 569 | $(LIBS) $(EXTRALIBS) $(DBMLIB) | ||
855 | 570 | @if [ x"$(STRIP_COMMAND)" != x"" ]; then \ | ||
856 | 571 | echo $(STRIP_COMMAND) exim_dbmbuild; \ | ||
857 | 572 | $(STRIP_COMMAND) exim_dbmbuild; \ | ||
858 | 573 | fi | ||
859 | 574 | @echo ">>> exim_dbmbuild utility built" | ||
860 | 575 | @echo " " | ||
861 | 576 | |||
862 | 577 | # The utility for locking a mailbox while messing around with it | ||
863 | 578 | |||
864 | 579 | exim_lock: exim_lock.c os.h | ||
865 | 580 | @echo "$(CC) exim_lock.c" | ||
866 | 581 | $(FE)$(CC) -c $(CFLAGS) $(INCLUDE) exim_lock.c | ||
867 | 582 | @echo "$(LNCC) -o exim_lock" | ||
868 | 583 | $(FE)$(LNCC) -o exim_lock $(LFLAGS) exim_lock.o \ | ||
869 | 584 | $(LIBS) $(EXTRALIBS) | ||
870 | 585 | @if [ x"$(STRIP_COMMAND)" != x"" ]; then \ | ||
871 | 586 | echo $(STRIP_COMMAND) exim_lock; \ | ||
872 | 587 | $(STRIP_COMMAND) exim_lock; \ | ||
873 | 588 | fi | ||
874 | 589 | @echo ">>> exim_lock utility built" | ||
875 | 590 | @echo " " | ||
876 | 591 | |||
877 | 592 | # The X-based Exim monitor program's binary part. There's a macro for cutting | ||
878 | 593 | # out the modified TextPop module, because some antique link editors cannot | ||
879 | 594 | # handle the fact that it is redefining things that are found later in the | ||
880 | 595 | # Xaw library. | ||
881 | 596 | |||
882 | 597 | # Object modules that are the unique Eximon modules | ||
883 | 598 | |||
884 | 599 | MONBIN = em_StripChart.o $(EXIMON_TEXTPOP) em_globals.o em_init.o \ | ||
885 | 600 | em_log.o em_main.o em_menu.o em_queue.o em_strip.o \ | ||
886 | 601 | em_text.o em_xs.o | ||
887 | 602 | |||
888 | 603 | # The complete modules list also includes some specially compiled versions of | ||
889 | 604 | # code from the main Exim source tree. | ||
890 | 605 | |||
891 | 606 | OBJ_MONBIN = util-spool_in.o \ | ||
892 | 607 | util-store.o \ | ||
893 | 608 | util-string.o \ | ||
894 | 609 | util-queue.o \ | ||
895 | 610 | util-tod.o \ | ||
896 | 611 | tree.o \ | ||
897 | 612 | $(MONBIN) | ||
898 | 613 | |||
899 | 614 | eximon.bin: $(EXIMON_EDITME) eximon $(OBJ_MONBIN) \ | ||
900 | 615 | ../exim_monitor/em_version.c | ||
901 | 616 | @echo "$(CC) exim_monitor/em_version.c" | ||
902 | 617 | $(FE)$(CC) -o em_version.o -c \ | ||
903 | 618 | $(CFLAGS) $(XINCLUDE) -I. ../exim_monitor/em_version.c | ||
904 | 619 | @echo "$(LNCC) -o eximon.bin" | ||
905 | 620 | $(FE)$(PURIFY) $(LNCC) -o eximon.bin em_version.o $(LFLAGS) $(XLFLAGS) \ | ||
906 | 621 | $(OBJ_MONBIN) -lXaw -lXmu -lXt -lXext -lX11 $(PCRE_LIBS) \ | ||
907 | 622 | $(LIBS) $(LIBS_EXIMON) $(EXTRALIBS) $(EXTRALIBS_EXIMON) -lc | ||
908 | 623 | @if [ x"$(STRIP_COMMAND)" != x"" ]; then \ | ||
909 | 624 | echo $(STRIP_COMMAND) eximon.bin; \ | ||
910 | 625 | $(STRIP_COMMAND) eximon.bin; \ | ||
911 | 626 | fi | ||
912 | 627 | @echo ">>> exim monitor binary built" | ||
913 | 628 | @echo " " | ||
914 | 629 | |||
915 | 630 | |||
916 | 631 | # Compile step for most of the exim modules. HDRS is a list of headers | ||
917 | 632 | # which cause everything to be rebuilt. PHDRS is the same, for the use | ||
918 | 633 | # of routers, transports, and authenticators. I can't find a way of doing this | ||
919 | 634 | # in one. This list is overkill, but it doesn't really take much time to | ||
920 | 635 | # rebuild Exim on a modern computer. | ||
921 | 636 | |||
922 | 637 | HDRS = blob.h \ | ||
923 | 638 | config.h \ | ||
924 | 639 | dbfunctions.h \ | ||
925 | 640 | dbstuff.h \ | ||
926 | 641 | exim.h \ | ||
927 | 642 | functions.h \ | ||
928 | 643 | globals.h \ | ||
929 | 644 | hash.h \ | ||
930 | 645 | local_scan.h \ | ||
931 | 646 | macros.h \ | ||
932 | 647 | mytypes.h \ | ||
933 | 648 | sha_ver.h \ | ||
934 | 649 | structs.h \ | ||
935 | 650 | os.h | ||
936 | 651 | PHDRS = ../config.h \ | ||
937 | 652 | ../dbfunctions.h \ | ||
938 | 653 | ../dbstuff.h \ | ||
939 | 654 | ../exim.h \ | ||
940 | 655 | ../functions.h \ | ||
941 | 656 | ../globals.h \ | ||
942 | 657 | ../local_scan.h \ | ||
943 | 658 | ../macros.h \ | ||
944 | 659 | ../mytypes.h \ | ||
945 | 660 | ../structs.h \ | ||
946 | 661 | ../os.h | ||
947 | 662 | |||
948 | 663 | .SUFFIXES: .o .c | ||
949 | 664 | .c.o:; @echo "$(CC) $*.c" | ||
950 | 665 | $(FE)$(CC) -c $(CFLAGS) -I. $(INCLUDE) $(IPV6_INCLUDE) $(TLS_INCLUDE) $*.c | ||
951 | 666 | |||
952 | 667 | # Update Exim's version information and build the version object. | ||
953 | 668 | |||
954 | 669 | version.h version.sh:: | ||
955 | 670 | @../scripts/reversion | ||
956 | 671 | |||
957 | 672 | cnumber.h: version.h | ||
958 | 673 | |||
959 | 674 | version.o: $(HDRS) cnumber.h version.h version.c | ||
960 | 675 | |||
961 | 676 | # This is the dummy module for use by test compiles of individual modules. It | ||
962 | 677 | # contains functions such as log_write() that may be called from bits of Exim | ||
963 | 678 | # in the tested code. | ||
964 | 679 | |||
965 | 680 | dummies.o: dummies.c | ||
966 | 681 | |||
967 | 682 | # Compile instructions for perl.o for when EXIM_PERL is set | ||
968 | 683 | |||
969 | 684 | perl.o: $(HDRS) perl.c | ||
970 | 685 | @echo "$(PERL_CC) perl.c" | ||
971 | 686 | $(FE)$(PERL_CC) $(PERL_CCOPTS) $(CFLAGS) $(INCLUDE) -c perl.c | ||
972 | 687 | |||
973 | 688 | # Compile instructions for the database utility modules | ||
974 | 689 | |||
975 | 690 | exim_dumpdb.o: $(HDRS) exim_dbutil.c | ||
976 | 691 | @echo "$(CC) -DEXIM_DUMPDB exim_dbutil.c" | ||
977 | 692 | $(FE)$(CC) -c $(CFLAGS) $(INCLUDE) \ | ||
978 | 693 | -DCOMPILE_UTILITY \ | ||
979 | 694 | -DEXIM_DUMPDB \ | ||
980 | 695 | -o exim_dumpdb.o exim_dbutil.c | ||
981 | 696 | |||
982 | 697 | exim_fixdb.o: $(HDRS) exim_dbutil.c | ||
983 | 698 | @echo "$(CC) -DEXIM_FIXDB exim_dbutil.c" | ||
984 | 699 | $(FE)$(CC) -c $(CFLAGS) $(INCLUDE) \ | ||
985 | 700 | -DCOMPILE_UTILITY \ | ||
986 | 701 | -DEXIM_FIXDB \ | ||
987 | 702 | -o exim_fixdb.o exim_dbutil.c | ||
988 | 703 | |||
989 | 704 | exim_tidydb.o: $(HDRS) exim_dbutil.c | ||
990 | 705 | @echo "$(CC) -DEXIM_TIDYDB exim_dbutil.c" | ||
991 | 706 | $(FE)$(CC) -c $(CFLAGS) $(INCLUDE) \ | ||
992 | 707 | -DCOMPILE_UTILITY \ | ||
993 | 708 | -DEXIM_TIDYDB \ | ||
994 | 709 | -o exim_tidydb.o exim_dbutil.c | ||
995 | 710 | |||
996 | 711 | # Compile instructions for exim_dbmbuild | ||
997 | 712 | |||
998 | 713 | exim_dbmbuild.o: $(HDRS) exim_dbmbuild.c | ||
999 | 714 | @echo "$(CC) exim_dbmbuild.c" | ||
1000 | 715 | $(FE)$(CC) -c $(CFLAGS) $(INCLUDE) -DCOMPILE_UTILITY \ | ||
1001 | 716 | -o exim_dbmbuild.o exim_dbmbuild.c | ||
1002 | 717 | |||
1003 | 718 | # Utilities use special versions of some modules - typically with debugging | ||
1004 | 719 | # calls cut out. | ||
1005 | 720 | |||
1006 | 721 | util-spool_in.o: $(HDRS) spool_in.c | ||
1007 | 722 | @echo "$(CC) -DCOMPILE_UTILITY spool_in.c" | ||
1008 | 723 | $(FE)$(CC) -c $(CFLAGS) $(INCLUDE) -DCOMPILE_UTILITY -o util-spool_in.o spool_in.c | ||
1009 | 724 | |||
1010 | 725 | util-store.o: $(HDRS) store.c | ||
1011 | 726 | @echo "$(CC) -DCOMPILE_UTILITY store.c" | ||
1012 | 727 | $(FE)$(CC) -c $(CFLAGS) $(INCLUDE) -DCOMPILE_UTILITY -o util-store.o store.c | ||
1013 | 728 | |||
1014 | 729 | util-string.o: $(HDRS) string.c | ||
1015 | 730 | @echo "$(CC) -DCOMPILE_UTILITY string.c" | ||
1016 | 731 | $(FE)$(CC) -c $(CFLAGS) $(INCLUDE) -DCOMPILE_UTILITY -o util-string.o string.c | ||
1017 | 732 | |||
1018 | 733 | util-queue.o: $(HDRS) queue.c | ||
1019 | 734 | @echo "$(CC) -DCOMPILE_UTILITY queue.c" | ||
1020 | 735 | $(FE)$(CC) -c $(CFLAGS) $(INCLUDE) -DCOMPILE_UTILITY -o util-queue.o queue.c | ||
1021 | 736 | |||
1022 | 737 | util-tod.o: $(HDRS) tod.c | ||
1023 | 738 | @echo "$(CC) -DCOMPILE_UTILITY tod.c" | ||
1024 | 739 | $(FE)$(CC) -c $(CFLAGS) $(INCLUDE) -DCOMPILE_UTILITY -o util-tod.o tod.c | ||
1025 | 740 | |||
1026 | 741 | util-os.o: $(HDRS) os.c | ||
1027 | 742 | @echo "$(CC) -DCOMPILE_UTILITY os.c" | ||
1028 | 743 | $(FE)$(CC) -c $(CFLAGS) $(INCLUDE) \ | ||
1029 | 744 | -DCOMPILE_UTILITY \ | ||
1030 | 745 | -DOS_LOAD_AVERAGE \ | ||
1031 | 746 | -DFIND_RUNNING_INTERFACES \ | ||
1032 | 747 | -o util-os.o os.c | ||
1033 | 748 | |||
1034 | 749 | # The local scan module depends only on its own special header, and is compiled | ||
1035 | 750 | # from a source whose location is set by configuration. | ||
1036 | 751 | |||
1037 | 752 | local_scan.o: config local_scan.h ../$(LOCAL_SCAN_SOURCE) | ||
1038 | 753 | @echo "$(CC) local_scan.c" | ||
1039 | 754 | $(FE)$(CC) -c $(CFLAGS) -I. $(INCLUDE) -o local_scan.o ../$(LOCAL_SCAN_SOURCE) | ||
1040 | 755 | |||
1041 | 756 | # Dependencies for the "ordinary" exim modules | ||
1042 | 757 | |||
1043 | 758 | acl.o: $(HDRS) acl.c | ||
1044 | 759 | base64.o: $(HDRS) mime.h base64.c | ||
1045 | 760 | child.o: $(HDRS) child.c | ||
1046 | 761 | crypt16.o: $(HDRS) crypt16.c | ||
1047 | 762 | daemon.o: $(HDRS) daemon.c | ||
1048 | 763 | dbfn.o: $(HDRS) dbfn.c | ||
1049 | 764 | debug.o: $(HDRS) debug.c | ||
1050 | 765 | deliver.o: $(HDRS) transports/smtp.h deliver.c | ||
1051 | 766 | directory.o: $(HDRS) directory.c | ||
1052 | 767 | dns.o: $(HDRS) dns.c | ||
1053 | 768 | enq.o: $(HDRS) enq.c | ||
1054 | 769 | exim.o: $(HDRS) exim.c | ||
1055 | 770 | expand.o: $(HDRS) expand.c | ||
1056 | 771 | environment.o: $(HDRS) environment.c | ||
1057 | 772 | filter.o: $(HDRS) filter.c | ||
1058 | 773 | filtertest.o: $(HDRS) filtertest.c | ||
1059 | 774 | globals.o: $(HDRS) globals.c | ||
1060 | 775 | hash.o: $(HDRS) hash.c | ||
1061 | 776 | header.o: $(HDRS) header.c | ||
1062 | 777 | host.o: $(HDRS) host.c | ||
1063 | 778 | ip.o: $(HDRS) ip.c | ||
1064 | 779 | log.o: $(HDRS) log.c | ||
1065 | 780 | lss.o: $(HDRS) lss.c | ||
1066 | 781 | match.o: $(HDRS) match.c | ||
1067 | 782 | moan.o: $(HDRS) moan.c | ||
1068 | 783 | os.o: $(HDRS) $(OS_C_INCLUDES) os.c | ||
1069 | 784 | parse.o: $(HDRS) parse.c | ||
1070 | 785 | queue.o: $(HDRS) queue.c | ||
1071 | 786 | rda.o: $(HDRS) rda.c | ||
1072 | 787 | readconf.o: $(HDRS) readconf.c | ||
1073 | 788 | receive.o: $(HDRS) receive.c | ||
1074 | 789 | retry.o: $(HDRS) retry.c | ||
1075 | 790 | rewrite.o: $(HDRS) rewrite.c | ||
1076 | 791 | rfc2047.o: $(HDRS) rfc2047.c | ||
1077 | 792 | route.o: $(HDRS) route.c | ||
1078 | 793 | search.o: $(HDRS) search.c | ||
1079 | 794 | sieve.o: $(HDRS) sieve.c | ||
1080 | 795 | smtp_in.o: $(HDRS) smtp_in.c | ||
1081 | 796 | smtp_out.o: $(HDRS) smtp_out.c | ||
1082 | 797 | spool_in.o: $(HDRS) spool_in.c | ||
1083 | 798 | spool_out.o: $(HDRS) spool_out.c | ||
1084 | 799 | std-crypto.o: $(HDRS) std-crypto.c | ||
1085 | 800 | store.o: $(HDRS) store.c | ||
1086 | 801 | string.o: $(HDRS) string.c | ||
1087 | 802 | tls.o: $(HDRS) tls.c \ | ||
1088 | 803 | tls-gnu.c tlscert-gnu.c \ | ||
1089 | 804 | tls-openssl.c tlscert-openssl.c | ||
1090 | 805 | tod.o: $(HDRS) tod.c | ||
1091 | 806 | transport.o: $(HDRS) transport.c | ||
1092 | 807 | tree.o: $(HDRS) tree.c | ||
1093 | 808 | verify.o: $(HDRS) transports/smtp.h verify.c | ||
1094 | 809 | dkim.o: $(HDRS) pdkim/pdkim.h dkim.c | ||
1095 | 810 | dkim_transport.o: $(HDRS) dkim_transport.c | ||
1096 | 811 | |||
1097 | 812 | # Dependencies for WITH_CONTENT_SCAN modules | ||
1098 | 813 | |||
1099 | 814 | malware.o: $(HDRS) malware.c | ||
1100 | 815 | mime.o: $(HDRS) mime.h mime.c | ||
1101 | 816 | regex.o: $(HDRS) regex.c | ||
1102 | 817 | spam.o: $(HDRS) spam.c | ||
1103 | 818 | spool_mbox.o: $(HDRS) spool_mbox.c | ||
1104 | 819 | |||
1105 | 820 | |||
1106 | 821 | # Dependencies for EXPERIMENTAL_* modules | ||
1107 | 822 | |||
1108 | 823 | bmi_spam.o: $(HDRS) bmi_spam.c | ||
1109 | 824 | dane.o: $(HDRS) dane.c dane-gnu.c dane-openssl.c | ||
1110 | 825 | dcc.o: $(HDRS) dcc.h dcc.c | ||
1111 | 826 | dmarc.o: $(HDRS) pdkim/pdkim.h dmarc.h dmarc.c | ||
1112 | 827 | imap_utf7.o: $(HDRS) imap_utf7.c | ||
1113 | 828 | spf.o: $(HDRS) spf.h spf.c | ||
1114 | 829 | srs.o: $(HDRS) srs.h srs.c | ||
1115 | 830 | utf8.o: $(HDRS) utf8.c | ||
1116 | 831 | |||
1117 | 832 | # The module containing tables of available lookups, routers, auths, and | ||
1118 | 833 | # transports must be rebuilt if any of them are. However, because the makefiles | ||
1119 | 834 | # for the drivers are always run, we don't actually put the dependencies here, | ||
1120 | 835 | # because if we do, some version of "make" (e.g. IRIX) insist on rebuilding | ||
1121 | 836 | # drtables.o even though the .a files haven't in fact been updated. Instead | ||
1122 | 837 | # it is arranged that the lower-level makefiles remove drtables.o when they | ||
1123 | 838 | # rebuild the .a files. | ||
1124 | 839 | |||
1125 | 840 | drtables.o: $(HDRS) drtables.c | ||
1126 | 841 | |||
1127 | 842 | # We depend upon object files built as part of building the lookups library | ||
1128 | 843 | # When using parallel make, we don't have the dependency to force building | ||
1129 | 844 | # in the sub-directory unless we force that dependency: | ||
1130 | 845 | |||
1131 | 846 | $(OBJ_LOOKUPS): buildlookups | ||
1132 | 847 | |||
1133 | 848 | # The exim monitor's private modules - the sources live in a private | ||
1134 | 849 | # subdirectory. The final binary combines the private modules with some | ||
1135 | 850 | # modules from the main exim binary. | ||
1136 | 851 | |||
1137 | 852 | em_StripChart.o: ../exim_monitor/em_StripChart.c | ||
1138 | 853 | em_TextPop.o: ../exim_monitor/em_TextPop.c | ||
1139 | 854 | em_globals.o: ../exim_monitor/em_globals.c ../exim_monitor/em_hdr.h | ||
1140 | 855 | em_init.o: ../exim_monitor/em_init.c ../exim_monitor/em_hdr.h | ||
1141 | 856 | em_log.o: ../exim_monitor/em_log.c ../exim_monitor/em_hdr.h | ||
1142 | 857 | em_main.o: ../exim_monitor/em_main.c ../exim_monitor/em_hdr.h | ||
1143 | 858 | em_menu.o: ../exim_monitor/em_menu.c ../exim_monitor/em_hdr.h | ||
1144 | 859 | em_queue.o: ../exim_monitor/em_queue.c ../exim_monitor/em_hdr.h | ||
1145 | 860 | em_strip.o: ../exim_monitor/em_strip.c ../exim_monitor/em_hdr.h | ||
1146 | 861 | em_text.o: ../exim_monitor/em_text.c ../exim_monitor/em_hdr.h | ||
1147 | 862 | em_xs.o: ../exim_monitor/em_xs.c ../exim_monitor/em_hdr.h | ||
1148 | 863 | em_version.o: ../exim_monitor/em_version.c ../exim_monitor/em_hdr.h | ||
1149 | 864 | $(MONBIN): $(HDRS) | ||
1150 | 865 | @echo "$(CC) exim_monitor/`echo $@ | sed 's/o$$/c/'`" | ||
1151 | 866 | $(FE)$(CC) -o $@ -c $(CFLAGS) -I. -I../exim_monitor $(INCLUDE) $(XINCLUDE) \ | ||
1152 | 867 | ../exim_monitor/`echo $@ | sed 's/o$$/c/'` | ||
1153 | 868 | |||
1154 | 869 | |||
1155 | 870 | # Targets for the various libraries that Exim uses. | ||
1156 | 871 | |||
1157 | 872 | # The lookups library. | ||
1158 | 873 | |||
1159 | 874 | buildlookups: config | ||
1160 | 875 | @cd lookups && $(MAKE) SHELL=$(SHELL) AR="$(AR)" $(MFLAGS) CC="$(CC)" CFLAGS="$(CFLAGS)" \ | ||
1161 | 876 | CFLAGS_DYNAMIC="$(CFLAGS_DYNAMIC)" HDRS="../version.h $(PHDRS)" \ | ||
1162 | 877 | FE="$(FE)" RANLIB="$(RANLIB)" RM_COMMAND="$(RM_COMMAND)" \ | ||
1163 | 878 | INCLUDE="$(INCLUDE) $(IPV6_INCLUDE) $(TLS_INCLUDE) $(LOOKUP_INCLUDE)" | ||
1164 | 879 | @echo " " | ||
1165 | 880 | |||
1166 | 881 | # The routers library. | ||
1167 | 882 | |||
1168 | 883 | buildrouters: config | ||
1169 | 884 | @cd routers && $(MAKE) SHELL=$(SHELL) AR="$(AR)" $(MFLAGS) CC="$(CC)" CFLAGS="$(CFLAGS)" \ | ||
1170 | 885 | FE="$(FE)" RANLIB="$(RANLIB)" RM_COMMAND="$(RM_COMMAND)" HDRS="$(PHDRS)" \ | ||
1171 | 886 | INCLUDE="$(INCLUDE) $(IPV6_INCLUDE) $(TLS_INCLUDE)" | ||
1172 | 887 | @echo " " | ||
1173 | 888 | |||
1174 | 889 | # The transports library. | ||
1175 | 890 | |||
1176 | 891 | buildtransports: config | ||
1177 | 892 | @cd transports && $(MAKE) SHELL=$(SHELL) AR="$(AR)" $(MFLAGS) CC="$(CC)" CFLAGS="$(CFLAGS)" \ | ||
1178 | 893 | FE="$(FE)" RANLIB="$(RANLIB)" RM_COMMAND="$(RM_COMMAND)" HDRS="$(PHDRS)" \ | ||
1179 | 894 | INCLUDE="$(INCLUDE) $(IPV6_INCLUDE) $(TLS_INCLUDE)" | ||
1180 | 895 | @echo " " | ||
1181 | 896 | |||
1182 | 897 | # The library of authorization modules | ||
1183 | 898 | |||
1184 | 899 | buildauths: config | ||
1185 | 900 | @cd auths && $(MAKE) SHELL=$(SHELL) AR="$(AR)" $(MFLAGS) CC="$(CC)" CFLAGS="$(CFLAGS)" \ | ||
1186 | 901 | FE="$(FE)" RANLIB="$(RANLIB)" RM_COMMAND="$(RM_COMMAND)" HDRS="$(PHDRS)" \ | ||
1187 | 902 | INCLUDE="$(INCLUDE) $(IPV6_INCLUDE) $(TLS_INCLUDE)" | ||
1188 | 903 | @echo " " | ||
1189 | 904 | |||
1190 | 905 | # The PDKIM library | ||
1191 | 906 | |||
1192 | 907 | buildpdkim: pdkim/pdkim.a | ||
1193 | 908 | pdkim/pdkim.a: config | ||
1194 | 909 | @cd pdkim && $(MAKE) SHELL=$(SHELL) AR="$(AR)" $(MFLAGS) CC="$(CC)" CFLAGS="$(CFLAGS)" \ | ||
1195 | 910 | FE="$(FE)" RANLIB="$(RANLIB)" RM_COMMAND="$(RM_COMMAND)" HDRS="$(PHDRS)" \ | ||
1196 | 911 | INCLUDE="$(INCLUDE) $(IPV6_INCLUDE) $(TLS_INCLUDE)" | ||
1197 | 912 | @echo " " | ||
1198 | 913 | |||
1199 | 914 | # The "clean", "install", and "makefile" targets just pass themselves back to | ||
1200 | 915 | # the main Exim makefile. These targets will be obeyed only if "make" is obeyed | ||
1201 | 916 | # for them in the build directory. | ||
1202 | 917 | |||
1203 | 918 | clean install makefile:; cd ..; $(MAKE) $(MFLAGS) build=$(build) $@ | ||
1204 | 919 | |||
1205 | 920 | # Targets for building stand-alone testing programs for basic testing of | ||
1206 | 921 | # some of the building blocks. These are not integrated with the makefile- | ||
1207 | 922 | # building targets. If you change something that is going to cause the | ||
1208 | 923 | # makefile to be rebuilt, you must run "make makefile" before running one | ||
1209 | 924 | # of these. | ||
1210 | 925 | |||
1211 | 926 | # The testing programs use different versions of some modules - usually | ||
1212 | 927 | # with bits cut out that are not relevant to the test in hand. For those | ||
1213 | 928 | # that are used by several tests, we use a different name. | ||
1214 | 929 | |||
1215 | 930 | sa-globals.o: $(HDRS) globals.c | ||
1216 | 931 | $(CC) -c $(CFLAGS) $(INCLUDE) -DSTAND_ALONE -o sa-globals.o globals.c | ||
1217 | 932 | |||
1218 | 933 | sa-os.o: $(HDRS) os.c | ||
1219 | 934 | $(CC) -c $(CFLAGS) $(INCLUDE) \ | ||
1220 | 935 | -DFIND_RUNNING_INTERFACES \ | ||
1221 | 936 | -o sa-os.o os.c | ||
1222 | 937 | |||
1223 | 938 | # These are the test targets themselves | ||
1224 | 939 | |||
1225 | 940 | test_dbfn: config.h dbfn.c dummies.o sa-globals.o sa-os.o store.o \ | ||
1226 | 941 | string.o tod.o version.o utf8.o | ||
1227 | 942 | $(CC) -c $(CFLAGS) $(INCLUDE) -DSTAND_ALONE dbfn.c | ||
1228 | 943 | $(CC) -c $(CFLAGS) $(INCLUDE) -DCOMPILE_UTILITY store.c | ||
1229 | 944 | $(LNCC) -o test_dbfn $(LFLAGS) dbfn.o \ | ||
1230 | 945 | dummies.o sa-globals.o sa-os.o store.o string.o \ | ||
1231 | 946 | tod.o version.o utf8.o $(LIBS) $(DBMLIB) $(LDFLAGS) | ||
1232 | 947 | rm -f dbfn.o store.o | ||
1233 | 948 | |||
1234 | 949 | test_host: config.h child.c host.c dns.c dummies.c sa-globals.o os.o \ | ||
1235 | 950 | store.o string.o tod.o tree.o | ||
1236 | 951 | $(CC) -c $(CFLAGS) $(INCLUDE) -DSTAND_ALONE -DTEST_HOST child.c | ||
1237 | 952 | $(CC) -c $(CFLAGS) $(INCLUDE) -DSTAND_ALONE -DTEST_HOST host.c | ||
1238 | 953 | $(CC) -c $(CFLAGS) $(INCLUDE) -DSTAND_ALONE -DTEST_HOST dns.c | ||
1239 | 954 | $(CC) -c $(CFLAGS) $(INCLUDE) -DSTAND_ALONE -DTEST_HOST dummies.c | ||
1240 | 955 | $(LNCC) -o test_host $(LFLAGS) \ | ||
1241 | 956 | host.o child.o dns.o dummies.o sa-globals.o os.o store.o string.o \ | ||
1242 | 957 | tod.o tree.o $(LIBS) $(LIBRESOLV) | ||
1243 | 958 | rm -f child.o dummies.o host.o dns.o | ||
1244 | 959 | |||
1245 | 960 | test_os: os.h os.c dummies.o sa-globals.o store.o string.o tod.o utf8.o | ||
1246 | 961 | $(CC) -c $(CFLAGS) $(INCLUDE) -DSTAND_ALONE os.c | ||
1247 | 962 | $(LNCC) -o test_os $(LFLAGS) os.o dummies.o \ | ||
1248 | 963 | sa-globals.o store.o string.o tod.o utf8.o $(LIBS) $(LDFLAGS) | ||
1249 | 964 | rm -f os.o | ||
1250 | 965 | |||
1251 | 966 | test_parse: config.h parse.c dummies.o sa-globals.o \ | ||
1252 | 967 | store.o string.o tod.o version.o utf8.o | ||
1253 | 968 | $(CC) -c $(CFLAGS) $(INCLUDE) -DSTAND_ALONE parse.c | ||
1254 | 969 | $(LNCC) -o test_parse $(LFLAGS) parse.o \ | ||
1255 | 970 | dummies.o sa-globals.o store.o string.o tod.o version.o \ | ||
1256 | 971 | utf8.o $(LDFLAGS) | ||
1257 | 972 | rm -f parse.o | ||
1258 | 973 | |||
1259 | 974 | test_string: config.h string.c dummies.o sa-globals.o store.o tod.o utf8.o | ||
1260 | 975 | $(CC) -c $(CFLAGS) $(INCLUDE) -DSTAND_ALONE string.c | ||
1261 | 976 | $(LNCC) -o test_string $(LFLAGS) -DSTAND_ALONE string.o \ | ||
1262 | 977 | dummies.o sa-globals.o store.o tod.o utf8.o $(LIBS) $(LDFLAGS) | ||
1263 | 978 | rm -f string.o | ||
1264 | 979 | |||
1265 | 980 | # End | ||
1266 | diff --git a/OS/Makefile-Default b/OS/Makefile-Default | |||
1267 | 0 | new file mode 100644 | 981 | new file mode 100644 |
1268 | index 0000000..b3990fe | |||
1269 | --- /dev/null | |||
1270 | +++ b/OS/Makefile-Default | |||
1271 | @@ -0,0 +1,321 @@ | |||
1272 | 1 | ################################################## | ||
1273 | 2 | # The Exim mail transport agent # | ||
1274 | 3 | ################################################## | ||
1275 | 4 | |||
1276 | 5 | # Generic default make file containing settings that relate to the OS or | ||
1277 | 6 | # to selectable features within the OS. The configuration options for Exim | ||
1278 | 7 | # itself live in Local/Makefile, which is constructed by editing src/EDITME. | ||
1279 | 8 | |||
1280 | 9 | # These settings are basic defaults which may be overridden, either by the | ||
1281 | 10 | # generic OS-specific files, or by site-specific files. Do not edit this file. | ||
1282 | 11 | # Instead, edit or create suitable OS-specific and/or site specific files. | ||
1283 | 12 | # See the manual for details. | ||
1284 | 13 | |||
1285 | 14 | |||
1286 | 15 | # MAKE_SHELL contains the name of the shell to be used for executing commands | ||
1287 | 16 | # from the make files. Normally /bin/sh should be used. | ||
1288 | 17 | |||
1289 | 18 | MAKE_SHELL=/bin/sh | ||
1290 | 19 | |||
1291 | 20 | |||
1292 | 21 | # BASENAME_COMMAND contains the path to the "basename" command, which varies | ||
1293 | 22 | # from OS to OS. This is used when building the Exim monitor script only. (See | ||
1294 | 23 | # also HOSTNAME_COMMAND.) If BASENAME_COMMAND is set to "look_for_it" then the | ||
1295 | 24 | # script checks for /usr/bin/basename and /bin/basename, and if neither is | ||
1296 | 25 | # found, it uses /usr/ucb/basename. This copes with Solaris 2 and Linux, both | ||
1297 | 26 | # of which come in different versions. | ||
1298 | 27 | |||
1299 | 28 | BASENAME_COMMAND=/usr/bin/basename | ||
1300 | 29 | |||
1301 | 30 | |||
1302 | 31 | # If you set STRIP_COMMAND to the path of the "strip" command, it will be run | ||
1303 | 32 | # on every binary that is built. It is left unset by default, which leaves | ||
1304 | 33 | # the binaries unstripped. | ||
1305 | 34 | |||
1306 | 35 | # STRIP_COMMAND=/usr/bin/strip | ||
1307 | 36 | |||
1308 | 37 | |||
1309 | 38 | # Some of the following commands live in different places in different OS. We | ||
1310 | 39 | # include them all here for generality. | ||
1311 | 40 | |||
1312 | 41 | CHOWN_COMMAND=/usr/bin/chown | ||
1313 | 42 | CHGRP_COMMAND=/usr/bin/chgrp | ||
1314 | 43 | CHMOD_COMMAND=/usr/bin/chmod | ||
1315 | 44 | MV_COMMAND=/bin/mv | ||
1316 | 45 | RM_COMMAND=/bin/rm | ||
1317 | 46 | TOUCH_COMMAND=/usr/bin/touch | ||
1318 | 47 | |||
1319 | 48 | |||
1320 | 49 | # Some operating systems have different ways of building libraries of | ||
1321 | 50 | # functions. This macro defines the command to do this, defaulting to | ||
1322 | 51 | # the "ar" command with options "cq". | ||
1323 | 52 | |||
1324 | 53 | AR=ar cq | ||
1325 | 54 | |||
1326 | 55 | |||
1327 | 56 | # Not all operating systems have the iconv() function. Those that do have | ||
1328 | 57 | # | ||
1329 | 58 | # HAVE_ICONV=yes | ||
1330 | 59 | # | ||
1331 | 60 | # in their OS-specific Makefiles. On those that don't it is possible to | ||
1332 | 61 | # install an independent implementation of iconv(). If you've done this, | ||
1333 | 62 | # add "HAVE_ICONV=yes" to your Local/Makefile. | ||
1334 | 63 | |||
1335 | 64 | |||
1336 | 65 | # Perl is not necessary for running Exim itself, except when EXIM_PERL | ||
1337 | 66 | # is set to cause Perl embedding. However, some Perl utilities are provided | ||
1338 | 67 | # for processing the logs. Perl 5 is assumed. | ||
1339 | 68 | |||
1340 | 69 | PERL_COMMAND=/usr/bin/perl | ||
1341 | 70 | |||
1342 | 71 | |||
1343 | 72 | # CC contains the name of the C compiler to be used. | ||
1344 | 73 | |||
1345 | 74 | CC=gcc | ||
1346 | 75 | |||
1347 | 76 | |||
1348 | 77 | # CFLAGS contains flags to be passed to the compiler. Nothing is defaulted | ||
1349 | 78 | # here; instead each OS-dependent Makefile contains a default setting. | ||
1350 | 79 | |||
1351 | 80 | # CFLAGS=-O | ||
1352 | 81 | |||
1353 | 82 | |||
1354 | 83 | # LFLAGS contains flags to be passed to the link editor. Nothing is defaulted | ||
1355 | 84 | # here; instead each OS-dependent Makefile contains a default setting if one | ||
1356 | 85 | # is needed. | ||
1357 | 86 | |||
1358 | 87 | # LFLAGS= | ||
1359 | 88 | |||
1360 | 89 | |||
1361 | 90 | # PCRE_LIBS contains the library to be linked for PCRE | ||
1362 | 91 | |||
1363 | 92 | PCRE_LIBS=-lpcre | ||
1364 | 93 | |||
1365 | 94 | |||
1366 | 95 | # LIBS and EXTRALIBS contain library settings that are used on linking | ||
1367 | 96 | # commands to build binaries. The OS-dependent Makefile may contain a default | ||
1368 | 97 | # setting for LIBS, leaving EXTRALIBS available for adding further libraries | ||
1369 | 98 | # that are required for optional extras. | ||
1370 | 99 | |||
1371 | 100 | # LIBS= | ||
1372 | 101 | # EXTRALIBS= | ||
1373 | 102 | |||
1374 | 103 | |||
1375 | 104 | # LIBS_EXIM and EXTRALIBS_EXIM contain library settings that are used | ||
1376 | 105 | # only when linking the Exim binary. They are not used for other binaries. | ||
1377 | 106 | # One possible use is for the TCP wrappers library. | ||
1378 | 107 | |||
1379 | 108 | # LIBS_EXIM= | ||
1380 | 109 | # EXTRALIBS_EXIM= | ||
1381 | 110 | |||
1382 | 111 | |||
1383 | 112 | # LIBS_EXIMON and EXTRALIBS_EXIMON contain library settings that are | ||
1384 | 113 | # used only when linking the Exim monitor binary. They are not used for | ||
1385 | 114 | # other binaries. | ||
1386 | 115 | |||
1387 | 116 | # LIBS_EXIMON= | ||
1388 | 117 | # EXTRALIBS_EXIMON= | ||
1389 | 118 | |||
1390 | 119 | |||
1391 | 120 | # The error name for quota exceeded varies among operating systems, and | ||
1392 | 121 | # even, unfortunately, in different versions of the same operating system. | ||
1393 | 122 | # EDQUOT was not in Sys V, but is in SPEC 1170, apparently. It was used | ||
1394 | 123 | # in SunOS4, but got taken out for SunOS5, where ENOSPC was given if a quota | ||
1395 | 124 | # was exceeded. However, it got put back into SunOS5 with a patch to 5.4 in | ||
1396 | 125 | # order to comply with SPEC 1170. Thus even different patch levels of the same | ||
1397 | 126 | # system (SunOS5) may use different numbers. | ||
1398 | 127 | # | ||
1399 | 128 | # If you don't have quotas or are not interested in handling quota errors | ||
1400 | 129 | # specially, just set this variable to 0. If it is not set, it defaults to | ||
1401 | 130 | # EDQUOT if that is defined for the OS; otherwise it defaults to ENOSPC. | ||
1402 | 131 | |||
1403 | 132 | # ERRNO_QUOTA=EDQUOT | ||
1404 | 133 | |||
1405 | 134 | |||
1406 | 135 | # The exiwhat utility script finds all the processes running Exim, and sends | ||
1407 | 136 | # them a SIGUSR1 signal to get them to write their status to a file. There are | ||
1408 | 137 | # two ways in which this can be done: | ||
1409 | 138 | # | ||
1410 | 139 | # (1) If the OS has a command to find processes and signal them, that can be | ||
1411 | 140 | # used. Linux has "killall"; Solaris has "pkill". (Note: "killall" on Solaris | ||
1412 | 141 | # does something very different - and disastrous.) The following are set in the | ||
1413 | 142 | # OS-specific Makefiles for those OS where this can be done: | ||
1414 | 143 | |||
1415 | 144 | # EXIWHAT_MULTIKILL_CMD= | ||
1416 | 145 | # EXIWHAT_MULTIKILL_ARG= | ||
1417 | 146 | |||
1418 | 147 | # (2) For other operating systems, exiwhat calls the ps command and egreps the | ||
1419 | 148 | # output in order to find all the processes running Exim. The arguments for the | ||
1420 | 149 | # various commands needed to do this vary from OS to OS. These defaults work on | ||
1421 | 150 | # Solaris 2, HPUX, and IRIX. The OS-specific Makefiles have different versions | ||
1422 | 151 | # for other systems, and you can override with your own requirements in your | ||
1423 | 152 | # private Makefiles in the Local directory. The most commonly found | ||
1424 | 153 | # alternatives are -ax instead of -e for the ps argument, and / instead of a | ||
1425 | 154 | # blank before the name exim for the egrep argument on systems whose ps output | ||
1426 | 155 | # shows the full path name. The quotes for the egrep argument are specified | ||
1427 | 156 | # here so that leading white space can be used. This value should always be | ||
1428 | 157 | # given in single quotes. | ||
1429 | 158 | |||
1430 | 159 | EXIWHAT_PS_CMD=/bin/ps | ||
1431 | 160 | EXIWHAT_PS_ARG=-e | ||
1432 | 161 | EXIWHAT_EGREP_ARG=' exim( |$$|-)' | ||
1433 | 162 | |||
1434 | 163 | # For both kinds of exiwhat usage, the next setting specifies the signal that | ||
1435 | 164 | # is sent. | ||
1436 | 165 | |||
1437 | 166 | EXIWHAT_KILL_SIGNAL=-USR1 | ||
1438 | 167 | |||
1439 | 168 | |||
1440 | 169 | # IPv6 is gradually spreading more and more widely. Most operating systems seem | ||
1441 | 170 | # to support it nowadays. If you set this option, IPv6 support will be included | ||
1442 | 171 | # in the Exim binary. As well as the basic enabling option, there are | ||
1443 | 172 | # parameters for include and library directories that may be needed for IPv6 on | ||
1444 | 173 | # some systems, where the support is not yet in the standard library. | ||
1445 | 174 | |||
1446 | 175 | # HAVE_IPV6=YES | ||
1447 | 176 | # IPV6_INCLUDE=-I /usr/ipv6/include | ||
1448 | 177 | # IPV6_LIBS=-L/usr/ipv6/libs -linet6 | ||
1449 | 178 | |||
1450 | 179 | # Exim uses the function getaddrinfo() for converting IPv6 addresses in text | ||
1451 | 180 | # form to binary. Apparently some operating systems do not support this, or not | ||
1452 | 181 | # correctly, and require the use of the function inet_pton() instead. The | ||
1453 | 182 | # following setting enables this. Note, however, the inet_pton() has reduced | ||
1454 | 183 | # functionality compared with getaddrinfo(). In particular, it does not | ||
1455 | 184 | # recognize the percent convention for identifying scopes (interfaces) that is | ||
1456 | 185 | # used by some operating systems. | ||
1457 | 186 | |||
1458 | 187 | # IPV6_USE_INET_PTON=yes | ||
1459 | 188 | |||
1460 | 189 | # HOSTNAME_COMMAND contains the path to the "hostname" command, which varies | ||
1461 | 190 | # from OS to OS. This is used when building the Exim monitor script only. (See | ||
1462 | 191 | # also BASENAME_COMMAND.) If HOSTNAME_COMMAND is set to "look_for_it" then the | ||
1463 | 192 | # script checks for /usr/bin/hostname and /bin/hostname, and if neither is | ||
1464 | 193 | # found, it uses /usr/ucb/basename. This copes with Solaris 2, which comes in | ||
1465 | 194 | # different versions. | ||
1466 | 195 | |||
1467 | 196 | HOSTNAME_COMMAND=/bin/hostname | ||
1468 | 197 | |||
1469 | 198 | |||
1470 | 199 | # INCLUDE contains arbitrary include parameters that you may need to use | ||
1471 | 200 | # when building exim. It is added to every compile command. | ||
1472 | 201 | |||
1473 | 202 | # INCLUDE=-I /some/special/include-directory | ||
1474 | 203 | |||
1475 | 204 | |||
1476 | 205 | # Some OS require a separate library to be quoted when linking programs that | ||
1477 | 206 | # call name resolver functions. This can be set in LIBRESOLV, which is left | ||
1478 | 207 | # unset here, but is set is some of the OS-specific Makefiles. | ||
1479 | 208 | |||
1480 | 209 | # LIBRESOLV= | ||
1481 | 210 | |||
1482 | 211 | |||
1483 | 212 | # Additional libraries and include directories may be required for some | ||
1484 | 213 | # lookup styles, e.g. LDAP or SQL. LOOKUP_LIBS is included only on the | ||
1485 | 214 | # command for linking Exim itself, not on any auxiliary programs. You | ||
1486 | 215 | # don't need to set LOOKUP_INCLUDE if the relevant directories are already | ||
1487 | 216 | # specified in INCLUDE. | ||
1488 | 217 | |||
1489 | 218 | # LOOKUP_INCLUDE=-I /usr/local/ldap/include -I /usr/local/sql/include | ||
1490 | 219 | # LOOKUP_LIBS=-L/usr/local/lib -lldap -llber | ||
1491 | 220 | |||
1492 | 221 | |||
1493 | 222 | # RANLIB should be set to something that does nothing on systems that do not | ||
1494 | 223 | # have the ranlib command or do not need to run it on library files. | ||
1495 | 224 | |||
1496 | 225 | RANLIB=ranlib | ||
1497 | 226 | |||
1498 | 227 | |||
1499 | 228 | # EXIM_CHMOD is available to specify a command that is automatically applied | ||
1500 | 229 | # to the Exim binary immediately it is compiled. (I find this useful when | ||
1501 | 230 | # building test versions.) | ||
1502 | 231 | |||
1503 | 232 | EXIM_CHMOD=@true | ||
1504 | 233 | |||
1505 | 234 | |||
1506 | 235 | # LOCAL_SCAN_SOURCE defines the file in which the function local_scan() is | ||
1507 | 236 | # defined. This provides the administrator with a hook for including C code | ||
1508 | 237 | # for scanning incoming mails. The path that is defined must be relative to | ||
1509 | 238 | # the Exim distribution directory. For example | ||
1510 | 239 | |||
1511 | 240 | # LOCAL_SCAN_SOURCE=Local/local_scan.c | ||
1512 | 241 | |||
1513 | 242 | # The default setting points to a template function that doesn't actually do | ||
1514 | 243 | # any scanning, but just accepts the message. | ||
1515 | 244 | |||
1516 | 245 | LOCAL_SCAN_SOURCE=src/local_scan.c | ||
1517 | 246 | |||
1518 | 247 | # If you want to specify options for your local_scan() that can be set from | ||
1519 | 248 | # the main Exim configuration file, you need to uncomment the following line, | ||
1520 | 249 | # and then provide a table of options in your local_scan() source, as described | ||
1521 | 250 | # in the reference manual. | ||
1522 | 251 | |||
1523 | 252 | # LOCAL_SCAN_HAS_OPTIONS=yes | ||
1524 | 253 | |||
1525 | 254 | |||
1526 | 255 | ############################################################################# | ||
1527 | 256 | # The following are all concerned with configuring the way Exim handles its | ||
1528 | 257 | # database (hints) and other dbm files. | ||
1529 | 258 | |||
1530 | 259 | # Some systems require a separate library to be supplied when linking programs | ||
1531 | 260 | # that make use of DBM library calls. This can be set in DBMLIB, which is unset | ||
1532 | 261 | # by default, but is set in some of the OS-specific Makefiles. Setting it in | ||
1533 | 262 | # your Local/Makefile will override any other setting. | ||
1534 | 263 | |||
1535 | 264 | # DBMLIB= | ||
1536 | 265 | |||
1537 | 266 | |||
1538 | 267 | # When Exim is attempting to lock one of its database (hints) files, it | ||
1539 | 268 | # applies a timeout which can be altered here. | ||
1540 | 269 | |||
1541 | 270 | # EXIMDB_LOCK_TIMEOUT=60 | ||
1542 | 271 | |||
1543 | 272 | |||
1544 | 273 | # By default, Exim uses traditional ndbm function calls to handle its indexed | ||
1545 | 274 | # hints databases. On systems that have Berkeley db installed, this still | ||
1546 | 275 | # works via the compatibility interface. However, by defining USE_DB you can | ||
1547 | 276 | # make it use native db function calls. | ||
1548 | 277 | |||
1549 | 278 | # USE_DB=YES | ||
1550 | 279 | |||
1551 | 280 | # Similarly, if you are using gdbm, Exim will by default use the ndbm | ||
1552 | 281 | # compatibility interface. However, by defining USE_GDBM you can make it | ||
1553 | 282 | # use the native gdbm function calls. | ||
1554 | 283 | |||
1555 | 284 | # USE_GDBM=YES | ||
1556 | 285 | |||
1557 | 286 | |||
1558 | 287 | ############################################################################# | ||
1559 | 288 | # The following definitions are relevant only when compiling the Exim monitor | ||
1560 | 289 | # program, which requires an X11 display. See the variable EXIM_MONITOR in | ||
1561 | 290 | # src/EDITME for how to suppress this compilation. | ||
1562 | 291 | |||
1563 | 292 | # X11 contains the location of the X11 libraries and include files. | ||
1564 | 293 | |||
1565 | 294 | X11=/usr/X11R6 | ||
1566 | 295 | |||
1567 | 296 | # XINCLUDE contains options for header inclusion when compiling functions | ||
1568 | 297 | # that call X11 functions. | ||
1569 | 298 | |||
1570 | 299 | XINCLUDE=-I$(X11)/include | ||
1571 | 300 | |||
1572 | 301 | # XLFLAGS contains flags to be passed to the linker when linking the monitor. | ||
1573 | 302 | |||
1574 | 303 | XLFLAGS=-L$(X11)/lib | ||
1575 | 304 | |||
1576 | 305 | # X11_LD_LIB contains the name of the X11 library that is to be added to | ||
1577 | 306 | # LD_LIBRARY_PATH when running the monitor program. | ||
1578 | 307 | |||
1579 | 308 | X11_LD_LIB=$(X11)/lib | ||
1580 | 309 | |||
1581 | 310 | # A modified version of the Athena TextPop module is supplied with Exim. The | ||
1582 | 311 | # modification is to remove the "replace" part of the "search and replace" | ||
1583 | 312 | # operation because it isn't wanted. TextPop is only one of a number of | ||
1584 | 313 | # modules that make up the Text widget. Some antique link editors cannot handle | ||
1585 | 314 | # the case of a replacement module for one of a set of modules. To allow | ||
1586 | 315 | # the monitor to be linked in such cases, set the value of EXIMON_TEXTPOP | ||
1587 | 316 | # to be empty. The search operations will then contain a useless "replace" | ||
1588 | 317 | # option, which is untidy, but does no harm. | ||
1589 | 318 | |||
1590 | 319 | EXIMON_TEXTPOP=em_TextPop.o | ||
1591 | 320 | |||
1592 | 321 | # End | ||
1593 | diff --git a/OS/Makefile-FreeBSD b/OS/Makefile-FreeBSD | |||
1594 | 0 | new file mode 100644 | 322 | new file mode 100644 |
1595 | index 0000000..7c6c064 | |||
1596 | --- /dev/null | |||
1597 | +++ b/OS/Makefile-FreeBSD | |||
1598 | @@ -0,0 +1,54 @@ | |||
1599 | 1 | # Exim: OS-specific make file for FreeBSD | ||
1600 | 2 | # There's no setting of CFLAGS here, to allow the system default | ||
1601 | 3 | # for "make" to be the default. | ||
1602 | 4 | |||
1603 | 5 | CHOWN_COMMAND=/usr/sbin/chown | ||
1604 | 6 | STRIP_COMMAND=/usr/bin/strip | ||
1605 | 7 | CHMOD_COMMAND=/bin/chmod | ||
1606 | 8 | |||
1607 | 9 | # FreeBSD Ports no longer insert compatibility symlinks into /usr/bin for | ||
1608 | 10 | # scripting languages which traditionally have had them. | ||
1609 | 11 | PERL_COMMAND=/usr/local/bin/perl | ||
1610 | 12 | |||
1611 | 13 | HAVE_SA_LEN=YES | ||
1612 | 14 | |||
1613 | 15 | # crypt() is in a separate library | ||
1614 | 16 | LIBS=-lcrypt -lm -lutil | ||
1615 | 17 | |||
1616 | 18 | # Dynamically loaded modules need to be built with -fPIC | ||
1617 | 19 | CFLAGS_DYNAMIC=-shared -rdynamic -fPIC | ||
1618 | 20 | |||
1619 | 21 | # FreeBSD always ships with Berkeley DB | ||
1620 | 22 | USE_DB=yes | ||
1621 | 23 | |||
1622 | 24 | # This code for building outside ports suggested by Richard Clayton | ||
1623 | 25 | .ifdef X11BASE | ||
1624 | 26 | X11=${X11BASE} | ||
1625 | 27 | .elifdef LOCALBASE | ||
1626 | 28 | X11=$(LOCALBASE) | ||
1627 | 29 | .else | ||
1628 | 30 | X11=/usr/local | ||
1629 | 31 | .endif | ||
1630 | 32 | |||
1631 | 33 | # nb: FreeBSD is entirely elf; objformat was removed prior to FreeBSD 7 | ||
1632 | 34 | # http://www.freebsd.org/cgi/cvsweb.cgi/src/usr.bin/objformat/Attic/objformat.c | ||
1633 | 35 | # deleted Jan 2007. | ||
1634 | 36 | # | ||
1635 | 37 | # So if this fails, you're on an ancient unsupported FreeBSD release *and* | ||
1636 | 38 | # running GUI software, which seems both unusual and unwise. | ||
1637 | 39 | # | ||
1638 | 40 | # http://www.freebsd.org/doc/handbook/binary-formats.html suggests that the | ||
1639 | 41 | # switch to default to ELF came with FreeBSD 3. elf(5) claims ELF support | ||
1640 | 42 | # introduced in FreeBSD 2.2.6. | ||
1641 | 43 | # | ||
1642 | 44 | XINCLUDE=-I$(X11)/include | ||
1643 | 45 | XLFLAGS=-L$(X11)/lib -Wl,-rpath,${X11}/lib | ||
1644 | 46 | X11_LD_LIB=$(X11)/lib | ||
1645 | 47 | |||
1646 | 48 | EXIWHAT_PS_ARG=-ax | ||
1647 | 49 | EXIWHAT_EGREP_ARG='/exim( |$$)' | ||
1648 | 50 | EXIWHAT_MULTIKILL_CMD='killall -m' | ||
1649 | 51 | EXIWHAT_MULTIKILL_ARG='^exim($$|-[0-9.]+-[0-9]+$$)' | ||
1650 | 52 | EXIWHAT_KILL_SIGNAL=-USR1 | ||
1651 | 53 | |||
1652 | 54 | # End | ||
1653 | diff --git a/OS/Makefile-Linux b/OS/Makefile-Linux | |||
1654 | 0 | new file mode 100644 | 55 | new file mode 100644 |
1655 | index 0000000..990f884 | |||
1656 | --- /dev/null | |||
1657 | +++ b/OS/Makefile-Linux | |||
1658 | @@ -0,0 +1,36 @@ | |||
1659 | 1 | # Exim: OS-specific make file for Linux. This is for modern Linuxes, | ||
1660 | 2 | # which use libc6. | ||
1661 | 3 | # | ||
1662 | 4 | # For Linux, we assume GNU Make; at time of writing, the only extension | ||
1663 | 5 | # used is ?= which is actually portable to other maintained Make variants, | ||
1664 | 6 | # just is not POSIX. | ||
1665 | 7 | |||
1666 | 8 | HAVE_ICONV=yes | ||
1667 | 9 | |||
1668 | 10 | BASENAME_COMMAND=look_for_it | ||
1669 | 11 | CHOWN_COMMAND=look_for_it | ||
1670 | 12 | CHGRP_COMMAND=look_for_it | ||
1671 | 13 | CHMOD_COMMAND=look_for_it | ||
1672 | 14 | |||
1673 | 15 | # Preserve CFLAGS and CFLAGS_DYNAMIC from the caller/environment | ||
1674 | 16 | CFLAGS ?= -O -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE | ||
1675 | 17 | CFLAGS_DYNAMIC ?= -shared -rdynamic | ||
1676 | 18 | |||
1677 | 19 | DBMLIB = -ldb | ||
1678 | 20 | USE_DB = yes | ||
1679 | 21 | |||
1680 | 22 | LIBS = -lnsl -lcrypt -lm | ||
1681 | 23 | LIBRESOLV = -lresolv | ||
1682 | 24 | |||
1683 | 25 | X11=/usr/X11R6 | ||
1684 | 26 | XINCLUDE=-I$(X11)/include | ||
1685 | 27 | XLFLAGS=-L$(X11)/lib | ||
1686 | 28 | X11_LD_LIB=$(X11)/lib | ||
1687 | 29 | |||
1688 | 30 | EXIWHAT_PS_ARG=ax | ||
1689 | 31 | EXIWHAT_EGREP_ARG='/exim( |$$)' | ||
1690 | 32 | EXIWHAT_MULTIKILL_CMD=killall | ||
1691 | 33 | EXIWHAT_MULTIKILL_ARG=exim | ||
1692 | 34 | EXIWHAT_KILL_SIGNAL=-USR1 | ||
1693 | 35 | |||
1694 | 36 | # End | ||
1695 | diff --git a/OS/Makefile-OpenBSD b/OS/Makefile-OpenBSD | |||
1696 | 0 | new file mode 100644 | 37 | new file mode 100644 |
1697 | index 0000000..1022abb | |||
1698 | --- /dev/null | |||
1699 | +++ b/OS/Makefile-OpenBSD | |||
1700 | @@ -0,0 +1,28 @@ | |||
1701 | 1 | # Exim: OS-specific make file for OpenBSD | ||
1702 | 2 | |||
1703 | 3 | CHOWN_COMMAND=/usr/sbin/chown | ||
1704 | 4 | CHGRP_COMMAND=/usr/sbin/chgrp | ||
1705 | 5 | CHMOD_COMMAND=/bin/chmod | ||
1706 | 6 | |||
1707 | 7 | CFLAGS=-O2 -Wall | ||
1708 | 8 | |||
1709 | 9 | LIBS=-lm | ||
1710 | 10 | |||
1711 | 11 | HAVE_SA_LEN=YES | ||
1712 | 12 | |||
1713 | 13 | X11=/usr/X11R6 | ||
1714 | 14 | XINCLUDE=-I$(X11)/include | ||
1715 | 15 | XLFLAGS=-L$(X11)/lib | ||
1716 | 16 | |||
1717 | 17 | EXIWHAT_MULTIKILL_CMD=pkill | ||
1718 | 18 | EXIWHAT_MULTIKILL_ARG='exim( |$$|-)' | ||
1719 | 19 | EXIWHAT_PS_ARG=-ax | ||
1720 | 20 | EXIWHAT_EGREP_ARG='/exim( |$$)' | ||
1721 | 21 | EXIWHAT_KILL_SIGNAL=-USR1 | ||
1722 | 22 | |||
1723 | 23 | HAVE_IPV6=YES | ||
1724 | 24 | |||
1725 | 25 | # OpenBSD always ships with Berkeley DB | ||
1726 | 26 | USE_DB=yes | ||
1727 | 27 | |||
1728 | 28 | # End | ||
1729 | diff --git a/OS/Makefile-SunOS5 b/OS/Makefile-SunOS5 | |||
1730 | 0 | new file mode 100644 | 29 | new file mode 100644 |
1731 | index 0000000..568e99f | |||
1732 | --- /dev/null | |||
1733 | +++ b/OS/Makefile-SunOS5 | |||
1734 | @@ -0,0 +1,24 @@ | |||
1735 | 1 | # Exim: OS-specific make file for SunOS5 | ||
1736 | 2 | |||
1737 | 3 | CFLAGS=-O | ||
1738 | 4 | |||
1739 | 5 | HAVE_ICONV=yes | ||
1740 | 6 | |||
1741 | 7 | BASENAME_COMMAND=look_for_it | ||
1742 | 8 | HOSTNAME_COMMAND=look_for_it | ||
1743 | 9 | |||
1744 | 10 | RANLIB=@true | ||
1745 | 11 | LIBS=-lsocket -lnsl -lkstat -lm | ||
1746 | 12 | LIBRESOLV=-lresolv | ||
1747 | 13 | |||
1748 | 14 | EXIWHAT_MULTIKILL_CMD=pkill | ||
1749 | 15 | EXIWHAT_MULTIKILL_ARG='exim( |$$|-)' | ||
1750 | 16 | |||
1751 | 17 | X11=/usr/openwin | ||
1752 | 18 | XINCLUDE=-I$(X11)/include | ||
1753 | 19 | XLFLAGS=-L$(X11)/lib -R$(X11)/lib | ||
1754 | 20 | X11LIB=$(X11)/lib | ||
1755 | 21 | |||
1756 | 22 | OS_C_INCLUDES=setenv.c | ||
1757 | 23 | |||
1758 | 24 | # End | ||
1759 | diff --git a/OS/eximon.conf-Default b/OS/eximon.conf-Default | |||
1760 | 0 | new file mode 100644 | 25 | new file mode 100644 |
1761 | index 0000000..2f874ef | |||
1762 | --- /dev/null | |||
1763 | +++ b/OS/eximon.conf-Default | |||
1764 | @@ -0,0 +1,41 @@ | |||
1765 | 1 | # Exim: Default settings for the eximon script which fires up the Exim monitor. | ||
1766 | 2 | # These can be overridden by OS-specific scripts and local installation | ||
1767 | 3 | # scripts, and also at run time by shell variables. | ||
1768 | 4 | |||
1769 | 5 | # The name of the eximon binary, usually the same as the eximon script, | ||
1770 | 6 | # with .bin stuck on the end. | ||
1771 | 7 | |||
1772 | 8 | EXIMON_BINARY="${EXIMON_BINARY-$0.bin}" | ||
1773 | 9 | |||
1774 | 10 | # The remaining parameters are values likely to be changed to suit the | ||
1775 | 11 | # user's taste. They are documented in the EDITME file. | ||
1776 | 12 | |||
1777 | 13 | WINDOW_TITLE=${EXIMON_WINDOW_TITLE-'"${hostname} eximon"'} | ||
1778 | 14 | |||
1779 | 15 | ACTION_OUTPUT=${EXIMON_ACTION_OUTPUT-no} | ||
1780 | 16 | ACTION_QUEUE_UPDATE=${EXIMON_ACTION_QUEUE_UPDATE-yes} | ||
1781 | 17 | BODY_MAX=${EXIMON_BODY_MAX-20000} | ||
1782 | 18 | LOG_DEPTH=${EXIMON_LOG_DEPTH-300} | ||
1783 | 19 | LOG_WIDTH=${EXIMON_LOG_WIDTH-${EXIMON_WIDTH-950}} | ||
1784 | 20 | LOG_BUFFER=${EXIMON_LOG_BUFFER-20K} | ||
1785 | 21 | LOG_FONT=${EXIMON_LOG_FONT--misc-fixed-medium-r-normal-*-14-140-*-*-*-*-iso8859-1} | ||
1786 | 22 | LOG_STRIPCHARTS='/ <= /in/ | ||
1787 | 23 | / => /out/ | ||
1788 | 24 | / => .+ R=local/local/ | ||
1789 | 25 | / => .+ T=[^ ]*smtp/smtp/' | ||
1790 | 26 | MENU_EVENT=${EXIMON_MENU_EVENT-'Shift<Btn1Down>'} | ||
1791 | 27 | MIN_HEIGHT=${EXIMON_MIN_HEIGHT-162} | ||
1792 | 28 | MIN_WIDTH=${EXIMON_MIN_WIDTH-103} | ||
1793 | 29 | QUEUE_DEPTH=${EXIMON_QUEUE_DEPTH-200} | ||
1794 | 30 | QUEUE_WIDTH=${EXIMON_QUEUE_WIDTH-${EXIMON_WIDTH-950}} | ||
1795 | 31 | QUEUE_FONT=${EXIMON_QUEUE_FONT-${LOG_FONT}} | ||
1796 | 32 | QUEUE_MAX_ADDRESSES=${EXIMON_QUEUE_MAX_ADDRESSES-10} | ||
1797 | 33 | QUEUE_INTERVAL=${EXIMON_QUEUE_INTERVAL-300} | ||
1798 | 34 | QUEUE_STRIPCHART_NAME=${EXIMON_QUEUE_STRIPCHART_NAME-queue} | ||
1799 | 35 | SIZE_STRIPCHART=${EXIMON_SIZE_STRIPCHART} | ||
1800 | 36 | SIZE_STRIPCHART_NAME=${EXIMON_SIZE_STRIPCHART_NAME} | ||
1801 | 37 | START_SMALL=${EXIMON_START_SMALL-no} | ||
1802 | 38 | STRIPCHART_INTERVAL=${EXIMON_STRIPCHART_INTERVAL-60} | ||
1803 | 39 | TEXT_DEPTH=${EXIMON_TEXT_DEPTH-200} | ||
1804 | 40 | |||
1805 | 41 | # End | ||
1806 | diff --git a/OS/os.Configuring b/OS/os.Configuring | |||
1807 | 0 | new file mode 100644 | 42 | new file mode 100644 |
1808 | index 0000000..465bc26 | |||
1809 | --- /dev/null | |||
1810 | +++ b/OS/os.Configuring | |||
1811 | @@ -0,0 +1,215 @@ | |||
1812 | 1 | Configuring Exim for different Operating Systems | ||
1813 | 2 | ------------------------------------------------ | ||
1814 | 3 | |||
1815 | 4 | These notes describe the way in which Exim is configured at the C program level | ||
1816 | 5 | for different operating systems. The normal configuration options that apply | ||
1817 | 6 | independently of the operating system are specified by creating files in the | ||
1818 | 7 | Local directory, as described in chapter 4 of the manual. | ||
1819 | 8 | |||
1820 | 9 | These notes cover the os.* files in the OS directory, and contain information | ||
1821 | 10 | for people who want to port the program to some new OS, or to modify the | ||
1822 | 11 | configuration for an existing port. If you are just wanting to compile Exim on | ||
1823 | 12 | a system that it already knows about, you do not need to read further unless | ||
1824 | 13 | there are problems. | ||
1825 | 14 | |||
1826 | 15 | The os.c-<ostype> files | ||
1827 | 16 | ----------------------- | ||
1828 | 17 | |||
1829 | 18 | There may be an os.c-<ostype> file for each operating system, but for many of | ||
1830 | 19 | them it is not necessary. No error occurs is there isn't one. There is a | ||
1831 | 20 | generic file called os.c which contains code that is common to two or more OS | ||
1832 | 21 | for setting a restarting or a non-restarting signal, for computing the load | ||
1833 | 22 | average, and for finding all the network interface addresses. A few OS have | ||
1834 | 23 | their own individual code for one or more of these. When they do, the code is | ||
1835 | 24 | put into an os.c-<ostype> file, which also defines a macro such as | ||
1836 | 25 | OS_RESTARTING_SIGNAL (for example) to cut out the common code in the generic | ||
1837 | 26 | os.c. | ||
1838 | 27 | |||
1839 | 28 | The os.h-<ostype> files | ||
1840 | 29 | ----------------------- | ||
1841 | 30 | |||
1842 | 31 | For each OS that Exim knows about, there is an os.h-<ostype> file, where | ||
1843 | 32 | <ostype> is the OS name. The relevant file is included as a C header file for | ||
1844 | 33 | all Exim compilation by pointing a symbolic link called os.h at it from the | ||
1845 | 34 | build directory. The settings are as follows: | ||
1846 | 35 | |||
1847 | 36 | The select() function | ||
1848 | 37 | --------------------- | ||
1849 | 38 | |||
1850 | 39 | There is a difference in the data type for the second argument to the select() | ||
1851 | 40 | function in some OS. The macro SELECT_ARG2_TYPE can be used to define the type. | ||
1852 | 41 | If it is not defined in os.h, then it is defaulted to fs_set in exim.h. | ||
1853 | 42 | |||
1854 | 43 | The dn_expand() function | ||
1855 | 44 | ------------------------ | ||
1856 | 45 | |||
1857 | 46 | There is a difference in the data type for the fourth argument to the | ||
1858 | 47 | dn_expand() function in some OS. The macro DN_EXPAND_ARG4_TYPE can be used to | ||
1859 | 48 | define the type. If it is not defined in os.h, then it is defaulted to char * | ||
1860 | 49 | in exim.h. | ||
1861 | 50 | |||
1862 | 51 | The h_errno variable | ||
1863 | 52 | -------------------- | ||
1864 | 53 | |||
1865 | 54 | If NEED_H_ERRNO is defined, then a definition of the form | ||
1866 | 55 | |||
1867 | 56 | extern int h_errno | ||
1868 | 57 | |||
1869 | 58 | is included in the compiled code of Exim. | ||
1870 | 59 | |||
1871 | 60 | The strerror() function | ||
1872 | 61 | ----------------------- | ||
1873 | 62 | |||
1874 | 63 | Most systems provide the ANSI standard strerror() function; older systems may | ||
1875 | 64 | instead have an errlist[] variable in which to look up error texts. Defining | ||
1876 | 65 | STRERROR_FROM_ERRLIST causes Exim to build its own strerror() function that | ||
1877 | 66 | mimics the ANSI function by lookup up the error code in errlist. | ||
1878 | 67 | |||
1879 | 68 | Truncating files | ||
1880 | 69 | ---------------- | ||
1881 | 70 | |||
1882 | 71 | The fcntl() option for truncating the length of a file is called F_FREESP in | ||
1883 | 72 | most systems; in some, however, it is called O_TRUNC. Some os.h files define | ||
1884 | 73 | F_FREESP to be O_TRUNC for this reason. | ||
1885 | 74 | |||
1886 | 75 | Finding local interfaces | ||
1887 | 76 | ------------------------ | ||
1888 | 77 | |||
1889 | 78 | The SIOCGIFCONF ioctl for finding local interfaces behaves differently on BSD | ||
1890 | 79 | systems. It returns a vector of ifreq blocks containing sockaddr structures | ||
1891 | 80 | that can be longer than their sizeof definition, making the returned ifreq | ||
1892 | 81 | blocks longer than their sizeof definitions. BSD sockaddrs structures contain | ||
1893 | 82 | an sa_len field giving the actual size. To cope with difference, there is a | ||
1894 | 83 | macro called HAVE_SA_LEN. If it is defined, code that works on BSD systems is | ||
1895 | 84 | used. Otherwise, the objects returned by SIOCGIFCONF are assumed to be of | ||
1896 | 85 | length sizeof(struct ifreq). | ||
1897 | 86 | |||
1898 | 87 | On some operating systems, the SIOCGIFCONF ioctl returns the IP addresses | ||
1899 | 88 | with the list of interfaces, and there is no need to call SIOCGIFADDR for each | ||
1900 | 89 | individual address. Mostly, making the second call does no harm, but on Linux | ||
1901 | 90 | when there are IP aliases, it causes things to go wrong. This also happens on | ||
1902 | 91 | BSDI and GNU Hurd. Therefore, there is now a macro to cut it out, called | ||
1903 | 92 | SIOCGIFCONF_GIVES_ADDR. | ||
1904 | 93 | |||
1905 | 94 | Note that, if IPv6 support is configured, Exim cannot find the IPv6 addresses | ||
1906 | 95 | on local interfaces by itself. You need to set the local_interfaces option in | ||
1907 | 96 | this situation. | ||
1908 | 97 | |||
1909 | 98 | Computing load averages | ||
1910 | 99 | ----------------------- | ||
1911 | 100 | |||
1912 | 101 | There are several different ways that load averages are computed. One-off code | ||
1913 | 102 | is put in the os.c-<ostype>, but several OS use similar methods, and these | ||
1914 | 103 | are coded in the generic os.c, using a number of parameters to make variations | ||
1915 | 104 | between OS. | ||
1916 | 105 | |||
1917 | 106 | Sometimes the load average is not available to unprivileged callers. If | ||
1918 | 107 | LOAD_AVG_NEEDS_ROOT is set, Exim ensures that it is root before trying to | ||
1919 | 108 | obtain a load average value. | ||
1920 | 109 | |||
1921 | 110 | (1) If HAVE_BSD_GETLOADAVG is defined, Exim uses a simple call to the | ||
1922 | 111 | getloadavg() function. | ||
1923 | 112 | |||
1924 | 113 | (2) If HAVE_KSTAT is defined, Exim uses the kstat package as found in Solaris 2 | ||
1925 | 114 | (but nowhere else as yet). It uses some supplementary definitions: | ||
1926 | 115 | |||
1927 | 116 | LOAD_AVG_KSTAT the kstat to use | ||
1928 | 117 | LOAD_AVG_KSTAT_MODULE the module to access | ||
1929 | 118 | LOAD_AVG_KSTAT_SYMBOL the symbol containing the value we want | ||
1930 | 119 | LOAD_AVG_KSTAT_FIELD the field identity | ||
1931 | 120 | |||
1932 | 121 | (3) If HAVE_DEV_KMEM is defined, Exim reads load average values from the | ||
1933 | 122 | /dev/kmem device. It uses some supplementary definitions: | ||
1934 | 123 | |||
1935 | 124 | LOAD_AVG_TYPE the data type | ||
1936 | 125 | LOAD_AVG_SYMBOL the symbol to look up | ||
1937 | 126 | KERNEL_PATH the name of the kernel | ||
1938 | 127 | FSCALE a scaling factor | ||
1939 | 128 | |||
1940 | 129 | Sometimes FSCALE is defined in system headers so need not be defined in the | ||
1941 | 130 | os.h-<ostype> file. | ||
1942 | 131 | |||
1943 | 132 | Glibc systems and IP options | ||
1944 | 133 | ---------------------------- | ||
1945 | 134 | |||
1946 | 135 | The code for inspecting IP options is the same in all OS except for systems | ||
1947 | 136 | using glibc (e.g. Linux), which uses a different structure to return data from | ||
1948 | 137 | getsockopt(). To handle this, there is a macro called | ||
1949 | 138 | |||
1950 | 139 | GLIBC_IP_OPTIONS | ||
1951 | 140 | |||
1952 | 141 | which should be set for Linux (in os.h-Linux) and any other operating system | ||
1953 | 142 | that uses glibc. | ||
1954 | 143 | |||
1955 | 144 | Options for statvfs() | ||
1956 | 145 | --------------------- | ||
1957 | 146 | |||
1958 | 147 | The following settings apply to the compilation of the Exim monitor as well as | ||
1959 | 148 | to the main Exim binary. | ||
1960 | 149 | |||
1961 | 150 | #undefine HAVE_STATFS | ||
1962 | 151 | |||
1963 | 152 | Exim has options for checking the amount of space in the spool partition | ||
1964 | 153 | before accepting a message, and the monitor has the ability to display a | ||
1965 | 154 | stripchart of the percentage fullness of a particular disc partition, usually | ||
1966 | 155 | /var/spool/mail. The standard way of finding out the data is to call the | ||
1967 | 156 | statvfs() function, but some operating systems use statfs() and some may not | ||
1968 | 157 | have the ability at all. The Exim code uses STATVFS() for this function and | ||
1969 | 158 | this gets defined appropriately. HAVE_STATFS is defined before including the | ||
1970 | 159 | os.h file; undefining it suppresses the code for checking a partition in the | ||
1971 | 160 | main binary, and for monitoring disc partition in the monitor. | ||
1972 | 161 | |||
1973 | 162 | When HAVE_STATFS is defined, the distinction between statvfs() and statfs() is | ||
1974 | 163 | made by checking HAVE_SYS_STATVFS_H. If it is defined, then sys/statvfs.h is | ||
1975 | 164 | included. Otherwise, STATVFS() is defined as a macro for statfs(), and some | ||
1976 | 165 | further includes are done, according to the following definitions: | ||
1977 | 166 | |||
1978 | 167 | #define HAVE_SYS_MOUNT_H | ||
1979 | 168 | #define HAVE_VFS_H | ||
1980 | 169 | |||
1981 | 170 | Each of those definitions causes the inclusion of the corresponding system | ||
1982 | 171 | header file in the Exim monitor compilation. For example, the first one causes | ||
1983 | 172 | |||
1984 | 173 | #include <sys/mount.h> | ||
1985 | 174 | |||
1986 | 175 | to be obeyed. Different systems may require different combinations of these | ||
1987 | 176 | headers. | ||
1988 | 177 | |||
1989 | 178 | The sys/resource.h header | ||
1990 | 179 | ------------------------- | ||
1991 | 180 | |||
1992 | 181 | One OS does not have the sys/resource.h header. If NO_SYS_RESOURCE_H is defined | ||
1993 | 182 | in an os.h-<ostype> file, then the #include for this header is skipped in | ||
1994 | 183 | exim.h. | ||
1995 | 184 | |||
1996 | 185 | Support for login_cap functions | ||
1997 | 186 | ------------------------------- | ||
1998 | 187 | |||
1999 | 188 | Some of the BSD systems support functions for controlling the resources that | ||
2000 | 189 | user processes can use (e.g. login_getpwclass). If HAVE_SETCLASSRESOURCES is | ||
2001 | 190 | defined, Exim supports this feature for running pipe deliveries, using the | ||
2002 | 191 | setclassresources() function. | ||
2003 | 192 | |||
2004 | 193 | The crypt_h header | ||
2005 | 194 | ------------------ | ||
2006 | 195 | |||
2007 | 196 | Some OS require crypt.h to be included to get a prototype for the crypt() | ||
2008 | 197 | function. This is needed only when compiling with AUTH support. If CRYPT_H is | ||
2009 | 198 | defined, then this header is included. | ||
2010 | 199 | |||
2011 | 200 | mmap() support | ||
2012 | 201 | -------------- | ||
2013 | 202 | |||
2014 | 203 | The CDB support includes the option of handling file operations by using | ||
2015 | 204 | mmap()/munmap(). This gives a reasonable performance increase which will | ||
2016 | 205 | probably scale over multiple processes (since the files are mapped read-only | ||
2017 | 206 | shared). The vast majority of modern operating systems will support mmap | ||
2018 | 207 | (certainly in the simplified way that it is being used here). For example any | ||
2019 | 208 | BSD 4.x derived or POSIX compliant system will support it, as will pretty much | ||
2020 | 209 | any system using dynamically shared link libraries. | ||
2021 | 210 | |||
2022 | 211 | If the OS is believed to support mmap() then the symbol HAVE_MMAP is defined. | ||
2023 | 212 | Not all systems that support mmap will have had their config files updated to | ||
2024 | 213 | reflect this. Currently Linux, Sun, BSD and SGI/mips systems have been updated. | ||
2025 | 214 | |||
2026 | 215 | *** End *** | ||
2027 | diff --git a/OS/os.c-FreeBSD b/OS/os.c-FreeBSD | |||
2028 | 0 | new file mode 100644 | 216 | new file mode 100644 |
2029 | index 0000000..715a9ed | |||
2030 | --- /dev/null | |||
2031 | +++ b/OS/os.c-FreeBSD | |||
2032 | @@ -0,0 +1,24 @@ | |||
2033 | 1 | /************************************************* | ||
2034 | 2 | * Exim - an Internet mail transport agent * | ||
2035 | 3 | *************************************************/ | ||
2036 | 4 | |||
2037 | 5 | /* Copyright (c) Jeremy Harris 2017 */ | ||
2038 | 6 | /* See the file NOTICE for conditions of use and distribution. */ | ||
2039 | 7 | |||
2040 | 8 | /* FreeBSD-specific code. This is concatenated onto the generic | ||
2041 | 9 | src/os.c file. */ | ||
2042 | 10 | |||
2043 | 11 | |||
2044 | 12 | /************* | ||
2045 | 13 | * Sendfile * | ||
2046 | 14 | *************/ | ||
2047 | 15 | |||
2048 | 16 | ssize_t | ||
2049 | 17 | os_sendfile(int out, int in, off_t * off, size_t cnt) | ||
2050 | 18 | { | ||
2051 | 19 | off_t written; | ||
2052 | 20 | return sendfile(in, out, *off, cnt, NULL, &written, 0) < 0 | ||
2053 | 21 | ? (ssize_t) -1 : (ssize_t) written; | ||
2054 | 22 | } | ||
2055 | 23 | |||
2056 | 24 | /* End of os.c-Linux */ | ||
2057 | diff --git a/OS/os.c-Linux b/OS/os.c-Linux | |||
2058 | 0 | new file mode 100644 | 25 | new file mode 100644 |
2059 | index 0000000..a10bc7d | |||
2060 | --- /dev/null | |||
2061 | +++ b/OS/os.c-Linux | |||
2062 | @@ -0,0 +1,165 @@ | |||
2063 | 1 | /************************************************* | ||
2064 | 2 | * Exim - an Internet mail transport agent * | ||
2065 | 3 | *************************************************/ | ||
2066 | 4 | |||
2067 | 5 | /* Copyright (c) University of Cambridge 1997 - 2017 */ | ||
2068 | 6 | /* See the file NOTICE for conditions of use and distribution. */ | ||
2069 | 7 | |||
2070 | 8 | /* Linux-specific code. This is concatenated onto the generic | ||
2071 | 9 | src/os.c file. */ | ||
2072 | 10 | |||
2073 | 11 | |||
2074 | 12 | /************************************************* | ||
2075 | 13 | * Load average computation * | ||
2076 | 14 | *************************************************/ | ||
2077 | 15 | |||
2078 | 16 | /*Linux has an apparently unique way of getting the load average, so we provide | ||
2079 | 17 | a unique function here, and define OS_LOAD_AVERAGE to stop src/os.c trying to | ||
2080 | 18 | provide the function. However, when compiling os.c for utilities, we may not | ||
2081 | 19 | want this at all, so check that it isn't set first. */ | ||
2082 | 20 | |||
2083 | 21 | #if !defined(OS_LOAD_AVERAGE) && defined(__linux__) | ||
2084 | 22 | #define OS_LOAD_AVERAGE | ||
2085 | 23 | |||
2086 | 24 | /* Linux has 2 ways of returning load average: | ||
2087 | 25 | |||
2088 | 26 | (1) Do a read on /proc/loadavg | ||
2089 | 27 | (2) Use the sysinfo library function and syscall | ||
2090 | 28 | |||
2091 | 29 | The latter is simpler but in Linux 2.0 - 2.2 (and probably later releases) is | ||
2092 | 30 | exceptionally slow - 10-50ms per call is not unusual and about 100x slow the | ||
2093 | 31 | first method. This cripples high performance mail servers by increasing CPU | ||
2094 | 32 | utilisation by 3-5x. | ||
2095 | 33 | |||
2096 | 34 | In Exim's very early days, it used the 1st method. Later, it switched to the | ||
2097 | 35 | 2nd method. Now it tries the 1st method and falls back to the 2nd if /proc is | ||
2098 | 36 | unavailable. */ | ||
2099 | 37 | |||
2100 | 38 | #include <sys/sysinfo.h> | ||
2101 | 39 | |||
2102 | 40 | static int | ||
2103 | 41 | linux_slow_getloadavg(void) | ||
2104 | 42 | { | ||
2105 | 43 | struct sysinfo s; | ||
2106 | 44 | double avg; | ||
2107 | 45 | if (sysinfo(&s) < 0) return -1; | ||
2108 | 46 | avg = (double) (s.loads[0]) / (1<<SI_LOAD_SHIFT); | ||
2109 | 47 | return (int)(avg * 1000.0); | ||
2110 | 48 | } | ||
2111 | 49 | |||
2112 | 50 | int | ||
2113 | 51 | os_getloadavg(void) | ||
2114 | 52 | { | ||
2115 | 53 | char buffer[40]; | ||
2116 | 54 | double avg; | ||
2117 | 55 | int count; | ||
2118 | 56 | int fd = open ("/proc/loadavg", O_RDONLY); | ||
2119 | 57 | if (fd == -1) return linux_slow_getloadavg(); | ||
2120 | 58 | count = read (fd, buffer, sizeof(buffer)); | ||
2121 | 59 | (void)close (fd); | ||
2122 | 60 | if (count <= 0) return linux_slow_getloadavg(); | ||
2123 | 61 | count = sscanf (buffer, "%lf", &avg); | ||
2124 | 62 | if (count < 1) return linux_slow_getloadavg(); | ||
2125 | 63 | return (int)(avg * 1000.0); | ||
2126 | 64 | } | ||
2127 | 65 | #endif /* OS_LOAD_AVERAGE */ | ||
2128 | 66 | |||
2129 | 67 | |||
2130 | 68 | |||
2131 | 69 | |||
2132 | 70 | |||
2133 | 71 | /************************************************* | ||
2134 | 72 | * Finding interface addresses * | ||
2135 | 73 | *************************************************/ | ||
2136 | 74 | |||
2137 | 75 | /* This function is not required for utilities; we cut it out if | ||
2138 | 76 | FIND_RUNNING_INTERFACES is already defined. */ | ||
2139 | 77 | |||
2140 | 78 | #ifndef FIND_RUNNING_INTERFACES | ||
2141 | 79 | |||
2142 | 80 | /* This code, contributed by Jason Gunthorpe, appears to be the current | ||
2143 | 81 | way of finding IPv6 interfaces in Linux. It first calls the common function in | ||
2144 | 82 | order to find IPv4 interfaces, then grobbles around to find the others. Jason | ||
2145 | 83 | said, "This is so horrible, don't look. Slightly ripped from net-tools | ||
2146 | 84 | ifconfig." It gets called by virtue of os_find_running_interfaces being defined | ||
2147 | 85 | as a macro for os_find_running_interfaces_linux in the os.h-Linux file. */ | ||
2148 | 86 | |||
2149 | 87 | ip_address_item * | ||
2150 | 88 | os_find_running_interfaces_linux(void) | ||
2151 | 89 | { | ||
2152 | 90 | ip_address_item *yield = NULL; | ||
2153 | 91 | |||
2154 | 92 | #if HAVE_IPV6 | ||
2155 | 93 | ip_address_item *last = NULL; | ||
2156 | 94 | ip_address_item *next; | ||
2157 | 95 | char addr6p[8][5]; | ||
2158 | 96 | unsigned int plen, scope, dad_status, if_idx; | ||
2159 | 97 | char devname[20+1]; | ||
2160 | 98 | FILE *f; | ||
2161 | 99 | #endif | ||
2162 | 100 | |||
2163 | 101 | yield = os_common_find_running_interfaces(); | ||
2164 | 102 | |||
2165 | 103 | #if HAVE_IPV6 | ||
2166 | 104 | |||
2167 | 105 | /* Open the /proc file; give up if we can't. */ | ||
2168 | 106 | |||
2169 | 107 | if ((f = fopen("/proc/net/if_inet6", "r")) == NULL) return yield; | ||
2170 | 108 | |||
2171 | 109 | /* Pick out the data from within the file, and add it on to the chain */ | ||
2172 | 110 | |||
2173 | 111 | last = yield; | ||
2174 | 112 | if (last != NULL) while (last->next != NULL) last = last->next; | ||
2175 | 113 | |||
2176 | 114 | while (fscanf(f, "%4s%4s%4s%4s%4s%4s%4s%4s %02x %02x %02x %02x %20s\n", | ||
2177 | 115 | addr6p[0], addr6p[1], addr6p[2], addr6p[3], | ||
2178 | 116 | addr6p[4], addr6p[5], addr6p[6], addr6p[7], | ||
2179 | 117 | &if_idx, &plen, &scope, &dad_status, devname) != EOF) | ||
2180 | 118 | { | ||
2181 | 119 | struct sockaddr_in6 addr; | ||
2182 | 120 | |||
2183 | 121 | /* This data has to survive for ever, so use malloc. */ | ||
2184 | 122 | |||
2185 | 123 | next = store_malloc(sizeof(ip_address_item)); | ||
2186 | 124 | next->next = NULL; | ||
2187 | 125 | next->port = 0; | ||
2188 | 126 | sprintf(CS next->address, "%s:%s:%s:%s:%s:%s:%s:%s", | ||
2189 | 127 | addr6p[0], addr6p[1], addr6p[2], addr6p[3], | ||
2190 | 128 | addr6p[4], addr6p[5], addr6p[6], addr6p[7]); | ||
2191 | 129 | |||
2192 | 130 | /* Normalize the representation */ | ||
2193 | 131 | |||
2194 | 132 | inet_pton(AF_INET6, CS next->address, &addr.sin6_addr); | ||
2195 | 133 | inet_ntop(AF_INET6, &addr.sin6_addr, CS next->address, sizeof(next->address)); | ||
2196 | 134 | |||
2197 | 135 | if (yield == NULL) yield = last = next; else | ||
2198 | 136 | { | ||
2199 | 137 | last->next = next; | ||
2200 | 138 | last = next; | ||
2201 | 139 | } | ||
2202 | 140 | |||
2203 | 141 | DEBUG(D_interface) | ||
2204 | 142 | debug_printf("Actual local interface address is %s (%s)\n", last->address, | ||
2205 | 143 | devname); | ||
2206 | 144 | } | ||
2207 | 145 | fclose(f); | ||
2208 | 146 | #endif /* HAVE_IPV6 */ | ||
2209 | 147 | |||
2210 | 148 | return yield; | ||
2211 | 149 | } | ||
2212 | 150 | |||
2213 | 151 | #endif /* FIND_RUNNING_INTERFACES */ | ||
2214 | 152 | |||
2215 | 153 | |||
2216 | 154 | /************* | ||
2217 | 155 | * Sendfile * | ||
2218 | 156 | *************/ | ||
2219 | 157 | #include <sys/sendfile.h> | ||
2220 | 158 | |||
2221 | 159 | ssize_t | ||
2222 | 160 | os_sendfile(int out, int in, off_t * off, size_t cnt) | ||
2223 | 161 | { | ||
2224 | 162 | return sendfile(out, in, off, cnt); | ||
2225 | 163 | } | ||
2226 | 164 | |||
2227 | 165 | /* End of os.c-Linux */ | ||
2228 | diff --git a/OS/os.c-SunOS5 b/OS/os.c-SunOS5 | |||
2229 | 0 | new file mode 100644 | 166 | new file mode 100644 |
2230 | index 0000000..1624869 | |||
2231 | --- /dev/null | |||
2232 | +++ b/OS/os.c-SunOS5 | |||
2233 | @@ -0,0 +1,16 @@ | |||
2234 | 1 | /************************************************* | ||
2235 | 2 | * Exim - an Internet mail transport agent * | ||
2236 | 3 | *************************************************/ | ||
2237 | 4 | |||
2238 | 5 | /* Copyright (c) University of Cambridge 2016 */ | ||
2239 | 6 | /* Copyright (c) Jeremy Harris 2016 */ | ||
2240 | 7 | /* See the file NOTICE for conditions of use and distribution. */ | ||
2241 | 8 | |||
2242 | 9 | /* Solaris-specific code. This is concatenated onto the generic | ||
2243 | 10 | src/os.c file. */ | ||
2244 | 11 | |||
2245 | 12 | #if defined(MISSING_UNSETENV_3) && !defined(COMPILE_UTILITY) | ||
2246 | 13 | # include "setenv.c" | ||
2247 | 14 | #endif | ||
2248 | 15 | |||
2249 | 16 | /* End of os.c-SunOS5 */ | ||
2250 | diff --git a/OS/os.h-FreeBSD b/OS/os.h-FreeBSD | |||
2251 | 0 | new file mode 100644 | 17 | new file mode 100644 |
2252 | index 0000000..8b1af39 | |||
2253 | --- /dev/null | |||
2254 | +++ b/OS/os.h-FreeBSD | |||
2255 | @@ -0,0 +1,68 @@ | |||
2256 | 1 | /* Exim: OS-specific C header file for FreeBSD */ | ||
2257 | 2 | /* Copyright (c) University of Cambridge 2017 */ | ||
2258 | 3 | /* See the file NOTICE for conditions of use and distribution. */ | ||
2259 | 4 | |||
2260 | 5 | |||
2261 | 6 | #include <sys/types.h> | ||
2262 | 7 | |||
2263 | 8 | #define HAVE_BSD_GETLOADAVG | ||
2264 | 9 | #define HAVE_SETCLASSRESOURCES | ||
2265 | 10 | #define HAVE_MMAP | ||
2266 | 11 | #define HAVE_SYS_MOUNT_H | ||
2267 | 12 | #define SIOCGIFCONF_GIVES_ADDR | ||
2268 | 13 | #define HAVE_SRANDOMDEV | ||
2269 | 14 | #define HAVE_ARC4RANDOM | ||
2270 | 15 | |||
2271 | 16 | typedef struct flock flock_t; | ||
2272 | 17 | |||
2273 | 18 | /* iconv arg2 type: libiconv in Ports uses "const char* * inbuf" and was | ||
2274 | 19 | * traditionally the only approach available. The iconv functionality | ||
2275 | 20 | * in libc is "char ** restrict src". | ||
2276 | 21 | * | ||
2277 | 22 | * <https://www.freebsd.org/doc/en/books/porters-handbook/using-iconv.html> | ||
2278 | 23 | * says that libc has iconv since 2013, in 10-CURRENT. FreeBSD man-pages | ||
2279 | 24 | * shows it included in 10.0-RELEASE. Writing this in 2017, 10.3 is the | ||
2280 | 25 | * oldest supported release, so we should assume non-libiconv by default. | ||
2281 | 26 | * (Actually, people still using old releases past EOL; we shouldn't support | ||
2282 | 27 | * them but I don't want to deal with howls of complaints because we dare | ||
2283 | 28 | * to not support the unsupported, so guard this on FreeBSD 10+) | ||
2284 | 29 | * | ||
2285 | 30 | * Thus we no longer override iconv. | ||
2286 | 31 | * | ||
2287 | 32 | * However, if libiconv is installed, and anything adds /usr/local/include | ||
2288 | 33 | * to include-path (likely) then we'll get that. So define a variable | ||
2289 | 34 | * which makes the libiconv try to not interfere with OS iconv. | ||
2290 | 35 | */ | ||
2291 | 36 | #if __FreeBSD__ >= 10 | ||
2292 | 37 | # define LIBICONV_PLUG | ||
2293 | 38 | #endif | ||
2294 | 39 | /* for more specific version constraints, include <sys/param.h> and look at | ||
2295 | 40 | * __FreeBSD_version */ | ||
2296 | 41 | |||
2297 | 42 | |||
2298 | 43 | /* When using DKIM, setting OS_SENDFILE can increase | ||
2299 | 44 | performance on outgoing mail a bit. */ | ||
2300 | 45 | |||
2301 | 46 | #define OS_SENDFILE | ||
2302 | 47 | extern ssize_t os_sendfile(int, int, off_t *, size_t); | ||
2303 | 48 | |||
2304 | 49 | |||
2305 | 50 | /*******************/ | ||
2306 | 51 | |||
2307 | 52 | /* TCP_FASTOPEN support. There does not seems to be a | ||
2308 | 53 | MSG_FASTOPEN defined yet... */ | ||
2309 | 54 | #define EXIM_TFO_PROBE | ||
2310 | 55 | |||
2311 | 56 | #include <netinet/tcp.h> /* for TCP_FASTOPEN */ | ||
2312 | 57 | #include <sys/socket.h> /* for MSG_FASTOPEN */ | ||
2313 | 58 | #if defined(TCP_FASTOPEN) && !defined(MSG_FASTOPEN) | ||
2314 | 59 | # define MSG_FASTOPEN 0x20000000 | ||
2315 | 60 | #endif | ||
2316 | 61 | |||
2317 | 62 | /* for TCP state-variable values, for TFO logging */ | ||
2318 | 63 | #include <netinet/tcp_fsm.h> | ||
2319 | 64 | #define TCP_SYN_RECV TCPS_SYN_RECEIVED | ||
2320 | 65 | |||
2321 | 66 | /*******************/ | ||
2322 | 67 | |||
2323 | 68 | /* End */ | ||
2324 | diff --git a/OS/os.h-Linux b/OS/os.h-Linux | |||
2325 | 0 | new file mode 100644 | 69 | new file mode 100644 |
2326 | index 0000000..88c4d91 | |||
2327 | --- /dev/null | |||
2328 | +++ b/OS/os.h-Linux | |||
2329 | @@ -0,0 +1,88 @@ | |||
2330 | 1 | /* Exim: OS-specific C header file for Linux */ | ||
2331 | 2 | /* Copyright (c) University of Cambridge 2017 */ | ||
2332 | 3 | /* See the file NOTICE for conditions of use and distribution. */ | ||
2333 | 4 | |||
2334 | 5 | |||
2335 | 6 | /* Some old systems we've received bug-reports for have a <limits.h> which | ||
2336 | 7 | does not pull in <features.h>. Best to just pull it in now and have done | ||
2337 | 8 | with the issue. */ | ||
2338 | 9 | |||
2339 | 10 | #include <features.h> | ||
2340 | 11 | #include <sys/types.h> | ||
2341 | 12 | |||
2342 | 13 | |||
2343 | 14 | #define CRYPT_H | ||
2344 | 15 | #define GLIBC_IP_OPTIONS | ||
2345 | 16 | #define HAVE_MMAP | ||
2346 | 17 | #define HAVE_BSD_GETLOADAVG | ||
2347 | 18 | #define HAVE_SYS_STATVFS_H | ||
2348 | 19 | #define NO_IP_VAR_H | ||
2349 | 20 | #define SIG_IGN_WORKS | ||
2350 | 21 | |||
2351 | 22 | /* When using DKIM, setting OS_SENDFILE can increase | ||
2352 | 23 | performance on outgoing mail a bit. Note: With older glibc versions | ||
2353 | 24 | this setting will conflict with the _FILE_OFFSET_BITS=64 setting | ||
2354 | 25 | defined as part of the Linux CFLAGS. As of 2017 those are declared | ||
2355 | 26 | to be too old to build by default. */ | ||
2356 | 27 | |||
2357 | 28 | #define OS_SENDFILE | ||
2358 | 29 | extern ssize_t os_sendfile(int, int, off_t *, size_t); | ||
2359 | 30 | |||
2360 | 31 | #define F_FREESP O_TRUNC | ||
2361 | 32 | typedef struct flock flock_t; | ||
2362 | 33 | |||
2363 | 34 | #define os_strsignal strsignal | ||
2364 | 35 | #define OS_STRSIGNAL | ||
2365 | 36 | |||
2366 | 37 | #if defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__NetBSD_kernel__) | ||
2367 | 38 | # define SIOCGIFCONF_GIVES_ADDR | ||
2368 | 39 | # define HAVE_SYS_MOUNT_H | ||
2369 | 40 | #endif | ||
2370 | 41 | |||
2371 | 42 | #if defined(__linux__) | ||
2372 | 43 | |||
2373 | 44 | /* Some versions of Linux need explicit sync-ing of directories as well as | ||
2374 | 45 | files. This setting requests that. If the directory is on NFS, it may not | ||
2375 | 46 | be possible to sync it - in that case, Exim now should ignore the error. But | ||
2376 | 47 | if you have problems in that area, try undefining this. But be aware that you | ||
2377 | 48 | may be in a situation where files are not being properly "committed to stable | ||
2378 | 49 | storage" as quickly as Exim thinks they are. */ | ||
2379 | 50 | |||
2380 | 51 | #define NEED_SYNC_DIRECTORY | ||
2381 | 52 | |||
2382 | 53 | #define os_find_running_interfaces os_find_running_interfaces_linux | ||
2383 | 54 | |||
2384 | 55 | /* Need a prototype for the Linux-specific function. The structure hasn't | ||
2385 | 56 | been defined yet, so we need to pre-declare it. */ | ||
2386 | 57 | |||
2387 | 58 | struct ip_address_item; | ||
2388 | 59 | extern struct ip_address_item *os_find_running_interfaces_linux(void); | ||
2389 | 60 | |||
2390 | 61 | #endif /* __linux__ */ | ||
2391 | 62 | |||
2392 | 63 | /* Some folks running "unusual" setups with very old libc environments have | ||
2393 | 64 | found that _GNU_SOURCE=1 before <features.h> is not sufficient to define some | ||
2394 | 65 | constants needed for 64-bit arithmetic. If you encounter build errors based | ||
2395 | 66 | on LLONG_MIN being undefined and various other escape hatches have not helped, | ||
2396 | 67 | then change the 0 to 1 in the next block. */ | ||
2397 | 68 | |||
2398 | 69 | #if 0 | ||
2399 | 70 | # define LLONG_MIN LONG_LONG_MIN | ||
2400 | 71 | # define LLONG_MAX LONG_LONG_MAX | ||
2401 | 72 | #endif | ||
2402 | 73 | |||
2403 | 74 | #if _POSIX_C_SOURCE >= 200809L || _ATFILE_SOUCE | ||
2404 | 75 | # define EXIM_HAVE_OPENAT | ||
2405 | 76 | #endif | ||
2406 | 77 | |||
2407 | 78 | /* TCP Fast Open support */ | ||
2408 | 79 | |||
2409 | 80 | #include <netinet/tcp.h> /* for TCP_FASTOPEN */ | ||
2410 | 81 | #include <sys/socket.h> /* for MSG_FASTOPEN */ | ||
2411 | 82 | #if defined(TCP_FASTOPEN) && !defined(MSG_FASTOPEN) | ||
2412 | 83 | # define MSG_FASTOPEN 0x20000000 | ||
2413 | 84 | #endif | ||
2414 | 85 | #define EXIM_HAVE_TCPI_UNACKED | ||
2415 | 86 | |||
2416 | 87 | |||
2417 | 88 | /* End */ | ||
2418 | diff --git a/OS/os.h-OpenBSD b/OS/os.h-OpenBSD | |||
2419 | 0 | new file mode 100644 | 89 | new file mode 100644 |
2420 | index 0000000..81ed487 | |||
2421 | --- /dev/null | |||
2422 | +++ b/OS/os.h-OpenBSD | |||
2423 | @@ -0,0 +1,56 @@ | |||
2424 | 1 | /* Exim: OS-specific C header file for OpenBSD */ | ||
2425 | 2 | /* Copyright (c) University of Cambridge 2017 */ | ||
2426 | 3 | /* See the file NOTICE for conditions of use and distribution. */ | ||
2427 | 4 | |||
2428 | 5 | |||
2429 | 6 | #define HAVE_BSD_GETLOADAVG | ||
2430 | 7 | #define HAVE_MMAP | ||
2431 | 8 | #define HAVE_SYS_MOUNT_H | ||
2432 | 9 | #define SIOCGIFCONF_GIVES_ADDR | ||
2433 | 10 | #define HAVE_ARC4RANDOM | ||
2434 | 11 | /* In May 2014, OpenBSD 5.5 was released which cleaned up the arc4random_* API | ||
2435 | 12 | which removed the arc4random_stir() function. Set NOT_HAVE_ARC4RANDOM_STIR | ||
2436 | 13 | if the version released is past that point. */ | ||
2437 | 14 | #include <sys/param.h> | ||
2438 | 15 | #if OpenBSD >= 201405 | ||
2439 | 16 | # define NOT_HAVE_ARC4RANDOM_STIR | ||
2440 | 17 | #endif | ||
2441 | 18 | |||
2442 | 19 | typedef struct flock flock_t; | ||
2443 | 20 | |||
2444 | 21 | #define os_strsignal strsignal | ||
2445 | 22 | #define OS_STRSIGNAL | ||
2446 | 23 | |||
2447 | 24 | typedef struct __res_state *res_state; | ||
2448 | 25 | |||
2449 | 26 | /* default is non-const */ | ||
2450 | 27 | #define ICONV_ARG2_TYPE const char ** | ||
2451 | 28 | |||
2452 | 29 | #ifndef EPROTO | ||
2453 | 30 | # define EPROTO 71 | ||
2454 | 31 | #endif | ||
2455 | 32 | |||
2456 | 33 | /* We need to force this; the automatic in buildconfig.c gets %ld */ | ||
2457 | 34 | #ifdef OFF_T_FMT | ||
2458 | 35 | # undef OFF_T_FMT | ||
2459 | 36 | # undef LONGLONG_T | ||
2460 | 37 | #endif | ||
2461 | 38 | #define OFF_T_FMT "%lld" | ||
2462 | 39 | #define LONGLONG_T long long int | ||
2463 | 40 | |||
2464 | 41 | #ifdef PID_T_FMT | ||
2465 | 42 | # undef PID_T_FMT | ||
2466 | 43 | #endif | ||
2467 | 44 | #define PID_T_FMT "%d" | ||
2468 | 45 | |||
2469 | 46 | #ifdef INO_T_FMT | ||
2470 | 47 | # undef INO_T_FMT | ||
2471 | 48 | #endif | ||
2472 | 49 | #define INO_T_FMT "%llu" | ||
2473 | 50 | |||
2474 | 51 | #ifdef TIME_T_FMT | ||
2475 | 52 | # undef TIME_T_FMT | ||
2476 | 53 | #endif | ||
2477 | 54 | #define TIME_T_FMT "%lld" | ||
2478 | 55 | |||
2479 | 56 | /* End */ | ||
2480 | diff --git a/OS/os.h-SunOS5 b/OS/os.h-SunOS5 | |||
2481 | 0 | new file mode 100644 | 57 | new file mode 100644 |
2482 | index 0000000..dfbd8f1 | |||
2483 | --- /dev/null | |||
2484 | +++ b/OS/os.h-SunOS5 | |||
2485 | @@ -0,0 +1,51 @@ | |||
2486 | 1 | /* Exim: OS-specific C header file for SunOS5 aka Solaris */ | ||
2487 | 2 | |||
2488 | 3 | #define CRYPT_H | ||
2489 | 4 | #define HAVE_MMAP | ||
2490 | 5 | #define HAVE_SYS_STATVFS_H | ||
2491 | 6 | #define F_FAVAIL f_favail | ||
2492 | 7 | #define SIOCGIFCONF_GIVES_ADDR | ||
2493 | 8 | |||
2494 | 9 | #define HAVE_GETIPNODEBYNAME 1 | ||
2495 | 10 | #define HAVE_GETIPNODEBYADDR 1 | ||
2496 | 11 | |||
2497 | 12 | #define HAVE_KSTAT | ||
2498 | 13 | #define LOAD_AVG_KSTAT "system_misc" | ||
2499 | 14 | #define LOAD_AVG_KSTAT_MODULE "unix" | ||
2500 | 15 | #define LOAD_AVG_SYMBOL "avenrun_1min" | ||
2501 | 16 | #define LOAD_AVG_FIELD value.ui32 | ||
2502 | 17 | |||
2503 | 18 | #define os_strsignal strsignal | ||
2504 | 19 | #define OS_STRSIGNAL | ||
2505 | 20 | |||
2506 | 21 | /* This is needed for some early Solaris releases, but causes trouble | ||
2507 | 22 | in the current ones, so it is out by default. */ | ||
2508 | 23 | |||
2509 | 24 | /* #define EXIM_SOCKLEN_T size_t */ | ||
2510 | 25 | |||
2511 | 26 | /* This is different from Linux and all other PAM implementations, | ||
2512 | 27 | it seems. */ | ||
2513 | 28 | |||
2514 | 29 | #define PAM_CONVERSE_ARG2_TYPE struct pam_message | ||
2515 | 30 | |||
2516 | 31 | |||
2517 | 32 | /* default is non-const */ | ||
2518 | 33 | #define ICONV_ARG2_TYPE const char ** | ||
2519 | 34 | |||
2520 | 35 | #if _POSIX_C_SOURCE < 200112L | ||
2521 | 36 | # define MISSING_UNSETENV_3 | ||
2522 | 37 | #endif | ||
2523 | 38 | |||
2524 | 39 | |||
2525 | 40 | /* SunOS5 doesn't accept getcwd(NULL, 0) to auto-allocate | ||
2526 | 41 | a buffer */ | ||
2527 | 42 | |||
2528 | 43 | #define OS_GETCWD | ||
2529 | 44 | |||
2530 | 45 | |||
2531 | 46 | #ifndef MIN | ||
2532 | 47 | # define MIN(a,b) (((a)<(b))?(a):(b)) | ||
2533 | 48 | # define MAX(a,b) (((a)>(b))?(a):(b)) | ||
2534 | 49 | #endif | ||
2535 | 50 | |||
2536 | 51 | /* End */ | ||
2537 | diff --git a/OS/unsupported/Makefile-AIX b/OS/unsupported/Makefile-AIX | |||
2538 | 0 | new file mode 100644 | 52 | new file mode 100644 |
2539 | index 0000000..fc32aa2 | |||
2540 | --- /dev/null | |||
2541 | +++ b/OS/unsupported/Makefile-AIX | |||
2542 | @@ -0,0 +1,28 @@ | |||
2543 | 1 | # Exim: OS-specific make file for AIX | ||
2544 | 2 | # Written by Nick Waterman (nick@cimio.co.uk) | ||
2545 | 3 | # Modified by PH following a message from Mike Meredith | ||
2546 | 4 | |||
2547 | 5 | # Note that the output of uname -m is probably not what Philip expected, | ||
2548 | 6 | # so you might end up with more build-AIX-random_number directories than | ||
2549 | 7 | # you expected if you have too many AIX boxes, but it seems to work... I | ||
2550 | 8 | # blame IBM. | ||
2551 | 9 | |||
2552 | 10 | # Note that nowadays you have to pay extra for a cc compiler with AIX! | ||
2553 | 11 | |||
2554 | 12 | CC=gcc | ||
2555 | 13 | |||
2556 | 14 | # This needs to be in here rather than os.h-AIX because of regexp stuff. | ||
2557 | 15 | # basically strchr is a #define, which means "extern char *strchr()" | ||
2558 | 16 | # ruins things. __STR31__ seems to get around this by magic. The AIX | ||
2559 | 17 | # include files are quite a confusing maze. | ||
2560 | 18 | # Mike M says this is not necessary any more; possibly this is related to | ||
2561 | 19 | # using gcc. Commented out by PH. | ||
2562 | 20 | #CFLAGS = -D__STR31__ | ||
2563 | 21 | |||
2564 | 22 | CFLAGS = -mcpu=power4 -maix64 -O3 | ||
2565 | 23 | |||
2566 | 24 | # Needed for vfork() and vfork() only? | ||
2567 | 25 | |||
2568 | 26 | LIBS = -lbsd -lm | ||
2569 | 27 | |||
2570 | 28 | # End | ||
2571 | diff --git a/OS/unsupported/Makefile-BSDI b/OS/unsupported/Makefile-BSDI | |||
2572 | 0 | new file mode 100644 | 29 | new file mode 100644 |
2573 | index 0000000..d56aa9b | |||
2574 | --- /dev/null | |||
2575 | +++ b/OS/unsupported/Makefile-BSDI | |||
2576 | @@ -0,0 +1,21 @@ | |||
2577 | 1 | # Exim: OS-specific make file for BSDI aka BSD/OS. Its antique link editor | ||
2578 | 2 | # cannot handle the TextPop overriding. | ||
2579 | 3 | |||
2580 | 4 | CFLAGS=-O | ||
2581 | 5 | CHOWN_COMMAND=/usr/sbin/chown | ||
2582 | 6 | |||
2583 | 7 | HAVE_SA_LEN=YES | ||
2584 | 8 | |||
2585 | 9 | X11=/usr/X11 | ||
2586 | 10 | XINCLUDE=-I$(X11)/include | ||
2587 | 11 | XLFLAGS=-L$(X11)/lib | ||
2588 | 12 | X11_LD_LIB=$(X11)/lib | ||
2589 | 13 | |||
2590 | 14 | LIBS_EXIMON=-lSM -lICE -lipc -lm | ||
2591 | 15 | EXIMON_TEXTPOP= | ||
2592 | 16 | |||
2593 | 17 | EXIWHAT_PS_ARG=-ax | ||
2594 | 18 | EXIWHAT_EGREP_ARG='/exim( |$$)' | ||
2595 | 19 | EXIWHAT_KILL_SIGNAL=-USR1 | ||
2596 | 20 | |||
2597 | 21 | # End | ||
2598 | diff --git a/OS/unsupported/Makefile-CYGWIN b/OS/unsupported/Makefile-CYGWIN | |||
2599 | 0 | new file mode 100644 | 22 | new file mode 100644 |
2600 | index 0000000..006e9fe | |||
2601 | --- /dev/null | |||
2602 | +++ b/OS/unsupported/Makefile-CYGWIN | |||
2603 | @@ -0,0 +1,113 @@ | |||
2604 | 1 | # OS-specific file for Cygwin. | ||
2605 | 2 | |||
2606 | 3 | # This file provided by Pierre A. Humblet <Pierre.Humblet@ieee.org> | ||
2607 | 4 | |||
2608 | 5 | HAVE_IPV6 = yes | ||
2609 | 6 | HAVE_ICONV = yes | ||
2610 | 7 | # Use c99 to have %z | ||
2611 | 8 | CFLAGS= -g -Wall -std=c99 -U __STRICT_ANSI__ | ||
2612 | 9 | LIBS= -lcrypt -lresolv | ||
2613 | 10 | LIBS_EXIM= -liconv | ||
2614 | 11 | EXIWHAT_PS_ARG=-as | ||
2615 | 12 | EXIWHAT_KILL_SIGNAL=-USR1 | ||
2616 | 13 | EXIWHAT_EGREP_ARG='/(EXIM|exim)[0-9. -]*$$' | ||
2617 | 14 | |||
2618 | 15 | DBMLIB=-lgdbm | ||
2619 | 16 | USE_GDBM=YES | ||
2620 | 17 | |||
2621 | 18 | # Some OS add a suffix to executables | ||
2622 | 19 | EXE = .exe | ||
2623 | 20 | |||
2624 | 21 | # To add a resource file with an icon | ||
2625 | 22 | LIBS_EXIM +=../Local/exim_res.o | ||
2626 | 23 | |||
2627 | 24 | # To produce a linker map | ||
2628 | 25 | #LIBS_EXIM+=-Wl,-Map,Exim.Map | ||
2629 | 26 | |||
2630 | 27 | |||
2631 | 28 | ################################################## | ||
2632 | 29 | # The following is normally set in local/Makefile. | ||
2633 | 30 | # Makefile.cygwin provides defaults with which the | ||
2634 | 31 | # precompiled version is built | ||
2635 | 32 | ################################################## | ||
2636 | 33 | |||
2637 | 34 | BIN_DIRECTORY=/usr/bin | ||
2638 | 35 | CONFIGURE_FILE=/etc/exim.conf | ||
2639 | 36 | EXIM_USER=18 # This changes if user exim exists | ||
2640 | 37 | EXIM_GROUP=544 # Administrators | ||
2641 | 38 | SPOOL_DIRECTORY=/var/spool/exim | ||
2642 | 39 | LOG_FILE_PATH=/var/log/exim/exim_%s.log | ||
2643 | 40 | TIMEZONE_DEFAULT = "" | ||
2644 | 41 | |||
2645 | 42 | AUTH_CRAM_MD5=yes | ||
2646 | 43 | AUTH_PLAINTEXT=yes | ||
2647 | 44 | AUTH_SPA=yes | ||
2648 | 45 | |||
2649 | 46 | SUPPORT_TLS=yes | ||
2650 | 47 | TLS_LIBS=-lssl -lcrypto | ||
2651 | 48 | |||
2652 | 49 | ROUTER_ACCEPT=yes | ||
2653 | 50 | ROUTER_DNSLOOKUP=yes | ||
2654 | 51 | ROUTER_IPLITERAL=yes | ||
2655 | 52 | ROUTER_MANUALROUTE=yes | ||
2656 | 53 | ROUTER_QUERYPROGRAM=yes | ||
2657 | 54 | ROUTER_REDIRECT=yes | ||
2658 | 55 | |||
2659 | 56 | TRANSPORT_APPENDFILE=yes | ||
2660 | 57 | TRANSPORT_AUTOREPLY=yes | ||
2661 | 58 | TRANSPORT_PIPE=yes | ||
2662 | 59 | TRANSPORT_SMTP=yes | ||
2663 | 60 | |||
2664 | 61 | SUPPORT_MAILDIR=yes | ||
2665 | 62 | SUPPORT_MAILSTORE=yes | ||
2666 | 63 | SUPPORT_MBX=yes | ||
2667 | 64 | |||
2668 | 65 | LOOKUP_DBM=yes | ||
2669 | 66 | LOOKUP_LSEARCH=yes | ||
2670 | 67 | |||
2671 | 68 | # LOOKUP_CDB=yes | ||
2672 | 69 | LOOKUP_DNSDB=yes | ||
2673 | 70 | LOOKUP_DSEARCH=yes | ||
2674 | 71 | LOOKUP_LDAP=yes | ||
2675 | 72 | # LOOKUP_MYSQL=yes | ||
2676 | 73 | # LOOKUP_NIS=yes | ||
2677 | 74 | # LOOKUP_NISPLUS=yes | ||
2678 | 75 | # LOOKUP_ORACLE=yes | ||
2679 | 76 | LOOKUP_PASSWD=yes | ||
2680 | 77 | # LOOKUP_PGSQL=yes | ||
2681 | 78 | # LOOKUP_WHOSON=yes | ||
2682 | 79 | |||
2683 | 80 | LDAP_LIB_TYPE=OPENLDAP2 | ||
2684 | 81 | LOOKUP_LIBS=-lldap -llber | ||
2685 | 82 | |||
2686 | 83 | WITH_CONTENT_SCAN=yes | ||
2687 | 84 | |||
2688 | 85 | # It is important to define these variables but the values are always overridden | ||
2689 | 86 | CONFIGURE_OWNER=18 | ||
2690 | 87 | CONFIGURE_GROUP=544 | ||
2691 | 88 | |||
2692 | 89 | EXICYCLOG_MAX=10 | ||
2693 | 90 | |||
2694 | 91 | COMPRESS_COMMAND=/usr/bin/gzip | ||
2695 | 92 | COMPRESS_SUFFIX=gz | ||
2696 | 93 | ZCAT_COMMAND=/usr/bin/zcat | ||
2697 | 94 | |||
2698 | 95 | # EXIM_PERL=perl.o | ||
2699 | 96 | |||
2700 | 97 | # Comment the two lines below if you do not have PAM, e.g. from | ||
2701 | 98 | # ftp://ftp.uni-erlangen.de/pub/pc/gnuwin32/cygwin/porters/Humblet_Pierre_A | ||
2702 | 99 | SUPPORT_PAM=yes | ||
2703 | 100 | CFLAGS += -DINCLUDE_PAM -I ../pam -I ../../pam | ||
2704 | 101 | |||
2705 | 102 | # All modes are in octal and must start with 0 | ||
2706 | 103 | EXIMDB_DIRECTORY_MODE = 01777 | ||
2707 | 104 | EXIMDB_MODE = 0666 | ||
2708 | 105 | EXIMDB_LOCKFILE_MODE = 0666 | ||
2709 | 106 | INPUT_DIRECTORY_MODE = 01777 | ||
2710 | 107 | LOG_DIRECTORY_MODE = 01777 | ||
2711 | 108 | LOG_MODE = 0666 | ||
2712 | 109 | MSGLOG_DIRECTORY_MODE = 01777 | ||
2713 | 110 | SPOOL_DIRECTORY_MODE = 01777 | ||
2714 | 111 | SPOOL_MODE = 0600 | ||
2715 | 112 | |||
2716 | 113 | # End | ||
2717 | diff --git a/OS/unsupported/Makefile-DGUX b/OS/unsupported/Makefile-DGUX | |||
2718 | 0 | new file mode 100644 | 114 | new file mode 100644 |
2719 | index 0000000..667c63f | |||
2720 | --- /dev/null | |||
2721 | +++ b/OS/unsupported/Makefile-DGUX | |||
2722 | @@ -0,0 +1,32 @@ | |||
2723 | 1 | # Exim: OS-specific make file for DGUX | ||
2724 | 2 | # | ||
2725 | 3 | # Written by Ken Bailey (K.Bailey@rbgkew.org.uk) Feb 1998 | ||
2726 | 4 | # on dgux R4.11MU04 generic AViiON mc88100 | ||
2727 | 5 | # with no X | ||
2728 | 6 | |||
2729 | 7 | # Minor tidies to remove settings that are actually the default, | ||
2730 | 8 | # in line with the style of other system files - PH. | ||
2731 | 9 | |||
2732 | 10 | BASENAME_COMMAND=/bin/basename | ||
2733 | 11 | CHOWN_COMMAND=/bin/chown | ||
2734 | 12 | CHGRP_COMMAND=/bin/chgrp | ||
2735 | 13 | CHMOD_COMMAND=/bin/chmod | ||
2736 | 14 | |||
2737 | 15 | # PERL | ||
2738 | 16 | # Perl is not necessary for running Exim itself, but some Perl utilities | ||
2739 | 17 | # are provided for processing the logs. Perl 5 is assumed. | ||
2740 | 18 | # DG ship perl version 4.036 in /bin/perl so need to use locally installed perl | ||
2741 | 19 | |||
2742 | 20 | PERL_COMMAND=/usr/local/bin/perl | ||
2743 | 21 | |||
2744 | 22 | # dg's version of gcc likes O2 | ||
2745 | 23 | |||
2746 | 24 | CFLAGS=-O2 | ||
2747 | 25 | |||
2748 | 26 | RANLIB=@true | ||
2749 | 27 | LIBS=-lsocket -lnsl -lm | ||
2750 | 28 | LIBRESOLV=-lresolv | ||
2751 | 29 | DBMLIB=-ldbm | ||
2752 | 30 | |||
2753 | 31 | # End | ||
2754 | 32 | |||
2755 | diff --git a/OS/unsupported/Makefile-Darwin b/OS/unsupported/Makefile-Darwin | |||
2756 | 0 | new file mode 100644 | 33 | new file mode 100644 |
2757 | index 0000000..be0d952 | |||
2758 | --- /dev/null | |||
2759 | +++ b/OS/unsupported/Makefile-Darwin | |||
2760 | @@ -0,0 +1,29 @@ | |||
2761 | 1 | # Exim: OS-specific make file for Darwin (Mac OS X). | ||
2762 | 2 | |||
2763 | 3 | CC=cc | ||
2764 | 4 | |||
2765 | 5 | BASENAME_COMMAND=look_for_it | ||
2766 | 6 | CHOWN_COMMAND=/usr/sbin/chown | ||
2767 | 7 | CHMOD_COMMAND=/bin/chmod | ||
2768 | 8 | |||
2769 | 9 | HAVE_SA_LEN=YES | ||
2770 | 10 | |||
2771 | 11 | # Removed -DBIND_8_COMPAT for 4.61 | ||
2772 | 12 | # CFLAGS=-O -no-cpp-precomp -DBIND_8_COMPAT | ||
2773 | 13 | |||
2774 | 14 | CFLAGS=-O -no-cpp-precomp | ||
2775 | 15 | LIBRESOLV=-lresolv | ||
2776 | 16 | |||
2777 | 17 | USE_DB = yes | ||
2778 | 18 | DBMLIB = | ||
2779 | 19 | |||
2780 | 20 | X11=/usr/X11R6 | ||
2781 | 21 | XINCLUDE=-I$(X11)/include | ||
2782 | 22 | XLFLAGS=-L$(X11)/lib | ||
2783 | 23 | X11_LD_LIB=$(X11)/lib | ||
2784 | 24 | |||
2785 | 25 | EXIWHAT_PS_ARG=ax | ||
2786 | 26 | EXIWHAT_EGREP_ARG='/exim( |$$)' | ||
2787 | 27 | EXIWHAT_KILL_SIGNAL=-USR1 | ||
2788 | 28 | |||
2789 | 29 | # End | ||
2790 | diff --git a/OS/unsupported/Makefile-DragonFly b/OS/unsupported/Makefile-DragonFly | |||
2791 | 0 | new file mode 100644 | 30 | new file mode 100644 |
2792 | index 0000000..c49c59f | |||
2793 | --- /dev/null | |||
2794 | +++ b/OS/unsupported/Makefile-DragonFly | |||
2795 | @@ -0,0 +1,31 @@ | |||
2796 | 1 | # Exim: OS-specific make file for DragonFly | ||
2797 | 2 | # There's no setting of CFLAGS here, to allow the system default | ||
2798 | 3 | # for "make" to be the default. | ||
2799 | 4 | |||
2800 | 5 | CHOWN_COMMAND=/usr/sbin/chown | ||
2801 | 6 | CHMOD_COMMAND=/bin/chmod | ||
2802 | 7 | |||
2803 | 8 | HAVE_SA_LEN=YES | ||
2804 | 9 | |||
2805 | 10 | # crypt() is in a separate library | ||
2806 | 11 | LIBS=-lcrypt -lm | ||
2807 | 12 | |||
2808 | 13 | # DragonFly always ships with Berkeley DB | ||
2809 | 14 | USE_DB=yes | ||
2810 | 15 | |||
2811 | 16 | # X11 may be under /usr/pkg/xorg/ for example. | ||
2812 | 17 | # X11=/usr/X11R6 | ||
2813 | 18 | X11=$(X11BASE) | ||
2814 | 19 | |||
2815 | 20 | XINCLUDE=-I$(X11)/include | ||
2816 | 21 | XLFLAGS=-L$(X11)/lib | ||
2817 | 22 | XLFLAGS+=-Wl,-rpath,${X11BASE}/lib | ||
2818 | 23 | X11_LD_LIB=$(X11)/lib | ||
2819 | 24 | |||
2820 | 25 | EXIWHAT_PS_ARG=-ax | ||
2821 | 26 | EXIWHAT_EGREP_ARG='/exim( |$$)' | ||
2822 | 27 | EXIWHAT_MULTIKILL_CMD='killall -m' | ||
2823 | 28 | EXIWHAT_MULTIKILL_ARG='^exim($$|-[0-9.]+-[0-9]+$$)' | ||
2824 | 29 | EXIWHAT_KILL_SIGNAL=-USR1 | ||
2825 | 30 | |||
2826 | 31 | # End | ||
2827 | diff --git a/OS/unsupported/Makefile-GNU b/OS/unsupported/Makefile-GNU | |||
2828 | 0 | new file mode 100644 | 32 | new file mode 100644 |
2829 | index 0000000..e464341 | |||
2830 | --- /dev/null | |||
2831 | +++ b/OS/unsupported/Makefile-GNU | |||
2832 | @@ -0,0 +1,29 @@ | |||
2833 | 1 | # Exim: OS-specific make file for GNU and variants. | ||
2834 | 2 | |||
2835 | 3 | HAVE_ICONV=yes | ||
2836 | 4 | |||
2837 | 5 | BASENAME_COMMAND=look_for_it | ||
2838 | 6 | CHOWN_COMMAND=look_for_it | ||
2839 | 7 | CHGRP_COMMAND=look_for_it | ||
2840 | 8 | CHMOD_COMMAND=look_for_it | ||
2841 | 9 | |||
2842 | 10 | CFLAGS ?= -O -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE | ||
2843 | 11 | |||
2844 | 12 | DBMLIB = -ldb | ||
2845 | 13 | USE_DB = yes | ||
2846 | 14 | |||
2847 | 15 | LIBS = -lnsl -lcrypt -lm | ||
2848 | 16 | LIBRESOLV = -lresolv | ||
2849 | 17 | |||
2850 | 18 | X11=/usr/X11R6 | ||
2851 | 19 | XINCLUDE=-I$(X11)/include | ||
2852 | 20 | XLFLAGS=-L$(X11)/lib | ||
2853 | 21 | X11_LD_LIB=$(X11)/lib | ||
2854 | 22 | |||
2855 | 23 | EXIWHAT_PS_ARG=ax | ||
2856 | 24 | EXIWHAT_EGREP_ARG='/exim( |$$)' | ||
2857 | 25 | EXIWHAT_MULTIKILL_CMD=killall | ||
2858 | 26 | EXIWHAT_MULTIKILL_ARG=exim | ||
2859 | 27 | EXIWHAT_KILL_SIGNAL=-USR1 | ||
2860 | 28 | |||
2861 | 29 | # End | ||
2862 | diff --git a/OS/unsupported/Makefile-GNUkFreeBSD b/OS/unsupported/Makefile-GNUkFreeBSD | |||
2863 | 0 | new file mode 100644 | 30 | new file mode 100644 |
2864 | index 0000000..8019281 | |||
2865 | --- /dev/null | |||
2866 | +++ b/OS/unsupported/Makefile-GNUkFreeBSD | |||
2867 | @@ -0,0 +1,29 @@ | |||
2868 | 1 | # Exim: OS-specific make file for GNU and variants. | ||
2869 | 2 | |||
2870 | 3 | HAVE_ICONV=yes | ||
2871 | 4 | |||
2872 | 5 | BASENAME_COMMAND=look_for_it | ||
2873 | 6 | CHOWN_COMMAND=look_for_it | ||
2874 | 7 | CHGRP_COMMAND=look_for_it | ||
2875 | 8 | CHMOD_COMMAND=look_for_it | ||
2876 | 9 | |||
2877 | 10 | CFLAGS ?= -O -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE | ||
2878 | 11 | |||
2879 | 12 | DBMLIB = -ldb | ||
2880 | 13 | USE_DB = yes | ||
2881 | 14 | |||
2882 | 15 | LIBS = -lnsl -lcrypt -lm | ||
2883 | 16 | LIBRESOLV = -lresolv | ||
2884 | 17 | |||
2885 | 18 | X11=/usr/X11R6 | ||
2886 | 19 | XINCLUDE=-I$(X11)/include | ||
2887 | 20 | XLFLAGS=-L$(X11)/lib | ||
2888 | 21 | X11_LD_LIB=$(X11)/lib | ||
2889 | 22 | |||
2890 | 23 | EXIWHAT_PS_ARG=ax | ||
2891 | 24 | EXIWHAT_EGREP_ARG='/exim( |$$)' | ||
2892 | 25 | EXIWHAT_MULTIKILL_CMD=killall | ||
2893 | 26 | EXIWHAT_MULTIKILL_ARG=exim4 | ||
2894 | 27 | EXIWHAT_KILL_SIGNAL=-USR1 | ||
2895 | 28 | |||
2896 | 29 | # End | ||
2897 | diff --git a/OS/unsupported/Makefile-GNUkNetBSD b/OS/unsupported/Makefile-GNUkNetBSD | |||
2898 | 0 | new file mode 100644 | 30 | new file mode 100644 |
2899 | index 0000000..8019281 | |||
2900 | --- /dev/null | |||
2901 | +++ b/OS/unsupported/Makefile-GNUkNetBSD | |||
2902 | @@ -0,0 +1,29 @@ | |||
2903 | 1 | # Exim: OS-specific make file for GNU and variants. | ||
2904 | 2 | |||
2905 | 3 | HAVE_ICONV=yes | ||
2906 | 4 | |||
2907 | 5 | BASENAME_COMMAND=look_for_it | ||
2908 | 6 | CHOWN_COMMAND=look_for_it | ||
2909 | 7 | CHGRP_COMMAND=look_for_it | ||
2910 | 8 | CHMOD_COMMAND=look_for_it | ||
2911 | 9 | |||
2912 | 10 | CFLAGS ?= -O -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE | ||
2913 | 11 | |||
2914 | 12 | DBMLIB = -ldb | ||
2915 | 13 | USE_DB = yes | ||
2916 | 14 | |||
2917 | 15 | LIBS = -lnsl -lcrypt -lm | ||
2918 | 16 | LIBRESOLV = -lresolv | ||
2919 | 17 | |||
2920 | 18 | X11=/usr/X11R6 | ||
2921 | 19 | XINCLUDE=-I$(X11)/include | ||
2922 | 20 | XLFLAGS=-L$(X11)/lib | ||
2923 | 21 | X11_LD_LIB=$(X11)/lib | ||
2924 | 22 | |||
2925 | 23 | EXIWHAT_PS_ARG=ax | ||
2926 | 24 | EXIWHAT_EGREP_ARG='/exim( |$$)' | ||
2927 | 25 | EXIWHAT_MULTIKILL_CMD=killall | ||
2928 | 26 | EXIWHAT_MULTIKILL_ARG=exim4 | ||
2929 | 27 | EXIWHAT_KILL_SIGNAL=-USR1 | ||
2930 | 28 | |||
2931 | 29 | # End | ||
2932 | diff --git a/OS/unsupported/Makefile-HI-OSF b/OS/unsupported/Makefile-HI-OSF | |||
2933 | 0 | new file mode 100644 | 30 | new file mode 100644 |
2934 | index 0000000..da3d487 | |||
2935 | --- /dev/null | |||
2936 | +++ b/OS/unsupported/Makefile-HI-OSF | |||
2937 | @@ -0,0 +1,8 @@ | |||
2938 | 1 | # Exim: OS-specific make file for HI-OSF/1-MJ and HI-UX/MPP | ||
2939 | 2 | |||
2940 | 3 | CC=cc | ||
2941 | 4 | CFLAGS=-O | ||
2942 | 5 | RANLIB=@true | ||
2943 | 6 | EXIWHAT_EGREP_ARG='/exim( |$$)' | ||
2944 | 7 | |||
2945 | 8 | # End | ||
2946 | diff --git a/OS/unsupported/Makefile-HI-UX b/OS/unsupported/Makefile-HI-UX | |||
2947 | 0 | new file mode 100644 | 9 | new file mode 100644 |
2948 | index 0000000..870ee84 | |||
2949 | --- /dev/null | |||
2950 | +++ b/OS/unsupported/Makefile-HI-UX | |||
2951 | @@ -0,0 +1,12 @@ | |||
2952 | 1 | # Exim: OS-specific make file for HI-UX | ||
2953 | 2 | |||
2954 | 3 | CC=cc -Aa -D_HIUX_SOURCE | ||
2955 | 4 | HAVE_SETRESUID=YES | ||
2956 | 5 | HAVE_SETEUID=NO | ||
2957 | 6 | XINCLUDE=-I/usr/include/X11R5 | ||
2958 | 7 | XLFLAGS=-L/usr/lib/X11R5 | ||
2959 | 8 | DBMLIB = -lndbm | ||
2960 | 9 | NEED_H_ERRNO=1 | ||
2961 | 10 | RANLIB=@true | ||
2962 | 11 | |||
2963 | 12 | # End | ||
2964 | diff --git a/OS/unsupported/Makefile-HP-UX b/OS/unsupported/Makefile-HP-UX | |||
2965 | 0 | new file mode 100644 | 13 | new file mode 100644 |
2966 | index 0000000..ea35144 | |||
2967 | --- /dev/null | |||
2968 | +++ b/OS/unsupported/Makefile-HP-UX | |||
2969 | @@ -0,0 +1,27 @@ | |||
2970 | 1 | # Exim: OS-specific make file for HP-UX later than 9 | ||
2971 | 2 | |||
2972 | 3 | # HP ANSI C compiler | ||
2973 | 4 | #CC=cc | ||
2974 | 5 | #CFLAGS=+O2 +Onolimit -z -D_XOPEN_SOURCE_EXTENDED | ||
2975 | 6 | # Users of the A.06.00 compiler might need to use +O1 rather than +O2 as | ||
2976 | 7 | # there have been some problems reported with this compiler with +O2 set. | ||
2977 | 8 | |||
2978 | 9 | # gcc | ||
2979 | 10 | CFLAGS=-O -D_XOPEN_SOURCE_EXTENDED | ||
2980 | 11 | LDFLAGS=-Wl,-z | ||
2981 | 12 | LIBS=-lm | ||
2982 | 13 | |||
2983 | 14 | BASENAME_COMMAND=/bin/basename | ||
2984 | 15 | HAVE_ICONV=yes | ||
2985 | 16 | HAVE_SETRESUID=YES | ||
2986 | 17 | HAVE_SETEUID=NO | ||
2987 | 18 | XINCLUDE=-I/usr/include/X11R6 -I/usr/contrib/X11R6/include | ||
2988 | 19 | XLFLAGS=-L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib | ||
2989 | 20 | X11_LD_LIB=/usr/contrib/X11R6/lib | ||
2990 | 21 | EXIMON_TEXTPOP= | ||
2991 | 22 | DBMLIB=-lndbm | ||
2992 | 23 | RANLIB=@true | ||
2993 | 24 | |||
2994 | 25 | OS_C_INCLUDES=setenv.c | ||
2995 | 26 | |||
2996 | 27 | # End | ||
2997 | diff --git a/OS/unsupported/Makefile-HP-UX-9 b/OS/unsupported/Makefile-HP-UX-9 | |||
2998 | 0 | new file mode 100644 | 28 | new file mode 100644 |
2999 | index 0000000..1530009 | |||
3000 | --- /dev/null | |||
3001 | +++ b/OS/unsupported/Makefile-HP-UX-9 | |||
3002 | @@ -0,0 +1,15 @@ | |||
3003 | 1 | # Exim: OS-specific make file for HP-UX 9 | ||
3004 | 2 | |||
3005 | 3 | CFLAGS=-O | ||
3006 | 4 | BASENAME_COMMAND=/bin/basename | ||
3007 | 5 | HAVE_ICONV=yes | ||
3008 | 6 | HAVE_SETRESUID=YES | ||
3009 | 7 | HAVE_SETEUID=NO | ||
3010 | 8 | XINCLUDE=-I/usr/include/X11R5 | ||
3011 | 9 | XLFLAGS=-L/usr/lib/X11R5 -L/usr/contrib/X11R5/lib | ||
3012 | 10 | X11_LD_LIB=/usr/contrib/X11R5/lib | ||
3013 | 11 | EXIMON_TEXTPOP= | ||
3014 | 12 | DBMLIB=-lndbm | ||
3015 | 13 | RANLIB=@true | ||
3016 | 14 | |||
3017 | 15 | # End | ||
3018 | diff --git a/OS/unsupported/Makefile-IRIX b/OS/unsupported/Makefile-IRIX | |||
3019 | 0 | new file mode 100644 | 16 | new file mode 100644 |
3020 | index 0000000..7b95783 | |||
3021 | --- /dev/null | |||
3022 | +++ b/OS/unsupported/Makefile-IRIX | |||
3023 | @@ -0,0 +1,12 @@ | |||
3024 | 1 | # Exim: OS-specific make file for IRIX | ||
3025 | 2 | |||
3026 | 3 | HAVE_ICONV=yes | ||
3027 | 4 | BASENAME_COMMAND=/sbin/basename | ||
3028 | 5 | HOSTNAME_COMMAND=/usr/bsd/hostname | ||
3029 | 6 | CFLAGS=-OPT:Olimit=1500 | ||
3030 | 7 | LIBS=-lmld -lm | ||
3031 | 8 | XINCLUDE=-I/usr/include/X11 | ||
3032 | 9 | vfork=fork | ||
3033 | 10 | RANLIB=@true | ||
3034 | 11 | |||
3035 | 12 | # End | ||
3036 | diff --git a/OS/unsupported/Makefile-IRIX6 b/OS/unsupported/Makefile-IRIX6 | |||
3037 | 0 | new file mode 100644 | 13 | new file mode 100644 |
3038 | index 0000000..be01138 | |||
3039 | --- /dev/null | |||
3040 | +++ b/OS/unsupported/Makefile-IRIX6 | |||
3041 | @@ -0,0 +1,13 @@ | |||
3042 | 1 | # Exim: OS-specific make file for IRIX6 on 64-bit systems | ||
3043 | 2 | |||
3044 | 3 | HAVE_ICONV=yes | ||
3045 | 4 | HOSTNAME_COMMAND=/usr/bsd/hostname | ||
3046 | 5 | CFLAGS=-O2 -n32 -OPT:Olimit=4000 | ||
3047 | 6 | LFLAGS=-n32 | ||
3048 | 7 | LIBS=-lelf -lm | ||
3049 | 8 | XINCLUDE=-I/usr/include/X11 | ||
3050 | 9 | XLFLAGS= | ||
3051 | 10 | vfork=fork | ||
3052 | 11 | RANLIB=@true | ||
3053 | 12 | |||
3054 | 13 | # End | ||
3055 | diff --git a/OS/unsupported/Makefile-IRIX632 b/OS/unsupported/Makefile-IRIX632 | |||
3056 | 0 | new file mode 100644 | 14 | new file mode 100644 |
3057 | index 0000000..b567fc6 | |||
3058 | --- /dev/null | |||
3059 | +++ b/OS/unsupported/Makefile-IRIX632 | |||
3060 | @@ -0,0 +1,16 @@ | |||
3061 | 1 | # Exim: OS-specific make file for IRIX 6 on 32-bit systems. | ||
3062 | 2 | # There seems to be some variation. The commented settings show | ||
3063 | 3 | # some alternatives. | ||
3064 | 4 | |||
3065 | 5 | HAVE_ICONV=yes | ||
3066 | 6 | HOSTNAME_COMMAND=/usr/bsd/hostname | ||
3067 | 7 | #CFLAGS=-OPT:Olimit=1500 -32 -mips2 | ||
3068 | 8 | CFLAGS=-32 | ||
3069 | 9 | LFLAGS=-32 | ||
3070 | 10 | #LIBS=-lmld | ||
3071 | 11 | LIBS=-lelf -lm | ||
3072 | 12 | XINCLUDE=-I/usr/include/X11 | ||
3073 | 13 | vfork=fork | ||
3074 | 14 | RANLIB=@true | ||
3075 | 15 | |||
3076 | 16 | # End | ||
3077 | diff --git a/OS/unsupported/Makefile-IRIX65 b/OS/unsupported/Makefile-IRIX65 | |||
3078 | 0 | new file mode 100644 | 17 | new file mode 100644 |
3079 | index 0000000..50e7745 | |||
3080 | --- /dev/null | |||
3081 | +++ b/OS/unsupported/Makefile-IRIX65 | |||
3082 | @@ -0,0 +1,16 @@ | |||
3083 | 1 | # Exim: OS-specific make file for IRIX 6.5 | ||
3084 | 2 | |||
3085 | 3 | HAVE_ICONV=yes | ||
3086 | 4 | HOSTNAME_COMMAND=/usr/bsd/hostname | ||
3087 | 5 | CC=cc | ||
3088 | 6 | CFLAGS=-O2 -OPT:Olimit=0 | ||
3089 | 7 | # CFLAGS=-O2 # override with this (in your Local/Makefile) if using gcc | ||
3090 | 8 | LFLAGS=-Wl,-LD_MSG:off=85 | ||
3091 | 9 | LFLAGS= | ||
3092 | 10 | # nlist has moved from libmld to libelf | ||
3093 | 11 | LIBS=-lelf -lm | ||
3094 | 12 | XINCLUDE=-I/usr/include/X11 | ||
3095 | 13 | vfork=fork | ||
3096 | 14 | RANLIB=@true | ||
3097 | 15 | |||
3098 | 16 | # End | ||
3099 | diff --git a/OS/unsupported/Makefile-NetBSD b/OS/unsupported/Makefile-NetBSD | |||
3100 | 0 | new file mode 100644 | 17 | new file mode 100644 |
3101 | index 0000000..35d03a2 | |||
3102 | --- /dev/null | |||
3103 | +++ b/OS/unsupported/Makefile-NetBSD | |||
3104 | @@ -0,0 +1,27 @@ | |||
3105 | 1 | # Exim: OS-specific make file for NetBSD (ELF object format) | ||
3106 | 2 | |||
3107 | 3 | CHOWN_COMMAND=/usr/sbin/chown | ||
3108 | 4 | CHMOD_COMMAND=/bin/chmod | ||
3109 | 5 | |||
3110 | 6 | CFLAGS ?= -O2 | ||
3111 | 7 | |||
3112 | 8 | HAVE_SA_LEN=YES | ||
3113 | 9 | HAVE_IPV6=YES | ||
3114 | 10 | LIBS=-lcrypt -lm | ||
3115 | 11 | |||
3116 | 12 | X11=/usr/X11R6 | ||
3117 | 13 | XINCLUDE=-I$(X11)/include | ||
3118 | 14 | XLFLAGS=-L$(X11)/lib | ||
3119 | 15 | X11_LD_LIB=$(X11)/lib | ||
3120 | 16 | |||
3121 | 17 | EXIWHAT_PS_ARG=-ax | ||
3122 | 18 | EXIWHAT_EGREP_ARG='/exim( |$$)' | ||
3123 | 19 | EXIWHAT_KILL_SIGNAL=-USR1 | ||
3124 | 20 | |||
3125 | 21 | # NetBSD always ships with Berkeley DB | ||
3126 | 22 | USE_DB=yes | ||
3127 | 23 | |||
3128 | 24 | # NetBSD ELF linker needs a -R flag. | ||
3129 | 25 | XLFLAGS+=-Wl,-R$(X11)/lib/ | ||
3130 | 26 | |||
3131 | 27 | # End | ||
3132 | diff --git a/OS/unsupported/Makefile-NetBSD-a.out b/OS/unsupported/Makefile-NetBSD-a.out | |||
3133 | 0 | new file mode 100644 | 28 | new file mode 100644 |
3134 | index 0000000..e210efd | |||
3135 | --- /dev/null | |||
3136 | +++ b/OS/unsupported/Makefile-NetBSD-a.out | |||
3137 | @@ -0,0 +1,24 @@ | |||
3138 | 1 | # Exim: OS-specific make file for NetBSD (a.out/COFF object format) | ||
3139 | 2 | |||
3140 | 3 | CHOWN_COMMAND=/usr/sbin/chown | ||
3141 | 4 | CHMOD_COMMAND=/bin/chmod | ||
3142 | 5 | |||
3143 | 6 | CFLAGS ?= -O2 | ||
3144 | 7 | |||
3145 | 8 | HAVE_SA_LEN=YES | ||
3146 | 9 | HAVE_IPV6=YES | ||
3147 | 10 | LIBS=-lcrypt -lm | ||
3148 | 11 | |||
3149 | 12 | X11=/usr/X11R6 | ||
3150 | 13 | XINCLUDE=-I$(X11)/include | ||
3151 | 14 | XLFLAGS=-L$(X11)/lib | ||
3152 | 15 | X11_LD_LIB=$(X11)/lib | ||
3153 | 16 | |||
3154 | 17 | EXIWHAT_PS_ARG=-ax | ||
3155 | 18 | EXIWHAT_EGREP_ARG='/exim( |$$)' | ||
3156 | 19 | EXIWHAT_KILL_SIGNAL=-USR1 | ||
3157 | 20 | |||
3158 | 21 | # NetBSD always ships with Berkeley DB | ||
3159 | 22 | USE_DB=yes | ||
3160 | 23 | |||
3161 | 24 | # End | ||
3162 | diff --git a/OS/unsupported/Makefile-OSF1 b/OS/unsupported/Makefile-OSF1 | |||
3163 | 0 | new file mode 100644 | 25 | new file mode 100644 |
3164 | index 0000000..811ca07 | |||
3165 | --- /dev/null | |||
3166 | +++ b/OS/unsupported/Makefile-OSF1 | |||
3167 | @@ -0,0 +1,10 @@ | |||
3168 | 1 | # Exim: OS-specific make file for OSF1 | ||
3169 | 2 | |||
3170 | 3 | CFLAGS=-O | ||
3171 | 4 | LIBS=-liconv -lm | ||
3172 | 5 | HAVE_CRYPT16=yes | ||
3173 | 6 | HAVE_ICONV=yes | ||
3174 | 7 | HOSTNAME_COMMAND=/usr/bin/hostname | ||
3175 | 8 | EXIWHAT_EGREP_ARG='/exim( |$$)' | ||
3176 | 9 | |||
3177 | 10 | # End | ||
3178 | diff --git a/OS/unsupported/Makefile-OpenUNIX b/OS/unsupported/Makefile-OpenUNIX | |||
3179 | 0 | new file mode 100644 | 11 | new file mode 100644 |
3180 | index 0000000..e4d7261 | |||
3181 | --- /dev/null | |||
3182 | +++ b/OS/unsupported/Makefile-OpenUNIX | |||
3183 | @@ -0,0 +1,17 @@ | |||
3184 | 1 | # Exim: OS-specific make file for OpenUNIX | ||
3185 | 2 | |||
3186 | 3 | CC=/usr/bin/cc | ||
3187 | 4 | CFLAGS=-O -I/usr/local/include | ||
3188 | 5 | LFLAGS=-L/usr/local/lib | ||
3189 | 6 | |||
3190 | 7 | LIBS=-lsocket -lnsl -lelf -lgen -lresolv -lm | ||
3191 | 8 | EXTRALIBS_EXIMON=-lICE -lSM | ||
3192 | 9 | |||
3193 | 10 | RANLIB=@true | ||
3194 | 11 | ERRNO_QUOTA=0 | ||
3195 | 12 | |||
3196 | 13 | X11=/usr/lib/X11 | ||
3197 | 14 | XINCLUDE=-I/usr/include/X11 | ||
3198 | 15 | XLFLAGS=-L/usr/lib -L$(X11)/lib | ||
3199 | 16 | |||
3200 | 17 | # End | ||
3201 | diff --git a/OS/unsupported/Makefile-QNX b/OS/unsupported/Makefile-QNX | |||
3202 | 0 | new file mode 100644 | 18 | new file mode 100644 |
3203 | index 0000000..3cf81c4 | |||
3204 | --- /dev/null | |||
3205 | +++ b/OS/unsupported/Makefile-QNX | |||
3206 | @@ -0,0 +1,30 @@ | |||
3207 | 1 | # Exim: OS-specific makefile for QNX | ||
3208 | 2 | |||
3209 | 3 | BASENAME_COMMAND=/bin/basename | ||
3210 | 4 | MAKE_SHELL=/usr/bin/bash | ||
3211 | 5 | |||
3212 | 6 | CHOWN_COMMAND=/bin/chown | ||
3213 | 7 | CHGRP_COMMAND=/bin/chgrp | ||
3214 | 8 | CHMOD_COMMAND=/bin/chmod | ||
3215 | 9 | HOSTNAME_COMMAND=/bin/hostname | ||
3216 | 10 | MV_COMMAND=/bin/mv | ||
3217 | 11 | PERL_COMMAND=/usr/bin/perl | ||
3218 | 12 | RM_COMMAND=/bin/rm | ||
3219 | 13 | |||
3220 | 14 | AR=ar -rc | ||
3221 | 15 | |||
3222 | 16 | CC=cc | ||
3223 | 17 | CFLAGS=-Otax | ||
3224 | 18 | LIBIDENTCFLAGS= | ||
3225 | 19 | |||
3226 | 20 | RANLIB=@true | ||
3227 | 21 | DBMLIB=-ldb | ||
3228 | 22 | USE_DB=yes | ||
3229 | 23 | LIBS=-lsocket -lm | ||
3230 | 24 | |||
3231 | 25 | X11=/usr/X11R6 | ||
3232 | 26 | XINCLUDE=-I$(X11)/include | ||
3233 | 27 | XLFLAGS=-L$(X11)/lib | ||
3234 | 28 | X11_LD_LIB=$(X11)/lib | ||
3235 | 29 | |||
3236 | 30 | # End | ||
3237 | diff --git a/OS/unsupported/Makefile-SCO b/OS/unsupported/Makefile-SCO | |||
3238 | 0 | new file mode 100644 | 31 | new file mode 100644 |
3239 | index 0000000..baa61d8 | |||
3240 | --- /dev/null | |||
3241 | +++ b/OS/unsupported/Makefile-SCO | |||
3242 | @@ -0,0 +1,28 @@ | |||
3243 | 1 | # Exim: OS-specific make file for SCO | ||
3244 | 2 | |||
3245 | 3 | # It was reported that some versions of gcc (e.g. 2.8.1) require this to be | ||
3246 | 4 | # CFLAGS=-melf | ||
3247 | 5 | |||
3248 | 6 | CFLAGS=-b elf | ||
3249 | 7 | |||
3250 | 8 | RANLIB=@true | ||
3251 | 9 | DBMLIB=-lndbm | ||
3252 | 10 | ERRNO_QUOTA=0 | ||
3253 | 11 | LIBS=-lsocket -lm | ||
3254 | 12 | HAVE_ICONV=yes | ||
3255 | 13 | |||
3256 | 14 | X11=/usr/lib/X11 | ||
3257 | 15 | XINCLUDE=-I/usr/include/X11 | ||
3258 | 16 | XLFLAGS=-L/usr/lib -L$(X11)/lib | ||
3259 | 17 | X11_LD_LIB=$(X11)/lib | ||
3260 | 18 | |||
3261 | 19 | # Changes from Frank Bernhardt (30/09/04) | ||
3262 | 20 | |||
3263 | 21 | BASENAME_COMMAND=/bin/basename | ||
3264 | 22 | CHOWN_COMMAND=/bin/chown | ||
3265 | 23 | CHGRP_COMMAND=/bin/chgrp | ||
3266 | 24 | CHMOD_COMMAND=/bin/chmod | ||
3267 | 25 | HOSTNAME_COMMAND=/usr/bin/hostname | ||
3268 | 26 | TOUCH_COMMAND=/bin/touch | ||
3269 | 27 | |||
3270 | 28 | # End | ||
3271 | diff --git a/OS/unsupported/Makefile-SCO_SV b/OS/unsupported/Makefile-SCO_SV | |||
3272 | 0 | new file mode 100644 | 29 | new file mode 100644 |
3273 | index 0000000..249b81a | |||
3274 | --- /dev/null | |||
3275 | +++ b/OS/unsupported/Makefile-SCO_SV | |||
3276 | @@ -0,0 +1,34 @@ | |||
3277 | 1 | # Exim: OS-specific make file for SCO_SV release 5 (tested on 5.0.5 & 5.0.5) | ||
3278 | 2 | # (see the UNIX_SV files for SCO 4.2) | ||
3279 | 3 | # Supplied by: Tony Earnshaw <tonye@ilion.nl> | ||
3280 | 4 | |||
3281 | 5 | # Note that 'gcc -melf -m486' applies to gcc 2.7.2 and higher; | ||
3282 | 6 | # 2.7.1 and SCO's SDK need '-belf'. | ||
3283 | 7 | |||
3284 | 8 | # Removed -lwrap (PH 27/7/00) because not all systems have it | ||
3285 | 9 | |||
3286 | 10 | CFLAGS=-melf -O3 -m486 | ||
3287 | 11 | LFLAGS=-L/lib -L/usr/lib -L/usr/local/lib | ||
3288 | 12 | LIBS=-ltinfo -lsocket -lm | ||
3289 | 13 | |||
3290 | 14 | HAVE_ICONV=yes | ||
3291 | 15 | |||
3292 | 16 | RANLIB=@true | ||
3293 | 17 | DBMLIB=-lndbm | ||
3294 | 18 | ERRNO_QUOTA=0 | ||
3295 | 19 | |||
3296 | 20 | X11=/usr/lib/X11 | ||
3297 | 21 | XINCLUDE=-I/usr/include/X11 | ||
3298 | 22 | XLFLAGS=-L/usr/lib -L$(X11)/lib | ||
3299 | 23 | X11_LD_LIB=$(X11)/lib | ||
3300 | 24 | |||
3301 | 25 | # Changes from Frank Bernhardt (30/9/04) | ||
3302 | 26 | |||
3303 | 27 | BASENAME_COMMAND=/bin/basename | ||
3304 | 28 | CHOWN_COMMAND=/bin/chown | ||
3305 | 29 | CHGRP_COMMAND=/bin/chgrp | ||
3306 | 30 | CHMOD_COMMAND=/bin/chmod | ||
3307 | 31 | HOSTNAME_COMMAND=/usr/bin/hostname | ||
3308 | 32 | TOUCH_COMMAND=/bin/touch | ||
3309 | 33 | |||
3310 | 34 | # End | ||
3311 | diff --git a/OS/unsupported/Makefile-SunOS4 b/OS/unsupported/Makefile-SunOS4 | |||
3312 | 0 | new file mode 100644 | 35 | new file mode 100644 |
3313 | index 0000000..c876998 | |||
3314 | --- /dev/null | |||
3315 | +++ b/OS/unsupported/Makefile-SunOS4 | |||
3316 | @@ -0,0 +1,16 @@ | |||
3317 | 1 | # Exim: OS-specific make file for SunOS4 | ||
3318 | 2 | |||
3319 | 3 | CFLAGS=-O | ||
3320 | 4 | |||
3321 | 5 | CHOWN_COMMAND=/usr/etc/chown | ||
3322 | 6 | HOSTNAME_COMMAND=/usr/bin/hostname | ||
3323 | 7 | EXIT_FAILURE=1 | ||
3324 | 8 | EXIT_SUCCESS=0 | ||
3325 | 9 | LIBRESOLV=-lresolv | ||
3326 | 10 | XINCLUDE=-I/usr/include/X11 | ||
3327 | 11 | |||
3328 | 12 | EXIWHAT_PS_ARG=-ax | ||
3329 | 13 | EXIWHAT_EGREP_ARG='/exim( |$$)' | ||
3330 | 14 | EXIWHAT_KILL_SIGNAL=-30 | ||
3331 | 15 | |||
3332 | 16 | # End | ||
3333 | diff --git a/OS/unsupported/Makefile-SunOS5-hal b/OS/unsupported/Makefile-SunOS5-hal | |||
3334 | 0 | new file mode 100644 | 17 | new file mode 100644 |
3335 | index 0000000..05ea893 | |||
3336 | --- /dev/null | |||
3337 | +++ b/OS/unsupported/Makefile-SunOS5-hal | |||
3338 | @@ -0,0 +1,18 @@ | |||
3339 | 1 | # Exim: OS-specific make file for SunOS5 on a HAL | ||
3340 | 2 | |||
3341 | 3 | # Note: The HAL runs a standard SunOS5 except that it has a 64 bit C | ||
3342 | 4 | # compiler called hcc. To make things work pass the -KV7 flag to force | ||
3343 | 5 | # 32bit compilation - this is necessary to interwork with some libraries. | ||
3344 | 6 | |||
3345 | 7 | CC=hcc | ||
3346 | 8 | CFLAGS=-O -KV7 | ||
3347 | 9 | LIBIDENTCFLAGS="-KV7 -O -DHAVE_ANSIHEADERS" | ||
3348 | 10 | LIBIDENTNAME=sunos5 | ||
3349 | 11 | RANLIB=@true | ||
3350 | 12 | LIBS=-lsocket -lnsl -lkstat -lm | ||
3351 | 13 | LIBRESOLV=-lresolv | ||
3352 | 14 | X11=/usr/X11R6 | ||
3353 | 15 | XINCLUDE=-I$(X11)/include | ||
3354 | 16 | XLFLAGS=-L$(X11)/lib -R$(X11)/lib | ||
3355 | 17 | |||
3356 | 18 | # End | ||
3357 | diff --git a/OS/unsupported/Makefile-ULTRIX b/OS/unsupported/Makefile-ULTRIX | |||
3358 | 0 | new file mode 100644 | 19 | new file mode 100644 |
3359 | index 0000000..9e912b3 | |||
3360 | --- /dev/null | |||
3361 | +++ b/OS/unsupported/Makefile-ULTRIX | |||
3362 | @@ -0,0 +1,18 @@ | |||
3363 | 1 | # Exim: OS-specific make file for Ultrix | ||
3364 | 2 | |||
3365 | 3 | MAKE_SHELL=/usr/bin/sh5 | ||
3366 | 4 | |||
3367 | 5 | CFLAGS=-O | ||
3368 | 6 | |||
3369 | 7 | # This can either be /usr/include/X11 or /usr/include/mit depending on | ||
3370 | 8 | # the particular version of ULTRIX. | ||
3371 | 9 | |||
3372 | 10 | XINCLUDE=-I/usr/include/X11 -I/usr/include/mit | ||
3373 | 11 | |||
3374 | 12 | DBMLIB=-lgdbm | ||
3375 | 13 | |||
3376 | 14 | EXIWHAT_PS_ARG=-ax | ||
3377 | 15 | EXIWHAT_EGREP_ARG='/exim( |$$)' | ||
3378 | 16 | EXIWHAT_KILL_SIGNAL=-USR1 | ||
3379 | 17 | |||
3380 | 18 | # End | ||
3381 | diff --git a/OS/unsupported/Makefile-UNIX_SV b/OS/unsupported/Makefile-UNIX_SV | |||
3382 | 0 | new file mode 100644 | 19 | new file mode 100644 |
3383 | index 0000000..bfcfae1 | |||
3384 | --- /dev/null | |||
3385 | +++ b/OS/unsupported/Makefile-UNIX_SV | |||
3386 | @@ -0,0 +1,24 @@ | |||
3387 | 1 | # Exim: OS-specific make file for SCO SVR4.2MP (and maybe Unixware) | ||
3388 | 2 | # | ||
3389 | 3 | # *** Note that for SCO 5 the configuration file is called SCO_SV, | ||
3390 | 4 | # *** and that Unixware7 has its own configuration. This is an old | ||
3391 | 5 | # *** file that is retained for compatibility. | ||
3392 | 6 | # | ||
3393 | 7 | # Note that SCO does not include dbm/ndbm with their standard compiler | ||
3394 | 8 | # (it is available with /usr/ucb/cc, but that has bugs of its own). You | ||
3395 | 9 | # should install gcc and gdbm, then execute 'make install-compat' in the | ||
3396 | 10 | # gdbm source directory. | ||
3397 | 11 | |||
3398 | 12 | CC=gcc -I/usr/local/include | ||
3399 | 13 | CFLAGS=-O | ||
3400 | 14 | |||
3401 | 15 | RANLIB=@true | ||
3402 | 16 | DBMLIB=-lgdbm -L/usr/local/lib | ||
3403 | 17 | ERRNO_QUOTA=0 | ||
3404 | 18 | LIBS=-lsocket -lelf -lgen -lnsl -lresolv -lm | ||
3405 | 19 | |||
3406 | 20 | X11=/usr/lib/X11 | ||
3407 | 21 | XINCLUDE=-I/usr/include/X11 | ||
3408 | 22 | XLFLAGS=-L/usr/lib -L$(X11)/lib | ||
3409 | 23 | |||
3410 | 24 | # End | ||
3411 | diff --git a/OS/unsupported/Makefile-USG b/OS/unsupported/Makefile-USG | |||
3412 | 0 | new file mode 100644 | 25 | new file mode 100644 |
3413 | index 0000000..753a2d7 | |||
3414 | --- /dev/null | |||
3415 | +++ b/OS/unsupported/Makefile-USG | |||
3416 | @@ -0,0 +1,33 @@ | |||
3417 | 1 | # Exim: OS-specific make file for Unixware 2.x | ||
3418 | 2 | # | ||
3419 | 3 | # Note that Unixware does not include db/dbm/ndbm with their standard compiler | ||
3420 | 4 | # (it is available with /usr/ucb/cc, but that has bugs of its own). You | ||
3421 | 5 | # should install gcc and Berkeley DB (or another dbm library if you really | ||
3422 | 6 | # insist). If you use a different dbm library you will need to override | ||
3423 | 7 | # DBMLIB below. | ||
3424 | 8 | # | ||
3425 | 9 | # DB 1.85 and 2.x can be found at http://www.sleepycat.com/. | ||
3426 | 10 | # They have different characteristics. See the discussion of dbm libraries | ||
3427 | 11 | # in doc/dbm.discuss.txt in the Exim distribution. | ||
3428 | 12 | # | ||
3429 | 13 | # DB needs to be compiled with gcc and you need a 'cc' in your path | ||
3430 | 14 | # before the Unixware CC to compile it. | ||
3431 | 15 | # | ||
3432 | 16 | # Don't bother even starting to install exim on Unixware unless | ||
3433 | 17 | # you have installed gcc and use it for everything. | ||
3434 | 18 | |||
3435 | 19 | CC=gcc -I/usr/local/include | ||
3436 | 20 | CFLAGS=-O | ||
3437 | 21 | |||
3438 | 22 | RANLIB=@true | ||
3439 | 23 | DBMLIB=-ldb -L/usr/local/lib | ||
3440 | 24 | USE_DB=YES | ||
3441 | 25 | ERRNO_QUOTA=0 | ||
3442 | 26 | LIBS=-lsocket -lelf -lgen -lnsl -lresolv -lm | ||
3443 | 27 | |||
3444 | 28 | X11=/usr/lib/X11 | ||
3445 | 29 | XINCLUDE=-I/usr/include/X11 | ||
3446 | 30 | XLFLAGS=-L/usr/lib -L$(X11)/lib | ||
3447 | 31 | X11_LD_LIB=$(X11)/lib | ||
3448 | 32 | |||
3449 | 33 | # End | ||
3450 | diff --git a/OS/unsupported/Makefile-Unixware7 b/OS/unsupported/Makefile-Unixware7 | |||
3451 | 0 | new file mode 100644 | 34 | new file mode 100644 |
3452 | index 0000000..88a8838 | |||
3453 | --- /dev/null | |||
3454 | +++ b/OS/unsupported/Makefile-Unixware7 | |||
3455 | @@ -0,0 +1,32 @@ | |||
3456 | 1 | # Exim: OS-specific make file for Unixware7 | ||
3457 | 2 | # Based on information from James FitzGibbon <james@ehlo.com> | ||
3458 | 3 | |||
3459 | 4 | # If you want to use libbind, you need to | ||
3460 | 5 | # add -I/usr/local/bind/include to CFLAGS | ||
3461 | 6 | # add -L/usr/local/bind/lib to LFLAGS | ||
3462 | 7 | # remove -lresolv from LIBS | ||
3463 | 8 | # add LOOKUP_LIBS=-lbind | ||
3464 | 9 | # The new settings should go in your Local/Makefile rather than here; then | ||
3465 | 10 | # they will be usable for subsequent Exim releases. | ||
3466 | 11 | |||
3467 | 12 | CC=/usr/bin/cc | ||
3468 | 13 | CFLAGS=-O -I/usr/local/include | ||
3469 | 14 | LFLAGS=-L/usr/local/lib | ||
3470 | 15 | |||
3471 | 16 | HAVE_ICONV=yes | ||
3472 | 17 | |||
3473 | 18 | LIBS=-lsocket -lnsl -lelf -lgen -lresolv -lm | ||
3474 | 19 | |||
3475 | 20 | # Removed on the advice of Larry Rosenman | ||
3476 | 21 | # EXTRALIBS=-lwrap | ||
3477 | 22 | |||
3478 | 23 | EXTRALIBS_EXIMON=-lICE -lSM | ||
3479 | 24 | |||
3480 | 25 | RANLIB=@true | ||
3481 | 26 | ERRNO_QUOTA=0 | ||
3482 | 27 | |||
3483 | 28 | X11=/usr/lib/X11 | ||
3484 | 29 | XINCLUDE=-I/usr/include/X11 | ||
3485 | 30 | XLFLAGS=-L/usr/lib -L$(X11)/lib | ||
3486 | 31 | |||
3487 | 32 | # End | ||
3488 | diff --git a/OS/unsupported/Makefile-mips b/OS/unsupported/Makefile-mips | |||
3489 | 0 | new file mode 100644 | 33 | new file mode 100644 |
3490 | index 0000000..ff33139 | |||
3491 | --- /dev/null | |||
3492 | +++ b/OS/unsupported/Makefile-mips | |||
3493 | @@ -0,0 +1,16 @@ | |||
3494 | 1 | # Exim: OS-specific make file for RiscOS4bsd | ||
3495 | 2 | |||
3496 | 3 | HOSTNAME_COMMAND=/usr/ucb/hostname | ||
3497 | 4 | EXIT_FAILURE=1 | ||
3498 | 5 | EXIT_SUCCESS=0 | ||
3499 | 6 | LIBRESOLV=-lresolv | ||
3500 | 7 | LIBS=-liberty -lm | ||
3501 | 8 | XINCLUDE=-I/usr/X11R6/include | ||
3502 | 9 | |||
3503 | 10 | CFLAGS=-O | ||
3504 | 11 | |||
3505 | 12 | EXIWHAT_PS_ARG=-ax | ||
3506 | 13 | EXIWHAT_EGREP_ARG='/exim( |$$)' | ||
3507 | 14 | EXIWHAT_KILL_SIGNAL=-30 | ||
3508 | 15 | |||
3509 | 16 | # End | ||
3510 | diff --git a/OS/unsupported/README b/OS/unsupported/README | |||
3511 | 0 | new file mode 100644 | 17 | new file mode 100644 |
3512 | index 0000000..73790ae | |||
3513 | --- /dev/null | |||
3514 | +++ b/OS/unsupported/README | |||
3515 | @@ -0,0 +1,14 @@ | |||
3516 | 1 | Files in this directory are historical. They may have worked once but the | ||
3517 | 2 | project has no assurance that they still do. | ||
3518 | 3 | |||
3519 | 4 | If you need to use one for a build for your platform, copy it up one directory | ||
3520 | 5 | level first. We'll reinstate it given a current version and evidence of testing. | ||
3521 | 6 | For the latter please look into the project regression testsuite, and please | ||
3522 | 7 | consider operating a buildfarm animal in the long term (it runs the testsuite). | ||
3523 | 8 | |||
3524 | 9 | The buildfarm status page is: | ||
3525 | 10 | https://buildfarm.exim.org/cgi-bin/show_status.pl | ||
3526 | 11 | There's a "register" link there with a link to how-to instructions. Please do | ||
3527 | 12 | monitor the status of your animal on an ongoing basis. The exim-users or | ||
3528 | 13 | exim-dev mailinglist are good places to ask for help and to discuss any regressions | ||
3529 | 14 | seen in test runs. There is also the #exim IRC channel on Freenode. | ||
3530 | diff --git a/OS/unsupported/os.c-BSDI b/OS/unsupported/os.c-BSDI | |||
3531 | 0 | new file mode 100644 | 15 | new file mode 100644 |
3532 | index 0000000..03a7a1c | |||
3533 | --- /dev/null | |||
3534 | +++ b/OS/unsupported/os.c-BSDI | |||
3535 | @@ -0,0 +1,19 @@ | |||
3536 | 1 | /************************************************* | ||
3537 | 2 | * Exim - an Internet mail transport agent * | ||
3538 | 3 | *************************************************/ | ||
3539 | 4 | |||
3540 | 5 | /* Copyright (c) 2016 Heiko Schlittermann <hs@schlittermann.de> */ | ||
3541 | 6 | /* See the file NOTICE for conditions of use and distribution. */ | ||
3542 | 7 | |||
3543 | 8 | /* BSDI-specific code. This is concatenated onto the generic | ||
3544 | 9 | src/os.c file. */ | ||
3545 | 10 | |||
3546 | 11 | #ifndef OS_UNSETENV | ||
3547 | 12 | #define OS_UNSETENV | ||
3548 | 13 | |||
3549 | 14 | int | ||
3550 | 15 | os_unsetenv(const uschar * name) | ||
3551 | 16 | { | ||
3552 | 17 | unsetenv(CS name); | ||
3553 | 18 | return 0; | ||
3554 | 19 | } | ||
3555 | diff --git a/OS/unsupported/os.c-GNU b/OS/unsupported/os.c-GNU | |||
3556 | 0 | new file mode 100644 | 20 | new file mode 100644 |
3557 | index 0000000..e5d6ff6 | |||
3558 | --- /dev/null | |||
3559 | +++ b/OS/unsupported/os.c-GNU | |||
3560 | @@ -0,0 +1,55 @@ | |||
3561 | 1 | /************************************************* | ||
3562 | 2 | * Exim - an Internet mail transport agent * | ||
3563 | 3 | *************************************************/ | ||
3564 | 4 | |||
3565 | 5 | /* See the file NOTICE for conditions of use and distribution. */ | ||
3566 | 6 | |||
3567 | 7 | /* GNU-specific code. This is concatenated onto the generic src/os.c file. | ||
3568 | 8 | GNU/Hurd has approximately the same way to determine the load average as NeXT, | ||
3569 | 9 | so a variant of this could also be in the generic os.c file. See the GNU EMacs | ||
3570 | 10 | getloadavg.c file, from which this snippet was derived. getloadavg.c from Emacs | ||
3571 | 11 | is copyrighted by the FSF under the terms of the GPLv2 or any later version. | ||
3572 | 12 | Changes are hereby placed under the same license, as requested by the GPL. */ | ||
3573 | 13 | |||
3574 | 14 | #ifndef OS_LOAD_AVERAGE | ||
3575 | 15 | #define OS_LOAD_AVERAGE | ||
3576 | 16 | |||
3577 | 17 | #include <mach.h> | ||
3578 | 18 | |||
3579 | 19 | static processor_set_t default_set; | ||
3580 | 20 | static int getloadavg_initialized; | ||
3581 | 21 | |||
3582 | 22 | int | ||
3583 | 23 | os_getloadavg (void) | ||
3584 | 24 | { | ||
3585 | 25 | host_t host; | ||
3586 | 26 | struct processor_set_basic_info info; | ||
3587 | 27 | unsigned info_count; | ||
3588 | 28 | |||
3589 | 29 | if (!getloadavg_initialized) | ||
3590 | 30 | { | ||
3591 | 31 | if (processor_set_default (mach_host_self(), &default_set) == KERN_SUCCESS) | ||
3592 | 32 | getloadavg_initialized = 1; | ||
3593 | 33 | } | ||
3594 | 34 | |||
3595 | 35 | if (getloadavg_initialized) | ||
3596 | 36 | { | ||
3597 | 37 | info_count = PROCESSOR_SET_BASIC_INFO_COUNT; | ||
3598 | 38 | if (processor_set_info(default_set, PROCESSOR_SET_BASIC_INFO, &host, | ||
3599 | 39 | (processor_set_info_t)&info, &info_count) != KERN_SUCCESS) | ||
3600 | 40 | getloadavg_initialized = 0; | ||
3601 | 41 | else | ||
3602 | 42 | { | ||
3603 | 43 | #if LOAD_SCALE == 1000 | ||
3604 | 44 | return info.load_average; | ||
3605 | 45 | #else | ||
3606 | 46 | return (int) (((double) info.load_average * 1000) / LOAD_SCALE)); | ||
3607 | 47 | #endif | ||
3608 | 48 | } | ||
3609 | 49 | } | ||
3610 | 50 | |||
3611 | 51 | return -1; | ||
3612 | 52 | } | ||
3613 | 53 | #endif /* OS_LOAD_AVERAGE */ | ||
3614 | 54 | |||
3615 | 55 | /* End of os.c-GNU */ | ||
3616 | diff --git a/OS/unsupported/os.c-HI-OSF b/OS/unsupported/os.c-HI-OSF | |||
3617 | 0 | new file mode 100644 | 56 | new file mode 100644 |
3618 | index 0000000..5e3d336 | |||
3619 | --- /dev/null | |||
3620 | +++ b/OS/unsupported/os.c-HI-OSF | |||
3621 | @@ -0,0 +1,35 @@ | |||
3622 | 1 | /************************************************* | ||
3623 | 2 | * Exim - an Internet mail transport agent * | ||
3624 | 3 | *************************************************/ | ||
3625 | 4 | |||
3626 | 5 | /* Copyright (c) University of Cambridge 2001 */ | ||
3627 | 6 | /* See the file NOTICE for conditions of use and distribution. */ | ||
3628 | 7 | |||
3629 | 8 | /* HI-OSF-specific code. This is concatenated onto the generic | ||
3630 | 9 | src/os.c file. OSF has an apparently unique way of getting the | ||
3631 | 10 | load average, so we provide a unique function here, and define | ||
3632 | 11 | OS_LOAD_AVERAGE to stop src/os.c trying to provide the function. */ | ||
3633 | 12 | |||
3634 | 13 | #ifndef OS_LOAD_AVERAGE | ||
3635 | 14 | #define OS_LOAD_AVERAGE | ||
3636 | 15 | |||
3637 | 16 | #include <sys/table.h> | ||
3638 | 17 | |||
3639 | 18 | int | ||
3640 | 19 | os_getloadavg(void) | ||
3641 | 20 | { | ||
3642 | 21 | double avg; | ||
3643 | 22 | struct tbl_loadavg load_avg; | ||
3644 | 23 | |||
3645 | 24 | table (TBL_LOADAVG, 0, &load_avg, 1, sizeof (load_avg)); | ||
3646 | 25 | |||
3647 | 26 | avg = (load_avg.tl_lscale == 0)? | ||
3648 | 27 | load_avg.tl_avenrun.d[0] : | ||
3649 | 28 | (load_avg.tl_avenrun.l[0] / (double)load_avg.tl_lscale); | ||
3650 | 29 | |||
3651 | 30 | return (int)(avg * 1000.0); | ||
3652 | 31 | } | ||
3653 | 32 | |||
3654 | 33 | #endif /* OS_LOAD_AVERAGE */ | ||
3655 | 34 | |||
3656 | 35 | /* End of os.c-HI-OSF */ | ||
3657 | diff --git a/OS/unsupported/os.c-HP-UX b/OS/unsupported/os.c-HP-UX | |||
3658 | 0 | new file mode 100644 | 36 | new file mode 100644 |
3659 | index 0000000..fdd8708 | |||
3660 | --- /dev/null | |||
3661 | +++ b/OS/unsupported/os.c-HP-UX | |||
3662 | @@ -0,0 +1,16 @@ | |||
3663 | 1 | /************************************************* | ||
3664 | 2 | * Exim - an Internet mail transport agent * | ||
3665 | 3 | *************************************************/ | ||
3666 | 4 | |||
3667 | 5 | /* Copyright (c) University of Cambridge 2016 */ | ||
3668 | 6 | /* Copyright (c) Jeremy Harris 2016 */ | ||
3669 | 7 | /* See the file NOTICE for conditions of use and distribution. */ | ||
3670 | 8 | |||
3671 | 9 | /* HP-UX-specific code. This is concatenated onto the generic | ||
3672 | 10 | src/os.c file. */ | ||
3673 | 11 | |||
3674 | 12 | #ifndef COMPILE_UTILITY | ||
3675 | 13 | # include "setenv.c" | ||
3676 | 14 | #endif | ||
3677 | 15 | |||
3678 | 16 | /* End of os.c-SunHP-UX */ | ||
3679 | diff --git a/OS/unsupported/os.c-IRIX b/OS/unsupported/os.c-IRIX | |||
3680 | 0 | new file mode 100644 | 17 | new file mode 100644 |
3681 | index 0000000..1f6b0e1 | |||
3682 | --- /dev/null | |||
3683 | +++ b/OS/unsupported/os.c-IRIX | |||
3684 | @@ -0,0 +1,118 @@ | |||
3685 | 1 | /************************************************* | ||
3686 | 2 | * Exim - an Internet mail transport agent * | ||
3687 | 3 | *************************************************/ | ||
3688 | 4 | |||
3689 | 5 | /* Copyright (c) University of Cambridge 2001 */ | ||
3690 | 6 | /* See the file NOTICE for conditions of use and distribution. */ | ||
3691 | 7 | |||
3692 | 8 | /* Irix-specific code. This is concatenated onto the generic src/os.c file. | ||
3693 | 9 | Irix has a unique way of finding all the network interfaces, so we provide a | ||
3694 | 10 | unique function here, and define FIND_RUNNING_INTERFACES to stop src/os.c | ||
3695 | 11 | trying to provide the function. The macro may be set initially anyway, when | ||
3696 | 12 | compiling os. for utilities that don't want this function. */ | ||
3697 | 13 | |||
3698 | 14 | #ifndef FIND_RUNNING_INTERFACES | ||
3699 | 15 | #define FIND_RUNNING_INTERFACES | ||
3700 | 16 | |||
3701 | 17 | /* This is the special form of the function using sysctl() which is the only | ||
3702 | 18 | form that returns all the aliases on IRIX systems. This code has its origins | ||
3703 | 19 | in a sample program that came from within SGI. */ | ||
3704 | 20 | |||
3705 | 21 | #include <sys/sysctl.h> | ||
3706 | 22 | #include <net/if_dl.h> | ||
3707 | 23 | #include <net/if_types.h> | ||
3708 | 24 | #include <net/soioctl.h> | ||
3709 | 25 | #include <net/route.h> | ||
3710 | 26 | |||
3711 | 27 | #define ROUNDUP(a) ((a) > 0 ? (1 + (((a) - 1) | (sizeof(__uint64_t) -1))) \ | ||
3712 | 28 | : sizeof(__uint64_t)) | ||
3713 | 29 | #ifdef _HAVE_SA_LEN | ||
3714 | 30 | #define ADVANCE(x, n) (x += ROUNDUP((n)->sa_len)) | ||
3715 | 31 | #else | ||
3716 | 32 | #define ADVANCE(x, n) (x += ROUNDUP(_FAKE_SA_LEN_DST(n))) | ||
3717 | 33 | #endif | ||
3718 | 34 | |||
3719 | 35 | |||
3720 | 36 | ip_address_item * | ||
3721 | 37 | os_find_running_interfaces(void) | ||
3722 | 38 | { | ||
3723 | 39 | ip_address_item *yield = NULL; | ||
3724 | 40 | ip_address_item *last = NULL; | ||
3725 | 41 | ip_address_item *next; | ||
3726 | 42 | |||
3727 | 43 | size_t needed; | ||
3728 | 44 | int mib[6]; | ||
3729 | 45 | char *buf, *nextaddr, *lim; | ||
3730 | 46 | register struct if_msghdr *ifm; | ||
3731 | 47 | |||
3732 | 48 | mib[0] = CTL_NET; | ||
3733 | 49 | mib[1] = PF_ROUTE; | ||
3734 | 50 | mib[2] = 0; | ||
3735 | 51 | mib[3] = 0; | ||
3736 | 52 | mib[4] = NET_RT_IFLIST; | ||
3737 | 53 | mib[5] = 0; | ||
3738 | 54 | |||
3739 | 55 | /* Get an estimate of the amount of store needed, then get the store and | ||
3740 | 56 | get the data into it. Any error causes a panic death. */ | ||
3741 | 57 | |||
3742 | 58 | if (sysctl(mib, 6, NULL, &needed, NULL, 0) < 0) | ||
3743 | 59 | log_write(0, LOG_PANIC_DIE, "iflist-sysctl-estimate failed: %s", | ||
3744 | 60 | strerror(errno)); | ||
3745 | 61 | |||
3746 | 62 | buf = store_get(needed); | ||
3747 | 63 | |||
3748 | 64 | if (sysctl(mib, 6, buf, &needed, NULL, 0) < 0) | ||
3749 | 65 | log_write(0, LOG_PANIC_DIE, "sysctl of ifnet list failed: %s", | ||
3750 | 66 | strerror(errno)); | ||
3751 | 67 | |||
3752 | 68 | /* Now fish out the data for each interface */ | ||
3753 | 69 | |||
3754 | 70 | lim = buf + needed; | ||
3755 | 71 | for (nextaddr = buf; nextaddr < lim; nextaddr += ifm->ifm_msglen) | ||
3756 | 72 | { | ||
3757 | 73 | ifm = (struct if_msghdr *)nextaddr; | ||
3758 | 74 | |||
3759 | 75 | if (ifm->ifm_type != RTM_IFINFO) | ||
3760 | 76 | { | ||
3761 | 77 | struct ifa_msghdr *ifam = (struct ifa_msghdr *)ifm; | ||
3762 | 78 | struct sockaddr_in *mask = NULL, *addr = NULL; | ||
3763 | 79 | |||
3764 | 80 | if ((ifam->ifam_addrs & RTA_NETMASK) != 0) | ||
3765 | 81 | mask = (struct sockaddr_in *)(ifam + 1); | ||
3766 | 82 | |||
3767 | 83 | if ((ifam->ifam_addrs & RTA_IFA) != 0) | ||
3768 | 84 | { | ||
3769 | 85 | char *cp = CS mask; | ||
3770 | 86 | struct sockaddr *sa = (struct sockaddr *)mask; | ||
3771 | 87 | ADVANCE(cp, sa); | ||
3772 | 88 | addr = (struct sockaddr_in *)cp; | ||
3773 | 89 | } | ||
3774 | 90 | |||
3775 | 91 | /* Create a data block for the address, fill in the data, and put it on | ||
3776 | 92 | the chain. This data has to survive for ever, so use malloc. */ | ||
3777 | 93 | |||
3778 | 94 | if (addr != NULL) | ||
3779 | 95 | { | ||
3780 | 96 | next = store_malloc(sizeof(ip_address_item)); | ||
3781 | 97 | next->next = NULL; | ||
3782 | 98 | next->port = 0; | ||
3783 | 99 | (void)host_ntoa(-1, addr, next->address, NULL); | ||
3784 | 100 | |||
3785 | 101 | if (yield == NULL) yield = last = next; else | ||
3786 | 102 | { | ||
3787 | 103 | last->next = next; | ||
3788 | 104 | last = next; | ||
3789 | 105 | } | ||
3790 | 106 | |||
3791 | 107 | DEBUG(D_interface) debug_printf("Actual local interface address is %s\n", | ||
3792 | 108 | last->address); | ||
3793 | 109 | } | ||
3794 | 110 | } | ||
3795 | 111 | } | ||
3796 | 112 | |||
3797 | 113 | return yield; | ||
3798 | 114 | } | ||
3799 | 115 | |||
3800 | 116 | #endif /* FIND_RUNNING_INTERFACES */ | ||
3801 | 117 | |||
3802 | 118 | /* End of os.c-IRIX */ | ||
3803 | diff --git a/OS/unsupported/os.c-IRIX6 b/OS/unsupported/os.c-IRIX6 | |||
3804 | 0 | new file mode 100644 | 119 | new file mode 100644 |
3805 | index 0000000..1f6b0e1 | |||
3806 | --- /dev/null | |||
3807 | +++ b/OS/unsupported/os.c-IRIX6 | |||
3808 | @@ -0,0 +1,118 @@ | |||
3809 | 1 | /************************************************* | ||
3810 | 2 | * Exim - an Internet mail transport agent * | ||
3811 | 3 | *************************************************/ | ||
3812 | 4 | |||
3813 | 5 | /* Copyright (c) University of Cambridge 2001 */ | ||
3814 | 6 | /* See the file NOTICE for conditions of use and distribution. */ | ||
3815 | 7 | |||
3816 | 8 | /* Irix-specific code. This is concatenated onto the generic src/os.c file. | ||
3817 | 9 | Irix has a unique way of finding all the network interfaces, so we provide a | ||
3818 | 10 | unique function here, and define FIND_RUNNING_INTERFACES to stop src/os.c | ||
3819 | 11 | trying to provide the function. The macro may be set initially anyway, when | ||
3820 | 12 | compiling os. for utilities that don't want this function. */ | ||
3821 | 13 | |||
3822 | 14 | #ifndef FIND_RUNNING_INTERFACES | ||
3823 | 15 | #define FIND_RUNNING_INTERFACES | ||
3824 | 16 | |||
3825 | 17 | /* This is the special form of the function using sysctl() which is the only | ||
3826 | 18 | form that returns all the aliases on IRIX systems. This code has its origins | ||
3827 | 19 | in a sample program that came from within SGI. */ | ||
3828 | 20 | |||
3829 | 21 | #include <sys/sysctl.h> | ||
3830 | 22 | #include <net/if_dl.h> | ||
3831 | 23 | #include <net/if_types.h> | ||
3832 | 24 | #include <net/soioctl.h> | ||
3833 | 25 | #include <net/route.h> | ||
3834 | 26 | |||
3835 | 27 | #define ROUNDUP(a) ((a) > 0 ? (1 + (((a) - 1) | (sizeof(__uint64_t) -1))) \ | ||
3836 | 28 | : sizeof(__uint64_t)) | ||
3837 | 29 | #ifdef _HAVE_SA_LEN | ||
3838 | 30 | #define ADVANCE(x, n) (x += ROUNDUP((n)->sa_len)) | ||
3839 | 31 | #else | ||
3840 | 32 | #define ADVANCE(x, n) (x += ROUNDUP(_FAKE_SA_LEN_DST(n))) | ||
3841 | 33 | #endif | ||
3842 | 34 | |||
3843 | 35 | |||
3844 | 36 | ip_address_item * | ||
3845 | 37 | os_find_running_interfaces(void) | ||
3846 | 38 | { | ||
3847 | 39 | ip_address_item *yield = NULL; | ||
3848 | 40 | ip_address_item *last = NULL; | ||
3849 | 41 | ip_address_item *next; | ||
3850 | 42 | |||
3851 | 43 | size_t needed; | ||
3852 | 44 | int mib[6]; | ||
3853 | 45 | char *buf, *nextaddr, *lim; | ||
3854 | 46 | register struct if_msghdr *ifm; | ||
3855 | 47 | |||
3856 | 48 | mib[0] = CTL_NET; | ||
3857 | 49 | mib[1] = PF_ROUTE; | ||
3858 | 50 | mib[2] = 0; | ||
3859 | 51 | mib[3] = 0; | ||
3860 | 52 | mib[4] = NET_RT_IFLIST; | ||
3861 | 53 | mib[5] = 0; | ||
3862 | 54 | |||
3863 | 55 | /* Get an estimate of the amount of store needed, then get the store and | ||
3864 | 56 | get the data into it. Any error causes a panic death. */ | ||
3865 | 57 | |||
3866 | 58 | if (sysctl(mib, 6, NULL, &needed, NULL, 0) < 0) | ||
3867 | 59 | log_write(0, LOG_PANIC_DIE, "iflist-sysctl-estimate failed: %s", | ||
3868 | 60 | strerror(errno)); | ||
3869 | 61 | |||
3870 | 62 | buf = store_get(needed); | ||
3871 | 63 | |||
3872 | 64 | if (sysctl(mib, 6, buf, &needed, NULL, 0) < 0) | ||
3873 | 65 | log_write(0, LOG_PANIC_DIE, "sysctl of ifnet list failed: %s", | ||
3874 | 66 | strerror(errno)); | ||
3875 | 67 | |||
3876 | 68 | /* Now fish out the data for each interface */ | ||
3877 | 69 | |||
3878 | 70 | lim = buf + needed; | ||
3879 | 71 | for (nextaddr = buf; nextaddr < lim; nextaddr += ifm->ifm_msglen) | ||
3880 | 72 | { | ||
3881 | 73 | ifm = (struct if_msghdr *)nextaddr; | ||
3882 | 74 | |||
3883 | 75 | if (ifm->ifm_type != RTM_IFINFO) | ||
3884 | 76 | { | ||
3885 | 77 | struct ifa_msghdr *ifam = (struct ifa_msghdr *)ifm; | ||
3886 | 78 | struct sockaddr_in *mask = NULL, *addr = NULL; | ||
3887 | 79 | |||
3888 | 80 | if ((ifam->ifam_addrs & RTA_NETMASK) != 0) | ||
3889 | 81 | mask = (struct sockaddr_in *)(ifam + 1); | ||
3890 | 82 | |||
3891 | 83 | if ((ifam->ifam_addrs & RTA_IFA) != 0) | ||
3892 | 84 | { | ||
3893 | 85 | char *cp = CS mask; | ||
3894 | 86 | struct sockaddr *sa = (struct sockaddr *)mask; | ||
3895 | 87 | ADVANCE(cp, sa); | ||
3896 | 88 | addr = (struct sockaddr_in *)cp; | ||
3897 | 89 | } | ||
3898 | 90 | |||
3899 | 91 | /* Create a data block for the address, fill in the data, and put it on | ||
3900 | 92 | the chain. This data has to survive for ever, so use malloc. */ | ||
3901 | 93 | |||
3902 | 94 | if (addr != NULL) | ||
3903 | 95 | { | ||
3904 | 96 | next = store_malloc(sizeof(ip_address_item)); | ||
3905 | 97 | next->next = NULL; | ||
3906 | 98 | next->port = 0; | ||
3907 | 99 | (void)host_ntoa(-1, addr, next->address, NULL); | ||
3908 | 100 | |||
3909 | 101 | if (yield == NULL) yield = last = next; else | ||
3910 | 102 | { | ||
3911 | 103 | last->next = next; | ||
3912 | 104 | last = next; | ||
3913 | 105 | } | ||
3914 | 106 | |||
3915 | 107 | DEBUG(D_interface) debug_printf("Actual local interface address is %s\n", | ||
3916 | 108 | last->address); | ||
3917 | 109 | } | ||
3918 | 110 | } | ||
3919 | 111 | } | ||
3920 | 112 | |||
3921 | 113 | return yield; | ||
3922 | 114 | } | ||
3923 | 115 | |||
3924 | 116 | #endif /* FIND_RUNNING_INTERFACES */ | ||
3925 | 117 | |||
3926 | 118 | /* End of os.c-IRIX */ | ||
3927 | diff --git a/OS/unsupported/os.c-IRIX632 b/OS/unsupported/os.c-IRIX632 | |||
3928 | 0 | new file mode 100644 | 119 | new file mode 100644 |
3929 | index 0000000..1f6b0e1 | |||
3930 | --- /dev/null | |||
3931 | +++ b/OS/unsupported/os.c-IRIX632 | |||
3932 | @@ -0,0 +1,118 @@ | |||
3933 | 1 | /************************************************* | ||
3934 | 2 | * Exim - an Internet mail transport agent * | ||
3935 | 3 | *************************************************/ | ||
3936 | 4 | |||
3937 | 5 | /* Copyright (c) University of Cambridge 2001 */ | ||
3938 | 6 | /* See the file NOTICE for conditions of use and distribution. */ | ||
3939 | 7 | |||
3940 | 8 | /* Irix-specific code. This is concatenated onto the generic src/os.c file. | ||
3941 | 9 | Irix has a unique way of finding all the network interfaces, so we provide a | ||
3942 | 10 | unique function here, and define FIND_RUNNING_INTERFACES to stop src/os.c | ||
3943 | 11 | trying to provide the function. The macro may be set initially anyway, when | ||
3944 | 12 | compiling os. for utilities that don't want this function. */ | ||
3945 | 13 | |||
3946 | 14 | #ifndef FIND_RUNNING_INTERFACES | ||
3947 | 15 | #define FIND_RUNNING_INTERFACES | ||
3948 | 16 | |||
3949 | 17 | /* This is the special form of the function using sysctl() which is the only | ||
3950 | 18 | form that returns all the aliases on IRIX systems. This code has its origins | ||
3951 | 19 | in a sample program that came from within SGI. */ | ||
3952 | 20 | |||
3953 | 21 | #include <sys/sysctl.h> | ||
3954 | 22 | #include <net/if_dl.h> | ||
3955 | 23 | #include <net/if_types.h> | ||
3956 | 24 | #include <net/soioctl.h> | ||
3957 | 25 | #include <net/route.h> | ||
3958 | 26 | |||
3959 | 27 | #define ROUNDUP(a) ((a) > 0 ? (1 + (((a) - 1) | (sizeof(__uint64_t) -1))) \ | ||
3960 | 28 | : sizeof(__uint64_t)) | ||
3961 | 29 | #ifdef _HAVE_SA_LEN | ||
3962 | 30 | #define ADVANCE(x, n) (x += ROUNDUP((n)->sa_len)) | ||
3963 | 31 | #else | ||
3964 | 32 | #define ADVANCE(x, n) (x += ROUNDUP(_FAKE_SA_LEN_DST(n))) | ||
3965 | 33 | #endif | ||
3966 | 34 | |||
3967 | 35 | |||
3968 | 36 | ip_address_item * | ||
3969 | 37 | os_find_running_interfaces(void) | ||
3970 | 38 | { | ||
3971 | 39 | ip_address_item *yield = NULL; | ||
3972 | 40 | ip_address_item *last = NULL; | ||
3973 | 41 | ip_address_item *next; | ||
3974 | 42 | |||
3975 | 43 | size_t needed; | ||
3976 | 44 | int mib[6]; | ||
3977 | 45 | char *buf, *nextaddr, *lim; | ||
3978 | 46 | register struct if_msghdr *ifm; | ||
3979 | 47 | |||
3980 | 48 | mib[0] = CTL_NET; | ||
3981 | 49 | mib[1] = PF_ROUTE; | ||
3982 | 50 | mib[2] = 0; | ||
3983 | 51 | mib[3] = 0; | ||
3984 | 52 | mib[4] = NET_RT_IFLIST; | ||
3985 | 53 | mib[5] = 0; | ||
3986 | 54 | |||
3987 | 55 | /* Get an estimate of the amount of store needed, then get the store and | ||
3988 | 56 | get the data into it. Any error causes a panic death. */ | ||
3989 | 57 | |||
3990 | 58 | if (sysctl(mib, 6, NULL, &needed, NULL, 0) < 0) | ||
3991 | 59 | log_write(0, LOG_PANIC_DIE, "iflist-sysctl-estimate failed: %s", | ||
3992 | 60 | strerror(errno)); | ||
3993 | 61 | |||
3994 | 62 | buf = store_get(needed); | ||
3995 | 63 | |||
3996 | 64 | if (sysctl(mib, 6, buf, &needed, NULL, 0) < 0) | ||
3997 | 65 | log_write(0, LOG_PANIC_DIE, "sysctl of ifnet list failed: %s", | ||
3998 | 66 | strerror(errno)); | ||
3999 | 67 | |||
4000 | 68 | /* Now fish out the data for each interface */ | ||
4001 | 69 | |||
4002 | 70 | lim = buf + needed; | ||
4003 | 71 | for (nextaddr = buf; nextaddr < lim; nextaddr += ifm->ifm_msglen) | ||
4004 | 72 | { | ||
4005 | 73 | ifm = (struct if_msghdr *)nextaddr; | ||
4006 | 74 | |||
4007 | 75 | if (ifm->ifm_type != RTM_IFINFO) | ||
4008 | 76 | { | ||
4009 | 77 | struct ifa_msghdr *ifam = (struct ifa_msghdr *)ifm; | ||
4010 | 78 | struct sockaddr_in *mask = NULL, *addr = NULL; | ||
4011 | 79 | |||
4012 | 80 | if ((ifam->ifam_addrs & RTA_NETMASK) != 0) | ||
4013 | 81 | mask = (struct sockaddr_in *)(ifam + 1); | ||
4014 | 82 | |||
4015 | 83 | if ((ifam->ifam_addrs & RTA_IFA) != 0) | ||
4016 | 84 | { | ||
4017 | 85 | char *cp = CS mask; | ||
4018 | 86 | struct sockaddr *sa = (struct sockaddr *)mask; | ||
4019 | 87 | ADVANCE(cp, sa); | ||
4020 | 88 | addr = (struct sockaddr_in *)cp; | ||
4021 | 89 | } | ||
4022 | 90 | |||
4023 | 91 | /* Create a data block for the address, fill in the data, and put it on | ||
4024 | 92 | the chain. This data has to survive for ever, so use malloc. */ | ||
4025 | 93 | |||
4026 | 94 | if (addr != NULL) | ||
4027 | 95 | { | ||
4028 | 96 | next = store_malloc(sizeof(ip_address_item)); | ||
4029 | 97 | next->next = NULL; | ||
4030 | 98 | next->port = 0; | ||
4031 | 99 | (void)host_ntoa(-1, addr, next->address, NULL); | ||
4032 | 100 | |||
4033 | 101 | if (yield == NULL) yield = last = next; else | ||
4034 | 102 | { | ||
4035 | 103 | last->next = next; | ||
4036 | 104 | last = next; | ||
4037 | 105 | } | ||
4038 | 106 | |||
4039 | 107 | DEBUG(D_interface) debug_printf("Actual local interface address is %s\n", | ||
4040 | 108 | last->address); | ||
4041 | 109 | } | ||
4042 | 110 | } | ||
4043 | 111 | } | ||
4044 | 112 | |||
4045 | 113 | return yield; | ||
4046 | 114 | } | ||
4047 | 115 | |||
4048 | 116 | #endif /* FIND_RUNNING_INTERFACES */ | ||
4049 | 117 | |||
4050 | 118 | /* End of os.c-IRIX */ | ||
4051 | diff --git a/OS/unsupported/os.c-IRIX65 b/OS/unsupported/os.c-IRIX65 | |||
4052 | 0 | new file mode 100644 | 119 | new file mode 100644 |
4053 | index 0000000..1f6b0e1 | |||
4054 | --- /dev/null | |||
4055 | +++ b/OS/unsupported/os.c-IRIX65 | |||
4056 | @@ -0,0 +1,118 @@ | |||
4057 | 1 | /************************************************* | ||
4058 | 2 | * Exim - an Internet mail transport agent * | ||
4059 | 3 | *************************************************/ | ||
4060 | 4 | |||
4061 | 5 | /* Copyright (c) University of Cambridge 2001 */ | ||
4062 | 6 | /* See the file NOTICE for conditions of use and distribution. */ | ||
4063 | 7 | |||
4064 | 8 | /* Irix-specific code. This is concatenated onto the generic src/os.c file. | ||
4065 | 9 | Irix has a unique way of finding all the network interfaces, so we provide a | ||
4066 | 10 | unique function here, and define FIND_RUNNING_INTERFACES to stop src/os.c | ||
4067 | 11 | trying to provide the function. The macro may be set initially anyway, when | ||
4068 | 12 | compiling os. for utilities that don't want this function. */ | ||
4069 | 13 | |||
4070 | 14 | #ifndef FIND_RUNNING_INTERFACES | ||
4071 | 15 | #define FIND_RUNNING_INTERFACES | ||
4072 | 16 | |||
4073 | 17 | /* This is the special form of the function using sysctl() which is the only | ||
4074 | 18 | form that returns all the aliases on IRIX systems. This code has its origins | ||
4075 | 19 | in a sample program that came from within SGI. */ | ||
4076 | 20 | |||
4077 | 21 | #include <sys/sysctl.h> | ||
4078 | 22 | #include <net/if_dl.h> | ||
4079 | 23 | #include <net/if_types.h> | ||
4080 | 24 | #include <net/soioctl.h> | ||
4081 | 25 | #include <net/route.h> | ||
4082 | 26 | |||
4083 | 27 | #define ROUNDUP(a) ((a) > 0 ? (1 + (((a) - 1) | (sizeof(__uint64_t) -1))) \ | ||
4084 | 28 | : sizeof(__uint64_t)) | ||
4085 | 29 | #ifdef _HAVE_SA_LEN | ||
4086 | 30 | #define ADVANCE(x, n) (x += ROUNDUP((n)->sa_len)) | ||
4087 | 31 | #else | ||
4088 | 32 | #define ADVANCE(x, n) (x += ROUNDUP(_FAKE_SA_LEN_DST(n))) | ||
4089 | 33 | #endif | ||
4090 | 34 | |||
4091 | 35 | |||
4092 | 36 | ip_address_item * | ||
4093 | 37 | os_find_running_interfaces(void) | ||
4094 | 38 | { | ||
4095 | 39 | ip_address_item *yield = NULL; | ||
4096 | 40 | ip_address_item *last = NULL; | ||
4097 | 41 | ip_address_item *next; | ||
4098 | 42 | |||
4099 | 43 | size_t needed; | ||
4100 | 44 | int mib[6]; | ||
4101 | 45 | char *buf, *nextaddr, *lim; | ||
4102 | 46 | register struct if_msghdr *ifm; | ||
4103 | 47 | |||
4104 | 48 | mib[0] = CTL_NET; | ||
4105 | 49 | mib[1] = PF_ROUTE; | ||
4106 | 50 | mib[2] = 0; | ||
4107 | 51 | mib[3] = 0; | ||
4108 | 52 | mib[4] = NET_RT_IFLIST; | ||
4109 | 53 | mib[5] = 0; | ||
4110 | 54 | |||
4111 | 55 | /* Get an estimate of the amount of store needed, then get the store and | ||
4112 | 56 | get the data into it. Any error causes a panic death. */ | ||
4113 | 57 | |||
4114 | 58 | if (sysctl(mib, 6, NULL, &needed, NULL, 0) < 0) | ||
4115 | 59 | log_write(0, LOG_PANIC_DIE, "iflist-sysctl-estimate failed: %s", | ||
4116 | 60 | strerror(errno)); | ||
4117 | 61 | |||
4118 | 62 | buf = store_get(needed); | ||
4119 | 63 | |||
4120 | 64 | if (sysctl(mib, 6, buf, &needed, NULL, 0) < 0) | ||
4121 | 65 | log_write(0, LOG_PANIC_DIE, "sysctl of ifnet list failed: %s", | ||
4122 | 66 | strerror(errno)); | ||
4123 | 67 | |||
4124 | 68 | /* Now fish out the data for each interface */ | ||
4125 | 69 | |||
4126 | 70 | lim = buf + needed; | ||
4127 | 71 | for (nextaddr = buf; nextaddr < lim; nextaddr += ifm->ifm_msglen) | ||
4128 | 72 | { | ||
4129 | 73 | ifm = (struct if_msghdr *)nextaddr; | ||
4130 | 74 | |||
4131 | 75 | if (ifm->ifm_type != RTM_IFINFO) | ||
4132 | 76 | { | ||
4133 | 77 | struct ifa_msghdr *ifam = (struct ifa_msghdr *)ifm; | ||
4134 | 78 | struct sockaddr_in *mask = NULL, *addr = NULL; | ||
4135 | 79 | |||
4136 | 80 | if ((ifam->ifam_addrs & RTA_NETMASK) != 0) | ||
4137 | 81 | mask = (struct sockaddr_in *)(ifam + 1); | ||
4138 | 82 | |||
4139 | 83 | if ((ifam->ifam_addrs & RTA_IFA) != 0) | ||
4140 | 84 | { | ||
4141 | 85 | char *cp = CS mask; | ||
4142 | 86 | struct sockaddr *sa = (struct sockaddr *)mask; | ||
4143 | 87 | ADVANCE(cp, sa); | ||
4144 | 88 | addr = (struct sockaddr_in *)cp; | ||
4145 | 89 | } | ||
4146 | 90 | |||
4147 | 91 | /* Create a data block for the address, fill in the data, and put it on | ||
4148 | 92 | the chain. This data has to survive for ever, so use malloc. */ | ||
4149 | 93 | |||
4150 | 94 | if (addr != NULL) | ||
4151 | 95 | { | ||
4152 | 96 | next = store_malloc(sizeof(ip_address_item)); | ||
4153 | 97 | next->next = NULL; | ||
4154 | 98 | next->port = 0; | ||
4155 | 99 | (void)host_ntoa(-1, addr, next->address, NULL); | ||
4156 | 100 | |||
4157 | 101 | if (yield == NULL) yield = last = next; else | ||
4158 | 102 | { | ||
4159 | 103 | last->next = next; | ||
4160 | 104 | last = next; | ||
4161 | 105 | } | ||
4162 | 106 | |||
4163 | 107 | DEBUG(D_interface) debug_printf("Actual local interface address is %s\n", | ||
4164 | 108 | last->address); | ||
4165 | 109 | } | ||
4166 | 110 | } | ||
4167 | 111 | } | ||
4168 | 112 | |||
4169 | 113 | return yield; | ||
4170 | 114 | } | ||
4171 | 115 | |||
4172 | 116 | #endif /* FIND_RUNNING_INTERFACES */ | ||
4173 | 117 | |||
4174 | 118 | /* End of os.c-IRIX */ | ||
4175 | diff --git a/OS/unsupported/os.c-OSF1 b/OS/unsupported/os.c-OSF1 | |||
4176 | 0 | new file mode 100644 | 119 | new file mode 100644 |
4177 | index 0000000..ad91b63 | |||
4178 | --- /dev/null | |||
4179 | +++ b/OS/unsupported/os.c-OSF1 | |||
4180 | @@ -0,0 +1,36 @@ | |||
4181 | 1 | /************************************************* | ||
4182 | 2 | * Exim - an Internet mail transport agent * | ||
4183 | 3 | *************************************************/ | ||
4184 | 4 | |||
4185 | 5 | /* Copyright (c) University of Cambridge 2001 */ | ||
4186 | 6 | /* See the file NOTICE for conditions of use and distribution. */ | ||
4187 | 7 | |||
4188 | 8 | /* OSF1-specific code. This is concatenated onto the generic src/os.c file. | ||
4189 | 9 | OSF1 has an apparently unique way of getting the load average, so we provide a | ||
4190 | 10 | unique function here, and define OS_LOAD_AVERAGE to stop src/os.c trying to | ||
4191 | 11 | provide the function. The macro may be set initially anyway, when compiling os. | ||
4192 | 12 | for utilities that don't want this function. */ | ||
4193 | 13 | |||
4194 | 14 | #ifndef OS_LOAD_AVERAGE | ||
4195 | 15 | #define OS_LOAD_AVERAGE | ||
4196 | 16 | |||
4197 | 17 | #include <sys/table.h> | ||
4198 | 18 | |||
4199 | 19 | int | ||
4200 | 20 | os_getloadavg(void) | ||
4201 | 21 | { | ||
4202 | 22 | double avg; | ||
4203 | 23 | struct tbl_loadavg load_avg; | ||
4204 | 24 | |||
4205 | 25 | table (TBL_LOADAVG, 0, &load_avg, 1, sizeof (load_avg)); | ||
4206 | 26 | |||
4207 | 27 | avg = (load_avg.tl_lscale == 0)? | ||
4208 | 28 | load_avg.tl_avenrun.d[0] : | ||
4209 | 29 | (load_avg.tl_avenrun.l[0] / (double)load_avg.tl_lscale); | ||
4210 | 30 | |||
4211 | 31 | return (int)(avg * 1000.0); | ||
4212 | 32 | } | ||
4213 | 33 | |||
4214 | 34 | #endif /* OS_LOAD_AVERAGE */ | ||
4215 | 35 | |||
4216 | 36 | /* End of os.c-OSF1 */ | ||
4217 | diff --git a/OS/unsupported/os.c-cygwin b/OS/unsupported/os.c-cygwin | |||
4218 | 0 | new file mode 100644 | 37 | new file mode 100644 |
4219 | index 0000000..c9464aa | |||
4220 | --- /dev/null | |||
4221 | +++ b/OS/unsupported/os.c-cygwin | |||
4222 | @@ -0,0 +1,531 @@ | |||
4223 | 1 | /************************************************* | ||
4224 | 2 | * Exim - an Internet mail transport agent * | ||
4225 | 3 | *************************************************/ | ||
4226 | 4 | |||
4227 | 5 | /* Cygwin-specific code. December 2002. Updated Jan 2015. | ||
4228 | 6 | This is prefixed to the src/os.c file. | ||
4229 | 7 | |||
4230 | 8 | This code was supplied by Pierre A. Humblet <Pierre.Humblet@ieee.org> | ||
4231 | 9 | */ | ||
4232 | 10 | |||
4233 | 11 | /* We need a special mkdir that | ||
4234 | 12 | allows names starting with // */ | ||
4235 | 13 | #undef mkdir | ||
4236 | 14 | int cygwin_mkdir( const char *path, mode_t mode ) | ||
4237 | 15 | { | ||
4238 | 16 | const char * p = path; | ||
4239 | 17 | if (*p == '/') while(*(p+1) == '/') p++; | ||
4240 | 18 | return mkdir(p, mode); | ||
4241 | 19 | } | ||
4242 | 20 | |||
4243 | 21 | #ifndef COMPILE_UTILITY /* Utilities don't need special code */ | ||
4244 | 22 | |||
4245 | 23 | #ifdef INCLUDE_PAM | ||
4246 | 24 | #include "../pam/pam.c" | ||
4247 | 25 | #endif | ||
4248 | 26 | #include <alloca.h> | ||
4249 | 27 | |||
4250 | 28 | unsigned int cygwin_WinVersion; | ||
4251 | 29 | |||
4252 | 30 | /* Conflict between Windows definitions and others */ | ||
4253 | 31 | #ifdef NOERROR | ||
4254 | 32 | #undef NOERROR | ||
4255 | 33 | #endif | ||
4256 | 34 | #ifdef DELETE | ||
4257 | 35 | #undef DELETE | ||
4258 | 36 | #endif | ||
4259 | 37 | |||
4260 | 38 | #include <windows.h> | ||
4261 | 39 | #include <ntstatus.h> | ||
4262 | 40 | #include <lmcons.h> | ||
4263 | 41 | |||
4264 | 42 | #define EqualLuid(Luid1, Luid2) \ | ||
4265 | 43 | ((Luid1.LowPart == Luid2.LowPart) && (Luid1.HighPart == Luid2.HighPart)) | ||
4266 | 44 | #include <sys/cygwin.h> | ||
4267 | 45 | |||
4268 | 46 | /* Special static variables */ | ||
4269 | 47 | static BOOL cygwin_debug = FALSE; | ||
4270 | 48 | static int fakesetugid = 1; /* when not privileged, setugid = noop */ | ||
4271 | 49 | |||
4272 | 50 | #undef setuid | ||
4273 | 51 | int cygwin_setuid(uid_t uid ) | ||
4274 | 52 | { | ||
4275 | 53 | int res = 0; | ||
4276 | 54 | if (fakesetugid == 0) { | ||
4277 | 55 | res = setuid(uid); | ||
4278 | 56 | if (cygwin_debug) | ||
4279 | 57 | fprintf(stderr, "setuid %u %u %d pid: %d\n", | ||
4280 | 58 | uid, getuid(),res, getpid()); | ||
4281 | 59 | } | ||
4282 | 60 | return res; | ||
4283 | 61 | } | ||
4284 | 62 | |||
4285 | 63 | #undef setgid | ||
4286 | 64 | int cygwin_setgid(gid_t gid ) | ||
4287 | 65 | { | ||
4288 | 66 | int res = 0; | ||
4289 | 67 | if (fakesetugid == 0) { | ||
4290 | 68 | res = setgid(gid); | ||
4291 | 69 | if (cygwin_debug) | ||
4292 | 70 | fprintf(stderr, "setgid %u %u %d pid: %d\n", | ||
4293 | 71 | gid, getgid(), res, getpid()); | ||
4294 | 72 | } | ||
4295 | 73 | return res; | ||
4296 | 74 | } | ||
4297 | 75 | |||
4298 | 76 | /* Background processes run at lower priority */ | ||
4299 | 77 | static void cygwin_setpriority() | ||
4300 | 78 | { | ||
4301 | 79 | if (!SetPriorityClass(GetCurrentProcess(), BELOW_NORMAL_PRIORITY_CLASS)) | ||
4302 | 80 | SetPriorityClass(GetCurrentProcess(), IDLE_PRIORITY_CLASS); | ||
4303 | 81 | return; | ||
4304 | 82 | } | ||
4305 | 83 | |||
4306 | 84 | |||
4307 | 85 | /* GetVersion() | ||
4308 | 86 | MSB: 1 for 95/98/ME; Next 7: build number, except for 95/98/ME | ||
4309 | 87 | Next byte: 0 | ||
4310 | 88 | Next byte: minor version of OS | ||
4311 | 89 | Low byte: major version of OS (3 or 4 for for NT, 5 for 2000 and XP) */ | ||
4312 | 90 | //#define VERSION_IS_58M(x) (x & 0x80000000) /* 95, 98, Me */ | ||
4313 | 91 | //#define VERSION_IS_NT(x) ((x & 0XFF) < 5) /* NT 4 or 3.51 */ | ||
4314 | 92 | |||
4315 | 93 | /* | ||
4316 | 94 | Routine to find if process or thread is privileged | ||
4317 | 95 | */ | ||
4318 | 96 | |||
4319 | 97 | enum { | ||
4320 | 98 | CREATE_BIT = 1, | ||
4321 | 99 | }; | ||
4322 | 100 | |||
4323 | 101 | static DWORD get_privileges () | ||
4324 | 102 | { | ||
4325 | 103 | char buffer[1024]; | ||
4326 | 104 | DWORD i, length; | ||
4327 | 105 | HANDLE hToken = NULL; | ||
4328 | 106 | PTOKEN_PRIVILEGES privs; | ||
4329 | 107 | LUID cluid, rluid; | ||
4330 | 108 | DWORD ret = 0; | ||
4331 | 109 | |||
4332 | 110 | privs = (PTOKEN_PRIVILEGES) buffer; | ||
4333 | 111 | |||
4334 | 112 | if (OpenProcessToken (GetCurrentProcess(), TOKEN_QUERY, &hToken) | ||
4335 | 113 | && LookupPrivilegeValue (NULL, SE_CREATE_TOKEN_NAME, &cluid) | ||
4336 | 114 | && LookupPrivilegeValue(NULL, SE_RESTORE_NAME, &rluid) | ||
4337 | 115 | && (GetTokenInformation( hToken, TokenPrivileges, | ||
4338 | 116 | privs, sizeof (buffer), &length) | ||
4339 | 117 | || (GetLastError () == ERROR_INSUFFICIENT_BUFFER | ||
4340 | 118 | && (privs = (PTOKEN_PRIVILEGES) alloca (length)) | ||
4341 | 119 | && GetTokenInformation(hToken, TokenPrivileges, | ||
4342 | 120 | privs, length, &length)))) { | ||
4343 | 121 | for (i = 0; i < privs->PrivilegeCount; i++) { | ||
4344 | 122 | if (EqualLuid(privs->Privileges[i].Luid, cluid)) | ||
4345 | 123 | ret |= CREATE_BIT; | ||
4346 | 124 | if (ret == (CREATE_BIT)) | ||
4347 | 125 | break; | ||
4348 | 126 | } | ||
4349 | 127 | } | ||
4350 | 128 | else | ||
4351 | 129 | fprintf(stderr, "has_create_token_privilege %u\n", GetLastError()); | ||
4352 | 130 | |||
4353 | 131 | if (hToken) | ||
4354 | 132 | CloseHandle(hToken); | ||
4355 | 133 | |||
4356 | 134 | return ret; | ||
4357 | 135 | } | ||
4358 | 136 | |||
4359 | 137 | /* | ||
4360 | 138 | We use cygwin_premain to fake a few things | ||
4361 | 139 | and to provide some debug info | ||
4362 | 140 | */ | ||
4363 | 141 | void cygwin_premain2(int argc, char ** argv, struct per_process * ptr) | ||
4364 | 142 | { | ||
4365 | 143 | int i, res, is_daemon = 0, is_spoolwritable, is_privileged, is_eximuser; | ||
4366 | 144 | uid_t myuid, systemuid; | ||
4367 | 145 | gid_t mygid, adminsgid; | ||
4368 | 146 | struct passwd * pwp = NULL; | ||
4369 | 147 | struct stat buf; | ||
4370 | 148 | char *cygenv; | ||
4371 | 149 | SID(1, SystemSid, SECURITY_LOCAL_SYSTEM_RID); | ||
4372 | 150 | SID(2, AdminsSid, SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_ADMINS); | ||
4373 | 151 | DWORD priv_flags; | ||
4374 | 152 | |||
4375 | 153 | myuid = getuid(); | ||
4376 | 154 | mygid = getgid(); | ||
4377 | 155 | cygwin_WinVersion = GetVersion(); | ||
4378 | 156 | if ((cygenv = getenv("CYGWIN")) == NULL) cygenv = ""; | ||
4379 | 157 | /* Produce some debugging on stderr, | ||
4380 | 158 | cannot yet use exim's debug functions. | ||
4381 | 159 | Exim does not use -c and ignores -n. | ||
4382 | 160 | Set lower priority for daemons */ | ||
4383 | 161 | for (i = 1; i < argc; i++) { | ||
4384 | 162 | if (argv[i][0] == '-') { | ||
4385 | 163 | if (argv[i][1] == 'c') { | ||
4386 | 164 | ssize_t size; | ||
4387 | 165 | wchar_t *win32_path; | ||
4388 | 166 | argv[i][1] = 'n'; /* Replace -c by -n */ | ||
4389 | 167 | cygwin_debug = TRUE; | ||
4390 | 168 | fprintf(stderr, "CYGWIN = \"%s\".\n", cygenv); | ||
4391 | 169 | if (((size = cygwin_conv_path(CCP_POSIX_TO_WIN_W,"/", win32_path, 0)) > 0) | ||
4392 | 170 | && ((win32_path = malloc(size)) != NULL) | ||
4393 | 171 | && (cygwin_conv_path(CCP_POSIX_TO_WIN_W,"/", win32_path, size) == 0)) { | ||
4394 | 172 | fprintf(stderr, " Root / mapped to %ls.\n", win32_path); | ||
4395 | 173 | free(win32_path); | ||
4396 | 174 | } | ||
4397 | 175 | } | ||
4398 | 176 | else if (argv[i][1] == 'b' && argv[i][2] == 'd') { | ||
4399 | 177 | is_daemon = 1; | ||
4400 | 178 | cygwin_setpriority(); | ||
4401 | 179 | } | ||
4402 | 180 | } | ||
4403 | 181 | } | ||
4404 | 182 | |||
4405 | 183 | /* Nt/2000/XP | ||
4406 | 184 | We initially set the exim uid & gid to those of the "exim user", | ||
4407 | 185 | or to the root uid (SYSTEM) and exim gid (ADMINS), | ||
4408 | 186 | If privileged, we setuid to those. | ||
4409 | 187 | We always set the configure uid to the system uid. | ||
4410 | 188 | We always set the root uid to the real uid | ||
4411 | 189 | to allow exim imposed restrictions (bypassable by recompiling) | ||
4412 | 190 | and to avoid exec that cause loss of privilege | ||
4413 | 191 | If not privileged and unable to chown, | ||
4414 | 192 | we set the exim uid to our uid. | ||
4415 | 193 | If unprivileged and /var/spool/exim is writable and not running as listening daemon, | ||
4416 | 194 | we fake all subsequent setuid. */ | ||
4417 | 195 | |||
4418 | 196 | /* Get the system and admins uid from their sids */ | ||
4419 | 197 | if ((systemuid = cygwin_internal(CW_GET_UID_FROM_SID, & SystemSid)) == -1) { | ||
4420 | 198 | fprintf(stderr, "Cannot map System sid. Aborting\n"); | ||
4421 | 199 | exit(1); | ||
4422 | 200 | } | ||
4423 | 201 | if ((adminsgid = cygwin_internal(CW_GET_GID_FROM_SID, & AdminsSid)) == -1) { | ||
4424 | 202 | fprintf(stderr, "Cannot map Admins sid. Aborting\n"); | ||
4425 | 203 | exit(1); | ||
4426 | 204 | } | ||
4427 | 205 | |||
4428 | 206 | priv_flags = get_privileges (); | ||
4429 | 207 | is_privileged = !!(priv_flags & CREATE_BIT); | ||
4430 | 208 | |||
4431 | 209 | /* Call getpwnam for account exim after getting the local exim name */ | ||
4432 | 210 | char exim_username[DNLEN + UNLEN + 2]; | ||
4433 | 211 | if (cygwin_internal(CW_CYGNAME_FROM_WINNAME, "exim", exim_username, sizeof exim_username) != 0) | ||
4434 | 212 | pwp = getpwnam (exim_username); | ||
4435 | 213 | |||
4436 | 214 | /* If cannot setuid to exim or and is not the daemon (which is assumed to be | ||
4437 | 215 | able to chown or to be the exim user) set the exim ugid to our ugid to avoid | ||
4438 | 216 | chown failures after creating files and to be able to setuid to exim in | ||
4439 | 217 | exim.c ( "privilege not needed" ). */ | ||
4440 | 218 | if ((is_privileged == 0) && (!is_daemon)) { | ||
4441 | 219 | exim_uid = myuid; | ||
4442 | 220 | exim_gid = mygid; | ||
4443 | 221 | } | ||
4444 | 222 | else if (pwp != NULL) { | ||
4445 | 223 | exim_uid = pwp->pw_uid; /* Set it according to passwd */ | ||
4446 | 224 | exim_gid = pwp->pw_gid; | ||
4447 | 225 | is_eximuser = 1; | ||
4448 | 226 | } | ||
4449 | 227 | else { | ||
4450 | 228 | exim_uid = systemuid; | ||
4451 | 229 | exim_gid = adminsgid; | ||
4452 | 230 | is_eximuser = 0; | ||
4453 | 231 | } | ||
4454 | 232 | |||
4455 | 233 | res = stat("/var/spool/exim", &buf); | ||
4456 | 234 | /* Check if writable (and can be stat) */ | ||
4457 | 235 | is_spoolwritable = ((res == 0) && ((buf.st_mode & S_IWOTH) != 0)); | ||
4458 | 236 | |||
4459 | 237 | fakesetugid = (is_privileged == 0) && (is_daemon == 0) && (is_spoolwritable == 1); | ||
4460 | 238 | |||
4461 | 239 | if (is_privileged) { /* Can setuid */ | ||
4462 | 240 | if (cygwin_setgid(exim_gid) /* Setuid to exim */ | ||
4463 | 241 | || cygwin_setuid(exim_uid)) { | ||
4464 | 242 | fprintf(stderr, "Unable to setuid/gid to exim. priv_flags: %x\n", priv_flags); | ||
4465 | 243 | exit(0); /* Problem... Perhaps not in 544 */ | ||
4466 | 244 | } | ||
4467 | 245 | } | ||
4468 | 246 | |||
4469 | 247 | /* Set the configuration file uid and gid to the system uid and admins gid. */ | ||
4470 | 248 | config_uid = systemuid; | ||
4471 | 249 | config_gid = adminsgid; | ||
4472 | 250 | |||
4473 | 251 | /* Pretend we are root to avoid useless exec | ||
4474 | 252 | and avoid exim set limitations. | ||
4475 | 253 | We are limited by file access rights */ | ||
4476 | 254 | root_uid = getuid (); | ||
4477 | 255 | |||
4478 | 256 | if (cygwin_debug) { | ||
4479 | 257 | fprintf(stderr, "Starting uid %u, gid %u, priv_flags %x, is_privileged %d, is_daemon %d, is_spoolwritable %d.\n", | ||
4480 | 258 | myuid, mygid, priv_flags, is_privileged, is_daemon, is_spoolwritable); | ||
4481 | 259 | fprintf(stderr, "root_uid %u, exim_uid %u, exim_gid %u, config_uid %u, config_gid %u, is_eximuser %d.\n", | ||
4482 | 260 | root_uid, exim_uid, exim_gid, config_uid, config_gid, is_eximuser); | ||
4483 | 261 | } | ||
4484 | 262 | return; | ||
4485 | 263 | } | ||
4486 | 264 | |||
4487 | 265 | #ifndef OS_LOAD_AVERAGE /* Can be set on command line */ | ||
4488 | 266 | #define OS_LOAD_AVERAGE /* src/os.c need not provide it */ | ||
4489 | 267 | |||
4490 | 268 | /***************************************************************** | ||
4491 | 269 | Functions for average load measurements | ||
4492 | 270 | |||
4493 | 271 | Uses NtQuerySystemInformation. | ||
4494 | 272 | This requires definitions that are not part of | ||
4495 | 273 | standard include files. | ||
4496 | 274 | |||
4497 | 275 | This is discouraged starting with WinXP. | ||
4498 | 276 | |||
4499 | 277 | *************************************************************/ | ||
4500 | 278 | /* Structure to compute the load average efficiently */ | ||
4501 | 279 | typedef struct { | ||
4502 | 280 | DWORD Lock; | ||
4503 | 281 | unsigned long long Time100ns; /* Last measurement time */ | ||
4504 | 282 | unsigned long long IdleCount; /* Latest cumulative idle time */ | ||
4505 | 283 | unsigned long long LastCounter; /* Last measurement counter */ | ||
4506 | 284 | unsigned long long PerfFreq; /* Perf counter frequency */ | ||
4507 | 285 | int LastLoad; /* Last reported load, or -1 */ | ||
4508 | 286 | } cygwin_perf_t; | ||
4509 | 287 | |||
4510 | 288 | static struct { | ||
4511 | 289 | HANDLE handle; | ||
4512 | 290 | pid_t pid; | ||
4513 | 291 | cygwin_perf_t *perf; | ||
4514 | 292 | } cygwin_load = {NULL, 0, NULL}; | ||
4515 | 293 | |||
4516 | 294 | #include <ntdef.h> | ||
4517 | 295 | |||
4518 | 296 | typedef enum _SYSTEM_INFORMATION_CLASS | ||
4519 | 297 | { | ||
4520 | 298 | SystemBasicInformation = 0, | ||
4521 | 299 | SystemPerformanceInformation = 2, | ||
4522 | 300 | SystemTimeOfDayInformation = 3, | ||
4523 | 301 | SystemProcessesAndThreadsInformation = 5, | ||
4524 | 302 | SystemProcessorTimes = 8, | ||
4525 | 303 | SystemPagefileInformation = 18, | ||
4526 | 304 | /* There are a lot more of these... */ | ||
4527 | 305 | } SYSTEM_INFORMATION_CLASS; | ||
4528 | 306 | |||
4529 | 307 | typedef struct _SYSTEM_BASIC_INFORMATION | ||
4530 | 308 | { | ||
4531 | 309 | ULONG Unknown; | ||
4532 | 310 | ULONG MaximumIncrement; | ||
4533 | 311 | ULONG PhysicalPageSize; | ||
4534 | 312 | ULONG NumberOfPhysicalPages; | ||
4535 | 313 | ULONG LowestPhysicalPage; | ||
4536 | 314 | ULONG HighestPhysicalPage; | ||
4537 | 315 | ULONG AllocationGranularity; | ||
4538 | 316 | ULONG LowestUserAddress; | ||
4539 | 317 | ULONG HighestUserAddress; | ||
4540 | 318 | ULONG ActiveProcessors; | ||
4541 | 319 | UCHAR NumberProcessors; | ||
4542 | 320 | } SYSTEM_BASIC_INFORMATION, *PSYSTEM_BASIC_INFORMATION; | ||
4543 | 321 | |||
4544 | 322 | typedef struct __attribute__ ((aligned (8))) _SYSTEM_PROCESSOR_TIMES | ||
4545 | 323 | { | ||
4546 | 324 | LARGE_INTEGER IdleTime; | ||
4547 | 325 | LARGE_INTEGER KernelTime; | ||
4548 | 326 | LARGE_INTEGER UserTime; | ||
4549 | 327 | LARGE_INTEGER DpcTime; | ||
4550 | 328 | LARGE_INTEGER InterruptTime; | ||
4551 | 329 | ULONG InterruptCount; | ||
4552 | 330 | } SYSTEM_PROCESSOR_TIMES, *PSYSTEM_PROCESSOR_TIMES; | ||
4553 | 331 | |||
4554 | 332 | typedef NTSTATUS NTAPI (*NtQuerySystemInformation_t) (SYSTEM_INFORMATION_CLASS, PVOID, ULONG, PULONG); | ||
4555 | 333 | typedef ULONG NTAPI (*RtlNtStatusToDosError_t) (NTSTATUS); | ||
4556 | 334 | |||
4557 | 335 | static NtQuerySystemInformation_t NtQuerySystemInformation; | ||
4558 | 336 | static RtlNtStatusToDosError_t RtlNtStatusToDosError; | ||
4559 | 337 | |||
4560 | 338 | /***************************************************************** | ||
4561 | 339 | * | ||
4562 | 340 | LoadNtdll() | ||
4563 | 341 | Load special functions from the NTDLL | ||
4564 | 342 | Return TRUE if success. | ||
4565 | 343 | |||
4566 | 344 | *****************************************************************/ | ||
4567 | 345 | |||
4568 | 346 | static BOOL LoadNtdll() | ||
4569 | 347 | { | ||
4570 | 348 | HINSTANCE hinstLib; | ||
4571 | 349 | |||
4572 | 350 | if ((hinstLib = LoadLibrary("NTDLL.DLL")) | ||
4573 | 351 | && (NtQuerySystemInformation = | ||
4574 | 352 | (NtQuerySystemInformation_t) GetProcAddress(hinstLib, | ||
4575 | 353 | "NtQuerySystemInformation")) | ||
4576 | 354 | && (RtlNtStatusToDosError = | ||
4577 | 355 | (RtlNtStatusToDosError_t) GetProcAddress(hinstLib, | ||
4578 | 356 | "RtlNtStatusToDosError"))) | ||
4579 | 357 | return TRUE; | ||
4580 | 358 | |||
4581 | 359 | DEBUG(D_load) | ||
4582 | 360 | debug_printf("perf: load: %u (Windows)\n", GetLastError()); | ||
4583 | 361 | return FALSE; | ||
4584 | 362 | } | ||
4585 | 363 | /***************************************************************** | ||
4586 | 364 | * | ||
4587 | 365 | ReadStat() | ||
4588 | 366 | Measures current Time100ns and IdleCount | ||
4589 | 367 | Return TRUE if success. | ||
4590 | 368 | |||
4591 | 369 | *****************************************************************/ | ||
4592 | 370 | |||
4593 | 371 | static BOOL ReadStat(unsigned long long int *Time100nsPtr, | ||
4594 | 372 | unsigned long long int *IdleCountPtr) | ||
4595 | 373 | { | ||
4596 | 374 | NTSTATUS ret; | ||
4597 | 375 | SYSTEM_BASIC_INFORMATION sbi; | ||
4598 | 376 | PSYSTEM_PROCESSOR_TIMES spt; | ||
4599 | 377 | |||
4600 | 378 | *Time100nsPtr = *IdleCountPtr = 0; | ||
4601 | 379 | |||
4602 | 380 | if ((ret = NtQuerySystemInformation(SystemBasicInformation, | ||
4603 | 381 | (PVOID) &sbi, sizeof sbi, NULL)) | ||
4604 | 382 | != STATUS_SUCCESS) { | ||
4605 | 383 | DEBUG(D_load) | ||
4606 | 384 | debug_printf("Perf: NtQuerySystemInformation: %u (Windows)\n", | ||
4607 | 385 | RtlNtStatusToDosError(ret)); | ||
4608 | 386 | } | ||
4609 | 387 | else if (!(spt = (PSYSTEM_PROCESSOR_TIMES) alloca(sizeof(spt[0]) * sbi.NumberProcessors))) { | ||
4610 | 388 | DEBUG(D_load) | ||
4611 | 389 | debug_printf("Perf: alloca: errno %d (%s)\n", errno, strerror(errno)); | ||
4612 | 390 | } | ||
4613 | 391 | else if ((ret = NtQuerySystemInformation(SystemProcessorTimes, (PVOID) spt, | ||
4614 | 392 | sizeof spt[0] * sbi.NumberProcessors, NULL)) | ||
4615 | 393 | != STATUS_SUCCESS) { | ||
4616 | 394 | DEBUG(D_load) | ||
4617 | 395 | debug_printf("Perf: NtQuerySystemInformation: %u (Windows)\n", | ||
4618 | 396 | RtlNtStatusToDosError(ret)); | ||
4619 | 397 | } | ||
4620 | 398 | else { | ||
4621 | 399 | int i; | ||
4622 | 400 | for (i = 0; i < sbi.NumberProcessors; i++) { | ||
4623 | 401 | *Time100nsPtr += spt[i].KernelTime.QuadPart;; | ||
4624 | 402 | *Time100nsPtr += spt[i].UserTime.QuadPart; | ||
4625 | 403 | *IdleCountPtr += spt[i].IdleTime.QuadPart; | ||
4626 | 404 | } | ||
4627 | 405 | return TRUE; | ||
4628 | 406 | } | ||
4629 | 407 | return FALSE; | ||
4630 | 408 | } | ||
4631 | 409 | |||
4632 | 410 | /***************************************************************** | ||
4633 | 411 | * | ||
4634 | 412 | InitLoadAvg() | ||
4635 | 413 | Initialize the cygwin_load.perf structure. | ||
4636 | 414 | and set cygwin_load.perf->Flag to TRUE if successful. | ||
4637 | 415 | This is called the first time os_getloadavg is called | ||
4638 | 416 | *****************************************************************/ | ||
4639 | 417 | static void InitLoadAvg(cygwin_perf_t *this) | ||
4640 | 418 | { | ||
4641 | 419 | BOOL success = TRUE; | ||
4642 | 420 | |||
4643 | 421 | /* Get perf frequency and counter */ | ||
4644 | 422 | QueryPerformanceFrequency((LARGE_INTEGER *)& this->PerfFreq); | ||
4645 | 423 | QueryPerformanceCounter((LARGE_INTEGER *)& this->LastCounter); | ||
4646 | 424 | |||
4647 | 425 | /* Get initial values for Time100ns and IdleCount */ | ||
4648 | 426 | success = success | ||
4649 | 427 | && ReadStat( & this->Time100ns, | ||
4650 | 428 | & this->IdleCount); | ||
4651 | 429 | /* If success, set the Load to 0, else to -1 */ | ||
4652 | 430 | if (success) this->LastLoad = 0; | ||
4653 | 431 | else { | ||
4654 | 432 | log_write(0, LOG_MAIN, "Cannot obtain Load Average"); | ||
4655 | 433 | this->LastLoad = -1; | ||
4656 | 434 | } | ||
4657 | 435 | } | ||
4658 | 436 | |||
4659 | 437 | |||
4660 | 438 | /***************************************************************** | ||
4661 | 439 | * | ||
4662 | 440 | os_getloadavg() | ||
4663 | 441 | |||
4664 | 442 | Return -1 if not available; | ||
4665 | 443 | Return the previous value if less than AVERAGING sec old. | ||
4666 | 444 | else return the processor load on a [0 - 1000] scale. | ||
4667 | 445 | |||
4668 | 446 | The first time we are called we initialize the counts | ||
4669 | 447 | and return 0 or -1. | ||
4670 | 448 | The initial load cannot be measured as we use the processor 100% | ||
4671 | 449 | *****************************************************************/ | ||
4672 | 450 | static SECURITY_ATTRIBUTES sa = {sizeof (SECURITY_ATTRIBUTES), NULL, TRUE}; | ||
4673 | 451 | #define AVERAGING 10 | ||
4674 | 452 | |||
4675 | 453 | int os_getloadavg() | ||
4676 | 454 | { | ||
4677 | 455 | unsigned long long Time100ns, IdleCount, CurrCounter; | ||
4678 | 456 | int value; | ||
4679 | 457 | pid_t newpid; | ||
4680 | 458 | |||
4681 | 459 | /* New process. | ||
4682 | 460 | Reload the dlls and the file mapping */ | ||
4683 | 461 | if ((newpid = getpid()) != cygwin_load.pid) { | ||
4684 | 462 | BOOL new; | ||
4685 | 463 | cygwin_load.pid = newpid; | ||
4686 | 464 | |||
4687 | 465 | if (!LoadNtdll()) { | ||
4688 | 466 | log_write(0, LOG_MAIN, "Cannot obtain Load Average"); | ||
4689 | 467 | cygwin_load.perf = NULL; | ||
4690 | 468 | return -1; | ||
4691 | 469 | } | ||
4692 | 470 | |||
4693 | 471 | if ((new = !cygwin_load.handle)) { | ||
4694 | 472 | cygwin_load.handle = CreateFileMapping (INVALID_HANDLE_VALUE, &sa, PAGE_READWRITE, | ||
4695 | 473 | 0, sizeof(cygwin_perf_t), NULL); | ||
4696 | 474 | DEBUG(D_load) | ||
4697 | 475 | debug_printf("Perf: CreateFileMapping: handle %p\n", (void *) cygwin_load.handle); | ||
4698 | 476 | } | ||
4699 | 477 | cygwin_load.perf = (cygwin_perf_t *) MapViewOfFile (cygwin_load.handle, | ||
4700 | 478 | FILE_MAP_READ | FILE_MAP_WRITE, 0, 0, 0); | ||
4701 | 479 | DEBUG(D_load) | ||
4702 | 480 | debug_printf("Perf: MapViewOfFile: addr %p\n", (void *) cygwin_load.perf); | ||
4703 | 481 | if (new && cygwin_load.perf) | ||
4704 | 482 | InitLoadAvg(cygwin_load.perf); | ||
4705 | 483 | } | ||
4706 | 484 | |||
4707 | 485 | /* Check if initialized OK */ | ||
4708 | 486 | if (!cygwin_load.perf || cygwin_load.perf->LastLoad < 0) | ||
4709 | 487 | return -1; | ||
4710 | 488 | |||
4711 | 489 | /* If we cannot get the lock, we return 0. | ||
4712 | 490 | This is to prevent any lock-up possibility. | ||
4713 | 491 | Finding a lock busy is unlikely, and giving up only | ||
4714 | 492 | results in an immediate delivery .*/ | ||
4715 | 493 | |||
4716 | 494 | if (InterlockedCompareExchange(&cygwin_load.perf->Lock, 1, 0)) { | ||
4717 | 495 | DEBUG(D_load) | ||
4718 | 496 | debug_printf("Perf: Lock busy\n"); | ||
4719 | 497 | return 0; | ||
4720 | 498 | } | ||
4721 | 499 | |||
4722 | 500 | /* Get the current time (PerfCounter) */ | ||
4723 | 501 | QueryPerformanceCounter((LARGE_INTEGER *)& CurrCounter); | ||
4724 | 502 | /* Calls closer than AVERAGING sec apart use the previous value */ | ||
4725 | 503 | if (CurrCounter - cygwin_load.perf->LastCounter > | ||
4726 | 504 | AVERAGING * cygwin_load.perf->PerfFreq) { | ||
4727 | 505 | /* Get Time100ns and IdleCount */ | ||
4728 | 506 | if (ReadStat( & Time100ns, & IdleCount)) { /* Success */ | ||
4729 | 507 | /* Return processor load on 1000 scale */ | ||
4730 | 508 | value = 1000 - ((1000 * (IdleCount - cygwin_load.perf->IdleCount)) / | ||
4731 | 509 | (Time100ns - cygwin_load.perf->Time100ns)); | ||
4732 | 510 | cygwin_load.perf->Time100ns = Time100ns; | ||
4733 | 511 | cygwin_load.perf->IdleCount = IdleCount; | ||
4734 | 512 | cygwin_load.perf->LastCounter = CurrCounter; | ||
4735 | 513 | cygwin_load.perf->LastLoad = value; | ||
4736 | 514 | DEBUG(D_load) | ||
4737 | 515 | debug_printf("Perf: New load average %d\n", value); | ||
4738 | 516 | } | ||
4739 | 517 | else { /* Something bad happened. | ||
4740 | 518 | Refuse to measure the load anymore | ||
4741 | 519 | but don't bother releasing the buffer */ | ||
4742 | 520 | log_write(0, LOG_MAIN, "Cannot obtain Load Average"); | ||
4743 | 521 | cygwin_load.perf->LastLoad = -1; | ||
4744 | 522 | } | ||
4745 | 523 | } | ||
4746 | 524 | else | ||
4747 | 525 | DEBUG(D_load) | ||
4748 | 526 | debug_printf("Perf: Old load average %d\n", cygwin_load.perf->LastLoad); | ||
4749 | 527 | cygwin_load.perf->Lock = 0; | ||
4750 | 528 | return cygwin_load.perf->LastLoad; | ||
4751 | 529 | } | ||
4752 | 530 | #endif /* OS_LOAD_AVERAGE */ | ||
4753 | 531 | #endif /* COMPILE_UTILITY */ | ||
4754 | diff --git a/OS/unsupported/os.h-AIX b/OS/unsupported/os.h-AIX | |||
4755 | 0 | new file mode 100644 | 532 | new file mode 100644 |
4756 | index 0000000..5cd4501 | |||
4757 | --- /dev/null | |||
4758 | +++ b/OS/unsupported/os.h-AIX | |||
4759 | @@ -0,0 +1,27 @@ | |||
4760 | 1 | /* Exim: OS-specific C header file for AIX */ | ||
4761 | 2 | /* Written by Nick Waterman <nick@cimio.co.uk> */ | ||
4762 | 3 | /* Modified by Philip Hazel with data from | ||
4763 | 4 | Niels Provos <provos@wserver.physnet.uni-hamburg.de> | ||
4764 | 5 | Juozas Simkevicius <juozas@omnitel.net> for load averages | ||
4765 | 6 | */ | ||
4766 | 7 | |||
4767 | 8 | #define HAVE_DEV_KMEM | ||
4768 | 9 | #define LOAD_AVG_SYMBOL "avenrun" | ||
4769 | 10 | #define KERNEL_PATH "/unix" | ||
4770 | 11 | #define LOAD_AVG_TYPE int | ||
4771 | 12 | #define FSCALE 65536.0 | ||
4772 | 13 | |||
4773 | 14 | #define HAVE_SYS_VFS_H | ||
4774 | 15 | #define HAVE_SYS_STATFS_H | ||
4775 | 16 | |||
4776 | 17 | /* Now tell AIX to emulate BSD as badly as it can. */ | ||
4777 | 18 | |||
4778 | 19 | #define _BSD 44 | ||
4779 | 20 | |||
4780 | 21 | typedef struct flock flock_t; | ||
4781 | 22 | |||
4782 | 23 | /* default is non-const */ | ||
4783 | 24 | #define ICONV_ARG2_TYPE const char ** | ||
4784 | 25 | |||
4785 | 26 | |||
4786 | 27 | /* End */ | ||
4787 | diff --git a/OS/unsupported/os.h-BSDI b/OS/unsupported/os.h-BSDI | |||
4788 | 0 | new file mode 100644 | 28 | new file mode 100644 |
4789 | index 0000000..a1705ec | |||
4790 | --- /dev/null | |||
4791 | +++ b/OS/unsupported/os.h-BSDI | |||
4792 | @@ -0,0 +1,15 @@ | |||
4793 | 1 | /* Exim: OS-specific C header file for BSDI */ | ||
4794 | 2 | |||
4795 | 3 | #define HAVE_BSD_GETLOADAVG | ||
4796 | 4 | #define HAVE_SETCLASSRESOURCES | ||
4797 | 5 | #define HAVE_MMAP | ||
4798 | 6 | #define HAVE_SYS_MOUNT_H | ||
4799 | 7 | #define SIOCGIFCONF_GIVES_ADDR | ||
4800 | 8 | #define OS_UNSETENV | ||
4801 | 9 | |||
4802 | 10 | typedef struct flock flock_t; | ||
4803 | 11 | |||
4804 | 12 | /* default is non-const */ | ||
4805 | 13 | #define ICONV_ARG2_TYPE const char ** | ||
4806 | 14 | |||
4807 | 15 | /* End */ | ||
4808 | diff --git a/OS/unsupported/os.h-DGUX b/OS/unsupported/os.h-DGUX | |||
4809 | 0 | new file mode 100644 | 16 | new file mode 100644 |
4810 | index 0000000..9040f0e | |||
4811 | --- /dev/null | |||
4812 | +++ b/OS/unsupported/os.h-DGUX | |||
4813 | @@ -0,0 +1,28 @@ | |||
4814 | 1 | /* Exim: OS-specific C header file for DGUX */ | ||
4815 | 2 | |||
4816 | 3 | /* Written by Ken Bailey (K.Bailey@rbgkew.org.uk) Feb 1998 */ | ||
4817 | 4 | /* on dgux R4.11MU04 generic AViiON mc88100 */ | ||
4818 | 5 | /* Modified Dec 1998 by PH after message from Ken. */ | ||
4819 | 6 | |||
4820 | 7 | #define HAVE_SYS_STATVFS_H | ||
4821 | 8 | #define F_FAVAIL f_favail | ||
4822 | 9 | |||
4823 | 10 | #define NO_SYSEXITS /* DGUX doesn't ship sysexits.h */ | ||
4824 | 11 | #define NO_IP_VAR_H /* DGUX has no netinet/ip_var.h */ | ||
4825 | 12 | |||
4826 | 13 | #define os_strsignal dg_strsignal | ||
4827 | 14 | #define OS_STRSIGNAL | ||
4828 | 15 | |||
4829 | 16 | #define HAVE_MMAP | ||
4830 | 17 | |||
4831 | 18 | /* The definition of ipoptions in netinet/in.h (masquerading as ip_opts) used | ||
4832 | 19 | in smtp_in.c is for Intel DG _IX86_ABI only. You may be able to get this to | ||
4833 | 20 | work on Intel DG but it's certainly easier to skip it on M88k. This means we | ||
4834 | 21 | forego the detection of some source-routing based IP attacks. */ | ||
4835 | 22 | |||
4836 | 23 | #define NO_IP_OPTIONS | ||
4837 | 24 | |||
4838 | 25 | /* default is non-const */ | ||
4839 | 26 | #define ICONV_ARG2_TYPE const char ** | ||
4840 | 27 | |||
4841 | 28 | /* End */ | ||
4842 | diff --git a/OS/unsupported/os.h-Darwin b/OS/unsupported/os.h-Darwin | |||
4843 | 0 | new file mode 100644 | 29 | new file mode 100644 |
4844 | index 0000000..f408740 | |||
4845 | --- /dev/null | |||
4846 | +++ b/OS/unsupported/os.h-Darwin | |||
4847 | @@ -0,0 +1,48 @@ | |||
4848 | 1 | /* Exim: OS-specific C header file for Darwin (Mac OS X) */ | ||
4849 | 2 | |||
4850 | 3 | /* #define CRYPT_H */ /* Apparently this isn't needed */ | ||
4851 | 4 | |||
4852 | 5 | #define HAVE_MMAP | ||
4853 | 6 | #define HAVE_SYS_MOUNT_H | ||
4854 | 7 | #define PAM_H_IN_PAM | ||
4855 | 8 | #define SIOCGIFCONF_GIVES_ADDR | ||
4856 | 9 | |||
4857 | 10 | /* OSX 10.2 does not have poll.h, 10.3 does emulate it badly. */ | ||
4858 | 11 | #define NO_POLL_H | ||
4859 | 12 | |||
4860 | 13 | #define F_FREESP O_TRUNC | ||
4861 | 14 | typedef struct flock flock_t; | ||
4862 | 15 | |||
4863 | 16 | #define BASE_62 36 /* HFS+ aliases lower and upper cases in filenames. | ||
4864 | 17 | Consider reducing MAX_LOCALHOST_NUMBER */ | ||
4865 | 18 | |||
4866 | 19 | #ifndef _BSD_SOCKLEN_T_ | ||
4867 | 20 | #define _BSD_SOCKLEN_T_ int32_t /* socklen_t (duh) */ | ||
4868 | 21 | #endif | ||
4869 | 22 | |||
4870 | 23 | /* Settings for handling IP options. There's no netinet/ip_var.h. The IP | ||
4871 | 24 | option handling is in the style of the later GLIBCs but the GLIBC macros | ||
4872 | 25 | aren't set, so we invent a new one. */ | ||
4873 | 26 | |||
4874 | 27 | #define NO_IP_VAR_H | ||
4875 | 28 | #define DARWIN_IP_OPTIONS | ||
4876 | 29 | |||
4877 | 30 | /* Need this for the DNS lookup code. Remember to remove if we get round to | ||
4878 | 31 | updating Exim to use the newer interface. */ | ||
4879 | 32 | |||
4880 | 33 | #define BIND_8_COMPAT | ||
4881 | 34 | |||
4882 | 35 | /* It's not .so for dynamic libraries on Darwin. */ | ||
4883 | 36 | #define DYNLIB_FN_EXT "dylib" | ||
4884 | 37 | |||
4885 | 38 | /* We currently need some assistance getting OFF_T_FMT correct on MacOS */ | ||
4886 | 39 | #ifdef OFF_T_FMT | ||
4887 | 40 | # undef OFF_T_FMT | ||
4888 | 41 | #endif | ||
4889 | 42 | #define OFF_T_FMT "%lld" | ||
4890 | 43 | #define LONGLONG_T long int | ||
4891 | 44 | |||
4892 | 45 | /* default is non-const */ | ||
4893 | 46 | #define ICONV_ARG2_TYPE const char ** | ||
4894 | 47 | |||
4895 | 48 | /* End */ | ||
4896 | diff --git a/OS/unsupported/os.h-DragonFly b/OS/unsupported/os.h-DragonFly | |||
4897 | 0 | new file mode 100644 | 49 | new file mode 100644 |
4898 | index 0000000..4c2f1d5 | |||
4899 | --- /dev/null | |||
4900 | +++ b/OS/unsupported/os.h-DragonFly | |||
4901 | @@ -0,0 +1,13 @@ | |||
4902 | 1 | /* Exim: OS-specific C header file for DragonFly */ | ||
4903 | 2 | |||
4904 | 3 | #define HAVE_BSD_GETLOADAVG | ||
4905 | 4 | #define HAVE_MMAP | ||
4906 | 5 | #define HAVE_SYS_MOUNT_H | ||
4907 | 6 | #define SIOCGIFCONF_GIVES_ADDR | ||
4908 | 7 | |||
4909 | 8 | typedef struct flock flock_t; | ||
4910 | 9 | |||
4911 | 10 | /* default is non-const */ | ||
4912 | 11 | #define ICONV_ARG2_TYPE const char ** | ||
4913 | 12 | |||
4914 | 13 | /* End */ | ||
4915 | diff --git a/OS/unsupported/os.h-GNU b/OS/unsupported/os.h-GNU | |||
4916 | 0 | new file mode 100644 | 14 | new file mode 100644 |
4917 | index 0000000..4499316 | |||
4918 | --- /dev/null | |||
4919 | +++ b/OS/unsupported/os.h-GNU | |||
4920 | @@ -0,0 +1,23 @@ | |||
4921 | 1 | /* Exim: OS-specific C header file for GNU/Hurd */ | ||
4922 | 2 | |||
4923 | 3 | #define CRYPT_H | ||
4924 | 4 | #define GLIBC_IP_OPTIONS | ||
4925 | 5 | #define HAVE_BSD_GETLOADAVG | ||
4926 | 6 | #define HAVE_MMAP | ||
4927 | 7 | #define HAVE_SYS_VFS_H | ||
4928 | 8 | #define NO_IP_VAR_H | ||
4929 | 9 | #define SIG_IGN_WORKS | ||
4930 | 10 | #define SIOCGIFCONF_GIVES_ADDR | ||
4931 | 11 | |||
4932 | 12 | #define F_FREESP O_TRUNC | ||
4933 | 13 | typedef struct flock flock_t; | ||
4934 | 14 | |||
4935 | 15 | #define os_strsignal strsignal | ||
4936 | 16 | #define OS_STRSIGNAL | ||
4937 | 17 | |||
4938 | 18 | /* Hurd-specific bits below */ | ||
4939 | 19 | |||
4940 | 20 | /* default is non-const */ | ||
4941 | 21 | #define ICONV_ARG2_TYPE const char ** | ||
4942 | 22 | |||
4943 | 23 | /* End */ | ||
4944 | diff --git a/OS/unsupported/os.h-GNUkFreeBSD b/OS/unsupported/os.h-GNUkFreeBSD | |||
4945 | 0 | new file mode 100644 | 24 | new file mode 100644 |
4946 | index 0000000..ab35031 | |||
4947 | --- /dev/null | |||
4948 | +++ b/OS/unsupported/os.h-GNUkFreeBSD | |||
4949 | @@ -0,0 +1,25 @@ | |||
4950 | 1 | /* Exim: OS-specific C header file for GNU/kFreeBSD */ | ||
4951 | 2 | |||
4952 | 3 | #define CRYPT_H | ||
4953 | 4 | #define GLIBC_IP_OPTIONS | ||
4954 | 5 | #define HAVE_MMAP | ||
4955 | 6 | #define HAVE_BSD_GETLOADAVG | ||
4956 | 7 | #define HAVE_SYS_VFS_H | ||
4957 | 8 | #define NO_IP_VAR_H | ||
4958 | 9 | #define SIG_IGN_WORKS | ||
4959 | 10 | |||
4960 | 11 | #define F_FREESP O_TRUNC | ||
4961 | 12 | typedef struct flock flock_t; | ||
4962 | 13 | |||
4963 | 14 | #define os_strsignal strsignal | ||
4964 | 15 | #define OS_STRSIGNAL | ||
4965 | 16 | |||
4966 | 17 | /* kFreeBSD-specific bits below */ | ||
4967 | 18 | |||
4968 | 19 | #define HAVE_SYS_MOUNT_H | ||
4969 | 20 | #define SIOCGIFCONF_GIVES_ADDR | ||
4970 | 21 | |||
4971 | 22 | /* default is non-const */ | ||
4972 | 23 | #define ICONV_ARG2_TYPE const char ** | ||
4973 | 24 | |||
4974 | 25 | /* End */ | ||
4975 | diff --git a/OS/unsupported/os.h-GNUkNetBSD b/OS/unsupported/os.h-GNUkNetBSD | |||
4976 | 0 | new file mode 100644 | 26 | new file mode 100644 |
4977 | index 0000000..bc3bc25 | |||
4978 | --- /dev/null | |||
4979 | +++ b/OS/unsupported/os.h-GNUkNetBSD | |||
4980 | @@ -0,0 +1,25 @@ | |||
4981 | 1 | /* Exim: OS-specific C header file for GNU/kNetBSD */ | ||
4982 | 2 | |||
4983 | 3 | #define CRYPT_H | ||
4984 | 4 | #define GLIBC_IP_OPTIONS | ||
4985 | 5 | #define HAVE_MMAP | ||
4986 | 6 | #define HAVE_BSD_GETLOADAVG | ||
4987 | 7 | #define HAVE_SYS_VFS_H | ||
4988 | 8 | #define NO_IP_VAR_H | ||
4989 | 9 | #define SIG_IGN_WORKS | ||
4990 | 10 | |||
4991 | 11 | #define F_FREESP O_TRUNC | ||
4992 | 12 | typedef struct flock flock_t; | ||
4993 | 13 | |||
4994 | 14 | #define os_strsignal strsignal | ||
4995 | 15 | #define OS_STRSIGNAL | ||
4996 | 16 | |||
4997 | 17 | /* kNetBSD-specific bits below */ | ||
4998 | 18 | |||
4999 | 19 | #define HAVE_SYS_MOUNT_H | ||
5000 | 20 | #define SIOCGIFCONF_GIVES_ADDR |
The diff has been truncated for viewing.
Small fix, all formal things LGTM.
Testing instructions are good and work for me to trigger the issue.
WOrks fine with the PPA build that also upgraded fine.
I do not see additional regression potential in this, nice small helpful fix +1