From 440fb3d225b0350f7ed8b2916172a2ead3bc14f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Thu, 20 May 2021 15:53:50 +0200 Subject: [PATCH 1/2] Completely remove BIND 9 Windows support The Windows support has been completely removed from the source tree and BIND 9 now no longer supports native compilation on Windows. We might consider reviewing mingw-w64 port if contributed by external party, but no development efforts will be put into making BIND 9 compile and run on Windows again. --- .dir-locals.el | 4 - .gitlab-ci.yml | 107 +- Makefile.top | 2 - PLATFORMS.md | 21 +- README.md | 4 - bin/check/check-tool.c | 26 - bin/check/check-tool.h | 7 - bin/check/named-checkconf.c | 8 - bin/check/named-checkzone.c | 7 - bin/check/win32/checkconf.vcxproj.filters.in | 27 - bin/check/win32/checkconf.vcxproj.in | 144 - bin/check/win32/checkconf.vcxproj.user | 3 - bin/check/win32/checktool.vcxproj.filters.in | 18 - bin/check/win32/checktool.vcxproj.in | 124 - bin/check/win32/checktool.vcxproj.user | 3 - bin/check/win32/checkzone.vcxproj.filters.in | 27 - bin/check/win32/checkzone.vcxproj.in | 152 - bin/check/win32/checkzone.vcxproj.user | 3 - bin/confgen/Makefile.am | 6 +- bin/confgen/{unix => }/os.c | 0 .../win32/confgentool.vcxproj.filters.in | 39 - bin/confgen/win32/confgentool.vcxproj.in | 128 - bin/confgen/win32/confgentool.vcxproj.user | 3 - bin/confgen/win32/os.c | 25 - .../win32/rndcconfgen.vcxproj.filters.in | 18 - bin/confgen/win32/rndcconfgen.vcxproj.in | 132 - bin/confgen/win32/rndcconfgen.vcxproj.user | 3 - .../win32/tsigkeygen.vcxproj.filters.in | 18 - bin/confgen/win32/tsigkeygen.vcxproj.in | 143 - bin/confgen/win32/tsigkeygen.vcxproj.user | 3 - bin/delv/delv.c | 26 +- bin/delv/win32/delv.vcxproj.filters.in | 22 - bin/delv/win32/delv.vcxproj.in | 133 - bin/delv/win32/delv.vcxproj.user | 3 - bin/dig/dig.c | 16 - bin/dig/win32/dig.vcxproj.filters.in | 27 - bin/dig/win32/dig.vcxproj.in | 142 - bin/dig/win32/dig.vcxproj.user | 3 - bin/dig/win32/dighost.vcxproj.filters.in | 18 - bin/dig/win32/dighost.vcxproj.in | 132 - bin/dig/win32/dighost.vcxproj.user | 3 - bin/dig/win32/host.vcxproj.filters.in | 18 - bin/dig/win32/host.vcxproj.in | 139 - bin/dig/win32/host.vcxproj.user | 3 - bin/dig/win32/nslookup.vcxproj.filters.in | 21 - bin/dig/win32/nslookup.vcxproj.in | 140 - bin/dig/win32/nslookup.vcxproj.user | 3 - bin/dnssec/dnssec-signzone.c | 7 - bin/dnssec/dnssectool.c | 26 - bin/dnssec/dnssectool.h | 7 - bin/dnssec/win32/cds.vcxproj.filters.in | 18 - bin/dnssec/win32/cds.vcxproj.in | 132 - bin/dnssec/win32/cds.vcxproj.user | 3 - .../win32/dnssectool.vcxproj.filters.in | 27 - bin/dnssec/win32/dnssectool.vcxproj.in | 126 - bin/dnssec/win32/dnssectool.vcxproj.user | 3 - bin/dnssec/win32/dsfromkey.vcxproj.filters.in | 18 - bin/dnssec/win32/dsfromkey.vcxproj.in | 158 - bin/dnssec/win32/dsfromkey.vcxproj.user | 3 - bin/dnssec/win32/importkey.vcxproj.filters.in | 18 - bin/dnssec/win32/importkey.vcxproj.in | 132 - bin/dnssec/win32/importkey.vcxproj.user | 3 - .../win32/keyfromlabel.vcxproj.filters.in | 18 - bin/dnssec/win32/keyfromlabel.vcxproj.in | 132 - bin/dnssec/win32/keyfromlabel.vcxproj.user | 3 - bin/dnssec/win32/keygen.vcxproj.filters.in | 18 - bin/dnssec/win32/keygen.vcxproj.in | 135 - bin/dnssec/win32/keygen.vcxproj.user | 3 - bin/dnssec/win32/revoke.vcxproj.filters.in | 18 - bin/dnssec/win32/revoke.vcxproj.in | 132 - bin/dnssec/win32/revoke.vcxproj.user | 3 - bin/dnssec/win32/settime.vcxproj.filters.in | 18 - bin/dnssec/win32/settime.vcxproj.in | 132 - bin/dnssec/win32/settime.vcxproj.user | 3 - bin/dnssec/win32/signzone.vcxproj.filters.in | 18 - bin/dnssec/win32/signzone.vcxproj.in | 132 - bin/dnssec/win32/signzone.vcxproj.user | 3 - bin/dnssec/win32/verify.vcxproj.filters.in | 18 - bin/dnssec/win32/verify.vcxproj.in | 132 - bin/dnssec/win32/verify.vcxproj.user | 3 - bin/named/Makefile.am | 7 +- bin/named/config.c | 20 +- bin/named/controlconf.c | 2 - bin/named/{unix => }/dlz_dlopen_driver.c | 0 bin/named/include/named/main.h | 2 +- bin/named/{unix => }/include/named/os.h | 0 bin/named/main.c | 21 +- bin/named/named.rst | 3 +- bin/named/{unix => }/os.c | 0 bin/named/unix/include/.clang-format | 1 - bin/named/win32/dlz_dlopen_driver.c | 567 --- bin/named/win32/include/.clang-format | 1 - bin/named/win32/include/named/ntservice.h | 29 - bin/named/win32/include/named/os.h | 76 - bin/named/win32/named.vcxproj.filters.in | 133 - bin/named/win32/named.vcxproj.in | 194 - bin/named/win32/named.vcxproj.user | 3 - bin/named/win32/ntservice.c | 175 - bin/named/win32/os.c | 471 -- .../win32/nsupdate.vcxproj.filters.in | 18 - bin/nsupdate/win32/nsupdate.vcxproj.in | 136 - bin/nsupdate/win32/nsupdate.vcxproj.user | 3 - bin/pkcs11/pkcs11-destroy.c | 4 - .../win32/pk11destroy.vcxproj.filters.in | 22 - bin/pkcs11/win32/pk11destroy.vcxproj.in | 126 - bin/pkcs11/win32/pk11destroy.vcxproj.user | 3 - .../win32/pk11keygen.vcxproj.filters.in | 22 - bin/pkcs11/win32/pk11keygen.vcxproj.in | 126 - bin/pkcs11/win32/pk11keygen.vcxproj.user | 3 - bin/pkcs11/win32/pk11list.vcxproj.filters.in | 22 - bin/pkcs11/win32/pk11list.vcxproj.in | 126 - bin/pkcs11/win32/pk11list.vcxproj.user | 3 - .../win32/pk11tokens.vcxproj.filters.in | 22 - bin/pkcs11/win32/pk11tokens.vcxproj.in | 126 - bin/pkcs11/win32/pk11tokens.vcxproj.user | 3 - bin/rndc/win32/rndc.vcxproj.filters.in | 30 - bin/rndc/win32/rndc.vcxproj.in | 140 - bin/rndc/win32/rndc.vcxproj.user | 3 - bin/tests/system/README | 10 +- bin/tests/system/conf.sh.common | 56 +- bin/tests/system/conf.sh.in | 2 +- bin/tests/system/conf.sh.win32 | 117 - bin/tests/system/feature-test.c | 28 +- bin/tests/system/resolve.c | 9 +- .../system/win32/bigkey.vcxproj.filters.in | 22 - bin/tests/system/win32/bigkey.vcxproj.in | 127 - bin/tests/system/win32/bigkey.vcxproj.user | 3 - .../win32/feature-test.vcxproj.filters.in | 22 - .../system/win32/feature-test.vcxproj.in | 124 - .../system/win32/feature-test.vcxproj.user | 3 - .../system/win32/gencheck.vcxproj.filters.in | 22 - bin/tests/system/win32/gencheck.vcxproj.in | 124 - bin/tests/system/win32/gencheck.vcxproj.user | 3 - .../system/win32/keycreate.vcxproj.filters.in | 22 - bin/tests/system/win32/keycreate.vcxproj.in | 127 - bin/tests/system/win32/keycreate.vcxproj.user | 3 - .../system/win32/keydelete.vcxproj.filters.in | 22 - bin/tests/system/win32/keydelete.vcxproj.in | 127 - bin/tests/system/win32/keydelete.vcxproj.user | 3 - .../win32/makejournal.vcxproj.filters.in | 18 - bin/tests/system/win32/makejournal.vcxproj.in | 127 - .../system/win32/makejournal.vcxproj.user | 3 - .../win32/pipequeries.vcxproj.filters.in | 22 - bin/tests/system/win32/pipequeries.vcxproj.in | 127 - .../system/win32/pipequeries.vcxproj.user | 3 - .../system/win32/resolve.vcxproj.filters.in | 22 - bin/tests/system/win32/resolve.vcxproj.in | 130 - bin/tests/system/win32/resolve.vcxproj.user | 3 - bin/tools/win32/arpaname.vcxproj.filters.in | 22 - bin/tools/win32/arpaname.vcxproj.in | 124 - bin/tools/win32/arpaname.vcxproj.user | 3 - .../win32/journalprint.vcxproj.filters.in | 18 - bin/tools/win32/journalprint.vcxproj.in | 129 - bin/tools/win32/journalprint.vcxproj.user | 3 - bin/tools/win32/mdig.vcxproj.filters.in | 18 - bin/tools/win32/mdig.vcxproj.in | 130 - bin/tools/win32/mdig.vcxproj.user | 3 - bin/tools/win32/nsec3hash.vcxproj.filters.in | 18 - bin/tools/win32/nsec3hash.vcxproj.in | 127 - bin/tools/win32/nsec3hash.vcxproj.user | 3 - bin/tools/win32/rrchecker.vcxproj.filters.in | 18 - bin/tools/win32/rrchecker.vcxproj.in | 129 - bin/tools/win32/rrchecker.vcxproj.user | 3 - bin/win32/BINDInstall/AccountInfo.cpp | 463 -- bin/win32/BINDInstall/AccountInfo.h | 42 - bin/win32/BINDInstall/BINDInstall.cpp | 98 - bin/win32/BINDInstall/BINDInstall.h | 56 - bin/win32/BINDInstall/BINDInstall.rc | 325 -- .../BINDInstall.vcxproj.filters.in | 79 - bin/win32/BINDInstall/BINDInstall.vcxproj.in | 311 -- .../BINDInstall/BINDInstall.vcxproj.user | 3 - bin/win32/BINDInstall/BINDInstallDlg.cpp | 1593 ------- bin/win32/BINDInstall/BINDInstallDlg.h | 165 - bin/win32/BINDInstall/DirBrowse.cpp | 96 - bin/win32/BINDInstall/DirBrowse.h | 72 - bin/win32/BINDInstall/StdAfx.cpp | 8 - bin/win32/BINDInstall/StdAfx.h | 38 - bin/win32/BINDInstall/VersionInfo.cpp | 291 -- bin/win32/BINDInstall/VersionInfo.h | 91 - bin/win32/BINDInstall/res/BINDInstall.ico | Bin 1078 -> 0 bytes bin/win32/BINDInstall/res/BINDInstall.rc2 | 13 - bin/win32/BINDInstall/resource.h | 105 - config.h.win32 | 395 -- configure.ac | 2 +- conftools/perllib/dnsconf/Makefile.PL | 2 +- contrib/dlz/example/dlz_example.c | 4 +- contrib/dlz/example/win32/DLLMain.c | 45 - contrib/dlz/example/win32/dxdriver.def | 20 - contrib/dlz/example/win32/dxdriver.dsp | 121 - contrib/dlz/example/win32/dxdriver.dsw | 29 - contrib/dlz/example/win32/dxdriver.mak | 298 -- contrib/dlz/modules/include/dlz_minimal.h | 12 +- doc/arm/notes.rst | 3 +- doc/arm/reference.rst | 7 +- doc/design/windows-nt | 138 - doc/dev/style.md | 3 - doc/doxygen/Doxyfile.in | 2 +- doc/man/named.8in | 3 +- lib/bind9/win32/DLLMain.c | 47 - lib/bind9/win32/libbind9.def | 8 - lib/bind9/win32/libbind9.vcxproj.filters.in | 39 - lib/bind9/win32/libbind9.vcxproj.in | 146 - lib/bind9/win32/libbind9.vcxproj.user | 3 - lib/dns/Makefile.am | 5 +- lib/dns/dst_api.c | 6 - lib/dns/dst_parse.c | 6 - lib/dns/gen-win32.h | 299 -- lib/dns/gen.c | 19 +- lib/dns/{gen-unix.h => gen.h} | 0 lib/dns/geoip2.c | 9 +- lib/dns/gssapictx.c | 2 +- lib/dns/hmac_link.c | 4 +- lib/dns/journal.c | 3 +- lib/dns/opensslrsa_link.c | 8 - lib/dns/rbtdb.c | 12 +- lib/dns/rdata/in_1/wks_11.c | 25 - lib/dns/ssu_external.c | 7 +- lib/dns/win32/DLLMain.c | 47 - lib/dns/win32/gen.vcxproj.filters.in | 27 - lib/dns/win32/gen.vcxproj.in | 134 - lib/dns/win32/gen.vcxproj.user | 3 - lib/dns/win32/libdns.def.in | 1528 ------- lib/dns/win32/libdns.vcxproj.filters.in | 652 --- lib/dns/win32/libdns.vcxproj.in | 350 -- lib/dns/win32/libdns.vcxproj.user | 3 - lib/irs/resconf.c | 21 +- lib/irs/win32/DLLMain.c | 47 - lib/irs/win32/include/.clang-format | 1 - lib/irs/win32/include/irs/.gitignore | 1 - lib/irs/win32/libirs.def | 9 - lib/irs/win32/libirs.vcxproj.filters.in | 33 - lib/irs/win32/libirs.vcxproj.in | 140 - lib/irs/win32/libirs.vcxproj.user | 3 - lib/irs/win32/resconf.c | 127 - lib/isc/Makefile.am | 111 +- lib/isc/app.c | 96 +- lib/isc/assertions.c | 4 - lib/isc/backtrace.c | 171 +- lib/isc/{pthreads => }/condition.c | 0 lib/isc/{unix => }/dir.c | 0 lib/isc/{unix => }/errno.c | 0 lib/isc/{unix => }/errno2result.c | 0 lib/isc/{unix => }/errno2result.h | 0 lib/isc/{unix => }/file.c | 0 lib/isc/{unix => }/fsaccess.c | 0 lib/isc/glob.c | 194 +- lib/isc/hash.c | 3 - lib/isc/{unix => }/include/isc/align.h | 0 lib/isc/include/isc/attributes.h | 10 +- lib/isc/include/isc/barrier.h | 2 +- .../{pthreads => }/include/isc/condition.h | 0 lib/isc/{unix => }/include/isc/dir.h | 0 lib/isc/include/isc/endian.h | 24 - lib/isc/{pthreads => }/include/isc/mutex.h | 0 lib/isc/{unix => }/include/isc/net.h | 0 lib/isc/include/isc/netaddr.h | 6 +- lib/isc/{unix => }/include/isc/netdb.h | 0 lib/isc/{unix => }/include/isc/offset.h | 0 lib/isc/{pthreads => }/include/isc/once.h | 0 lib/isc/include/isc/sockaddr.h | 7 +- lib/isc/{unix => }/include/isc/stat.h | 0 lib/isc/{unix => }/include/isc/stdatomic.h | 0 lib/isc/{unix => }/include/isc/stdtime.h | 0 lib/isc/{unix => }/include/isc/syslog.h | 0 lib/isc/{pthreads => }/include/isc/thread.h | 0 lib/isc/{unix => }/include/isc/time.h | 0 lib/isc/include/isc/types.h | 10 +- lib/isc/include/isc/util.h | 2 +- lib/isc/{unix => }/interfaceiter.c | 0 lib/isc/lib_p.h | 18 - lib/isc/log.c | 24 - lib/isc/{unix => }/meminfo.c | 0 lib/isc/{pthreads => }/mutex.c | 0 lib/isc/{unix => }/net.c | 2 - lib/isc/netaddr.c | 12 - lib/isc/netmgr/http.c | 2 - lib/isc/netmgr/netmgr-int.h | 6 - lib/isc/netmgr/netmgr.c | 80 +- lib/isc/netmgr/tcp.c | 12 +- lib/isc/netmgr/tcpdns.c | 12 +- lib/isc/netmgr/tlsdns.c | 12 +- lib/isc/netmgr/udp.c | 18 +- lib/isc/netmgr/uv-compat.c | 12 - lib/isc/{unix => }/os.c | 0 lib/isc/pk11.c | 4 - lib/isc/{unix => }/pk11_api.c | 0 lib/isc/pthreads/include/.clang-format | 1 - lib/isc/{unix => }/resource.c | 0 lib/isc/sockaddr.c | 13 - lib/isc/{unix => }/socket.c | 13 - lib/isc/socket_p.h | 4 - lib/isc/stats.c | 4 - lib/isc/{unix => }/stdio.c | 0 lib/isc/{unix => }/stdtime.c | 0 lib/isc/string.c | 4 - lib/isc/{unix => }/syslog.c | 0 lib/isc/tests/task_test.c | 8 - lib/isc/{pthreads => }/thread.c | 0 lib/isc/{unix => }/time.c | 0 lib/isc/timer.c | 5 +- lib/isc/trampoline_p.h | 2 +- lib/isc/unix/include/.clang-format | 1 - lib/isc/win32/.dir-locals.el | 35 - lib/isc/win32/DLLMain.c | 51 - lib/isc/win32/condition.c | 254 -- lib/isc/win32/dir.c | 309 -- lib/isc/win32/errno.c | 19 - lib/isc/win32/errno2result.c | 116 - lib/isc/win32/errno2result.h | 33 - lib/isc/win32/file.c | 998 ----- lib/isc/win32/fsaccess.c | 399 -- lib/isc/win32/include/.clang-format | 1 - lib/isc/win32/include/isc/align.h | 13 - lib/isc/win32/include/isc/bind_registry.h | 40 - lib/isc/win32/include/isc/bindevt.h | 81 - lib/isc/win32/include/isc/condition.h | 58 - lib/isc/win32/include/isc/dir.h | 71 - lib/isc/win32/include/isc/ipv6.h | 128 - lib/isc/win32/include/isc/mutex.h | 45 - lib/isc/win32/include/isc/net.h | 398 -- lib/isc/win32/include/isc/netdb.h | 46 - lib/isc/win32/include/isc/ntgroups.h | 26 - lib/isc/win32/include/isc/ntpaths.h | 64 - lib/isc/win32/include/isc/offset.h | 24 - lib/isc/win32/include/isc/once.h | 38 - lib/isc/win32/include/isc/platform.h.in | 105 - lib/isc/win32/include/isc/stat.h | 56 - lib/isc/win32/include/isc/stdatomic.h | 601 --- lib/isc/win32/include/isc/stdtime.h | 60 - lib/isc/win32/include/isc/syslog.h | 37 - lib/isc/win32/include/isc/thread.h | 97 - lib/isc/win32/include/isc/time.h | 466 -- lib/isc/win32/include/isc/win32os.h | 39 - lib/isc/win32/interfaceiter.c | 547 --- lib/isc/win32/ipv6.c | 16 - lib/isc/win32/libgen.h | 20 - lib/isc/win32/libisc.def.exclude | 42 - lib/isc/win32/libisc.def.in | 806 ---- lib/isc/win32/libisc.vcxproj.filters.in | 650 --- lib/isc/win32/libisc.vcxproj.in | 494 --- lib/isc/win32/libisc.vcxproj.user | 3 - lib/isc/win32/meminfo.c | 24 - lib/isc/win32/net.c | 296 -- lib/isc/win32/netdb.h | 180 - lib/isc/win32/ntgroups.c | 211 - lib/isc/win32/ntpaths.c | 149 - lib/isc/win32/once.c | 41 - lib/isc/win32/os.c | 39 - lib/isc/win32/pk11_api.c | 704 --- lib/isc/win32/resource.c | 64 - lib/isc/win32/socket.c | 3951 ----------------- lib/isc/win32/stdio.c | 156 - lib/isc/win32/stdtime.c | 41 - lib/isc/win32/syslog.c | 169 - lib/isc/win32/syslog.h | 68 - lib/isc/win32/thread.c | 80 - lib/isc/win32/time.c | 649 --- lib/isc/win32/unistd.h | 52 - lib/isc/win32/win32os.c | 111 - lib/isccc/win32/DLLMain.c | 47 - lib/isccc/win32/libisccc.def | 65 - lib/isccc/win32/libisccc.vcxproj.filters.in | 81 - lib/isccc/win32/libisccc.vcxproj.in | 151 - lib/isccc/win32/libisccc.vcxproj.user | 3 - lib/isccfg/win32/DLLMain.c | 49 - lib/isccfg/win32/libisccfg.def | 175 - lib/isccfg/win32/libisccfg.vcxproj.filters.in | 63 - lib/isccfg/win32/libisccfg.vcxproj.in | 148 - lib/isccfg/win32/libisccfg.vcxproj.user | 3 - lib/ns/client.c | 5 - lib/ns/hooks.c | 7 - lib/ns/include/ns/client.h | 4 - lib/ns/include/ns/hooks.h | 2 - lib/ns/tests/plugin_test.c | 6 - lib/ns/win32/DLLMain.c | 47 - lib/ns/win32/libns.def | 110 - lib/ns/win32/libns.vcxproj.filters | 108 - lib/ns/win32/libns.vcxproj.in | 162 - lib/ns/win32/libns.vcxproj.user | 3 - lib/win32/bindevt/bindevt.c | 21 - lib/win32/bindevt/bindevt.mc | 39 - lib/win32/bindevt/bindevt.vcxproj.filters.in | 12 - lib/win32/bindevt/bindevt.vcxproj.in | 142 - lib/win32/bindevt/bindevt.vcxproj.user | 3 - util/check-includes.pl | 8 +- util/check-instincludes.sh | 2 +- util/check-make-install.in | 1 - util/check-win32util-configure | 31 - util/checklibs.sh | 65 +- util/copyrights | 335 +- util/kit.sh | 11 - util/nt-kit | 180 - util/unused-headers.sh | 2 +- win32utils/Configure | 2707 ----------- win32utils/GeoIP.diff | 345 -- win32utils/bind9.sln.in | 329 -- win32utils/build.txt | 246 - win32utils/readme1st.txt | 145 - 398 files changed, 222 insertions(+), 38006 deletions(-) delete mode 100644 bin/check/win32/checkconf.vcxproj.filters.in delete mode 100644 bin/check/win32/checkconf.vcxproj.in delete mode 100644 bin/check/win32/checkconf.vcxproj.user delete mode 100644 bin/check/win32/checktool.vcxproj.filters.in delete mode 100644 bin/check/win32/checktool.vcxproj.in delete mode 100644 bin/check/win32/checktool.vcxproj.user delete mode 100644 bin/check/win32/checkzone.vcxproj.filters.in delete mode 100644 bin/check/win32/checkzone.vcxproj.in delete mode 100644 bin/check/win32/checkzone.vcxproj.user rename bin/confgen/{unix => }/os.c (100%) delete mode 100644 bin/confgen/win32/confgentool.vcxproj.filters.in delete mode 100644 bin/confgen/win32/confgentool.vcxproj.in delete mode 100644 bin/confgen/win32/confgentool.vcxproj.user delete mode 100644 bin/confgen/win32/os.c delete mode 100644 bin/confgen/win32/rndcconfgen.vcxproj.filters.in delete mode 100644 bin/confgen/win32/rndcconfgen.vcxproj.in delete mode 100644 bin/confgen/win32/rndcconfgen.vcxproj.user delete mode 100644 bin/confgen/win32/tsigkeygen.vcxproj.filters.in delete mode 100644 bin/confgen/win32/tsigkeygen.vcxproj.in delete mode 100644 bin/confgen/win32/tsigkeygen.vcxproj.user delete mode 100644 bin/delv/win32/delv.vcxproj.filters.in delete mode 100644 bin/delv/win32/delv.vcxproj.in delete mode 100644 bin/delv/win32/delv.vcxproj.user delete mode 100644 bin/dig/win32/dig.vcxproj.filters.in delete mode 100644 bin/dig/win32/dig.vcxproj.in delete mode 100644 bin/dig/win32/dig.vcxproj.user delete mode 100644 bin/dig/win32/dighost.vcxproj.filters.in delete mode 100644 bin/dig/win32/dighost.vcxproj.in delete mode 100644 bin/dig/win32/dighost.vcxproj.user delete mode 100644 bin/dig/win32/host.vcxproj.filters.in delete mode 100644 bin/dig/win32/host.vcxproj.in delete mode 100644 bin/dig/win32/host.vcxproj.user delete mode 100644 bin/dig/win32/nslookup.vcxproj.filters.in delete mode 100644 bin/dig/win32/nslookup.vcxproj.in delete mode 100644 bin/dig/win32/nslookup.vcxproj.user delete mode 100644 bin/dnssec/win32/cds.vcxproj.filters.in delete mode 100644 bin/dnssec/win32/cds.vcxproj.in delete mode 100644 bin/dnssec/win32/cds.vcxproj.user delete mode 100644 bin/dnssec/win32/dnssectool.vcxproj.filters.in delete mode 100644 bin/dnssec/win32/dnssectool.vcxproj.in delete mode 100644 bin/dnssec/win32/dnssectool.vcxproj.user delete mode 100644 bin/dnssec/win32/dsfromkey.vcxproj.filters.in delete mode 100644 bin/dnssec/win32/dsfromkey.vcxproj.in delete mode 100644 bin/dnssec/win32/dsfromkey.vcxproj.user delete mode 100644 bin/dnssec/win32/importkey.vcxproj.filters.in delete mode 100644 bin/dnssec/win32/importkey.vcxproj.in delete mode 100644 bin/dnssec/win32/importkey.vcxproj.user delete mode 100644 bin/dnssec/win32/keyfromlabel.vcxproj.filters.in delete mode 100644 bin/dnssec/win32/keyfromlabel.vcxproj.in delete mode 100644 bin/dnssec/win32/keyfromlabel.vcxproj.user delete mode 100644 bin/dnssec/win32/keygen.vcxproj.filters.in delete mode 100644 bin/dnssec/win32/keygen.vcxproj.in delete mode 100644 bin/dnssec/win32/keygen.vcxproj.user delete mode 100644 bin/dnssec/win32/revoke.vcxproj.filters.in delete mode 100644 bin/dnssec/win32/revoke.vcxproj.in delete mode 100644 bin/dnssec/win32/revoke.vcxproj.user delete mode 100644 bin/dnssec/win32/settime.vcxproj.filters.in delete mode 100644 bin/dnssec/win32/settime.vcxproj.in delete mode 100644 bin/dnssec/win32/settime.vcxproj.user delete mode 100644 bin/dnssec/win32/signzone.vcxproj.filters.in delete mode 100644 bin/dnssec/win32/signzone.vcxproj.in delete mode 100644 bin/dnssec/win32/signzone.vcxproj.user delete mode 100644 bin/dnssec/win32/verify.vcxproj.filters.in delete mode 100644 bin/dnssec/win32/verify.vcxproj.in delete mode 100644 bin/dnssec/win32/verify.vcxproj.user rename bin/named/{unix => }/dlz_dlopen_driver.c (100%) rename bin/named/{unix => }/include/named/os.h (100%) rename bin/named/{unix => }/os.c (100%) delete mode 120000 bin/named/unix/include/.clang-format delete mode 100644 bin/named/win32/dlz_dlopen_driver.c delete mode 120000 bin/named/win32/include/.clang-format delete mode 100644 bin/named/win32/include/named/ntservice.h delete mode 100644 bin/named/win32/include/named/os.h delete mode 100644 bin/named/win32/named.vcxproj.filters.in delete mode 100644 bin/named/win32/named.vcxproj.in delete mode 100644 bin/named/win32/named.vcxproj.user delete mode 100644 bin/named/win32/ntservice.c delete mode 100644 bin/named/win32/os.c delete mode 100644 bin/nsupdate/win32/nsupdate.vcxproj.filters.in delete mode 100644 bin/nsupdate/win32/nsupdate.vcxproj.in delete mode 100644 bin/nsupdate/win32/nsupdate.vcxproj.user delete mode 100644 bin/pkcs11/win32/pk11destroy.vcxproj.filters.in delete mode 100644 bin/pkcs11/win32/pk11destroy.vcxproj.in delete mode 100644 bin/pkcs11/win32/pk11destroy.vcxproj.user delete mode 100644 bin/pkcs11/win32/pk11keygen.vcxproj.filters.in delete mode 100644 bin/pkcs11/win32/pk11keygen.vcxproj.in delete mode 100644 bin/pkcs11/win32/pk11keygen.vcxproj.user delete mode 100644 bin/pkcs11/win32/pk11list.vcxproj.filters.in delete mode 100644 bin/pkcs11/win32/pk11list.vcxproj.in delete mode 100644 bin/pkcs11/win32/pk11list.vcxproj.user delete mode 100644 bin/pkcs11/win32/pk11tokens.vcxproj.filters.in delete mode 100644 bin/pkcs11/win32/pk11tokens.vcxproj.in delete mode 100644 bin/pkcs11/win32/pk11tokens.vcxproj.user delete mode 100644 bin/rndc/win32/rndc.vcxproj.filters.in delete mode 100644 bin/rndc/win32/rndc.vcxproj.in delete mode 100644 bin/rndc/win32/rndc.vcxproj.user delete mode 100644 bin/tests/system/conf.sh.win32 delete mode 100644 bin/tests/system/win32/bigkey.vcxproj.filters.in delete mode 100644 bin/tests/system/win32/bigkey.vcxproj.in delete mode 100644 bin/tests/system/win32/bigkey.vcxproj.user delete mode 100644 bin/tests/system/win32/feature-test.vcxproj.filters.in delete mode 100644 bin/tests/system/win32/feature-test.vcxproj.in delete mode 100644 bin/tests/system/win32/feature-test.vcxproj.user delete mode 100644 bin/tests/system/win32/gencheck.vcxproj.filters.in delete mode 100644 bin/tests/system/win32/gencheck.vcxproj.in delete mode 100644 bin/tests/system/win32/gencheck.vcxproj.user delete mode 100644 bin/tests/system/win32/keycreate.vcxproj.filters.in delete mode 100644 bin/tests/system/win32/keycreate.vcxproj.in delete mode 100644 bin/tests/system/win32/keycreate.vcxproj.user delete mode 100644 bin/tests/system/win32/keydelete.vcxproj.filters.in delete mode 100644 bin/tests/system/win32/keydelete.vcxproj.in delete mode 100644 bin/tests/system/win32/keydelete.vcxproj.user delete mode 100644 bin/tests/system/win32/makejournal.vcxproj.filters.in delete mode 100644 bin/tests/system/win32/makejournal.vcxproj.in delete mode 100644 bin/tests/system/win32/makejournal.vcxproj.user delete mode 100644 bin/tests/system/win32/pipequeries.vcxproj.filters.in delete mode 100644 bin/tests/system/win32/pipequeries.vcxproj.in delete mode 100644 bin/tests/system/win32/pipequeries.vcxproj.user delete mode 100644 bin/tests/system/win32/resolve.vcxproj.filters.in delete mode 100644 bin/tests/system/win32/resolve.vcxproj.in delete mode 100644 bin/tests/system/win32/resolve.vcxproj.user delete mode 100644 bin/tools/win32/arpaname.vcxproj.filters.in delete mode 100644 bin/tools/win32/arpaname.vcxproj.in delete mode 100644 bin/tools/win32/arpaname.vcxproj.user delete mode 100644 bin/tools/win32/journalprint.vcxproj.filters.in delete mode 100644 bin/tools/win32/journalprint.vcxproj.in delete mode 100644 bin/tools/win32/journalprint.vcxproj.user delete mode 100644 bin/tools/win32/mdig.vcxproj.filters.in delete mode 100644 bin/tools/win32/mdig.vcxproj.in delete mode 100644 bin/tools/win32/mdig.vcxproj.user delete mode 100644 bin/tools/win32/nsec3hash.vcxproj.filters.in delete mode 100644 bin/tools/win32/nsec3hash.vcxproj.in delete mode 100644 bin/tools/win32/nsec3hash.vcxproj.user delete mode 100644 bin/tools/win32/rrchecker.vcxproj.filters.in delete mode 100644 bin/tools/win32/rrchecker.vcxproj.in delete mode 100644 bin/tools/win32/rrchecker.vcxproj.user delete mode 100644 bin/win32/BINDInstall/AccountInfo.cpp delete mode 100644 bin/win32/BINDInstall/AccountInfo.h delete mode 100644 bin/win32/BINDInstall/BINDInstall.cpp delete mode 100644 bin/win32/BINDInstall/BINDInstall.h delete mode 100644 bin/win32/BINDInstall/BINDInstall.rc delete mode 100644 bin/win32/BINDInstall/BINDInstall.vcxproj.filters.in delete mode 100644 bin/win32/BINDInstall/BINDInstall.vcxproj.in delete mode 100644 bin/win32/BINDInstall/BINDInstall.vcxproj.user delete mode 100644 bin/win32/BINDInstall/BINDInstallDlg.cpp delete mode 100644 bin/win32/BINDInstall/BINDInstallDlg.h delete mode 100644 bin/win32/BINDInstall/DirBrowse.cpp delete mode 100644 bin/win32/BINDInstall/DirBrowse.h delete mode 100644 bin/win32/BINDInstall/StdAfx.cpp delete mode 100644 bin/win32/BINDInstall/StdAfx.h delete mode 100644 bin/win32/BINDInstall/VersionInfo.cpp delete mode 100644 bin/win32/BINDInstall/VersionInfo.h delete mode 100644 bin/win32/BINDInstall/res/BINDInstall.ico delete mode 100644 bin/win32/BINDInstall/res/BINDInstall.rc2 delete mode 100644 bin/win32/BINDInstall/resource.h delete mode 100644 config.h.win32 delete mode 100644 contrib/dlz/example/win32/DLLMain.c delete mode 100644 contrib/dlz/example/win32/dxdriver.def delete mode 100644 contrib/dlz/example/win32/dxdriver.dsp delete mode 100644 contrib/dlz/example/win32/dxdriver.dsw delete mode 100644 contrib/dlz/example/win32/dxdriver.mak delete mode 100644 doc/design/windows-nt delete mode 100644 lib/bind9/win32/DLLMain.c delete mode 100644 lib/bind9/win32/libbind9.def delete mode 100644 lib/bind9/win32/libbind9.vcxproj.filters.in delete mode 100644 lib/bind9/win32/libbind9.vcxproj.in delete mode 100644 lib/bind9/win32/libbind9.vcxproj.user delete mode 100644 lib/dns/gen-win32.h rename lib/dns/{gen-unix.h => gen.h} (100%) delete mode 100644 lib/dns/win32/DLLMain.c delete mode 100644 lib/dns/win32/gen.vcxproj.filters.in delete mode 100644 lib/dns/win32/gen.vcxproj.in delete mode 100644 lib/dns/win32/gen.vcxproj.user delete mode 100644 lib/dns/win32/libdns.def.in delete mode 100644 lib/dns/win32/libdns.vcxproj.filters.in delete mode 100644 lib/dns/win32/libdns.vcxproj.in delete mode 100644 lib/dns/win32/libdns.vcxproj.user delete mode 100644 lib/irs/win32/DLLMain.c delete mode 120000 lib/irs/win32/include/.clang-format delete mode 100644 lib/irs/win32/include/irs/.gitignore delete mode 100644 lib/irs/win32/libirs.def delete mode 100644 lib/irs/win32/libirs.vcxproj.filters.in delete mode 100644 lib/irs/win32/libirs.vcxproj.in delete mode 100644 lib/irs/win32/libirs.vcxproj.user delete mode 100644 lib/irs/win32/resconf.c rename lib/isc/{pthreads => }/condition.c (100%) rename lib/isc/{unix => }/dir.c (100%) rename lib/isc/{unix => }/errno.c (100%) rename lib/isc/{unix => }/errno2result.c (100%) rename lib/isc/{unix => }/errno2result.h (100%) rename lib/isc/{unix => }/file.c (100%) rename lib/isc/{unix => }/fsaccess.c (100%) rename lib/isc/{unix => }/include/isc/align.h (100%) rename lib/isc/{pthreads => }/include/isc/condition.h (100%) rename lib/isc/{unix => }/include/isc/dir.h (100%) rename lib/isc/{pthreads => }/include/isc/mutex.h (100%) rename lib/isc/{unix => }/include/isc/net.h (100%) rename lib/isc/{unix => }/include/isc/netdb.h (100%) rename lib/isc/{unix => }/include/isc/offset.h (100%) rename lib/isc/{pthreads => }/include/isc/once.h (100%) rename lib/isc/{unix => }/include/isc/stat.h (100%) rename lib/isc/{unix => }/include/isc/stdatomic.h (100%) rename lib/isc/{unix => }/include/isc/stdtime.h (100%) rename lib/isc/{unix => }/include/isc/syslog.h (100%) rename lib/isc/{pthreads => }/include/isc/thread.h (100%) rename lib/isc/{unix => }/include/isc/time.h (100%) rename lib/isc/{unix => }/interfaceiter.c (100%) delete mode 100644 lib/isc/lib_p.h rename lib/isc/{unix => }/meminfo.c (100%) rename lib/isc/{pthreads => }/mutex.c (100%) rename lib/isc/{unix => }/net.c (99%) rename lib/isc/{unix => }/os.c (100%) rename lib/isc/{unix => }/pk11_api.c (100%) delete mode 120000 lib/isc/pthreads/include/.clang-format rename lib/isc/{unix => }/resource.c (100%) rename lib/isc/{unix => }/socket.c (99%) rename lib/isc/{unix => }/stdio.c (100%) rename lib/isc/{unix => }/stdtime.c (100%) rename lib/isc/{unix => }/syslog.c (100%) rename lib/isc/{pthreads => }/thread.c (100%) rename lib/isc/{unix => }/time.c (100%) delete mode 120000 lib/isc/unix/include/.clang-format delete mode 100644 lib/isc/win32/.dir-locals.el delete mode 100644 lib/isc/win32/DLLMain.c delete mode 100644 lib/isc/win32/condition.c delete mode 100644 lib/isc/win32/dir.c delete mode 100644 lib/isc/win32/errno.c delete mode 100644 lib/isc/win32/errno2result.c delete mode 100644 lib/isc/win32/errno2result.h delete mode 100644 lib/isc/win32/file.c delete mode 100644 lib/isc/win32/fsaccess.c delete mode 120000 lib/isc/win32/include/.clang-format delete mode 100644 lib/isc/win32/include/isc/align.h delete mode 100644 lib/isc/win32/include/isc/bind_registry.h delete mode 100644 lib/isc/win32/include/isc/bindevt.h delete mode 100644 lib/isc/win32/include/isc/condition.h delete mode 100644 lib/isc/win32/include/isc/dir.h delete mode 100644 lib/isc/win32/include/isc/ipv6.h delete mode 100644 lib/isc/win32/include/isc/mutex.h delete mode 100644 lib/isc/win32/include/isc/net.h delete mode 100644 lib/isc/win32/include/isc/netdb.h delete mode 100644 lib/isc/win32/include/isc/ntgroups.h delete mode 100644 lib/isc/win32/include/isc/ntpaths.h delete mode 100644 lib/isc/win32/include/isc/offset.h delete mode 100644 lib/isc/win32/include/isc/once.h delete mode 100644 lib/isc/win32/include/isc/platform.h.in delete mode 100644 lib/isc/win32/include/isc/stat.h delete mode 100644 lib/isc/win32/include/isc/stdatomic.h delete mode 100644 lib/isc/win32/include/isc/stdtime.h delete mode 100644 lib/isc/win32/include/isc/syslog.h delete mode 100644 lib/isc/win32/include/isc/thread.h delete mode 100644 lib/isc/win32/include/isc/time.h delete mode 100644 lib/isc/win32/include/isc/win32os.h delete mode 100644 lib/isc/win32/interfaceiter.c delete mode 100644 lib/isc/win32/ipv6.c delete mode 100644 lib/isc/win32/libgen.h delete mode 100644 lib/isc/win32/libisc.def.exclude delete mode 100644 lib/isc/win32/libisc.def.in delete mode 100644 lib/isc/win32/libisc.vcxproj.filters.in delete mode 100644 lib/isc/win32/libisc.vcxproj.in delete mode 100644 lib/isc/win32/libisc.vcxproj.user delete mode 100644 lib/isc/win32/meminfo.c delete mode 100644 lib/isc/win32/net.c delete mode 100644 lib/isc/win32/netdb.h delete mode 100644 lib/isc/win32/ntgroups.c delete mode 100644 lib/isc/win32/ntpaths.c delete mode 100644 lib/isc/win32/once.c delete mode 100644 lib/isc/win32/os.c delete mode 100644 lib/isc/win32/pk11_api.c delete mode 100644 lib/isc/win32/resource.c delete mode 100644 lib/isc/win32/socket.c delete mode 100644 lib/isc/win32/stdio.c delete mode 100644 lib/isc/win32/stdtime.c delete mode 100644 lib/isc/win32/syslog.c delete mode 100644 lib/isc/win32/syslog.h delete mode 100644 lib/isc/win32/thread.c delete mode 100644 lib/isc/win32/time.c delete mode 100644 lib/isc/win32/unistd.h delete mode 100644 lib/isc/win32/win32os.c delete mode 100644 lib/isccc/win32/DLLMain.c delete mode 100644 lib/isccc/win32/libisccc.def delete mode 100644 lib/isccc/win32/libisccc.vcxproj.filters.in delete mode 100644 lib/isccc/win32/libisccc.vcxproj.in delete mode 100644 lib/isccc/win32/libisccc.vcxproj.user delete mode 100644 lib/isccfg/win32/DLLMain.c delete mode 100644 lib/isccfg/win32/libisccfg.def delete mode 100644 lib/isccfg/win32/libisccfg.vcxproj.filters.in delete mode 100644 lib/isccfg/win32/libisccfg.vcxproj.in delete mode 100644 lib/isccfg/win32/libisccfg.vcxproj.user delete mode 100644 lib/ns/win32/DLLMain.c delete mode 100644 lib/ns/win32/libns.def delete mode 100644 lib/ns/win32/libns.vcxproj.filters delete mode 100644 lib/ns/win32/libns.vcxproj.in delete mode 100644 lib/ns/win32/libns.vcxproj.user delete mode 100644 lib/win32/bindevt/bindevt.c delete mode 100644 lib/win32/bindevt/bindevt.mc delete mode 100644 lib/win32/bindevt/bindevt.vcxproj.filters.in delete mode 100644 lib/win32/bindevt/bindevt.vcxproj.in delete mode 100644 lib/win32/bindevt/bindevt.vcxproj.user delete mode 100644 util/check-win32util-configure delete mode 100644 util/nt-kit delete mode 100644 win32utils/Configure delete mode 100644 win32utils/GeoIP.diff delete mode 100644 win32utils/bind9.sln.in delete mode 100644 win32utils/build.txt delete mode 100644 win32utils/readme1st.txt diff --git a/.dir-locals.el b/.dir-locals.el index fb7c4c072a..0c52d76891 100644 --- a/.dir-locals.el +++ b/.dir-locals.el @@ -16,10 +16,6 @@ (concat directory-of-current-dir-locals-file "./")) ;; libisc - (expand-file-name - (concat directory-of-current-dir-locals-file "lib/isc/unix/include")) - (expand-file-name - (concat directory-of-current-dir-locals-file "lib/isc/pthreads/include")) (expand-file-name (concat directory-of-current-dir-locals-file "lib/isc/include")) (expand-file-name diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3277e2b9e3..abf4b208bc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -92,11 +92,6 @@ stages: - bsd-stress - stress -.windows-amd64: &windows_amd64 - tags: - - windows - - amd64 - ### Docker Image Templates # Alpine Linux @@ -155,12 +150,6 @@ stages: image: "$CI_REGISTRY_IMAGE:ubuntu-focal-amd64" <<: *linux_amd64 -# Windows - -.windows-server-2016-amd64: &windows_server_2016_amd64_image - image: "$CI_REGISTRY_IMAGE:windows-server-2016-amd64" - <<: *windows_amd64 - # Base image # This is a meta image that is used as a base for non-specific jobs @@ -286,33 +275,6 @@ stages: untracked: true expire_in: "1 day" -.windows_build: &windows_build_job - stage: build - script: - - 'Push-Location "C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Auxiliary/Build"' - - '& cmd.exe /C "vcvarsall.bat x64 & set" | Foreach-Object { if ($_ -match "(.*?)=(.*)") { Set-Item -force -path "Env:\$($matches[1])" -value "$($matches[2])" } }' - - 'Pop-Location' - - 'Set-Location win32utils' - - '& "C:/Strawberry/perl/bin/perl.exe" Configure - "with-tools-version=15.0" - "with-platform-toolset=v141" - "with-platform-version=10.0.17763.0" - "with-vcredist=C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Redist/MSVC/14.16.27012/vcredist_x64.exe" - "with-openssl=C:/OpenSSL" - "with-libxml2=C:/libxml2" - "with-libuv=C:/libuv" - "with-nghttp2=C:/nghttp2" - "without-python" - "with-system-tests" - x64' - - 'Set-Item -path "Env:CL" -value "/MP$([Math]::Truncate($BUILD_PARALLEL_JOBS/2))"' - - '& msbuild.exe /maxCpuCount:2 /t:Build /p:Configuration=$VSCONF bind9.sln' - needs: [] - artifacts: - untracked: true - expire_in: "1 day" - when: always - .setup_interfaces: &setup_interfaces | if [ "$(id -u)" -eq "0" ]; then sh -x bin/tests/system/ifconfig.sh up; @@ -365,24 +327,6 @@ stages: untracked: true when: on_failure -.windows_system_test: &windows_system_test_job - <<: *schedules_tags_web_triggering_rules - stage: system - script: - - 'Push-Location bin/tests/system' - - '$ifIndex = Get-NetIPInterface -AddressFamily IPv4 -InterfaceMetric 75 | Select-Object -ExpandProperty ifIndex' - - '& C:/tools/cygwin/bin/sed.exe -i "s/^exit.*/netsh interface ipv4 set dnsservers $ifIndex dhcp/; s/\(name\|interface\)=Loopback/$ifIndex/;" ifconfig.bat' - - '& C:/tools/cygwin/bin/sed.exe -i "s/kill -f/kill -W/;" conf.sh stop.pl' - - '& cmd.exe /C ifconfig.bat up; ""' - - 'Start-Sleep 2' - - '$Env:Path = "C:/tools/cygwin/bin;$Env:Path"' - - '& sh.exe runall.sh $TEST_PARALLEL_JOBS' - - 'If (Test-Path C:/CrashDumps/*) { dir C:/CrashDumps; Throw }' - artifacts: - untracked: true - expire_in: "1 day" - when: on_failure - .unit_test_common: &unit_test_common <<: *default_triggering_rules stage: unit @@ -473,7 +417,6 @@ misc: - perl -w util/update_copyrights < util/copyrights - if test "$(git status --porcelain | grep -Ev '\?\?' | wc -l)" -gt "0"; then git status --short; exit 1; fi - xmllint --noout --nonet `git ls-files '*.xml' '*.docbook'` - - sh util/check-win32util-configure - sh util/check-categories.sh - if git grep SYSTEMTESTTOP -- ':!.gitlab-ci.yml'; then echo 'Please use relative paths instead of $SYSTEMTESTTOP.'; exit 1; fi - bash util/unused-headers.sh @@ -1235,40 +1178,6 @@ unit:clang:openbsd:amd64: - job: clang:openbsd:amd64 artifacts: true -# Jobs for Visual Studio 2017 builds on Windows (amd64) - -msvc:windows:amd64: - <<: *windows_server_2016_amd64_image - <<: *windows_build_job - <<: *default_triggering_rules - variables: - VSCONF: Release - -system:msvc:windows:amd64: - <<: *windows_server_2016_amd64_image - <<: *windows_system_test_job - variables: - VSCONF: Release - needs: - - job: msvc:windows:amd64 - artifacts: true - -msvc-debug:windows:amd64: - <<: *windows_server_2016_amd64_image - <<: *windows_build_job - <<: *schedules_tags_web_triggering_rules - variables: - VSCONF: Debug - -system:msvc-debug:windows:amd64: - <<: *windows_server_2016_amd64_image - <<: *windows_system_test_job - variables: - VSCONF: Debug - needs: - - job: msvc-debug:windows:amd64 - artifacts: true - # Job producing a release tarball release: @@ -1276,17 +1185,7 @@ release: stage: release script: - export BIND_DIRECTORY="$(basename "$(find . -name "bind-*.tar.*" -printf "%f")" ".tar.${TARBALL_EXTENSION}")" - # Remove redundant files and system test utilities from Windows build artifacts - - find Build/Release/ -name "*.pdb" -print -delete - - find Build/Debug/ \( -name "*.bsc" -o -name "*.idb" \) -print -delete - - find Build/ -regextype posix-extended -regex "Build/.*/($(find bin/tests/ -type f | sed -nE "s|^bin/tests(/system)?/win32/(.*)\.vcxproj$|\2|p" | paste -d"|" -s))\..*" -print -delete - # Create Windows zips - - openssl dgst -sha256 "${BIND_DIRECTORY}.tar.${TARBALL_EXTENSION}" | tee Build/Release/SHA256 Build/Debug/SHA256 - - cp "doc/arm/_build/latex/Bv9ARM.pdf" Build/Release/ - - cp "doc/arm/_build/latex/Bv9ARM.pdf" Build/Debug/ - - ( cd Build/Release; zip "../../BIND${BIND_DIRECTORY#bind-}.x64.zip" * ) - - ( cd Build/Debug; zip "../../BIND${BIND_DIRECTORY#bind-}.debug.x64.zip" * ) - # Prepare release tarball contents (tarballs + zips + documentation) + # Prepare release tarball contents (tarballs + documentation) - mkdir -p release/doc/arm - pushd release - mv "../${BIND_DIRECTORY}.tar.${TARBALL_EXTENSION}" ../BIND*.zip . @@ -1303,10 +1202,6 @@ release: needs: - job: tarball-create artifacts: true - - job: msvc:windows:amd64 - artifacts: true - - job: msvc-debug:windows:amd64 - artifacts: true - job: docs artifacts: true only: diff --git a/Makefile.top b/Makefile.top index eb28daf458..5826876371 100644 --- a/Makefile.top +++ b/Makefile.top @@ -20,8 +20,6 @@ endif HOST_MACOS LIBISC_CFLAGS = \ -I$(top_srcdir)/include \ - -I$(top_srcdir)/lib/isc/unix/include \ - -I$(top_srcdir)/lib/isc/pthreads/include \ -I$(top_srcdir)/lib/isc/include \ -I$(top_builddir)/lib/isc/include diff --git a/PLATFORMS.md b/PLATFORMS.md index a58782e923..37bcd1dac1 100644 --- a/PLATFORMS.md +++ b/PLATFORMS.md @@ -18,12 +18,12 @@ the OpenSSL cryptography library, and the `nghttp2` HTTP/2 library. The following C11 features are used in BIND 9: * Atomic operations support from the compiler is needed, either in the form of - builtin operations, C11 atomics, or the `Interlocked` family of functions on - Windows. + builtin operations. * Thread Local Storage support from the compiler is needed, either in the form - of C11 `_Thread_local`/`thread_local`, the `__thread` GCC extension, or - the `__declspec(thread)` MSVC extension on Windows. + of C11 `_Thread_local`/`thread_local`, or the `__thread` GCC extension. + +The C11 variants are preferred. BIND 9.17 requires a fairly recent version of `libuv` (at least 1.x). For some of the older systems listed below, you will have to install an updated @@ -58,13 +58,11 @@ The amd64, i386, armhf and arm64 CPU architectures are all fully supported. ### Best effort The following are platforms on which BIND is known to build and run. -ISC makes every effort to fix bugs on these platforms, but may be unable to -do so quickly due to lack of hardware, less familiarity on the part of -engineering staff, and other constraints. With the exception of Windows -Server 2016, none of these are tested regularly by ISC. +ISC makes every effort to fix bugs on these platforms, but may be unable +to do so quickly due to lack of hardware, less familiarity on the part +of engineering staff, and other constraints. None of these are tested +regularly by ISC. -* Windows Server 2012 R2, 2016 / x64 -* Windows 10 / x64 * macOS 10.12+ * Solaris 11 * NetBSD @@ -96,8 +94,7 @@ platforms. These are platforms on which BIND 9.17 is known *not* to build or run: * Platforms without at least OpenSSL 1.0.2 -* Windows 10 / x86 -* Windows Server 2012 and older +* Windows * Solaris 10 and older * Platforms that don't support IPv6 Advanced Socket API (RFC 3542) * Platforms that don't support atomic operations (via compiler or library) diff --git a/README.md b/README.md index 823f212e1c..c6172f5e0f 100644 --- a/README.md +++ b/README.md @@ -141,10 +141,6 @@ Unix, including RHEL/CentOS, Fedora, Debian, Ubuntu, SLES, openSUSE, Slackware, Alpine, FreeBSD, NetBSD, OpenBSD, macOS, Solaris, OpenIndiana, OmniOS CE, HP-UX, and OpenWRT. -BIND 9 is also available for Windows Server 2012 R2 and higher. See -`win32utils/build.txt` for details on building for Windows -systems. - To build on a Unix or Linux system, use: $ autoreconf -fi (if you are building in the git repository) diff --git a/bin/check/check-tool.c b/bin/check/check-tool.c index 02449cc3a2..dd9a98c297 100644 --- a/bin/check/check-tool.c +++ b/bin/check/check-tool.c @@ -15,10 +15,6 @@ #include #include -#ifdef _WIN32 -#include -#endif /* ifdef _WIN32 */ - #include #include #include @@ -788,25 +784,3 @@ dump_zone(const char *zonename, dns_zone_t *zone, const char *filename, return (result); } - -#ifdef _WIN32 -void -InitSockets(void) { - WORD wVersionRequested; - WSADATA wsaData; - int err; - - wVersionRequested = MAKEWORD(2, 0); - - err = WSAStartup(wVersionRequested, &wsaData); - if (err != 0) { - fprintf(stderr, "WSAStartup() failed: %d\n", err); - exit(1); - } -} - -void -DestroySockets(void) { - WSACleanup(); -} -#endif /* ifdef _WIN32 */ diff --git a/bin/check/check-tool.h b/bin/check/check-tool.h index 2a0d9bdfe5..6e9e483f54 100644 --- a/bin/check/check-tool.h +++ b/bin/check/check-tool.h @@ -40,13 +40,6 @@ dump_zone(const char *zonename, dns_zone_t *zone, const char *filename, dns_masterformat_t fileformat, const dns_master_style_t *style, const uint32_t rawversion); -#ifdef _WIN32 -void -InitSockets(void); -void -DestroySockets(void); -#endif /* ifdef _WIN32 */ - extern int debug; extern const char *journal; extern bool nomerge; diff --git a/bin/check/named-checkconf.c b/bin/check/named-checkconf.c index a06f724e86..11303e9648 100644 --- a/bin/check/named-checkconf.c +++ b/bin/check/named-checkconf.c @@ -714,10 +714,6 @@ main(int argc, char **argv) { conffile = NAMED_CONFFILE; } -#ifdef _WIN32 - InitSockets(); -#endif /* ifdef _WIN32 */ - RUNTIME_CHECK(setup_logging(mctx, stdout, &logc) == ISC_R_SUCCESS); dns_result_register(); @@ -758,9 +754,5 @@ main(int argc, char **argv) { isc_mem_destroy(&mctx); -#ifdef _WIN32 - DestroySockets(); -#endif /* ifdef _WIN32 */ - return (exit_status); } diff --git a/bin/check/named-checkzone.c b/bin/check/named-checkzone.c index e6869b225a..145f80c096 100644 --- a/bin/check/named-checkzone.c +++ b/bin/check/named-checkzone.c @@ -519,10 +519,6 @@ main(int argc, char **argv) { usage(); } -#ifdef _WIN32 - InitSockets(); -#endif /* ifdef _WIN32 */ - isc_mem_create(&mctx); if (!quiet) { RUNTIME_CHECK(setup_logging(mctx, errout, &lctx) == @@ -572,9 +568,6 @@ main(int argc, char **argv) { isc_log_destroy(&lctx); } isc_mem_destroy(&mctx); -#ifdef _WIN32 - DestroySockets(); -#endif /* ifdef _WIN32 */ return ((result == ISC_R_SUCCESS) ? 0 : 1); } diff --git a/bin/check/win32/checkconf.vcxproj.filters.in b/bin/check/win32/checkconf.vcxproj.filters.in deleted file mode 100644 index 7d0bc521af..0000000000 --- a/bin/check/win32/checkconf.vcxproj.filters.in +++ /dev/null @@ -1,27 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Header Files - - - - - Source Files - - - \ No newline at end of file diff --git a/bin/check/win32/checkconf.vcxproj.in b/bin/check/win32/checkconf.vcxproj.in deleted file mode 100644 index 61a70efc38..0000000000 --- a/bin/check/win32/checkconf.vcxproj.in +++ /dev/null @@ -1,144 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {03A96113-CB14-43AA-AEB2-48950E3915C5} - Win32Proj - checkconf - @WINDOWS_TARGET_PLATFORM_VERSION@ - - - - Application - true - MultiByte - @PLATFORM_TOOLSET@ - - - Application - false - true - MultiByte - @PLATFORM_TOOLSET@ - - - - - - - - - - - - - true - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - named-$(ProjectName) - - - false - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - named-$(ProjectName) - - - - - - Level4 - false - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - .\$(Configuration)\$(ProjectName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - true - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;..\..\..\lib\isccfg\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - $(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\isccc\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);..\..\..\lib\ns\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@checktool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;libbind9.lib;libns.lib;ws2_32.lib;%(AdditionalDependencies) - - - - - Level1 - true - - - MaxSpeed - true - @INTRINSIC@ - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - OnlyExplicitInline - false - true - .\$(Configuration)\$(ProjectName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;..\..\..\lib\isccfg\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - false - true - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - $(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\isccc\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);..\..\..\lib\ns\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@checktool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;libbind9.lib;libns.lib;ws2_32.lib;%(AdditionalDependencies) - Default - - - - - - - - - - - {3840E563-D180-4761-AA9C-E6155F02EAFF} - - - {5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A} - - - {82ACD33C-E75F-45B8-BB6D-42643A10D7EE} - - - {B2DFA58C-6347-478E-81E8-01E06999D4F1} - - - {E741C10B-B075-4206-9596-46765B665E03} - - - {2C1F7096-C5B5-48D4-846F-A7ACA454335D} - - - - - - diff --git a/bin/check/win32/checkconf.vcxproj.user b/bin/check/win32/checkconf.vcxproj.user deleted file mode 100644 index ace9a86acb..0000000000 --- a/bin/check/win32/checkconf.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/bin/check/win32/checktool.vcxproj.filters.in b/bin/check/win32/checktool.vcxproj.filters.in deleted file mode 100644 index 34fc8c6c23..0000000000 --- a/bin/check/win32/checktool.vcxproj.filters.in +++ /dev/null @@ -1,18 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - \ No newline at end of file diff --git a/bin/check/win32/checktool.vcxproj.in b/bin/check/win32/checktool.vcxproj.in deleted file mode 100644 index 103ec11ede..0000000000 --- a/bin/check/win32/checktool.vcxproj.in +++ /dev/null @@ -1,124 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - - - - {2C1F7096-C5B5-48D4-846F-A7ACA454335D} - Win32Proj - checktool - @WINDOWS_TARGET_PLATFORM_VERSION@ - - - - StaticLibrary - true - MultiByte - @PLATFORM_TOOLSET@ - - - StaticLibrary - false - true - MultiByte - @PLATFORM_TOOLSET@ - - - - - - - - - - - - - .\$(Configuration)\ - - - .\$(Configuration)\ - None - - - .\$(Configuration)\ - - - .\$(Configuration)\ - None - - - - - - Level4 - false - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - true - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\dns\include;..\..\..\lib\ns\include;%(AdditionalIncludeDirectories) - CompileAsC - - - .\$(Configuration)\$(TargetName)$(TargetExt) - - - - - Level1 - true - - - MaxSpeed - true - @INTRINSIC@ - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - OnlyExplicitInline - false - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\dns\include;..\..\..\lib\ns\include;%(AdditionalIncludeDirectories) - CompileAsC - - - .\$(Configuration)\$(TargetName)$(TargetExt) - - - - - {3840E563-D180-4761-AA9C-E6155F02EAFF} - - - {5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A} - - - {82ACD33C-E75F-45B8-BB6D-42643A10D7EE} - - - {B2DFA58C-6347-478E-81E8-01E06999D4F1} - - - - - - diff --git a/bin/check/win32/checktool.vcxproj.user b/bin/check/win32/checktool.vcxproj.user deleted file mode 100644 index ace9a86acb..0000000000 --- a/bin/check/win32/checktool.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/bin/check/win32/checkzone.vcxproj.filters.in b/bin/check/win32/checkzone.vcxproj.filters.in deleted file mode 100644 index 4f3396c2d4..0000000000 --- a/bin/check/win32/checkzone.vcxproj.filters.in +++ /dev/null @@ -1,27 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Header Files - - - - - Source Files - - - \ No newline at end of file diff --git a/bin/check/win32/checkzone.vcxproj.in b/bin/check/win32/checkzone.vcxproj.in deleted file mode 100644 index 89eb279949..0000000000 --- a/bin/check/win32/checkzone.vcxproj.in +++ /dev/null @@ -1,152 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {66028555-7DD5-4016-B601-9EF9A1EE8BFA} - Win32Proj - checkzone - @WINDOWS_TARGET_PLATFORM_VERSION@ - - - - Application - true - MultiByte - @PLATFORM_TOOLSET@ - - - Application - false - true - MultiByte - @PLATFORM_TOOLSET@ - - - - - - - - - - - - - true - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - named-$(ProjectName) - - - false - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - named-$(ProjectName) - - - - - - Level4 - false - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - .\$(Configuration)\$(ProjectName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - true - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - $(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\ns\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@checktool.lib;libisc.lib;libdns.lib;libisccfg.lib;libns.lib;ws2_32.lib;%(AdditionalDependencies) - - - cd ..\..\..\Build\$(Configuration) -copy /Y named-checkzone.exe named-compilezone.exe -copy /Y named-checkzone.ilk named-compilezone.ilk - - - - - - Level1 - true - - - MaxSpeed - true - @INTRINSIC@ - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - OnlyExplicitInline - false - true - .\$(Configuration)\$(ProjectName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - false - true - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - $(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\ns\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@checktool.lib;libisc.lib;libdns.lib;libisccfg.lib;libns.lib;ws2_32.lib;%(AdditionalDependencies) - Default - - - cd ..\..\..\Build\$(Configuration) -copy /Y named-checkzone.exe named-compilezone.exe - - - - - - - - - - - - {3840E563-D180-4761-AA9C-E6155F02EAFF} - - - {5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A} - - - {82ACD33C-E75F-45B8-BB6D-42643A10D7EE} - - - {B2DFA58C-6347-478E-81E8-01E06999D4F1} - - - {2C1F7096-C5B5-48D4-846F-A7ACA454335D} - - - - - - diff --git a/bin/check/win32/checkzone.vcxproj.user b/bin/check/win32/checkzone.vcxproj.user deleted file mode 100644 index ace9a86acb..0000000000 --- a/bin/check/win32/checkzone.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/bin/confgen/Makefile.am b/bin/confgen/Makefile.am index 3101aba39e..d43aa2004a 100644 --- a/bin/confgen/Makefile.am +++ b/bin/confgen/Makefile.am @@ -14,11 +14,11 @@ noinst_LTLIBRARIES = libconfgen.la libconfgen_la_SOURCES = \ include/confgen/os.h \ - keygen.h \ keygen.c \ - util.h \ + keygen.h \ + os.c \ util.c \ - unix/os.c + util.h sbin_PROGRAMS = tsig-keygen rndc-confgen diff --git a/bin/confgen/unix/os.c b/bin/confgen/os.c similarity index 100% rename from bin/confgen/unix/os.c rename to bin/confgen/os.c diff --git a/bin/confgen/win32/confgentool.vcxproj.filters.in b/bin/confgen/win32/confgentool.vcxproj.filters.in deleted file mode 100644 index 231e4e112c..0000000000 --- a/bin/confgen/win32/confgentool.vcxproj.filters.in +++ /dev/null @@ -1,39 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/bin/confgen/win32/confgentool.vcxproj.in b/bin/confgen/win32/confgentool.vcxproj.in deleted file mode 100644 index b33fa3dd5b..0000000000 --- a/bin/confgen/win32/confgentool.vcxproj.in +++ /dev/null @@ -1,128 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {64964B03-4815-41F0-9057-E766A94AF197} - Win32Proj - confgentool - @WINDOWS_TARGET_PLATFORM_VERSION@ - - - - StaticLibrary - true - MultiByte - @PLATFORM_TOOLSET@ - - - StaticLibrary - false - true - MultiByte - @PLATFORM_TOOLSET@ - - - - - - - - - - - - - true - .\$(Configuration)\ - .\$(Configuration)\ - None - - - false - .\$(Configuration)\ - .\$(Configuration)\ - None - - - - - - Level4 - false - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - true - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - true - - - - - Level1 - true - - - MaxSpeed - true - @INTRINSIC@ - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - OnlyExplicitInline - false - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - true - true - true - false - - - - - - - - - - - - - - - {3840E563-D180-4761-AA9C-E6155F02EAFF} - - - {5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A} - - - - - - diff --git a/bin/confgen/win32/confgentool.vcxproj.user b/bin/confgen/win32/confgentool.vcxproj.user deleted file mode 100644 index ace9a86acb..0000000000 --- a/bin/confgen/win32/confgentool.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/bin/confgen/win32/os.c b/bin/confgen/win32/os.c deleted file mode 100644 index de33ec325a..0000000000 --- a/bin/confgen/win32/os.c +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#include -#include -#include -#include -#include -#include -#include - -#include - -int -set_user(FILE *fd, const char *user) { - return (0); -} diff --git a/bin/confgen/win32/rndcconfgen.vcxproj.filters.in b/bin/confgen/win32/rndcconfgen.vcxproj.filters.in deleted file mode 100644 index 20f6b5a17d..0000000000 --- a/bin/confgen/win32/rndcconfgen.vcxproj.filters.in +++ /dev/null @@ -1,18 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - \ No newline at end of file diff --git a/bin/confgen/win32/rndcconfgen.vcxproj.in b/bin/confgen/win32/rndcconfgen.vcxproj.in deleted file mode 100644 index 141763e26e..0000000000 --- a/bin/confgen/win32/rndcconfgen.vcxproj.in +++ /dev/null @@ -1,132 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {1E2C1635-3093-4D59-80E7-4743AC10F22F} - Win32Proj - rndcconfgen - @WINDOWS_TARGET_PLATFORM_VERSION@ - - - - Application - true - MultiByte - @PLATFORM_TOOLSET@ - - - Application - false - true - MultiByte - @PLATFORM_TOOLSET@ - - - - - - - - - - - - - true - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - rndc-confgen - - - false - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - rndc-confgen - - - - - - Level4 - false - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - .\$(Configuration)\$(ProjectName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - true - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - $(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@confgentool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies) - - - - - Level1 - true - - - MaxSpeed - true - @INTRINSIC@ - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - OnlyExplicitInline - false - true - .\$(Configuration)\$(ProjectName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - false - true - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - Default - $(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@confgentool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies) - - - - - - - - {3840E563-D180-4761-AA9C-E6155F02EAFF} - - - {5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A} - - - {64964B03-4815-41F0-9057-E766A94AF197} - - - - - - diff --git a/bin/confgen/win32/rndcconfgen.vcxproj.user b/bin/confgen/win32/rndcconfgen.vcxproj.user deleted file mode 100644 index ace9a86acb..0000000000 --- a/bin/confgen/win32/rndcconfgen.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/bin/confgen/win32/tsigkeygen.vcxproj.filters.in b/bin/confgen/win32/tsigkeygen.vcxproj.filters.in deleted file mode 100644 index ef6527dccb..0000000000 --- a/bin/confgen/win32/tsigkeygen.vcxproj.filters.in +++ /dev/null @@ -1,18 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - diff --git a/bin/confgen/win32/tsigkeygen.vcxproj.in b/bin/confgen/win32/tsigkeygen.vcxproj.in deleted file mode 100644 index 1664c0b236..0000000000 --- a/bin/confgen/win32/tsigkeygen.vcxproj.in +++ /dev/null @@ -1,143 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {1EA4FC64-F33B-4A50-970A-EA052BBE9CF1} - Win32Proj - tsigkeygen - @WINDOWS_TARGET_PLATFORM_VERSION@ - - - - Application - true - MultiByte - @PLATFORM_TOOLSET@ - - - Application - false - true - MultiByte - @PLATFORM_TOOLSET@ - - - - - - - - - - - - - true - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - tsig-keygen - - - false - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - tsig-keygen - - - - - - Level4 - false - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - .\$(Configuration)\$(ProjectName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - true - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - $(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@confgentool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies) - - - cd ..\..\..\Build\$(Configuration) -copy /Y tsig-keygen.exe ddns-confgen.exe -copy /Y tsig-keygen.ilk ddns-confgen.ilk - - - - - - Level1 - true - - - MaxSpeed - true - @INTRINSIC@ - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - OnlyExplicitInline - false - true - .\$(Configuration)\$(ProjectName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - false - true - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - Default - $(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@confgentool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies) - - - cd ..\..\..\Build\$(Configuration) -copy /Y tsig-keygen.exe ddns-confgen.exe - - - - - - - - - {3840E563-D180-4761-AA9C-E6155F02EAFF} - - - {5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A} - - - {64964B03-4815-41F0-9057-E766A94AF197} - - - - - - diff --git a/bin/confgen/win32/tsigkeygen.vcxproj.user b/bin/confgen/win32/tsigkeygen.vcxproj.user deleted file mode 100644 index 7135522534..0000000000 --- a/bin/confgen/win32/tsigkeygen.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/bin/delv/delv.c b/bin/delv/delv.c index c7eb8d6839..c3ff1860b6 100644 --- a/bin/delv/delv.c +++ b/bin/delv/delv.c @@ -9,22 +9,18 @@ * information regarding copyright ownership. */ -#include - -#ifndef WIN32 #include +#include +#include #include #include #include -#include -#include -#endif /* ifndef WIN32 */ - -#include #include #include #include #include +#include +#include #include #include @@ -38,9 +34,6 @@ #include #include #include -#ifdef WIN32 -#include -#endif /* ifdef WIN32 */ #include #include #include @@ -821,14 +814,7 @@ setup_dnsseckeys(dns_client_t *client) { } if (filename == NULL) { -#ifndef WIN32 filename = SYSCONFDIR "/bind.keys"; -#else /* ifndef WIN32 */ - static char buf[MAX_PATH]; - strlcpy(buf, isc_ntpaths_get(SYS_CONF_DIR), sizeof(buf)); - strlcat(buf, "\\bind.keys", sizeof(buf)); - filename = buf; -#endif /* ifndef WIN32 */ } if (trust_anchor == NULL) { @@ -1743,9 +1729,7 @@ main(int argc, char *argv[]) { isc_socketmgr_t *socketmgr = NULL; isc_timermgr_t *timermgr = NULL; dns_master_style_t *style = NULL; -#ifndef WIN32 struct sigaction sa; -#endif /* ifndef WIN32 */ progname = argv[0]; preparse_args(argc, argv); @@ -1773,14 +1757,12 @@ main(int argc, char *argv[]) { CHECK(isc_app_ctxstart(actx)); -#ifndef WIN32 /* Unblock SIGINT if it's been blocked by isc_app_ctxstart() */ memset(&sa, 0, sizeof(sa)); sa.sa_handler = SIG_DFL; if (sigfillset(&sa.sa_mask) != 0 || sigaction(SIGINT, &sa, NULL) < 0) { fatal("Couldn't set up signal handler"); } -#endif /* ifndef WIN32 */ /* Create client */ result = dns_client_create(mctx, actx, taskmgr, socketmgr, timermgr, 0, diff --git a/bin/delv/win32/delv.vcxproj.filters.in b/bin/delv/win32/delv.vcxproj.filters.in deleted file mode 100644 index c1af2f3b62..0000000000 --- a/bin/delv/win32/delv.vcxproj.filters.in +++ /dev/null @@ -1,22 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - diff --git a/bin/delv/win32/delv.vcxproj.in b/bin/delv/win32/delv.vcxproj.in deleted file mode 100644 index 135f51f80e..0000000000 --- a/bin/delv/win32/delv.vcxproj.in +++ /dev/null @@ -1,133 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {BE172EFE-C1DC-4812-BFB9-8C5F8ADB7E9F} - Win32Proj - delv - @WINDOWS_TARGET_PLATFORM_VERSION@ - - - - Application - true - MultiByte - @PLATFORM_TOOLSET@ - - - Application - false - true - MultiByte - @PLATFORM_TOOLSET@ - - - - - - - - - - - - - true - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - - - false - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - - - - - - Level4 - false - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - true - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@@GEOIP_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\dns\win32\include;..\..\..\lib\dns\include;..\..\..\lib\irs\win32\include;..\..\..\lib\irs\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - ..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@libisc.lib;libdns.lib;libisccfg.lib;libirs.lib;ws2_32.lib;%(AdditionalDependencies) - - - - - Level1 - true - - - MaxSpeed - true - @INTRINSIC@ - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - OnlyExplicitInline - false - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@@GEOIP_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\dns\win32\include;..\..\..\lib\dns\include;..\..\..\lib\irs\win32\include;..\..\..\lib\irs\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - false - true - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - Default - ..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@libisc.lib;libdns.lib;libisccfg.lib;libirs.lib;ws2_32.lib;%(AdditionalDependencies) - - - - - - - - {3840E563-D180-4761-AA9C-E6155F02EAFF} - - - {5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A} - - - {B2DFA58C-6347-478E-81E8-01E06999D4F1} - - - {A4F29CEB-7644-4A7F-BE9E-02B6A90E4919} - - - - - - diff --git a/bin/delv/win32/delv.vcxproj.user b/bin/delv/win32/delv.vcxproj.user deleted file mode 100644 index ace9a86acb..0000000000 --- a/bin/delv/win32/delv.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/bin/dig/dig.c b/bin/dig/dig.c index c4f75c4fdd..fbcd9737d7 100644 --- a/bin/dig/dig.c +++ b/bin/dig/dig.c @@ -329,11 +329,7 @@ received(unsigned int bytes, isc_sockaddr_t *from, dig_query_t *query) { uint64_t diff; time_t tnow; struct tm tmnow; -#ifdef WIN32 - wchar_t time_str[100]; -#else /* ifdef WIN32 */ char time_str[100]; -#endif /* ifdef WIN32 */ char fromtext[ISC_SOCKADDR_FORMATSIZE]; isc_sockaddr_format(from, fromtext, sizeof(fromtext)); @@ -368,23 +364,11 @@ received(unsigned int bytes, isc_sockaddr_t *from, dig_query_t *query) { time(&tnow); (void)localtime_r(&tnow, &tmnow); -#ifdef WIN32 - /* - * On Windows, time zone name ("%Z") may be a localized - * wide-character string, which strftime() handles incorrectly. - */ - if (wcsftime(time_str, sizeof(time_str) / sizeof(time_str[0]), - L"%a %b %d %H:%M:%S %Z %Y", &tmnow) > 0U) - { - printf(";; WHEN: %ls\n", time_str); - } -#else /* ifdef WIN32 */ if (strftime(time_str, sizeof(time_str), "%a %b %d %H:%M:%S %Z %Y", &tmnow) > 0U) { printf(";; WHEN: %s\n", time_str); } -#endif /* ifdef WIN32 */ if (query->lookup->doing_xfr) { printf(";; XFR size: %u records (messages %u, " "bytes %" PRIu64 ")\n", diff --git a/bin/dig/win32/dig.vcxproj.filters.in b/bin/dig/win32/dig.vcxproj.filters.in deleted file mode 100644 index 1d927325b7..0000000000 --- a/bin/dig/win32/dig.vcxproj.filters.in +++ /dev/null @@ -1,27 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Header Files - - - - - Source Files - - - \ No newline at end of file diff --git a/bin/dig/win32/dig.vcxproj.in b/bin/dig/win32/dig.vcxproj.in deleted file mode 100644 index ca020168a6..0000000000 --- a/bin/dig/win32/dig.vcxproj.in +++ /dev/null @@ -1,142 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {F938F9B8-D395-4A40-BEC7-0122D289C692} - Win32Proj - dig - @WINDOWS_TARGET_PLATFORM_VERSION@ - - - - Application - true - MultiByte - @PLATFORM_TOOLSET@ - - - Application - false - true - MultiByte - @PLATFORM_TOOLSET@ - - - - - - - - - - - - - true - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - - - false - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - - - - - - Level4 - false - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - true - ..\..\..\config.h - .\;..\include;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@@IDN_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - $(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@dighost.lib;libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;@IDN_LIB@ws2_32.lib;%(AdditionalDependencies) - - - - - Level1 - true - - - MaxSpeed - true - @INTRINSIC@ - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - OnlyExplicitInline - false - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - ..\..\..\config.h - .\;..\include;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@@IDN_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - false - true - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - Default - $(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@dighost.lib;libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;@IDN_LIB@ws2_32.lib;%(AdditionalDependencies) - - - - - - - - - - - {3840E563-D180-4761-AA9C-E6155F02EAFF} - - - {5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A} - - - {B2DFA58C-6347-478E-81E8-01E06999D4F1} - - - {A4F29CEB-7644-4A7F-BE9E-02B6A90E4919} - - - {E741C10B-B075-4206-9596-46765B665E03} - - - {140DE800-E552-43CC-B0C7-A33A92E368CA} - - - - - - diff --git a/bin/dig/win32/dig.vcxproj.user b/bin/dig/win32/dig.vcxproj.user deleted file mode 100644 index ace9a86acb..0000000000 --- a/bin/dig/win32/dig.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/bin/dig/win32/dighost.vcxproj.filters.in b/bin/dig/win32/dighost.vcxproj.filters.in deleted file mode 100644 index d108bfbf65..0000000000 --- a/bin/dig/win32/dighost.vcxproj.filters.in +++ /dev/null @@ -1,18 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - \ No newline at end of file diff --git a/bin/dig/win32/dighost.vcxproj.in b/bin/dig/win32/dighost.vcxproj.in deleted file mode 100644 index 0e26a2cb3b..0000000000 --- a/bin/dig/win32/dighost.vcxproj.in +++ /dev/null @@ -1,132 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {140DE800-E552-43CC-B0C7-A33A92E368CA} - Win32Proj - dighost - @WINDOWS_TARGET_PLATFORM_VERSION@ - - - - StaticLibrary - true - MultiByte - @PLATFORM_TOOLSET@ - - - StaticLibrary - false - true - MultiByte - @PLATFORM_TOOLSET@ - - - - - - - - - - - - - true - .\$(Configuration)\ - .\$(Configuration)\ - None - - - false - .\$(Configuration)\ - .\$(Configuration)\ - None - - - - - - Level4 - false - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - true - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@@IDN_INC@..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\dns\include;..\..\..\lib\irs\include;..\..\..\lib\irs\win32\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - - - - - Level1 - true - - - MaxSpeed - true - @INTRINSIC@ - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - OnlyExplicitInline - false - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@@IDN_INC@..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\dns\include;..\..\..\lib\irs\include;..\..\..\lib\irs\win32\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - false - true - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - false - - - - - - - - {3840E563-D180-4761-AA9C-E6155F02EAFF} - - - {5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A} - - - {B2DFA58C-6347-478E-81E8-01E06999D4F1} - - - {A4F29CEB-7644-4A7F-BE9E-02B6A90E4919} - - - {E741C10B-B075-4206-9596-46765B665E03} - - - - - - diff --git a/bin/dig/win32/dighost.vcxproj.user b/bin/dig/win32/dighost.vcxproj.user deleted file mode 100644 index ace9a86acb..0000000000 --- a/bin/dig/win32/dighost.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/bin/dig/win32/host.vcxproj.filters.in b/bin/dig/win32/host.vcxproj.filters.in deleted file mode 100644 index 56e781817d..0000000000 --- a/bin/dig/win32/host.vcxproj.filters.in +++ /dev/null @@ -1,18 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - \ No newline at end of file diff --git a/bin/dig/win32/host.vcxproj.in b/bin/dig/win32/host.vcxproj.in deleted file mode 100644 index 8b6d302e65..0000000000 --- a/bin/dig/win32/host.vcxproj.in +++ /dev/null @@ -1,139 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {BA1048A8-6961-4A20-BE12-08BE20611C9D} - Win32Proj - host - @WINDOWS_TARGET_PLATFORM_VERSION@ - - - - Application - true - MultiByte - @PLATFORM_TOOLSET@ - - - Application - false - true - MultiByte - @PLATFORM_TOOLSET@ - - - - - - - - - - - - - true - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - - - false - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - - - - - - Level4 - false - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - true - ..\..\..\config.h - .\;..\include;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@@IDN_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - $(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@dighost.lib;@IDN_LIB@libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;ws2_32.lib;%(AdditionalDependencies) - - - - - Level1 - true - - - MaxSpeed - true - @INTRINSIC@ - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - OnlyExplicitInline - false - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - ..\..\..\config.h - .\;..\include;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@@IDN_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - false - true - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - Default - $(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@dighost.lib;@IDN_LIB@libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;ws2_32.lib;%(AdditionalDependencies) - - - - - - - - {3840E563-D180-4761-AA9C-E6155F02EAFF} - - - {5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A} - - - {B2DFA58C-6347-478E-81E8-01E06999D4F1} - - - {A4F29CEB-7644-4A7F-BE9E-02B6A90E4919} - - - {E741C10B-B075-4206-9596-46765B665E03} - - - {140DE800-E552-43CC-B0C7-A33A92E368CA} - - - - - - diff --git a/bin/dig/win32/host.vcxproj.user b/bin/dig/win32/host.vcxproj.user deleted file mode 100644 index ace9a86acb..0000000000 --- a/bin/dig/win32/host.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/bin/dig/win32/nslookup.vcxproj.filters.in b/bin/dig/win32/nslookup.vcxproj.filters.in deleted file mode 100644 index 7f4756edf9..0000000000 --- a/bin/dig/win32/nslookup.vcxproj.filters.in +++ /dev/null @@ -1,21 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/bin/dig/win32/nslookup.vcxproj.in b/bin/dig/win32/nslookup.vcxproj.in deleted file mode 100644 index 0ff4268001..0000000000 --- a/bin/dig/win32/nslookup.vcxproj.in +++ /dev/null @@ -1,140 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {C15A6E1A-94CE-4686-99F9-6BC5FD623EB5} - Win32Proj - nslookup - @WINDOWS_TARGET_PLATFORM_VERSION@ - - - - Application - true - MultiByte - @PLATFORM_TOOLSET@ - - - Application - false - true - MultiByte - @PLATFORM_TOOLSET@ - - - - - - - - - - - - - true - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - - - false - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - - - - - - Level4 - false - Disabled - WIN32;USE_READLINE_STATIC;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - true - ..\..\..\config.h - .\;..\include;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@@READLINE_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\irs\include;..\..\..\lib\irs\win32\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - ..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@@READLINE_LIBD@@IDN_LIB@libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;ws2_32.lib;%(AdditionalDependencies) - - - - - Level1 - true - - - MaxSpeed - true - @INTRINSIC@ - WIN32;USE_READLINE_STATIC;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - OnlyExplicitInline - false - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - ..\..\..\config.h - .\;..\include;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@@READLINE_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\irs\include;..\..\..\lib\irs\win32\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - false - true - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - Default - ..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@@READLINE_LIB@@IDN_LIB@libisc.lib;libisccfg.lib;libirs.lib;libdns.lib;libbind9.lib;ws2_32.lib;%(AdditionalDependencies) - - - - - - - - - {3840E563-D180-4761-AA9C-E6155F02EAFF} - - - {5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A} - - - {B2DFA58C-6347-478E-81E8-01E06999D4F1} - - - {A4F29CEB-7644-4A7F-BE9E-02B6A90E4919} - - - {E741C10B-B075-4206-9596-46765B665E03} - - - {140DE800-E552-43CC-B0C7-A33A92E368CA} - - - - - - diff --git a/bin/dig/win32/nslookup.vcxproj.user b/bin/dig/win32/nslookup.vcxproj.user deleted file mode 100644 index ace9a86acb..0000000000 --- a/bin/dig/win32/nslookup.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/bin/dnssec/dnssec-signzone.c b/bin/dnssec/dnssec-signzone.c index 8d22d71d79..d1ee147277 100644 --- a/bin/dnssec/dnssec-signzone.c +++ b/bin/dnssec/dnssec-signzone.c @@ -3347,10 +3347,6 @@ main(int argc, char *argv[]) { } isc_commandline_reset = true; -#ifdef _WIN32 - InitSockets(); -#endif /* ifdef _WIN32 */ - masterstyle = &dns_master_style_explicitttl; check_result(isc_app_start(), "isc_app_start"); @@ -4106,8 +4102,5 @@ main(int argc, char *argv[]) { &sign_finish); } -#ifdef _WIN32 - DestroySockets(); -#endif /* ifdef _WIN32 */ return (vresult == ISC_R_SUCCESS ? 0 : 1); } diff --git a/bin/dnssec/dnssectool.c b/bin/dnssec/dnssectool.c index 2a5c0281d8..c01a640755 100644 --- a/bin/dnssec/dnssectool.c +++ b/bin/dnssec/dnssectool.c @@ -19,10 +19,6 @@ #include #include -#ifdef _WIN32 -#include -#endif /* ifdef _WIN32 */ - #include #include #include @@ -567,25 +563,3 @@ isoptarg(const char *arg, char **argv, void (*usage)(void)) { } return (false); } - -#ifdef _WIN32 -void -InitSockets(void) { - WORD wVersionRequested; - WSADATA wsaData; - int err; - - wVersionRequested = MAKEWORD(2, 0); - - err = WSAStartup(wVersionRequested, &wsaData); - if (err != 0) { - fprintf(stderr, "WSAStartup() failed: %d\n", err); - exit(1); - } -} - -void -DestroySockets(void) { - WSACleanup(); -} -#endif /* ifdef _WIN32 */ diff --git a/bin/dnssec/dnssectool.h b/bin/dnssec/dnssectool.h index e0970e2ae6..04c81c1a56 100644 --- a/bin/dnssec/dnssectool.h +++ b/bin/dnssec/dnssectool.h @@ -107,11 +107,4 @@ key_collision(dst_key_t *key, dns_name_t *name, const char *dir, bool isoptarg(const char *arg, char **argv, void (*usage)(void)); -#ifdef _WIN32 -void -InitSockets(void); -void -DestroySockets(void); -#endif /* ifdef _WIN32 */ - #endif /* DNSSEC_DNSSECTOOL_H */ diff --git a/bin/dnssec/win32/cds.vcxproj.filters.in b/bin/dnssec/win32/cds.vcxproj.filters.in deleted file mode 100644 index b6893db631..0000000000 --- a/bin/dnssec/win32/cds.vcxproj.filters.in +++ /dev/null @@ -1,18 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - diff --git a/bin/dnssec/win32/cds.vcxproj.in b/bin/dnssec/win32/cds.vcxproj.in deleted file mode 100644 index 8328a277f5..0000000000 --- a/bin/dnssec/win32/cds.vcxproj.in +++ /dev/null @@ -1,132 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {0EB1727E-2BBD-47A6-AD12-418F9DEB0531} - Win32Proj - cds - @WINDOWS_TARGET_PLATFORM_VERSION@ - - - - Application - true - MultiByte - @PLATFORM_TOOLSET@ - - - Application - false - true - MultiByte - @PLATFORM_TOOLSET@ - - - - - - - - - - - - - true - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - dnssec-$(ProjectName) - - - false - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - dnssec-$(ProjectName) - - - - - - Level4 - false - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - .\$(Configuration)\$(ProjectName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - true - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - $(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies) - - - - - Level1 - true - - - MaxSpeed - true - @INTRINSIC@ - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - OnlyExplicitInline - false - true - .\$(Configuration)\$(ProjectName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - false - true - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - Default - $(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies) - - - - - - - - {3840E563-D180-4761-AA9C-E6155F02EAFF} - - - {5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A} - - - {2CB7DC75-023B-4AA3-AF3A-AE5046A4EE70} - - - - - - diff --git a/bin/dnssec/win32/cds.vcxproj.user b/bin/dnssec/win32/cds.vcxproj.user deleted file mode 100644 index ace9a86acb..0000000000 --- a/bin/dnssec/win32/cds.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/bin/dnssec/win32/dnssectool.vcxproj.filters.in b/bin/dnssec/win32/dnssectool.vcxproj.filters.in deleted file mode 100644 index 1743f84313..0000000000 --- a/bin/dnssec/win32/dnssectool.vcxproj.filters.in +++ /dev/null @@ -1,27 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Header Files - - - - - Source Files - - - \ No newline at end of file diff --git a/bin/dnssec/win32/dnssectool.vcxproj.in b/bin/dnssec/win32/dnssectool.vcxproj.in deleted file mode 100644 index d871174bd7..0000000000 --- a/bin/dnssec/win32/dnssectool.vcxproj.in +++ /dev/null @@ -1,126 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - - - - - - - {2CB7DC75-023B-4AA3-AF3A-AE5046A4EE70} - Win32Proj - dnssectool - @WINDOWS_TARGET_PLATFORM_VERSION@ - - - - StaticLibrary - true - MultiByte - @PLATFORM_TOOLSET@ - - - StaticLibrary - false - true - MultiByte - @PLATFORM_TOOLSET@ - - - - - - - - - - - - - .\$(Configuration)\ - - - .\$(Configuration)\ - None - - - .\$(Configuration)\ - - - .\$(Configuration)\ - None - - - - - - Level4 - false - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - true - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Windows - true - - - - - Level1 - true - - - MaxSpeed - true - @INTRINSIC@ - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - OnlyExplicitInline - false - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Windows - true - true - true - false - - - - - {3840E563-D180-4761-AA9C-E6155F02EAFF} - - - {5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A} - - - - - - diff --git a/bin/dnssec/win32/dnssectool.vcxproj.user b/bin/dnssec/win32/dnssectool.vcxproj.user deleted file mode 100644 index ace9a86acb..0000000000 --- a/bin/dnssec/win32/dnssectool.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/bin/dnssec/win32/dsfromkey.vcxproj.filters.in b/bin/dnssec/win32/dsfromkey.vcxproj.filters.in deleted file mode 100644 index 7d0a58e6b0..0000000000 --- a/bin/dnssec/win32/dsfromkey.vcxproj.filters.in +++ /dev/null @@ -1,18 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - \ No newline at end of file diff --git a/bin/dnssec/win32/dsfromkey.vcxproj.in b/bin/dnssec/win32/dsfromkey.vcxproj.in deleted file mode 100644 index be24c8d377..0000000000 --- a/bin/dnssec/win32/dsfromkey.vcxproj.in +++ /dev/null @@ -1,158 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {6E6297F4-69D7-4533-85E1-BD17C30017C8} - Win32Proj - dsfromkey - @WINDOWS_TARGET_PLATFORM_VERSION@ - - - - Application - true - MultiByte - @PLATFORM_TOOLSET@ - - - Application - false - true - MultiByte - @PLATFORM_TOOLSET@ - - - - - - - - - - - - - true - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - dnssec-$(ProjectName) - - - false - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - dnssec-$(ProjectName) - - - - - - Level4 - false - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - .\$(Configuration)\$(ProjectName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - true - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - $(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies) - -@IF PYTHON - - cd ..\..\python -copy /Y dnssec-checkds.py ..\..\Build\$(Configuration)\dnssec-checkds.py -copy /Y dnssec-coverage.py ..\..\Build\$(Configuration)\dnssec-coverage.py -copy /Y dnssec-keymgr.py ..\..\Build\$(Configuration)\dnssec-keymgr.py -cd isc -@PYTHON@ policy.py parse \dev\nul > nul -set PYTHONPATH=. -@PYTHON@ -m parsetab - - -@END PYTHON - - - - Level1 - true - - - MaxSpeed - true - @INTRINSIC@ - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - OnlyExplicitInline - false - true - .\$(Configuration)\$(ProjectName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - false - true - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - Default - $(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies) - -@IF PYTHON - - cd ..\..\python -copy /Y dnssec-checkds.py ..\..\Build\$(Configuration)\dnssec-checkds.py -copy /Y dnssec-coverage.py ..\..\Build\$(Configuration)\dnssec-coverage.py -copy /Y dnssec-keymgr.py ..\..\Build\$(Configuration)\dnssec-keymgr.py -cd isc -@PYTHON@ policy.py parse \dev\nul > nul -set PYTHONPATH=. -@PYTHON@ -m parsetab - - -@END PYTHON - - - - - - - {3840E563-D180-4761-AA9C-E6155F02EAFF} - - - {5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A} - - - {2CB7DC75-023B-4AA3-AF3A-AE5046A4EE70} - - - - - - diff --git a/bin/dnssec/win32/dsfromkey.vcxproj.user b/bin/dnssec/win32/dsfromkey.vcxproj.user deleted file mode 100644 index ace9a86acb..0000000000 --- a/bin/dnssec/win32/dsfromkey.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/bin/dnssec/win32/importkey.vcxproj.filters.in b/bin/dnssec/win32/importkey.vcxproj.filters.in deleted file mode 100644 index 0bced368e0..0000000000 --- a/bin/dnssec/win32/importkey.vcxproj.filters.in +++ /dev/null @@ -1,18 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - diff --git a/bin/dnssec/win32/importkey.vcxproj.in b/bin/dnssec/win32/importkey.vcxproj.in deleted file mode 100644 index ef137a173b..0000000000 --- a/bin/dnssec/win32/importkey.vcxproj.in +++ /dev/null @@ -1,132 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {AB6690A0-055E-458f-BAC5-BF38BCC5834F} - Win32Proj - importkey - @WINDOWS_TARGET_PLATFORM_VERSION@ - - - - Application - true - MultiByte - @PLATFORM_TOOLSET@ - - - Application - false - true - MultiByte - @PLATFORM_TOOLSET@ - - - - - - - - - - - - - true - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - dnssec-$(ProjectName) - - - false - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - dnssec-$(ProjectName) - - - - - - Level4 - false - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - .\$(Configuration)\$(ProjectName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - true - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - $(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies) - - - - - Level1 - true - - - MaxSpeed - true - @INTRINSIC@ - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - OnlyExplicitInline - false - true - .\$(Configuration)\$(ProjectName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - false - true - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - Default - $(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies) - - - - - - - - {3840E563-D180-4761-AA9C-E6155F02EAFF} - - - {5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A} - - - {2CB7DC75-023B-4AA3-AF3A-AE5046A4EE70} - - - - - - diff --git a/bin/dnssec/win32/importkey.vcxproj.user b/bin/dnssec/win32/importkey.vcxproj.user deleted file mode 100644 index ace9a86acb..0000000000 --- a/bin/dnssec/win32/importkey.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/bin/dnssec/win32/keyfromlabel.vcxproj.filters.in b/bin/dnssec/win32/keyfromlabel.vcxproj.filters.in deleted file mode 100644 index bb54f8105e..0000000000 --- a/bin/dnssec/win32/keyfromlabel.vcxproj.filters.in +++ /dev/null @@ -1,18 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - \ No newline at end of file diff --git a/bin/dnssec/win32/keyfromlabel.vcxproj.in b/bin/dnssec/win32/keyfromlabel.vcxproj.in deleted file mode 100644 index 5b5a898d68..0000000000 --- a/bin/dnssec/win32/keyfromlabel.vcxproj.in +++ /dev/null @@ -1,132 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {17455DC6-5FBB-47C3-8F44-7DB574A188D3} - Win32Proj - keyfromlabel - @WINDOWS_TARGET_PLATFORM_VERSION@ - - - - Application - true - MultiByte - @PLATFORM_TOOLSET@ - - - Application - false - true - MultiByte - @PLATFORM_TOOLSET@ - - - - - - - - - - - - - true - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - dnssec-$(ProjectName) - - - false - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - dnssec-$(ProjectName) - - - - - - Level4 - false - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - .\$(Configuration)\$(ProjectName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - true - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - $(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies) - - - - - Level1 - true - - - MaxSpeed - true - @INTRINSIC@ - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - OnlyExplicitInline - false - true - .\$(Configuration)\$(ProjectName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - false - true - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - Default - $(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies) - - - - - - - - {3840E563-D180-4761-AA9C-E6155F02EAFF} - - - {5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A} - - - {2CB7DC75-023B-4AA3-AF3A-AE5046A4EE70} - - - - - - diff --git a/bin/dnssec/win32/keyfromlabel.vcxproj.user b/bin/dnssec/win32/keyfromlabel.vcxproj.user deleted file mode 100644 index ace9a86acb..0000000000 --- a/bin/dnssec/win32/keyfromlabel.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/bin/dnssec/win32/keygen.vcxproj.filters.in b/bin/dnssec/win32/keygen.vcxproj.filters.in deleted file mode 100644 index 5d1fa4c66d..0000000000 --- a/bin/dnssec/win32/keygen.vcxproj.filters.in +++ /dev/null @@ -1,18 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - \ No newline at end of file diff --git a/bin/dnssec/win32/keygen.vcxproj.in b/bin/dnssec/win32/keygen.vcxproj.in deleted file mode 100644 index ad93ba3796..0000000000 --- a/bin/dnssec/win32/keygen.vcxproj.in +++ /dev/null @@ -1,135 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {0BF11E21-168C-4CAA-B784-429D126BBAE5} - Win32Proj - keygen - @WINDOWS_TARGET_PLATFORM_VERSION@ - - - - Application - true - MultiByte - @PLATFORM_TOOLSET@ - - - Application - false - true - MultiByte - @PLATFORM_TOOLSET@ - - - - - - - - - - - - - true - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - dnssec-$(ProjectName) - - - false - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - dnssec-$(ProjectName) - - - - - - Level4 - false - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - .\$(Configuration)\$(ProjectName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - true - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\win32;..\..\..\lib\isccfg\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@dnssectool.lib;libisc.lib;libisccfg.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies) - $(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories) - - - - - Level1 - true - - - MaxSpeed - true - @INTRINSIC@ - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - OnlyExplicitInline - false - true - .\$(Configuration)\$(ProjectName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\win32;..\..\..\lib\isccfg\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - false - true - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - Default - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@dnssectool.lib;libisc.lib;libisccfg.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies) - $(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories) - - - - - - - - {3840E563-D180-4761-AA9C-E6155F02EAFF} - - - {5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A} - - - {B2DFA58C-6347-478E-81E8-01E06999D4F1} - - - {2CB7DC75-023B-4AA3-AF3A-AE5046A4EE70} - - - - - - diff --git a/bin/dnssec/win32/keygen.vcxproj.user b/bin/dnssec/win32/keygen.vcxproj.user deleted file mode 100644 index ace9a86acb..0000000000 --- a/bin/dnssec/win32/keygen.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/bin/dnssec/win32/revoke.vcxproj.filters.in b/bin/dnssec/win32/revoke.vcxproj.filters.in deleted file mode 100644 index 46e7310e20..0000000000 --- a/bin/dnssec/win32/revoke.vcxproj.filters.in +++ /dev/null @@ -1,18 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - \ No newline at end of file diff --git a/bin/dnssec/win32/revoke.vcxproj.in b/bin/dnssec/win32/revoke.vcxproj.in deleted file mode 100644 index 03eb175507..0000000000 --- a/bin/dnssec/win32/revoke.vcxproj.in +++ /dev/null @@ -1,132 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {D171F185-D3C2-4463-9CF3-ED1D0B1D6832} - Win32Proj - revoke - @WINDOWS_TARGET_PLATFORM_VERSION@ - - - - Application - true - MultiByte - @PLATFORM_TOOLSET@ - - - Application - false - true - MultiByte - @PLATFORM_TOOLSET@ - - - - - - - - - - - - - true - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - dnssec-$(ProjectName) - - - false - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - dnssec-$(ProjectName) - - - - - - Level4 - false - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - .\$(Configuration)\$(ProjectName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - true - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - $(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies) - - - - - Level1 - true - - - MaxSpeed - true - @INTRINSIC@ - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - OnlyExplicitInline - false - true - .\$(Configuration)\$(ProjectName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - false - true - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - Default - $(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies) - - - - - - - - {3840E563-D180-4761-AA9C-E6155F02EAFF} - - - {5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A} - - - {2CB7DC75-023B-4AA3-AF3A-AE5046A4EE70} - - - - - - diff --git a/bin/dnssec/win32/revoke.vcxproj.user b/bin/dnssec/win32/revoke.vcxproj.user deleted file mode 100644 index ace9a86acb..0000000000 --- a/bin/dnssec/win32/revoke.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/bin/dnssec/win32/settime.vcxproj.filters.in b/bin/dnssec/win32/settime.vcxproj.filters.in deleted file mode 100644 index 62b0e8230f..0000000000 --- a/bin/dnssec/win32/settime.vcxproj.filters.in +++ /dev/null @@ -1,18 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - \ No newline at end of file diff --git a/bin/dnssec/win32/settime.vcxproj.in b/bin/dnssec/win32/settime.vcxproj.in deleted file mode 100644 index 505f299ad5..0000000000 --- a/bin/dnssec/win32/settime.vcxproj.in +++ /dev/null @@ -1,132 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {03FB7588-C5A7-4572-968F-14F1206BC69C} - Win32Proj - settime - @WINDOWS_TARGET_PLATFORM_VERSION@ - - - - Application - true - MultiByte - @PLATFORM_TOOLSET@ - - - Application - false - true - MultiByte - @PLATFORM_TOOLSET@ - - - - - - - - - - - - - true - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - dnssec-$(ProjectName) - - - false - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - dnssec-$(ProjectName) - - - - - - Level4 - false - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - .\$(Configuration)\$(ProjectName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - true - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies) - $(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories) - - - - - Level1 - true - - - MaxSpeed - true - @INTRINSIC@ - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - OnlyExplicitInline - false - true - .\$(Configuration)\$(ProjectName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - false - true - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - Default - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies) - $(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories) - - - - - - - - {3840E563-D180-4761-AA9C-E6155F02EAFF} - - - {5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A} - - - {2CB7DC75-023B-4AA3-AF3A-AE5046A4EE70} - - - - - - diff --git a/bin/dnssec/win32/settime.vcxproj.user b/bin/dnssec/win32/settime.vcxproj.user deleted file mode 100644 index ace9a86acb..0000000000 --- a/bin/dnssec/win32/settime.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/bin/dnssec/win32/signzone.vcxproj.filters.in b/bin/dnssec/win32/signzone.vcxproj.filters.in deleted file mode 100644 index 682ae557f5..0000000000 --- a/bin/dnssec/win32/signzone.vcxproj.filters.in +++ /dev/null @@ -1,18 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - \ No newline at end of file diff --git a/bin/dnssec/win32/signzone.vcxproj.in b/bin/dnssec/win32/signzone.vcxproj.in deleted file mode 100644 index b53c10c15b..0000000000 --- a/bin/dnssec/win32/signzone.vcxproj.in +++ /dev/null @@ -1,132 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {205ED8A9-2E4C-41CC-9385-F3613402AA90} - Win32Proj - signzone - @WINDOWS_TARGET_PLATFORM_VERSION@ - - - - Application - true - MultiByte - @PLATFORM_TOOLSET@ - - - Application - false - true - MultiByte - @PLATFORM_TOOLSET@ - - - - - - - - - - - - - true - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - dnssec-$(ProjectName) - - - false - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - dnssec-$(ProjectName) - - - - - - Level4 - false - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - .\$(Configuration)\$(ProjectName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - true - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - $(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies) - - - - - Level1 - true - - - MaxSpeed - true - @INTRINSIC@ - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - OnlyExplicitInline - false - true - .\$(Configuration)\$(ProjectName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - false - true - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - Default - $(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies) - - - - - - - - {3840E563-D180-4761-AA9C-E6155F02EAFF} - - - {5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A} - - - {2CB7DC75-023B-4AA3-AF3A-AE5046A4EE70} - - - - - - diff --git a/bin/dnssec/win32/signzone.vcxproj.user b/bin/dnssec/win32/signzone.vcxproj.user deleted file mode 100644 index ace9a86acb..0000000000 --- a/bin/dnssec/win32/signzone.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/bin/dnssec/win32/verify.vcxproj.filters.in b/bin/dnssec/win32/verify.vcxproj.filters.in deleted file mode 100644 index 3b194bdfc0..0000000000 --- a/bin/dnssec/win32/verify.vcxproj.filters.in +++ /dev/null @@ -1,18 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - \ No newline at end of file diff --git a/bin/dnssec/win32/verify.vcxproj.in b/bin/dnssec/win32/verify.vcxproj.in deleted file mode 100644 index 9eab75887c..0000000000 --- a/bin/dnssec/win32/verify.vcxproj.in +++ /dev/null @@ -1,132 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {FD653434-F1A8-44A9-85B2-A7468491DA6D} - Win32Proj - verify - @WINDOWS_TARGET_PLATFORM_VERSION@ - - - - Application - true - MultiByte - @PLATFORM_TOOLSET@ - - - Application - false - true - MultiByte - @PLATFORM_TOOLSET@ - - - - - - - - - - - - - true - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - dnssec-$(ProjectName) - - - false - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - dnssec-$(ProjectName) - - - - - - Level4 - false - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - .\$(Configuration)\$(ProjectName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - true - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies) - $(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories) - - - - - Level1 - true - - - MaxSpeed - true - @INTRINSIC@ - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - OnlyExplicitInline - false - true - .\$(Configuration)\$(ProjectName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - false - true - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - Default - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@dnssectool.lib;libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies) - $(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories) - - - - - - - - {3840E563-D180-4761-AA9C-E6155F02EAFF} - - - {5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A} - - - {2CB7DC75-023B-4AA3-AF3A-AE5046A4EE70} - - - - - - diff --git a/bin/dnssec/win32/verify.vcxproj.user b/bin/dnssec/win32/verify.vcxproj.user deleted file mode 100644 index ace9a86acb..0000000000 --- a/bin/dnssec/win32/verify.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/bin/named/Makefile.am b/bin/named/Makefile.am index 548229a807..bd276c96c7 100644 --- a/bin/named/Makefile.am +++ b/bin/named/Makefile.am @@ -1,7 +1,6 @@ include $(top_srcdir)/Makefile.top AM_CPPFLAGS += \ - -I$(srcdir)/unix/include \ -I$(top_builddir)/include \ $(LIBISC_CFLAGS) \ $(LIBDNS_CFLAGS) \ @@ -52,18 +51,18 @@ named_SOURCES = \ config.c \ control.c \ controlconf.c \ + dlz_dlopen_driver.c \ fuzz.c \ log.c \ logconf.c \ main.c \ + os.c \ server.c \ statschannel.c \ tkeyconf.c \ transportconf.c \ tsigconf.c \ zoneconf.c \ - unix/dlz_dlopen_driver.c \ - unix/os.c \ include/dlz/dlz_dlopen_driver.h \ include/named/builtin.h \ include/named/config.h \ @@ -74,6 +73,7 @@ named_SOURCES = \ include/named/log.h \ include/named/logconf.h \ include/named/main.h \ + include/named/os.h \ include/named/server.h \ include/named/smf_globals.h \ include/named/statschannel.h \ @@ -82,7 +82,6 @@ named_SOURCES = \ include/named/tsigconf.h \ include/named/types.h \ include/named/zoneconf.h \ - unix/include/named/os.h \ xsl_p.h if HAVE_GEOIP2 diff --git a/bin/named/config.c b/bin/named/config.c index 6f56fbadbc..7e4757a4fe 100644 --- a/bin/named/config.c +++ b/bin/named/config.c @@ -50,27 +50,23 @@ options {\n\ bindkeys-file \"" NAMED_SYSCONFDIR "/bind.keys\";\n\ # blackhole {none;};\n" " cookie-algorithm siphash24;\n" -#ifndef WIN32 " coresize default;\n\ datasize default;\n" -#endif /* ifndef WIN32 */ "\ # deallocate-on-exit ;\n\ # directory \n\ dnssec-policy \"none\";\n\ dump-file \"named_dump.db\";\n\ edns-udp-size 1232;\n\ -# fake-iquery ;\n" -#ifndef WIN32 - " files unlimited;\n" -#endif /* ifndef WIN32 */ -#if defined(HAVE_GEOIP2) && !defined(WIN32) +# fake-iquery ;\n\ + files unlimited;\n" +#if defined(HAVE_GEOIP2) " geoip-directory \"" MAXMINDDB_PREFIX "/share/" "GeoIP\";" "\n" #elif defined(HAVE_GEOIP2) " geoip-directory \".\";\n" -#endif /* if defined(HAVE_GEOIP2) && !defined(WIN32) */ +#endif /* if defined(HAVE_GEOIP2) */ "\ # has-old-clients ;\n\ heartbeat-interval 60;\n\ @@ -110,11 +106,9 @@ options {\n\ server-id none;\n\ session-keyalg hmac-sha256;\n\ # session-keyfile \"" NAMED_LOCALSTATEDIR "/run/named/session.key\";\n\ - session-keyname local-ddns;\n" -#ifndef WIN32 - " stacksize default;\n" -#endif /* ifndef WIN32 */ - " startup-notify-rate 20;\n\ + session-keyname local-ddns;\n\ + stacksize default;\n\ + startup-notify-rate 20;\n\ statistics-file \"named.stats\";\n\ # statistics-interval ;\n\ tcp-advertised-timeout 300;\n\ diff --git a/bin/named/controlconf.c b/bin/named/controlconf.c index 6139799fb8..00897d1b53 100644 --- a/bin/named/controlconf.c +++ b/bin/named/controlconf.c @@ -1149,9 +1149,7 @@ add_listener(named_controls_t *cp, controllistener_t **listenerp, pf = isc_sockaddr_pf(&listener->address); if ((pf == AF_INET && isc_net_probeipv4() != ISC_R_SUCCESS) || -#ifndef _WIN32 (pf == AF_UNIX && isc_net_probeunix() != ISC_R_SUCCESS) || -#endif /* ifdef _WIN32 */ (pf == AF_INET6 && isc_net_probeipv6() != ISC_R_SUCCESS)) { CHECK(ISC_R_FAMILYNOSUPPORT); diff --git a/bin/named/unix/dlz_dlopen_driver.c b/bin/named/dlz_dlopen_driver.c similarity index 100% rename from bin/named/unix/dlz_dlopen_driver.c rename to bin/named/dlz_dlopen_driver.c diff --git a/bin/named/include/named/main.h b/bin/named/include/named/main.h index 3a3a7c1078..eae85df8f7 100644 --- a/bin/named/include/named/main.h +++ b/bin/named/include/named/main.h @@ -20,7 +20,7 @@ #endif /* ifdef ISC_MAIN_HOOK */ /* - * Commandline arguments for named; also referenced in win32/ntservice.c + * Commandline arguments for named; */ #define NAMED_MAIN_ARGS "46A:c:d:D:E:fFgL:M:m:n:N:p:sS:t:T:U:u:vVx:X:" diff --git a/bin/named/unix/include/named/os.h b/bin/named/include/named/os.h similarity index 100% rename from bin/named/unix/include/named/os.h rename to bin/named/include/named/os.h diff --git a/bin/named/main.c b/bin/named/main.c index 28bfdd57f6..46f4b57a9c 100644 --- a/bin/named/main.c +++ b/bin/named/main.c @@ -555,9 +555,7 @@ printversion(bool verbose) { /* * The default rndc.conf and rndc.key paths are in the same * directory, but named only has rndc.key defined internally. - * We construct the rndc.conf path from it. (We could use - * NAMED_SYSCONFDIR here but the result would look wrong on - * Windows.) + * We construct the rndc.conf path from it. */ strlcpy(rndcconf, named_g_keyfile, sizeof(rndcconf)); dot = strrchr(rndcconf, '.'); @@ -923,16 +921,12 @@ create_managers(void) { ISC_LOG_INFO, "found %u CPU%s, using %u worker thread%s", named_g_cpus_detected, named_g_cpus_detected == 1 ? "" : "s", named_g_cpus, named_g_cpus == 1 ? "" : "s"); -#ifdef WIN32 - named_g_udpdisp = 1; -#else /* ifdef WIN32 */ if (named_g_udpdisp == 0) { named_g_udpdisp = named_g_cpus_detected; } if (named_g_udpdisp > named_g_cpus) { named_g_udpdisp = named_g_cpus; } -#endif /* ifdef WIN32 */ isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER, ISC_LOG_INFO, "using %u UDP listener%s per interface", named_g_udpdisp, @@ -1154,7 +1148,6 @@ setup(void) { /* * Get the initial resource limits. */ -#ifndef WIN32 RUNTIME_CHECK(isc_resource_getlimit(isc_resource_stacksize, &named_g_initstacksize) == ISC_R_SUCCESS); @@ -1164,7 +1157,6 @@ setup(void) { RUNTIME_CHECK(isc_resource_getlimit(isc_resource_coresize, &named_g_initcoresize) == ISC_R_SUCCESS); -#endif /* ifndef WIN32 */ RUNTIME_CHECK(isc_resource_getlimit(isc_resource_openfiles, &named_g_initopenfiles) == ISC_R_SUCCESS); @@ -1427,17 +1419,6 @@ main(int argc, char *argv[]) { (void)ProfilerStart(NULL); #endif /* ifdef HAVE_GPERFTOOLS_PROFILER */ -#ifdef WIN32 - /* - * Prevent unbuffered I/O from crippling named performance on Windows - * when it is logging to stderr (e.g. in system tests). Use full - * buffering (_IOFBF) as line buffering (_IOLBF) is unavailable on - * Windows and fflush() is called anyway after each log message gets - * written to the default stderr logging channels created by libisc. - */ - setvbuf(stderr, NULL, _IOFBF, BUFSIZ); -#endif /* ifdef WIN32 */ - #ifdef HAVE_LIBXML2 xmlInitThreads(); #endif /* HAVE_LIBXML2 */ diff --git a/bin/named/named.rst b/bin/named/named.rst index 3fa96e038c..60eb3fb751 100644 --- a/bin/named/named.rst +++ b/bin/named/named.rst @@ -164,8 +164,7 @@ Options This cannot be increased to a value higher than the number of CPUs. If ``-n`` has been set to a higher value than the number of detected CPUs, then ``-U`` may be increased as high as that value, but no - higher. On Windows, the number of UDP listeners is hardwired to 1 and - this option has no effect. + higher. ``-u user`` This option sets the setuid to ``user`` after completing privileged operations, such as diff --git a/bin/named/unix/os.c b/bin/named/os.c similarity index 100% rename from bin/named/unix/os.c rename to bin/named/os.c diff --git a/bin/named/unix/include/.clang-format b/bin/named/unix/include/.clang-format deleted file mode 120000 index e919bbad93..0000000000 --- a/bin/named/unix/include/.clang-format +++ /dev/null @@ -1 +0,0 @@ -../../../../.clang-format.headers \ No newline at end of file diff --git a/bin/named/win32/dlz_dlopen_driver.c b/bin/named/win32/dlz_dlopen_driver.c deleted file mode 100644 index 6d063ad052..0000000000 --- a/bin/named/win32/dlz_dlopen_driver.c +++ /dev/null @@ -1,567 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include - -#include -#include - -static dns_sdlzimplementation_t *dlz_dlopen = NULL; - -typedef struct dlopen_data { - isc_mem_t *mctx; - char *dl_path; - char *dlzname; - HMODULE dl_handle; - void *dbdata; - unsigned int flags; - isc_mutex_t lock; - int version; - bool in_configure; - - dlz_dlopen_version_t *dlz_version; - dlz_dlopen_create_t *dlz_create; - dlz_dlopen_findzonedb_t *dlz_findzonedb; - dlz_dlopen_lookup_t *dlz_lookup; - dlz_dlopen_authority_t *dlz_authority; - dlz_dlopen_allnodes_t *dlz_allnodes; - dlz_dlopen_allowzonexfr_t *dlz_allowzonexfr; - dlz_dlopen_newversion_t *dlz_newversion; - dlz_dlopen_closeversion_t *dlz_closeversion; - dlz_dlopen_configure_t *dlz_configure; - dlz_dlopen_ssumatch_t *dlz_ssumatch; - dlz_dlopen_addrdataset_t *dlz_addrdataset; - dlz_dlopen_subrdataset_t *dlz_subrdataset; - dlz_dlopen_delrdataset_t *dlz_delrdataset; - dlz_dlopen_destroy_t *dlz_destroy; -} dlopen_data_t; - -/* Modules can choose whether they are lock-safe or not. */ -#define MAYBE_LOCK(cd) \ - do { \ - if ((cd->flags & DNS_SDLZFLAG_THREADSAFE) == 0 && \ - !cd->in_configure) \ - LOCK(&cd->lock); \ - } while (0) - -#define MAYBE_UNLOCK(cd) \ - do { \ - if ((cd->flags & DNS_SDLZFLAG_THREADSAFE) == 0 && \ - !cd->in_configure) \ - UNLOCK(&cd->lock); \ - } while (0) - -/* - * Log a message at the given level. - */ -static void -dlopen_log(int level, const char *fmt, ...) { - va_list ap; - va_start(ap, fmt); - isc_log_vwrite(dns_lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DLZ, - ISC_LOG_DEBUG(level), fmt, ap); - va_end(ap); -} - -/* - * SDLZ methods - */ - -static isc_result_t -dlopen_dlz_allnodes(const char *zone, void *driverarg, void *dbdata, - dns_sdlzallnodes_t *allnodes) { - dlopen_data_t *cd = (dlopen_data_t *)dbdata; - isc_result_t result; - - UNUSED(driverarg); - - if (cd->dlz_allnodes == NULL) { - return (ISC_R_NOPERM); - } - - MAYBE_LOCK(cd); - result = cd->dlz_allnodes(zone, cd->dbdata, allnodes); - MAYBE_UNLOCK(cd); - return (result); -} - -static isc_result_t -dlopen_dlz_allowzonexfr(void *driverarg, void *dbdata, const char *name, - const char *client) { - dlopen_data_t *cd = (dlopen_data_t *)dbdata; - isc_result_t result; - - UNUSED(driverarg); - - if (cd->dlz_allowzonexfr == NULL) { - return (ISC_R_NOPERM); - } - - MAYBE_LOCK(cd); - result = cd->dlz_allowzonexfr(cd->dbdata, name, client); - MAYBE_UNLOCK(cd); - return (result); -} - -static isc_result_t -dlopen_dlz_authority(const char *zone, void *driverarg, void *dbdata, - dns_sdlzlookup_t *lookup) { - dlopen_data_t *cd = (dlopen_data_t *)dbdata; - isc_result_t result; - - UNUSED(driverarg); - - if (cd->dlz_authority == NULL) { - return (ISC_R_NOTIMPLEMENTED); - } - - MAYBE_LOCK(cd); - result = cd->dlz_authority(zone, cd->dbdata, lookup); - MAYBE_UNLOCK(cd); - return (result); -} - -static isc_result_t -dlopen_dlz_findzonedb(void *driverarg, void *dbdata, const char *name, - dns_clientinfomethods_t *methods, - dns_clientinfo_t *clientinfo) { - dlopen_data_t *cd = (dlopen_data_t *)dbdata; - isc_result_t result; - - UNUSED(driverarg); - - MAYBE_LOCK(cd); - result = cd->dlz_findzonedb(cd->dbdata, name, methods, clientinfo); - MAYBE_UNLOCK(cd); - return (result); -} - -static isc_result_t -dlopen_dlz_lookup(const char *zone, const char *name, void *driverarg, - void *dbdata, dns_sdlzlookup_t *lookup, - dns_clientinfomethods_t *methods, - dns_clientinfo_t *clientinfo) { - dlopen_data_t *cd = (dlopen_data_t *)dbdata; - isc_result_t result; - - UNUSED(driverarg); - - MAYBE_LOCK(cd); - result = cd->dlz_lookup(zone, name, cd->dbdata, lookup, methods, - clientinfo); - MAYBE_UNLOCK(cd); - return (result); -} - -/* - * Load a symbol from the library - */ -static void * -dl_load_symbol(dlopen_data_t *cd, const char *symbol, bool mandatory) { - void *ptr = GetProcAddress(cd->dl_handle, symbol); - if (ptr == NULL && mandatory) { - dlopen_log(ISC_LOG_ERROR, - "dlz_dlopen: library '%s' is missing " - "required symbol '%s'", - cd->dl_path, symbol); - } - return (ptr); -} - -/* - * Called at startup for each dlopen zone in named.conf - */ -static isc_result_t -dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[], - void *driverarg, void **dbdata) { - dlopen_data_t *cd; - isc_mem_t *mctx = NULL; - isc_result_t result = ISC_R_FAILURE; - bool triedload = false; - - UNUSED(driverarg); - - if (argc < 2) { - dlopen_log(ISC_LOG_ERROR, - "dlz_dlopen driver for '%s' needs a path to " - "the shared library", - dlzname); - return (ISC_R_FAILURE); - } - - isc_mem_create(&mctx); - - cd = isc_mem_get(mctx, sizeof(*cd)); - memset(cd, 0, sizeof(*cd)); - - cd->mctx = mctx; - - cd->dl_path = isc_mem_strdup(cd->mctx, argv[1]); - - cd->dlzname = isc_mem_strdup(cd->mctx, dlzname); - - triedload = true; - - /* Initialize the lock */ - isc_mutex_init(&cd->lock); - - /* Open the library */ - cd->dl_handle = LoadLibraryA(cd->dl_path); - if (cd->dl_handle == NULL) { - unsigned int error = GetLastError(); - - dlopen_log(ISC_LOG_ERROR, - "dlz_dlopen failed to open library '%s' - %u", - cd->dl_path, error); - result = ISC_R_FAILURE; - goto cleanup_lock; - } - - /* Find the symbols */ - cd->dlz_version = - (dlz_dlopen_version_t *)dl_load_symbol(cd, "dlz_version", true); - cd->dlz_create = (dlz_dlopen_create_t *)dl_load_symbol(cd, "dlz_create", - true); - cd->dlz_lookup = (dlz_dlopen_lookup_t *)dl_load_symbol(cd, "dlz_lookup", - true); - cd->dlz_findzonedb = (dlz_dlopen_findzonedb_t *)dl_load_symbol( - cd, "dlz_findzonedb", true); - - if (cd->dlz_create == NULL || cd->dlz_version == NULL || - cd->dlz_lookup == NULL || cd->dlz_findzonedb == NULL) - { - /* We're missing a required symbol */ - result = ISC_R_FAILURE; - goto cleanup_lock; - } - - cd->dlz_allowzonexfr = (dlz_dlopen_allowzonexfr_t *)dl_load_symbol( - cd, "dlz_allowzonexfr", false); - cd->dlz_allnodes = (dlz_dlopen_allnodes_t *)dl_load_symbol( - cd, "dlz_allnodes", (cd->dlz_allowzonexfr != NULL)); - cd->dlz_authority = (dlz_dlopen_authority_t *)dl_load_symbol( - cd, "dlz_authority", false); - cd->dlz_newversion = (dlz_dlopen_newversion_t *)dl_load_symbol( - cd, "dlz_newversion", false); - cd->dlz_closeversion = (dlz_dlopen_closeversion_t *)dl_load_symbol( - cd, "dlz_closeversion", (cd->dlz_newversion != NULL)); - cd->dlz_configure = (dlz_dlopen_configure_t *)dl_load_symbol( - cd, "dlz_configure", false); - cd->dlz_ssumatch = (dlz_dlopen_ssumatch_t *)dl_load_symbol( - cd, "dlz_ssumatch", false); - cd->dlz_addrdataset = (dlz_dlopen_addrdataset_t *)dl_load_symbol( - cd, "dlz_addrdataset", false); - cd->dlz_subrdataset = (dlz_dlopen_subrdataset_t *)dl_load_symbol( - cd, "dlz_subrdataset", false); - cd->dlz_delrdataset = (dlz_dlopen_delrdataset_t *)dl_load_symbol( - cd, "dlz_delrdataset", false); - - /* Check the version of the API is the same */ - cd->version = cd->dlz_version(&cd->flags); - if (cd->version < (DLZ_DLOPEN_VERSION - DLZ_DLOPEN_AGE) || - cd->version > DLZ_DLOPEN_VERSION) - { - dlopen_log(ISC_LOG_ERROR, - "dlz_dlopen: %s: incorrect driver API version %d, " - "requires %d", - cd->dl_path, cd->version, DLZ_DLOPEN_VERSION); - result = ISC_R_FAILURE; - goto cleanup_lock; - } - - /* - * Call the library's create function. Note that this is an - * extended version of dlz create, with the addition of - * named function pointers for helper functions that the - * driver will need. This avoids the need for the backend to - * link the BIND9 libraries - */ - MAYBE_LOCK(cd); - result = cd->dlz_create(dlzname, argc - 1, argv + 1, &cd->dbdata, "log", - dlopen_log, "putrr", dns_sdlz_putrr, - "putnamedrr", dns_sdlz_putnamedrr, - "writeable_zone", dns_dlz_writeablezone, NULL); - MAYBE_UNLOCK(cd); - if (result != ISC_R_SUCCESS) { - goto cleanup_lock; - } - - *dbdata = cd; - - return (ISC_R_SUCCESS); - -cleanup_lock: - isc_mutex_destroy(&cd->lock); -failed: - dlopen_log(ISC_LOG_ERROR, "dlz_dlopen of '%s' failed", dlzname); - if (cd->dl_path) { - isc_mem_free(mctx, cd->dl_path); - } - if (cd->dlzname) { - isc_mem_free(mctx, cd->dlzname); - } - if (triedload) { - isc_mutex_destroy(&cd->lock); - } - if (cd->dl_handle) { - FreeLibrary(cd->dl_handle); - } - isc_mem_put(mctx, cd, sizeof(*cd)); - isc_mem_destroy(&mctx); - return (result); -} - -/* - * Called when bind is shutting down - */ -static void -dlopen_dlz_destroy(void *driverarg, void *dbdata) { - dlopen_data_t *cd = (dlopen_data_t *)dbdata; - isc_mem_t *mctx; - - UNUSED(driverarg); - - if (cd->dlz_destroy) { - MAYBE_LOCK(cd); - cd->dlz_destroy(cd->dbdata); - MAYBE_UNLOCK(cd); - } - - if (cd->dl_path) { - isc_mem_free(cd->mctx, cd->dl_path); - } - if (cd->dlzname) { - isc_mem_free(cd->mctx, cd->dlzname); - } - - if (cd->dl_handle) { - FreeLibrary(cd->dl_handle); - } - - isc_mutex_destroy(&cd->lock); - - mctx = cd->mctx; - isc_mem_put(mctx, cd, sizeof(*cd)); - isc_mem_destroy(&mctx); -} - -/* - * Called to start a transaction - */ -static isc_result_t -dlopen_dlz_newversion(const char *zone, void *driverarg, void *dbdata, - void **versionp) { - dlopen_data_t *cd = (dlopen_data_t *)dbdata; - isc_result_t result; - - UNUSED(driverarg); - - if (cd->dlz_newversion == NULL) { - return (ISC_R_NOTIMPLEMENTED); - } - - MAYBE_LOCK(cd); - result = cd->dlz_newversion(zone, cd->dbdata, versionp); - MAYBE_UNLOCK(cd); - return (result); -} - -/* - * Called to end a transaction - */ -static void -dlopen_dlz_closeversion(const char *zone, bool commit, void *driverarg, - void *dbdata, void **versionp) { - dlopen_data_t *cd = (dlopen_data_t *)dbdata; - - UNUSED(driverarg); - - if (cd->dlz_newversion == NULL) { - *versionp = NULL; - return; - } - - MAYBE_LOCK(cd); - cd->dlz_closeversion(zone, commit, cd->dbdata, versionp); - MAYBE_UNLOCK(cd); -} - -/* - * Called on startup to configure any writeable zones - */ -static isc_result_t -dlopen_dlz_configure(dns_view_t *view, dns_dlzdb_t *dlzdb, void *driverarg, - void *dbdata) { - dlopen_data_t *cd = (dlopen_data_t *)dbdata; - isc_result_t result; - - UNUSED(driverarg); - - if (cd->dlz_configure == NULL) { - return (ISC_R_SUCCESS); - } - - MAYBE_LOCK(cd); - cd->in_configure = true; - result = cd->dlz_configure(view, dlzdb, cd->dbdata); - cd->in_configure = false; - MAYBE_UNLOCK(cd); - - return (result); -} - -/* - * Check for authority to change a name - */ -static bool -dlopen_dlz_ssumatch(const char *signer, const char *name, const char *tcpaddr, - const char *type, const char *key, uint32_t keydatalen, - unsigned char *keydata, void *driverarg, void *dbdata) { - dlopen_data_t *cd = (dlopen_data_t *)dbdata; - bool ret; - - UNUSED(driverarg); - - if (cd->dlz_ssumatch == NULL) { - return (false); - } - - MAYBE_LOCK(cd); - ret = cd->dlz_ssumatch(signer, name, tcpaddr, type, key, keydatalen, - keydata, cd->dbdata); - MAYBE_UNLOCK(cd); - - return (ret); -} - -/* - * Add an rdataset - */ -static isc_result_t -dlopen_dlz_addrdataset(const char *name, const char *rdatastr, void *driverarg, - void *dbdata, void *version) { - dlopen_data_t *cd = (dlopen_data_t *)dbdata; - isc_result_t result; - - UNUSED(driverarg); - - if (cd->dlz_addrdataset == NULL) { - return (ISC_R_NOTIMPLEMENTED); - } - - MAYBE_LOCK(cd); - result = cd->dlz_addrdataset(name, rdatastr, cd->dbdata, version); - MAYBE_UNLOCK(cd); - - return (result); -} - -/* - * Subtract an rdataset - */ -static isc_result_t -dlopen_dlz_subrdataset(const char *name, const char *rdatastr, void *driverarg, - void *dbdata, void *version) { - dlopen_data_t *cd = (dlopen_data_t *)dbdata; - isc_result_t result; - - UNUSED(driverarg); - - if (cd->dlz_subrdataset == NULL) { - return (ISC_R_NOTIMPLEMENTED); - } - - MAYBE_LOCK(cd); - result = cd->dlz_subrdataset(name, rdatastr, cd->dbdata, version); - MAYBE_UNLOCK(cd); - - return (result); -} - -/* - * delete a rdataset - */ -static isc_result_t -dlopen_dlz_delrdataset(const char *name, const char *type, void *driverarg, - void *dbdata, void *version) { - dlopen_data_t *cd = (dlopen_data_t *)dbdata; - isc_result_t result; - - UNUSED(driverarg); - - if (cd->dlz_delrdataset == NULL) { - return (ISC_R_NOTIMPLEMENTED); - } - - MAYBE_LOCK(cd); - result = cd->dlz_delrdataset(name, type, cd->dbdata, version); - MAYBE_UNLOCK(cd); - - return (result); -} - -static dns_sdlzmethods_t dlz_dlopen_methods = { - dlopen_dlz_create, dlopen_dlz_destroy, dlopen_dlz_findzonedb, - dlopen_dlz_lookup, dlopen_dlz_authority, dlopen_dlz_allnodes, - dlopen_dlz_allowzonexfr, dlopen_dlz_newversion, dlopen_dlz_closeversion, - dlopen_dlz_configure, dlopen_dlz_ssumatch, dlopen_dlz_addrdataset, - dlopen_dlz_subrdataset, dlopen_dlz_delrdataset -}; - -/* - * Register driver with BIND - */ -isc_result_t -dlz_dlopen_init(isc_mem_t *mctx) { - isc_result_t result; - - dlopen_log(2, "Registering DLZ_dlopen driver"); - - result = dns_sdlzregister("dlopen", &dlz_dlopen_methods, NULL, - DNS_SDLZFLAG_RELATIVEOWNER | - DNS_SDLZFLAG_RELATIVERDATA | - DNS_SDLZFLAG_THREADSAFE, - mctx, &dlz_dlopen); - - if (result != ISC_R_SUCCESS) { - UNEXPECTED_ERROR(__FILE__, __LINE__, - "dns_sdlzregister() failed: %s", - isc_result_totext(result)); - result = ISC_R_UNEXPECTED; - } - - return (result); -} - -/* - * Unregister the driver - */ -void -dlz_dlopen_clear(void) { - dlopen_log(2, "Unregistering DLZ_dlopen driver"); - if (dlz_dlopen != NULL) { - dns_sdlzunregister(&dlz_dlopen); - } -} diff --git a/bin/named/win32/include/.clang-format b/bin/named/win32/include/.clang-format deleted file mode 120000 index e919bbad93..0000000000 --- a/bin/named/win32/include/.clang-format +++ /dev/null @@ -1 +0,0 @@ -../../../../.clang-format.headers \ No newline at end of file diff --git a/bin/named/win32/include/named/ntservice.h b/bin/named/win32/include/named/ntservice.h deleted file mode 100644 index 59eb5e0d18..0000000000 --- a/bin/named/win32/include/named/ntservice.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#ifndef NTSERVICE_H -#define NTSERVICE_H - -#include - -#define BIND_DISPLAY_NAME "ISC BIND" -#define BIND_SERVICE_NAME "named" - -void - ntservice_init(void); -void UpdateSCM(DWORD); -void -ServiceControl(DWORD dwCtrlCode); -void -ntservice_shutdown(void); -BOOL -ntservice_isservice(void); -#endif /* ifndef NTSERVICE_H */ diff --git a/bin/named/win32/include/named/os.h b/bin/named/win32/include/named/os.h deleted file mode 100644 index 4e6f1f02ad..0000000000 --- a/bin/named/win32/include/named/os.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#ifndef NAMED_OS_H -#define NAMED_OS_H 1 - -#include - -#include - -void -named_os_init(const char *progname); - -void -named_os_daemonize(void); - -void -named_os_opendevnull(void); - -void -named_os_closedevnull(void); - -void -named_os_chroot(const char *root); - -void -named_os_inituserinfo(const char *username); - -void -named_os_changeuser(void); - -unsigned int -ns_os_uid(void); - -void -named_os_adjustnofile(void); - -void -named_os_minprivs(void); - -FILE * -named_os_openfile(const char *filename, int mode, bool switch_user); - -void -named_os_writepidfile(const char *filename, bool first_time); - -bool -named_os_issingleton(const char *filename); - -void -named_os_shutdown(void); - -isc_result_t -named_os_gethostname(char *buf, size_t len); - -void -named_os_shutdownmsg(char *command, isc_buffer_t *text); - -void -named_os_tzset(void); - -void -named_os_started(void); - -const char * -named_os_uname(void); - -#endif /* NAMED_OS_H */ diff --git a/bin/named/win32/named.vcxproj.filters.in b/bin/named/win32/named.vcxproj.filters.in deleted file mode 100644 index 76e358f060..0000000000 --- a/bin/named/win32/named.vcxproj.filters.in +++ /dev/null @@ -1,133 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - -@IF GEOIP - - Source Files - -@END GEOIP - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - -@IF GEOIP - - Header Files - -@END GEOIP - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - diff --git a/bin/named/win32/named.vcxproj.in b/bin/named/win32/named.vcxproj.in deleted file mode 100644 index b6e96dfe4e..0000000000 --- a/bin/named/win32/named.vcxproj.in +++ /dev/null @@ -1,194 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {723C65DA-A96C-4BA3-A34E-44F11CA346F9} - Win32Proj - named - @WINDOWS_TARGET_PLATFORM_VERSION@ - - - - Application - true - MultiByte - @PLATFORM_TOOLSET@ - - - Application - false - true - MultiByte - @PLATFORM_TOOLSET@ - - - - - - - - - - - - - true - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - - - false - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - - - - - - Level4 - false - Disabled - WIN32;BUILDER="Visual Studio";_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - true - ..\..\..\config.h - @LIBUV_INC@@NGHTTP2_INC@@OPENSSL_INC@@GSSAPI_INC@@GEOIP_INC@.\;..\..\..\;@LIBXML2_INC@..\win32\include;..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;..\..\..\lib\isccc\include;..\..\..\lib\isccfg\include;..\..\..\lib\bind9\include;..\..\..\lib\ns\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - ..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);..\..\..\lib\ns\win32\$(Configuration);%(AdditionalLibraryDirectories) - @LIBUV_LIB@@NGHTTP2_LIB@@OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@@LIBXML2_LIB@@GSSAPI_LIB@@GEOIP_LIB@libisc.lib;libdns.lib;libisccc.lib;libisccfg.lib;libbind9.lib;libns.lib;version.lib;ws2_32.lib;%(AdditionalDependencies) - - - cd .. -perl -e "print \"const char xslmsg[] =\n\";" > xsl.c -perl -p -e "s/\"/\\\\\"/g;" -e "s/^/\"/;" -e "s/$/\"/;" < bind9.xsl >> xsl.c -perl -e "print \";\";" >> xsl.c - - - - - - Level1 - true - - - MaxSpeed - true - @INTRINSIC@ - WIN32;BUILDER="Visual Studio";NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - OnlyExplicitInline - false - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - ..\..\..\config.h - @LIBUV_INC@@NGHTTP2_INC@@OPENSSL_INC@@GSSAPI_INC@@GEOIP_INC@.\;..\..\..\;@LIBXML2_INC@..\win32\include;..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;..\..\..\lib\isccc\include;..\..\..\lib\isccfg\include;..\..\..\lib\bind9\include;..\..\..\lib\ns\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - false - true - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - Default - ..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccc\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);..\..\..\lib\ns\win32\$(Configuration);%(AdditionalLibraryDirectories) - @LIBUV_LIB@@NGHTTP2_LIB@@OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@@LIBXML2_LIB@@GSSAPI_LIB@@GEOIP_LIB@libisc.lib;libdns.lib;libisccc.lib;libisccfg.lib;libbind9.lib;libns.lib;version.lib;ws2_32.lib;%(AdditionalDependencies) - - - cd .. -perl -e "print \"const char xslmsg[] =\n\";" > xsl.c -perl -p -e "s/\"/\\\\\"/g;s/^/\"/;s/$/\"/;" < bind9.xsl >> xsl.c -perl -e "print \";\";" >> xsl.c - - - - - - - - -@IF GEOIP - -@END GEOIP - - - - - - - - - - - - - - - - - - -@IF GEOIP - -@END GEOIP - - - - - - - - - - - - - - - - - - {3840E563-D180-4761-AA9C-E6155F02EAFF} - - - {5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A} - - - {82ACD33C-E75F-45B8-BB6D-42643A10D7EE} - - - {B556705F-1920-4400-878A-B259D3556047} - - - {B2DFA58C-6347-478E-81E8-01E06999D4F1} - - - {E741C10B-B075-4206-9596-46765B665E03} - - - - - - diff --git a/bin/named/win32/named.vcxproj.user b/bin/named/win32/named.vcxproj.user deleted file mode 100644 index ace9a86acb..0000000000 --- a/bin/named/win32/named.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/bin/named/win32/ntservice.c b/bin/named/win32/ntservice.c deleted file mode 100644 index 1c686a3356..0000000000 --- a/bin/named/win32/ntservice.c +++ /dev/null @@ -1,175 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -/* Handle to SCM for updating service status */ -static SERVICE_STATUS_HANDLE hServiceStatus = 0; -static BOOL foreground = FALSE; -static char ConsoleTitle[128]; - -/* - * Forward declarations - */ -void -ServiceControl(DWORD dwCtrlCode); -int -bindmain(int, char *[]); /* From main.c */ - -/* - * Initialize the Service by registering it. - */ -void -ntservice_init(void) { - if (!foreground) { - /* Register handler with the SCM */ - hServiceStatus = RegisterServiceCtrlHandler( - BIND_SERVICE_NAME, (LPHANDLER_FUNCTION)ServiceControl); - if (!hServiceStatus) { - named_main_earlyfatal("could not register service " - "control handler"); - } - UpdateSCM(SERVICE_RUNNING); - } else { - snprintf(ConsoleTitle, sizeof(ConsoleTitle), "%s Version %s", - PACKAGE_NAME, PACKAGE_VERSION); - SetConsoleTitle(ConsoleTitle); - } -} - -void -ntservice_shutdown(void) { - UpdateSCM(SERVICE_STOPPED); -} -/* - * Routine to check if this is a service or a foreground program - */ -BOOL -ntservice_isservice(void) { - return (!foreground); -} -/* - * ServiceControl(): Handles requests from the SCM and passes them on - * to named. - */ -void -ServiceControl(DWORD dwCtrlCode) { - /* Handle the requested control code */ - switch (dwCtrlCode) { - case SERVICE_CONTROL_INTERROGATE: - UpdateSCM(0); - break; - - case SERVICE_CONTROL_SHUTDOWN: - case SERVICE_CONTROL_STOP: - named_server_flushonshutdown(named_g_server, true); - isc_app_shutdown(); - UpdateSCM(SERVICE_STOP_PENDING); - break; - default: - break; - } -} - -/* - * Tell the Service Control Manager the state of the service. - */ -void -UpdateSCM(DWORD state) { - SERVICE_STATUS ss; - static DWORD dwState = SERVICE_STOPPED; - - if (hServiceStatus) { - if (state) { - dwState = state; - } - - memset(&ss, 0, sizeof(SERVICE_STATUS)); - ss.dwServiceType |= SERVICE_WIN32_OWN_PROCESS; - ss.dwCurrentState = dwState; - ss.dwControlsAccepted = SERVICE_ACCEPT_STOP | - SERVICE_ACCEPT_SHUTDOWN; - ss.dwCheckPoint = 0; - ss.dwServiceSpecificExitCode = 0; - ss.dwWin32ExitCode = NO_ERROR; - ss.dwWaitHint = dwState == SERVICE_STOP_PENDING ? 10000 : 1000; - - if (!SetServiceStatus(hServiceStatus, &ss)) { - ss.dwCurrentState = SERVICE_STOPPED; - SetServiceStatus(hServiceStatus, &ss); - } - } -} - -/* unhook main */ - -#undef main - -/* - * This is the entry point for the executable - * We can now call bindmain() explicitly or via StartServiceCtrlDispatcher() - * as we need to. - */ -int -main(int argc, char *argv[]) { - int rc, ch; - - /* Command line users should put -f in the options. */ - isc_commandline_errprint = false; - while ((ch = isc_commandline_parse(argc, argv, NAMED_MAIN_ARGS)) != -1) - { - switch (ch) { - case 'f': - case 'g': - case 'v': - case 'V': - foreground = TRUE; - break; - default: - break; - } - } - isc_commandline_reset = true; - - if (foreground) { - /* run in console window */ - exit(bindmain(argc, argv)); - } else { - /* Start up as service */ - char *SERVICE_NAME = BIND_SERVICE_NAME; - - SERVICE_TABLE_ENTRY dispatchTable[] = { - { TEXT(SERVICE_NAME), - (LPSERVICE_MAIN_FUNCTION)bindmain }, - { NULL, NULL } - }; - - rc = StartServiceCtrlDispatcher(dispatchTable); - if (!rc) { - fprintf(stderr, "Use -f to run from the command " - "line.\n"); - /* will be 1063 when launched as a console app */ - exit(GetLastError()); - } - } - exit(0); -} diff --git a/bin/named/win32/os.c b/bin/named/win32/os.c deleted file mode 100644 index dc73b8fb1d..0000000000 --- a/bin/named/win32/os.c +++ /dev/null @@ -1,471 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -static char *lockfile = NULL; -static char *pidfile = NULL; -static int devnullfd = -1; -static int lockfilefd = -1; - -static BOOL Initialized = FALSE; - -static char *version_error = "named requires Windows 2000 Service Pack 2 or " - "later to run correctly"; - -void -named_paths_init(void) { - if (!Initialized) { - isc_ntpaths_init(); - } - - named_g_conffile = isc_ntpaths_get(NAMED_CONF_PATH); - named_g_defaultpidfile = isc_ntpaths_get(NAMED_PID_PATH); - named_g_defaultlockfile = isc_ntpaths_get(NAMED_LOCK_PATH); - named_g_keyfile = isc_ntpaths_get(RNDC_KEY_PATH); - named_g_defaultsessionkeyfile = isc_ntpaths_get(SESSION_KEY_PATH); - named_g_defaultbindkeys = isc_ntpaths_get(BIND_KEYS_PATH); - - Initialized = TRUE; -} - -/* - * Due to Knowledge base article Q263823 we need to make sure that - * Windows 2000 systems have Service Pack 2 or later installed and - * warn when it isn't. - */ -static void -version_check(const char *progname) { - if ((isc_win32os_versioncheck(4, 0, 0, 0) >= 0) && - (isc_win32os_versioncheck(5, 0, 0, 0) < 0)) - { - return; /* No problem with Version 4.0 */ - } - if (isc_win32os_versioncheck(5, 0, 2, 0) < 0) { - if (ntservice_isservice()) { - NTReportError(progname, version_error); - } else { - fprintf(stderr, "%s\n", version_error); - } - } -} - -static void -setup_syslog(const char *progname) { - int options; - - options = LOG_PID; -#ifdef LOG_NDELAY - options |= LOG_NDELAY; -#endif /* ifdef LOG_NDELAY */ - - openlog(progname, options, LOG_DAEMON); -} - -void -named_os_init(const char *progname) { - named_paths_init(); - setup_syslog(progname); - /* - * XXXMPA. We may need to split ntservice_init() in two and - * just mark as running in named_os_started(). If we do that - * this is where the first part of ntservice_init() should be - * called from. - * - * XXX970 Remove comment if no problems by 9.7.0. - * - * ntservice_init(); - */ - version_check(progname); - /* - * If running in a Cygwin environment, clear the SEM_NOGPFAULTERRORBOX - * bit in the process error mode to prevent Cygwin from concealing - * non-abort() crashes, giving Windows Error Reporting a chance to - * handle such crashes. This is done to ensure all crashes triggered - * by system tests can be detected. - */ - if (getenv("CYGWIN") != NULL) { - SetErrorMode(GetErrorMode() & ~SEM_NOGPFAULTERRORBOX); - } -} - -void -named_os_daemonize(void) { - /* - * Try to set stdin, stdout, and stderr to /dev/null, but press - * on even if it fails. - */ - if (devnullfd != -1) { - if (devnullfd != _fileno(stdin)) { - close(_fileno(stdin)); - (void)_dup2(devnullfd, _fileno(stdin)); - } - if (devnullfd != _fileno(stdout)) { - close(_fileno(stdout)); - (void)_dup2(devnullfd, _fileno(stdout)); - } - if (devnullfd != _fileno(stderr)) { - close(_fileno(stderr)); - (void)_dup2(devnullfd, _fileno(stderr)); - } - } -} - -void -named_os_opendevnull(void) { - devnullfd = open("NUL", O_RDWR, 0); -} - -void -named_os_closedevnull(void) { - if (devnullfd != _fileno(stdin) && devnullfd != _fileno(stdout) && - devnullfd != _fileno(stderr)) - { - close(devnullfd); - devnullfd = -1; - } -} - -void -named_os_chroot(const char *root) { - if (root != NULL) { - named_main_earlyfatal("chroot(): isn't supported by Win32 API"); - } -} - -void -named_os_inituserinfo(const char *username) {} - -void -named_os_changeuser(void) {} - -unsigned int -ns_os_uid(void) { - return (0); -} - -void -named_os_adjustnofile(void) {} - -void -named_os_minprivs(void) {} - -static int -safe_open(const char *filename, int mode, bool append) { - int fd; - struct stat sb; - - if (stat(filename, &sb) == -1) { - if (errno != ENOENT) { - return (-1); - } - } else if ((sb.st_mode & S_IFREG) == 0) { - return (-1); - } - - if (append) { - fd = open(filename, O_WRONLY | O_CREAT | O_APPEND, mode); - } else { - (void)unlink(filename); - fd = open(filename, O_WRONLY | O_CREAT | O_EXCL, mode); - } - return (fd); -} - -static void -cleanup_pidfile(void) { - if (pidfile != NULL) { - (void)unlink(pidfile); - free(pidfile); - } - pidfile = NULL; -} - -static void -cleanup_lockfile(void) { - if (lockfilefd != -1) { - close(lockfilefd); - lockfilefd = -1; - } - - if (lockfile != NULL) { - int n = unlink(lockfile); - if (n == -1 && errno != ENOENT) { - named_main_earlywarning("unlink '%s': failed", - lockfile); - } - free(lockfile); - lockfile = NULL; - } -} - -FILE * -named_os_openfile(const char *filename, int mode, bool switch_user) { - char strbuf[ISC_STRERRORSIZE]; - FILE *fp; - int fd; - - UNUSED(switch_user); - fd = safe_open(filename, mode, false); - if (fd < 0) { - strerror_s(strbuf, sizeof(strbuf), errno); - named_main_earlywarning("could not open file '%s': %s", - filename, strbuf); - return (NULL); - } - - fp = fdopen(fd, "w"); - if (fp == NULL) { - strerror_s(strbuf, sizeof(strbuf), errno); - named_main_earlywarning("could not fdopen() file '%s': %s", - filename, strbuf); - close(fd); - } - - return (fp); -} - -void -named_os_writepidfile(const char *filename, bool first_time) { - FILE *pidlockfile; - pid_t pid; - char strbuf[ISC_STRERRORSIZE]; - void (*report)(const char *, ...); - - /* - * The caller must ensure any required synchronization. - */ - - report = first_time ? named_main_earlyfatal : named_main_earlywarning; - - cleanup_pidfile(); - - if (filename == NULL) { - return; - } - - pidfile = strdup(filename); - if (pidfile == NULL) { - strerror_s(strbuf, sizeof(strbuf), errno); - (*report)("couldn't strdup() '%s': %s", filename, strbuf); - return; - } - - pidlockfile = named_os_openfile( - filename, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH, false); - if (pidlockfile == NULL) { - free(pidfile); - pidfile = NULL; - return; - } - - pid = getpid(); - - if (fprintf(pidlockfile, "%ld\n", (long)pid) < 0) { - (*report)("fprintf() to pid file '%s' failed", filename); - (void)fclose(pidlockfile); - cleanup_pidfile(); - return; - } - if (fflush(pidlockfile) == EOF) { - (*report)("fflush() to pid file '%s' failed", filename); - (void)fclose(pidlockfile); - cleanup_pidfile(); - return; - } - (void)fclose(pidlockfile); -} - -bool -named_os_issingleton(const char *filename) { - char strbuf[ISC_STRERRORSIZE]; - OVERLAPPED o; - - if (lockfilefd != -1) { - return (true); - } - - if (strcasecmp(filename, "none") == 0) { - return (true); - } - - lockfile = strdup(filename); - if (lockfile == NULL) { - strerror_s(strbuf, sizeof(strbuf), errno); - named_main_earlyfatal("couldn't allocate memory for '%s': %s", - filename, strbuf); - } - - /* - * named_os_openfile() uses safeopen() which removes any existing - * files. We can't use that here. - */ - lockfilefd = open(filename, O_WRONLY | O_CREAT, - S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); - if (lockfilefd == -1) { - cleanup_lockfile(); - return (false); - } - - memset(&o, 0, sizeof(o)); - /* Expect ERROR_LOCK_VIOLATION if already locked */ - if (!LockFileEx((HANDLE)_get_osfhandle(lockfilefd), - LOCKFILE_EXCLUSIVE_LOCK | LOCKFILE_FAIL_IMMEDIATELY, 0, - 0, 1, &o)) - { - cleanup_lockfile(); - return (false); - } - - return (true); -} - -void -named_os_shutdown(void) { - closelog(); - cleanup_pidfile(); - - if (lockfilefd != -1) { - (void)UnlockFile((HANDLE)_get_osfhandle(lockfilefd), 0, 0, 0, - 1); - } - cleanup_lockfile(); - - ntservice_shutdown(); /* This MUST be the last thing done */ -} - -isc_result_t -named_os_gethostname(char *buf, size_t len) { - int n; - - n = gethostname(buf, (int)len); - return ((n == 0) ? ISC_R_SUCCESS : ISC_R_FAILURE); -} - -void -named_os_shutdownmsg(char *command, isc_buffer_t *text) { - UNUSED(command); - UNUSED(text); -} - -void -named_os_tzset(void) { -#ifdef HAVE_TZSET - tzset(); -#endif /* ifdef HAVE_TZSET */ -} - -void -named_os_started(void) { - ntservice_init(); -} - -static char unamebuf[BUFSIZ]; -static const char *unamep = NULL; - -static void -getuname(void) { - DWORD fvilen; - char *fvi; - VS_FIXEDFILEINFO *ffi; - UINT ffilen; - SYSTEM_INFO sysinfo; - char *arch; - - fvi = NULL; - fvilen = GetFileVersionInfoSize("kernel32.dll", 0); - if (fvilen == 0) { - goto err; - } - fvi = (char *)malloc(fvilen); - if (fvi == NULL) { - goto err; - } - memset(fvi, 0, fvilen); - if (GetFileVersionInfo("kernel32.dll", 0, fvilen, fvi) == 0) { - goto err; - } - ffi = NULL; - ffilen = 0; - if ((VerQueryValue(fvi, "\\", &ffi, &ffilen) == 0) || (ffi == NULL) || - (ffilen == 0)) - { - goto err; - } - memset(&sysinfo, 0, sizeof(sysinfo)); - GetSystemInfo(&sysinfo); - switch (sysinfo.wProcessorArchitecture) { - case PROCESSOR_ARCHITECTURE_INTEL: - arch = "x86"; - break; - case PROCESSOR_ARCHITECTURE_ARM: - arch = "arm"; - break; - case PROCESSOR_ARCHITECTURE_IA64: - arch = "ia64"; - break; - case PROCESSOR_ARCHITECTURE_AMD64: - arch = "x64"; - break; - default: - arch = "unknown architecture"; - break; - } - - snprintf(unamebuf, sizeof(unamebuf), - "Windows %d %d build %d %d for %s\n", - (ffi->dwProductVersionMS >> 16) & 0xffff, - ffi->dwProductVersionMS & 0xffff, - (ffi->dwProductVersionLS >> 16) & 0xffff, - ffi->dwProductVersionLS & 0xffff, arch); - -err: - if (fvi != NULL) { - free(fvi); - } - unamep = unamebuf; -} - -/* - * GetVersionEx() returns 6.2 (aka Windows 8.1) since it was obsoleted - * so we had to switch to the recommended way to get the Windows version. - */ -const char * -named_os_uname(void) { - if (unamep == NULL) { - getuname(); - } - return (unamep); -} diff --git a/bin/nsupdate/win32/nsupdate.vcxproj.filters.in b/bin/nsupdate/win32/nsupdate.vcxproj.filters.in deleted file mode 100644 index 477847e099..0000000000 --- a/bin/nsupdate/win32/nsupdate.vcxproj.filters.in +++ /dev/null @@ -1,18 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - \ No newline at end of file diff --git a/bin/nsupdate/win32/nsupdate.vcxproj.in b/bin/nsupdate/win32/nsupdate.vcxproj.in deleted file mode 100644 index 8bf3eb4453..0000000000 --- a/bin/nsupdate/win32/nsupdate.vcxproj.in +++ /dev/null @@ -1,136 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {C41266C7-E27E-4D60-9815-82D3B32BF82F} - Win32Proj - nsupdate - @WINDOWS_TARGET_PLATFORM_VERSION@ - - - - Application - true - MultiByte - @PLATFORM_TOOLSET@ - - - Application - false - true - MultiByte - @PLATFORM_TOOLSET@ - - - - - - - - - - - - - true - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - - - false - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - - - - - - Level4 - false - Disabled - WIN32;USE_READLINE_STATIC;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - true - ..\..\..\config.h - .\;..\include;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@@GSSAPI_INC@@READLINE_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;..\..\..\lib\irs\include;..\..\..\lib\irs\win32\include;..\..\..\lib\bind9\include;..\..\..\lib\isccfg\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - ..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@@READLINE_LIBD@@GSSAPI_LIB@@KRB5_LIB@libisc.lib;libdns.lib;libbind9.lib;libisccfg.lib;libirs.lib;ws2_32.lib;%(AdditionalDependencies) - - - - - Level1 - true - - - MaxSpeed - true - @INTRINSIC@ - WIN32;USE_READLINE_STATIC;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - OnlyExplicitInline - false - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - ..\..\..\config.h - .\;..\include;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@@GSSAPI_INC@@READLINE_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;..\..\..\lib\irs\include;..\..\..\lib\irs\win32\include;..\..\..\lib\bind9\include;..\..\..\lib\isccfg\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - false - true - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - Default - ..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\irs\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@@READLINE_LIB@@GSSAPI_LIB@@KRB5_LIB@libisc.lib;libdns.lib;libbind9.lib;libisccfg.lib;libirs.lib;ws2_32.lib;%(AdditionalDependencies) - - - - - - - - {3840E563-D180-4761-AA9C-E6155F02EAFF} - - - {5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A} - - - {B2DFA58C-6347-478E-81E8-01E06999D4F1} - - - {A4F29CEB-7644-4A7F-BE9E-02B6A90E4919} - - - {E741C10B-B075-4206-9596-46765B665E03} - - - - - - diff --git a/bin/nsupdate/win32/nsupdate.vcxproj.user b/bin/nsupdate/win32/nsupdate.vcxproj.user deleted file mode 100644 index ace9a86acb..0000000000 --- a/bin/nsupdate/win32/nsupdate.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/bin/pkcs11/pkcs11-destroy.c b/bin/pkcs11/pkcs11-destroy.c index 191f02c7d2..4e1f4b0cd3 100644 --- a/bin/pkcs11/pkcs11-destroy.c +++ b/bin/pkcs11/pkcs11-destroy.c @@ -60,10 +60,6 @@ #include #include -#ifdef WIN32 -#define sleep(x) Sleep(x) -#endif /* ifdef WIN32 */ - int main(int argc, char *argv[]) { isc_result_t result; diff --git a/bin/pkcs11/win32/pk11destroy.vcxproj.filters.in b/bin/pkcs11/win32/pk11destroy.vcxproj.filters.in deleted file mode 100644 index bdcc43151d..0000000000 --- a/bin/pkcs11/win32/pk11destroy.vcxproj.filters.in +++ /dev/null @@ -1,22 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - \ No newline at end of file diff --git a/bin/pkcs11/win32/pk11destroy.vcxproj.in b/bin/pkcs11/win32/pk11destroy.vcxproj.in deleted file mode 100644 index fb2ff89761..0000000000 --- a/bin/pkcs11/win32/pk11destroy.vcxproj.in +++ /dev/null @@ -1,126 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {5B3137E5-7E1F-49AA-8810-A09AA417D326} - Win32Proj - pk11destroy - @WINDOWS_TARGET_PLATFORM_VERSION@ - - - - Application - true - MultiByte - @PLATFORM_TOOLSET@ - - - Application - false - true - MultiByte - @PLATFORM_TOOLSET@ - - - - - - - - - - - - - true - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - pkcs11-destroy - - - false - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - pkcs11-destroy - - - - - - Level4 - false - Disabled - WIN32;@PK11_LIB_LOCATION@_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - .\$(Configuration)\$(ProjectName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - true - ..\..\..\config.h - .\;..\..\..\;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - $(Configuration);..\..\..\lib\isc\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@libisc.lib;%(AdditionalDependencies) - - - - - Level1 - true - - - MaxSpeed - true - @INTRINSIC@ - WIN32;@PK11_LIB_LOCATION@NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - OnlyExplicitInline - false - true - .\$(Configuration)\$(ProjectName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - ..\..\..\config.h - .\;..\..\..\;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - false - true - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - Default - $(Configuration);..\..\..\lib\isc\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@libisc.lib;%(AdditionalDependencies) - - - - - - - - {3840E563-D180-4761-AA9C-E6155F02EAFF} - - - - - - diff --git a/bin/pkcs11/win32/pk11destroy.vcxproj.user b/bin/pkcs11/win32/pk11destroy.vcxproj.user deleted file mode 100644 index ace9a86acb..0000000000 --- a/bin/pkcs11/win32/pk11destroy.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/bin/pkcs11/win32/pk11keygen.vcxproj.filters.in b/bin/pkcs11/win32/pk11keygen.vcxproj.filters.in deleted file mode 100644 index 412ff8615a..0000000000 --- a/bin/pkcs11/win32/pk11keygen.vcxproj.filters.in +++ /dev/null @@ -1,22 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - \ No newline at end of file diff --git a/bin/pkcs11/win32/pk11keygen.vcxproj.in b/bin/pkcs11/win32/pk11keygen.vcxproj.in deleted file mode 100644 index 5c58ad1171..0000000000 --- a/bin/pkcs11/win32/pk11keygen.vcxproj.in +++ /dev/null @@ -1,126 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {5042D371-0402-4FA3-A52A-769708694422} - Win32Proj - pk11keygen - @WINDOWS_TARGET_PLATFORM_VERSION@ - - - - Application - true - MultiByte - @PLATFORM_TOOLSET@ - - - Application - false - true - MultiByte - @PLATFORM_TOOLSET@ - - - - - - - - - - - - - true - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - pkcs11-keygen - - - false - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - pkcs11-keygen - - - - - - Level4 - false - Disabled - WIN32;@PK11_LIB_LOCATION@_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - .\$(Configuration)\$(ProjectName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - true - ..\..\..\config.h - .\;..\..\..\;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - $(Configuration);..\..\..\lib\isc\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@libisc.lib;%(AdditionalDependencies) - - - - - Level1 - true - - - MaxSpeed - true - @INTRINSIC@ - WIN32;@PK11_LIB_LOCATION@NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - OnlyExplicitInline - false - true - .\$(Configuration)\$(ProjectName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - ..\..\..\config.h - .\;..\..\..\;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - false - true - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - Default - $(Configuration);..\..\..\lib\isc\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@libisc.lib;%(AdditionalDependencies) - - - - - - - - {3840E563-D180-4761-AA9C-E6155F02EAFF} - - - - - - diff --git a/bin/pkcs11/win32/pk11keygen.vcxproj.user b/bin/pkcs11/win32/pk11keygen.vcxproj.user deleted file mode 100644 index ace9a86acb..0000000000 --- a/bin/pkcs11/win32/pk11keygen.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/bin/pkcs11/win32/pk11list.vcxproj.filters.in b/bin/pkcs11/win32/pk11list.vcxproj.filters.in deleted file mode 100644 index 6944afda9c..0000000000 --- a/bin/pkcs11/win32/pk11list.vcxproj.filters.in +++ /dev/null @@ -1,22 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - \ No newline at end of file diff --git a/bin/pkcs11/win32/pk11list.vcxproj.in b/bin/pkcs11/win32/pk11list.vcxproj.in deleted file mode 100644 index 80d7a08726..0000000000 --- a/bin/pkcs11/win32/pk11list.vcxproj.in +++ /dev/null @@ -1,126 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {C663B088-F7BC-4C8C-8D06-A76636EED651} - Win32Proj - pk11list - @WINDOWS_TARGET_PLATFORM_VERSION@ - - - - Application - true - MultiByte - @PLATFORM_TOOLSET@ - - - Application - false - true - MultiByte - @PLATFORM_TOOLSET@ - - - - - - - - - - - - - true - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - pkcs11-list - - - false - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - pkcs11-list - - - - - - Level4 - false - Disabled - WIN32;@PK11_LIB_LOCATION@_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - .\$(Configuration)\$(ProjectName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - true - ..\..\..\config.h - .\;..\..\..\;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - $(Configuration);..\..\..\lib\isc\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@libisc.lib;%(AdditionalDependencies) - - - - - Level1 - true - - - MaxSpeed - true - @INTRINSIC@ - WIN32;@PK11_LIB_LOCATION@NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - OnlyExplicitInline - false - true - .\$(Configuration)\$(ProjectName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - ..\..\..\config.h - .\;..\..\..\;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - false - true - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - Default - $(Configuration);..\..\..\lib\isc\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@libisc.lib;%(AdditionalDependencies) - - - - - - - - {3840E563-D180-4761-AA9C-E6155F02EAFF} - - - - - - diff --git a/bin/pkcs11/win32/pk11list.vcxproj.user b/bin/pkcs11/win32/pk11list.vcxproj.user deleted file mode 100644 index ace9a86acb..0000000000 --- a/bin/pkcs11/win32/pk11list.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/bin/pkcs11/win32/pk11tokens.vcxproj.filters.in b/bin/pkcs11/win32/pk11tokens.vcxproj.filters.in deleted file mode 100644 index 7c3b8ed4e5..0000000000 --- a/bin/pkcs11/win32/pk11tokens.vcxproj.filters.in +++ /dev/null @@ -1,22 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - \ No newline at end of file diff --git a/bin/pkcs11/win32/pk11tokens.vcxproj.in b/bin/pkcs11/win32/pk11tokens.vcxproj.in deleted file mode 100644 index 9b38ccee3c..0000000000 --- a/bin/pkcs11/win32/pk11tokens.vcxproj.in +++ /dev/null @@ -1,126 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {403FD4B1-A4F9-4159-9013-5860E3A4417D} - Win32Proj - pk11tokens - @WINDOWS_TARGET_PLATFORM_VERSION@ - - - - Application - true - MultiByte - @PLATFORM_TOOLSET@ - - - Application - false - true - MultiByte - @PLATFORM_TOOLSET@ - - - - - - - - - - - - - true - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - pkcs11-tokens - - - false - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - pkcs11-tokens - - - - - - Level4 - false - Disabled - WIN32;@PK11_LIB_LOCATION@_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - .\$(Configuration)\$(ProjectName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - true - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - $(Configuration);..\..\..\lib\isc\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@libisc.lib;%(AdditionalDependencies) - - - - - Level1 - true - - - MaxSpeed - true - @INTRINSIC@ - WIN32;@PK11_LIB_LOCATION@NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - OnlyExplicitInline - false - true - .\$(Configuration)\$(ProjectName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - false - true - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - Default - $(Configuration);..\..\..\lib\isc\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@libisc.lib;%(AdditionalDependencies) - - - - - - - - {3840E563-D180-4761-AA9C-E6155F02EAFF} - - - - - - diff --git a/bin/pkcs11/win32/pk11tokens.vcxproj.user b/bin/pkcs11/win32/pk11tokens.vcxproj.user deleted file mode 100644 index ace9a86acb..0000000000 --- a/bin/pkcs11/win32/pk11tokens.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/bin/rndc/win32/rndc.vcxproj.filters.in b/bin/rndc/win32/rndc.vcxproj.filters.in deleted file mode 100644 index 93105edc68..0000000000 --- a/bin/rndc/win32/rndc.vcxproj.filters.in +++ /dev/null @@ -1,30 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Header Files - - - - - Source Files - - - Source Files - - - diff --git a/bin/rndc/win32/rndc.vcxproj.in b/bin/rndc/win32/rndc.vcxproj.in deleted file mode 100644 index 1e8ca06776..0000000000 --- a/bin/rndc/win32/rndc.vcxproj.in +++ /dev/null @@ -1,140 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {39721F26-8B80-4AA9-9826-2AEF7322C3D5} - Win32Proj - rndc - @WINDOWS_TARGET_PLATFORM_VERSION@ - - - - Application - true - MultiByte - @PLATFORM_TOOLSET@ - - - Application - false - true - MultiByte - @PLATFORM_TOOLSET@ - - - - - - - - - - - - - true - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - - - false - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - - - - - - Level4 - false - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - true - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccc\include;..\..\..\lib\isccfg\include;..\..\..\lib\bind9\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - $(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\isccc\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;libbind9.lib;ws2_32.lib;%(AdditionalDependencies) - - - - - Level1 - true - - - MaxSpeed - true - @INTRINSIC@ - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - OnlyExplicitInline - false - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccc\include;..\..\..\lib\isccfg\include;..\..\..\lib\bind9\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - false - true - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - Default - $(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\isccc\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;libbind9.lib;ws2_32.lib;%(AdditionalDependencies) - - - - - - - - - - - - {3840E563-D180-4761-AA9C-E6155F02EAFF} - - - {5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A} - - - {B556705F-1920-4400-878A-B259D3556047} - - - {B2DFA58C-6347-478E-81E8-01E06999D4F1} - - - {E741C10B-B075-4206-9596-46765B665E03} - - - - - - diff --git a/bin/rndc/win32/rndc.vcxproj.user b/bin/rndc/win32/rndc.vcxproj.user deleted file mode 100644 index ace9a86acb..0000000000 --- a/bin/rndc/win32/rndc.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/bin/tests/system/README b/bin/tests/system/README index 3bc6210a9a..c0970ebd32 100644 --- a/bin/tests/system/README +++ b/bin/tests/system/README @@ -8,8 +8,7 @@ This directory holds a simple test environment for running bind9 system tests involving multiple name servers. With the exception of "common" (which holds configuration information common to -multiple tests) and "win32" (which holds files needed to run the tests in a -Windows environment), each directory holds a set of scripts and configuration +multiple tests), each directory holds a set of scripts and configuration files to test different parts of BIND. The directories are named for the aspect of BIND they test, for example: @@ -374,8 +373,7 @@ a run of the full test suite (e.g. the tests are started with "runall.sh"). . ../conf.sh "conf.sh" defines a series of environment variables together with functions -useful for the test scripts. (conf.sh.win32 is the Windows equivalent of this -file.) +useful for the test scripts. prereq.sh @@ -643,10 +641,6 @@ SEQUENTIALDIRS variables as appropriate. The former is used for tests that can run in parallel with other tests, the latter for tests that are unable to do so. -* conf.sh.win32 This is the Windows equivalent of conf.sh.in. The name of the -test should be added to the PARALLELDIRS or SEQUENTIALDIRS variables as -appropriate. - * Makefile.in The name of the test should be added to one of the the PARALLEL or SEQUENTIAL variables. diff --git a/bin/tests/system/conf.sh.common b/bin/tests/system/conf.sh.common index 07106836a3..cd0838a893 100644 --- a/bin/tests/system/conf.sh.common +++ b/bin/tests/system/conf.sh.common @@ -33,8 +33,7 @@ export LANG=C # this reason, these must be run sequentially. # # Sequential tests that only run on unix/linux should be added to -# SEQUENTIAL_UNIX in conf.sh.in; those that only run on windows should -# be added to SEQUENTIAL_WINDOWS in conf.sh.win32. +# SEQUENTIAL_UNIX in conf.sh.in # SEQUENTIAL_COMMON="" @@ -44,8 +43,7 @@ SEQUENTIAL_COMMON="" # test, these tests can be run in parallel. # # Parallel tests that only run on unix/linux should be added to -# PARALLEL_UNIX in conf.sh.in; those that only run on windows should -# be added to PARALLEL_WINDOWS in conf.sh.win32. +# PARALLEL_UNIX in conf.sh.in; # # Note: some of the longer-running tests such as serve-stale and # rpzrecurse are scheduled first, in order to get more benefit from @@ -661,34 +659,28 @@ get_named_xfer_stats() { # copy_setports infile outfile # copy_setports() { - # The indirect method of handling the substitution of the PORT variables - # (defining "atsign" then substituting for it in the "sed" statement) is - # required to prevent the "Configure" script (in the win32utils/ directory) - # from replacing the PORT substitution tokens when it processes - # this file and produces conf.sh. - atsign="@" - sed -e "s/${atsign}PORT${atsign}/${PORT}/g" \ - -e "s/${atsign}TLSPORT${atsign}/${TLSPORT}/g" \ - -e "s/${atsign}HTTPPORT${atsign}/${HTTPPORT}/g" \ - -e "s/${atsign}HTTPSPORT${atsign}/${HTTPSPORT}/g" \ - -e "s/${atsign}EXTRAPORT1${atsign}/${EXTRAPORT1}/g" \ - -e "s/${atsign}EXTRAPORT2${atsign}/${EXTRAPORT2}/g" \ - -e "s/${atsign}EXTRAPORT3${atsign}/${EXTRAPORT3}/g" \ - -e "s/${atsign}EXTRAPORT4${atsign}/${EXTRAPORT4}/g" \ - -e "s/${atsign}EXTRAPORT5${atsign}/${EXTRAPORT5}/g" \ - -e "s/${atsign}EXTRAPORT6${atsign}/${EXTRAPORT6}/g" \ - -e "s/${atsign}EXTRAPORT7${atsign}/${EXTRAPORT7}/g" \ - -e "s/${atsign}EXTRAPORT8${atsign}/${EXTRAPORT8}/g" \ - -e "s/${atsign}CONTROLPORT${atsign}/${CONTROLPORT}/g" \ - -e "s/${atsign}DEFAULT_ALGORITHM${atsign}/${DEFAULT_ALGORITHM}/g" \ - -e "s/${atsign}DEFAULT_ALGORITHM_NUMBER${atsign}/${DEFAULT_ALGORITHM_NUMBER}/g" \ - -e "s/${atsign}DEFAULT_BITS${atsign}/${DEFAULT_BITS}/g" \ - -e "s/${atsign}ALTERNATIVE_ALGORITHM${atsign}/${ALTERNATIVE_ALGORITHM}/g" \ - -e "s/${atsign}ALTERNATIVE_ALGORITHM_NUMBER${atsign}/${ALTERNATIVE_ALGORITHM_NUMBER}/g" \ - -e "s/${atsign}ALTERNATIVE_BITS${atsign}/${ALTERNATIVE_BITS}/g" \ - -e "s/${atsign}DISABLED_ALGORITHM${atsign}/${DISABLED_ALGORITHM}/g" \ - -e "s/${atsign}DISABLED_ALGORITHM_NUMBER${atsign}/${DISABLED_ALGORITHM_NUMBER}/g" \ - -e "s/${atsign}DISABLED_BITS${atsign}/${DISABLED_BITS}/g" \ + sed -e "s/@PORT@/${PORT}/g" \ + -e "s/@TLSPORT@/${TLSPORT}/g" \ + -e "s/@HTTPPORT@/${HTTPPORT}/g" \ + -e "s/@HTTPSPORT@/${HTTPSPORT}/g" \ + -e "s/@EXTRAPORT1@/${EXTRAPORT1}/g" \ + -e "s/@EXTRAPORT2@/${EXTRAPORT2}/g" \ + -e "s/@EXTRAPORT3@/${EXTRAPORT3}/g" \ + -e "s/@EXTRAPORT4@/${EXTRAPORT4}/g" \ + -e "s/@EXTRAPORT5@/${EXTRAPORT5}/g" \ + -e "s/@EXTRAPORT6@/${EXTRAPORT6}/g" \ + -e "s/@EXTRAPORT7@/${EXTRAPORT7}/g" \ + -e "s/@EXTRAPORT8@/${EXTRAPORT8}/g" \ + -e "s/@CONTROLPORT@/${CONTROLPORT}/g" \ + -e "s/@DEFAULT_ALGORITHM@/${DEFAULT_ALGORITHM}/g" \ + -e "s/@DEFAULT_ALGORITHM_NUMBER@/${DEFAULT_ALGORITHM_NUMBER}/g" \ + -e "s/@DEFAULT_BITS@/${DEFAULT_BITS}/g" \ + -e "s/@ALTERNATIVE_ALGORITHM@/${ALTERNATIVE_ALGORITHM}/g" \ + -e "s/@ALTERNATIVE_ALGORITHM_NUMBER@/${ALTERNATIVE_ALGORITHM_NUMBER}/g" \ + -e "s/@ALTERNATIVE_BITS@/${ALTERNATIVE_BITS}/g" \ + -e "s/@DISABLED_ALGORITHM@/${DISABLED_ALGORITHM}/g" \ + -e "s/@DISABLED_ALGORITHM_NUMBER@/${DISABLED_ALGORITHM_NUMBER}/g" \ + -e "s/@DISABLED_BITS@/${DISABLED_BITS}/g" \ $1 > $2 } diff --git a/bin/tests/system/conf.sh.in b/bin/tests/system/conf.sh.in index 8b0621c052..699edba607 100644 --- a/bin/tests/system/conf.sh.in +++ b/bin/tests/system/conf.sh.in @@ -24,7 +24,7 @@ TMPDIR=${TMPDIR:-/tmp} # This is not the windows build. CYGWIN="" -# Load common values shared between windows and unix/linux. +# Load common values . $TOP_SRCDIR/bin/tests/system/conf.sh.common ARPANAME=$TOP_BUILDDIR/bin/tools/arpaname diff --git a/bin/tests/system/conf.sh.win32 b/bin/tests/system/conf.sh.win32 deleted file mode 100644 index bdebe0885c..0000000000 --- a/bin/tests/system/conf.sh.win32 +++ /dev/null @@ -1,117 +0,0 @@ -#!/bin/sh -# -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, you can obtain one at https://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -# -# Common configuration data for system tests, to be sourced into -# other shell scripts. -# - -# Find the top of the BIND9 tree. -TOP_BUILDDIR=@abs_top_builddir@ -TOP_SRCDIR=@abs_top_srcdir@ - -# This is the windows build. This disables certain tests cases -# and changes some specific behaviors where necessary. -CYGWIN=1 - -# Load common values shared between windows and unix/linux. -. $TOP_BUILDDIR/bin/tests/system/conf.sh.common - -# Visual Studio build configurations are Release and Debug -VSCONF=${VSCONF:-Debug} - -ARPANAME=$TOP_BUILDDIR/Build/$VSCONF/arpaname@EXEEXT@ -CDS=$TOP_BUILDDIR/Build/$VSCONF/dnssec-cds@EXEEXT@ -CHECKCONF=$TOP_BUILDDIR/Build/$VSCONF/named-checkconf@EXEEXT@ -CHECKZONE=$TOP_BUILDDIR/Build/$VSCONF/named-checkzone@EXEEXT@ -DELV=$TOP_BUILDDIR/Build/$VSCONF/delv@EXEEXT@ -DIG=$TOP_BUILDDIR/Build/$VSCONF/dig@EXEEXT@ -DNSTAPREAD=$TOP_BUILDDIR/Build/$VSCONF/dnstap-read@EXEEXT@ -DSFROMKEY=$TOP_BUILDDIR/Build/$VSCONF/dnssec-dsfromkey@EXEEXT@ -FEATURETEST=$TOP_BUILDDIR/Build/$VSCONF/feature-test@EXEEXT@ -FSTRM_CAPTURE=@FSTRM_CAPTURE@ -IMPORTKEY=$TOP_BUILDDIR/Build/$VSCONF/dnssec-importkey@EXEEXT@ -JOURNALPRINT=$TOP_BUILDDIR/Build/$VSCONF/named-journalprint@EXEEXT@ -KEYFRLAB=$TOP_BUILDDIR/Build/$VSCONF/dnssec-keyfromlabel@EXEEXT@ -KEYGEN=$TOP_BUILDDIR/Build/$VSCONF/dnssec-keygen@EXEEXT@ -MDIG=$TOP_BUILDDIR/Build/$VSCONF/mdig@EXEEXT@ -NAMED=$TOP_BUILDDIR/Build/$VSCONF/named@EXEEXT@ -NSEC3HASH=$TOP_BUILDDIR/Build/$VSCONF/nsec3hash@EXEEXT@ -NSLOOKUP=$TOP_BUILDDIR/Build/$VSCONF/nslookup@EXEEXT@ -NSUPDATE=$TOP_BUILDDIR/Build/$VSCONF/nsupdate@EXEEXT@ -NZD2NZF=$TOP_BUILDDIR/Build/$VSCONF/named-nzd2nzf@EXEEXT@ -PK11DEL="$TOP_BUILDDIR/Build/$VSCONF/pkcs11-destroy@EXEEXT@ -s ${SLOT:-0} -p ${HSMPIN:-1234} -w 0" -PK11GEN="$TOP_BUILDDIR/Build/$VSCONF/pkcs11-keygen@EXEEXT@ -q -s ${SLOT:-0} -p ${HSMPIN:-1234}" -PK11LIST="$TOP_BUILDDIR/Build/$VSCONF/pkcs11-list@EXEEXT@ -s ${SLOT:-0} -p ${HSMPIN:-1234}" -REVOKE=$TOP_BUILDDIR/Build/$VSCONF/dnssec-revoke@EXEEXT@ -RNDC=$TOP_BUILDDIR/Build/$VSCONF/rndc@EXEEXT@ -RNDCCONFGEN=$TOP_BUILDDIR/Build/$VSCONF/rndc-confgen@EXEEXT@ -RRCHECKER=$TOP_BUILDDIR/Build/$VSCONF/named-rrchecker@EXEEXT@ -SETTIME=$TOP_BUILDDIR/Build/$VSCONF/dnssec-settime@EXEEXT@ -SIGNER=$TOP_BUILDDIR/Build/$VSCONF/dnssec-signzone@EXEEXT@ -TSIGKEYGEN=$TOP_BUILDDIR/Build/$VSCONF/tsig-keygen@EXEEXT@ -VERIFY=$TOP_BUILDDIR/Build/$VSCONF/dnssec-verify@EXEEXT@ - -# to port WIRETEST=$TOP_BUILDDIR/Build/$VSCONF/wire_test@EXEEXT@ -WIRETEST= - -BIGKEY=$TOP_BUILDDIR/Build/$VSCONF/bigkey@EXEEXT@ -GENCHECK=$TOP_BUILDDIR/Build/$VSCONF/gencheck@EXEEXT@ -KEYCREATE=$TOP_BUILDDIR/Build/$VSCONF/keycreate@EXEEXT@ -KEYDELETE=$TOP_BUILDDIR/Build/$VSCONF/keydelete@EXEEXT@ -MAKEJOURNAL=$TOP_BUILDDIR/Build/$VSCONF/makejournal@EXEEXT@ -PIPEQUERIES=$TOP_BUILDDIR/Build/$VSCONF/pipequeries@EXEEXT@ -RESOLVE=$TOP_BUILDDIR/Build/$VSCONF/resolve@EXEEXT@ - -# we don't want a KRB5_CONFIG setting breaking the tests -KRB5_CONFIG=NUL - -# -# Construct the lists of tests to run -# -SEQUENTIAL_WINDOWS="" -SEQUENTIALDIRS="$SEQUENTIAL_COMMON $SEQUENTIAL_WINDOWS" - -PARALLEL_WINDOWS="@DNSTAP@" -PARALLELDIRS="$PARALLEL_COMMON $PARALLEL_WINDOWS" - -SUBDIRS="$SEQUENTIALDIRS $PARALLELDIRS" - -# Things that are different on Windows -KILL="/bin/kill -f" -DIFF="diff --strip-trailing-cr" -DOS2UNIX=dos2unix -# No trailing period -TP= - -# Configure is launched from native environment, but tests are run in Cygwin - -# so any detection is unreliable. -SHELL="/bin/bash -o igncr" -CURL=/usr/bin/curl -XMLLINT=/usr/bin/xmllint -PERL=/usr/bin/perl - -# -# PsSuspend is part of PSTools and can be downloaded from -# https://download.sysinternals.com/files/PSTools.zip -# -PSSUSPEND=@PSSUSPEND@ - -PYTHON=@PYTHON@ - -# -# Determine if we support various optional features. -# -HAVEXMLSTATS=@XMLSTATS@ -HAVEJSONSTATS=@JSONSTATS@ -HAVEZLIB=@ZLIB@ -NZD=@NZD_TOOLS@ -CRYPTO=@CRYPTO@ diff --git a/bin/tests/system/feature-test.c b/bin/tests/system/feature-test.c index 6793caa920..1d29d3036f 100644 --- a/bin/tests/system/feature-test.c +++ b/bin/tests/system/feature-test.c @@ -20,10 +20,6 @@ #include -#ifdef WIN32 -#include -#endif /* ifdef WIN32 */ - #ifndef MAXHOSTNAMELEN #ifdef HOST_NAME_MAX #define MAXHOSTNAMELEN HOST_NAME_MAX @@ -85,19 +81,6 @@ main(int argc, char **argv) { if (strcmp(argv[1], "--gethostname") == 0) { char hostname[MAXHOSTNAMELEN]; int n; -#ifdef WIN32 - /* From InitSocket() */ - WORD wVersionRequested; - WSADATA wsaData; - int err; - - wVersionRequested = MAKEWORD(2, 0); - err = WSAStartup(wVersionRequested, &wsaData); - if (err != 0) { - fprintf(stderr, "WSAStartup() failed: %d\n", err); - exit(1); - } -#endif /* ifdef WIN32 */ n = gethostname(hostname, sizeof(hostname)); if (n == -1) { @@ -105,9 +88,6 @@ main(int argc, char **argv) { return (1); } fprintf(stdout, "%s\n", hostname); -#ifdef WIN32 - WSACleanup(); -#endif /* ifdef WIN32 */ return (0); } @@ -149,9 +129,7 @@ main(int argc, char **argv) { } if (strcmp(argv[1], "--ipv6only=no") == 0) { -#ifdef WIN32 - return (0); -#elif defined(IPPROTO_IPV6) && defined(IPV6_V6ONLY) +#if defined(IPPROTO_IPV6) && defined(IPV6_V6ONLY) int s; int n = -1; int v6only = -1; @@ -164,9 +142,9 @@ main(int argc, char **argv) { close(s); } return ((n == 0 && v6only == 0) ? 0 : 1); -#else /* ifdef WIN32 */ +#else /* defined(IPPROTO_IPV6) && defined(IPV6_V6ONLY) */ return (1); -#endif /* ifdef WIN32 */ +#endif /* defined(IPPROTO_IPV6) && defined(IPV6_V6ONLY) */ } if (strcmp(argv[1], "--with-dlz-filesystem") == 0) { diff --git a/bin/tests/system/resolve.c b/bin/tests/system/resolve.c index 600871d05f..165124a68f 100644 --- a/bin/tests/system/resolve.c +++ b/bin/tests/system/resolve.c @@ -9,19 +9,16 @@ * information regarding copyright ownership. */ -#ifndef WIN32 #include #include #include -#include -#include -#include -#endif /* ifndef WIN32 */ - #include #include #include #include +#include +#include +#include #include #include diff --git a/bin/tests/system/win32/bigkey.vcxproj.filters.in b/bin/tests/system/win32/bigkey.vcxproj.filters.in deleted file mode 100644 index 1b592a604e..0000000000 --- a/bin/tests/system/win32/bigkey.vcxproj.filters.in +++ /dev/null @@ -1,22 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - \ No newline at end of file diff --git a/bin/tests/system/win32/bigkey.vcxproj.in b/bin/tests/system/win32/bigkey.vcxproj.in deleted file mode 100644 index d8b45bafa2..0000000000 --- a/bin/tests/system/win32/bigkey.vcxproj.in +++ /dev/null @@ -1,127 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {61F9D673-EB5C-47A5-8907-24E034C75EF8} - Win32Proj - bigkey - @WINDOWS_TARGET_PLATFORM_VERSION@ - - - - Application - true - MultiByte - @PLATFORM_TOOLSET@ - - - Application - false - true - MultiByte - @PLATFORM_TOOLSET@ - - - - - - - - - - - - - true - ..\..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - - - false - ..\..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - - - - - - Level4 - false - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - true - ..\..\..\..\config.h - .\;..\..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\..\lib\isc\win32;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;..\..\..\..\lib\dns\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - true - ..\..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - ..\..\..\..\lib\isc\win32\$(Configuration);..\..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@@LIBXML2_LIB@libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies) - - - - - Level1 - true - - - MaxSpeed - true - @INTRINSIC@ - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - OnlyExplicitInline - false - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - ..\..\..\..\config.h - .\;..\..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\..\lib\isc\win32;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;..\..\..\..\lib\dns\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - false - true - true - ..\..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - Default - ..\..\..\..\lib\isc\win32\$(Configuration);..\..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@@LIBXML2_LIB@libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies) - - - - - - - - {3840E563-D180-4761-AA9C-E6155F02EAFF} - - - {5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A} - - - - - - diff --git a/bin/tests/system/win32/bigkey.vcxproj.user b/bin/tests/system/win32/bigkey.vcxproj.user deleted file mode 100644 index ace9a86acb..0000000000 --- a/bin/tests/system/win32/bigkey.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/bin/tests/system/win32/feature-test.vcxproj.filters.in b/bin/tests/system/win32/feature-test.vcxproj.filters.in deleted file mode 100644 index 0e4fe58c2e..0000000000 --- a/bin/tests/system/win32/feature-test.vcxproj.filters.in +++ /dev/null @@ -1,22 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - \ No newline at end of file diff --git a/bin/tests/system/win32/feature-test.vcxproj.in b/bin/tests/system/win32/feature-test.vcxproj.in deleted file mode 100644 index f5b14e6ad2..0000000000 --- a/bin/tests/system/win32/feature-test.vcxproj.in +++ /dev/null @@ -1,124 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {63A921F6-1200-4723-828A-98960127B73D} - Win32Proj - feature-test - @WINDOWS_TARGET_PLATFORM_VERSION@ - - - - Application - true - MultiByte - @PLATFORM_TOOLSET@ - - - Application - false - true - MultiByte - @PLATFORM_TOOLSET@ - - - - - - - - - - - - - true - ..\..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - - - false - ..\..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - - - - - - Level4 - false - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - true - ..\..\..\..\config.h - .\;..\..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\..\lib\isc\win32;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;..\..\..\..\lib\dns\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - true - ..\..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - ..\..\..\..\lib\isc\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@@LIBXML2_LIB@libisc.lib;ws2_32.lib;%(AdditionalDependencies) - - - - - Level1 - true - - - MaxSpeed - true - @INTRINSIC@ - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - OnlyExplicitInline - false - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - ..\..\..\..\config.h - .\;..\..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\..\lib\isc\win32;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;..\..\..\..\lib\dns\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - false - true - true - ..\..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - Default - ..\..\..\..\lib\isc\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@@LIBXML2_LIB@libisc.lib;ws2_32.lib;%(AdditionalDependencies) - - - - - - - - {3840E563-D180-4761-AA9C-E6155F02EAFF} - - - - - - diff --git a/bin/tests/system/win32/feature-test.vcxproj.user b/bin/tests/system/win32/feature-test.vcxproj.user deleted file mode 100644 index ace9a86acb..0000000000 --- a/bin/tests/system/win32/feature-test.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/bin/tests/system/win32/gencheck.vcxproj.filters.in b/bin/tests/system/win32/gencheck.vcxproj.filters.in deleted file mode 100644 index 33431cfa61..0000000000 --- a/bin/tests/system/win32/gencheck.vcxproj.filters.in +++ /dev/null @@ -1,22 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - \ No newline at end of file diff --git a/bin/tests/system/win32/gencheck.vcxproj.in b/bin/tests/system/win32/gencheck.vcxproj.in deleted file mode 100644 index cff4647a45..0000000000 --- a/bin/tests/system/win32/gencheck.vcxproj.in +++ /dev/null @@ -1,124 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {764DBE24-C8B3-46E8-BE73-196431353A5D} - Win32Proj - gencheck - @WINDOWS_TARGET_PLATFORM_VERSION@ - - - - Application - true - MultiByte - @PLATFORM_TOOLSET@ - - - Application - false - true - MultiByte - @PLATFORM_TOOLSET@ - - - - - - - - - - - - - true - ..\..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - - - false - ..\..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - - - - - - Level4 - false - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - true - ..\..\..\..\config.h - .\;..\..\..\..\;@LIBXML2_INC@..\..\..\..\lib\isc\win32;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - true - ..\..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - ..\..\..\..\lib\isc\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@@LIBXML2_LIB@libisc.lib;ws2_32.lib;%(AdditionalDependencies) - - - - - Level1 - true - - - MaxSpeed - true - @INTRINSIC@ - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - OnlyExplicitInline - false - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - ..\..\..\..\config.h - .\;..\..\..\..\;@LIBXML2_INC@..\..\..\..\lib\isc\win32;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - false - true - true - ..\..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - Default - ..\..\..\..\lib\isc\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@@LIBXML2_LIB@libisc.lib;ws2_32.lib;%(AdditionalDependencies) - - - - - - - - {3840E563-D180-4761-AA9C-E6155F02EAFF} - - - - - - diff --git a/bin/tests/system/win32/gencheck.vcxproj.user b/bin/tests/system/win32/gencheck.vcxproj.user deleted file mode 100644 index ace9a86acb..0000000000 --- a/bin/tests/system/win32/gencheck.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/bin/tests/system/win32/keycreate.vcxproj.filters.in b/bin/tests/system/win32/keycreate.vcxproj.filters.in deleted file mode 100644 index 09f4c3a02b..0000000000 --- a/bin/tests/system/win32/keycreate.vcxproj.filters.in +++ /dev/null @@ -1,22 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - \ No newline at end of file diff --git a/bin/tests/system/win32/keycreate.vcxproj.in b/bin/tests/system/win32/keycreate.vcxproj.in deleted file mode 100644 index 656b3017d5..0000000000 --- a/bin/tests/system/win32/keycreate.vcxproj.in +++ /dev/null @@ -1,127 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {4F9A0F6F-366D-4483-B131-793832840508} - Win32Proj - keycreate - @WINDOWS_TARGET_PLATFORM_VERSION@ - - - - Application - true - MultiByte - @PLATFORM_TOOLSET@ - - - Application - false - true - MultiByte - @PLATFORM_TOOLSET@ - - - - - - - - - - - - - true - ..\..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - - - false - ..\..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - - - - - - Level4 - false - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - true - ..\..\..\..\config.h - .\;..\..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\..\lib\isc\win32;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;..\..\..\..\lib\dns\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - true - ..\..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - ..\..\..\..\lib\isc\win32\$(Configuration);..\..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@@LIBXML2_LIB@libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies) - - - - - Level1 - true - - - MaxSpeed - true - @INTRINSIC@ - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - OnlyExplicitInline - false - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - ..\..\..\..\config.h - .\;..\..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\..\lib\isc\win32;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;..\..\..\..\lib\dns\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - false - true - true - ..\..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - Default - ..\..\..\..\lib\isc\win32\$(Configuration);..\..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@@LIBXML2_LIB@libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies) - - - - - - - - {3840E563-D180-4761-AA9C-E6155F02EAFF} - - - {5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A} - - - - - - diff --git a/bin/tests/system/win32/keycreate.vcxproj.user b/bin/tests/system/win32/keycreate.vcxproj.user deleted file mode 100644 index ace9a86acb..0000000000 --- a/bin/tests/system/win32/keycreate.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/bin/tests/system/win32/keydelete.vcxproj.filters.in b/bin/tests/system/win32/keydelete.vcxproj.filters.in deleted file mode 100644 index 1e8cb3d1d1..0000000000 --- a/bin/tests/system/win32/keydelete.vcxproj.filters.in +++ /dev/null @@ -1,22 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - \ No newline at end of file diff --git a/bin/tests/system/win32/keydelete.vcxproj.in b/bin/tests/system/win32/keydelete.vcxproj.in deleted file mode 100644 index 8a6943bc48..0000000000 --- a/bin/tests/system/win32/keydelete.vcxproj.in +++ /dev/null @@ -1,127 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {85ADFF2A-BE31-4B8D-9089-9AD56CE78D7E} - Win32Proj - keydelete - @WINDOWS_TARGET_PLATFORM_VERSION@ - - - - Application - true - MultiByte - @PLATFORM_TOOLSET@ - - - Application - false - true - MultiByte - @PLATFORM_TOOLSET@ - - - - - - - - - - - - - true - ..\..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - - - false - ..\..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - - - - - - Level4 - false - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - true - ..\..\..\..\config.h - .\;..\..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\..\lib\isc\win32;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;..\..\..\..\lib\dns\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - true - ..\..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - ..\..\..\..\lib\isc\win32\$(Configuration);..\..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@@LIBXML2_LIB@libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies) - - - - - Level1 - true - - - MaxSpeed - true - @INTRINSIC@ - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - OnlyExplicitInline - false - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - ..\..\..\..\config.h - .\;..\..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\..\lib\isc\win32;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;..\..\..\..\lib\dns\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - false - true - true - ..\..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - Default - ..\..\..\..\lib\isc\win32\$(Configuration);..\..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@@LIBXML2_LIB@libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies) - - - - - - - - {3840E563-D180-4761-AA9C-E6155F02EAFF} - - - {5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A} - - - - - - diff --git a/bin/tests/system/win32/keydelete.vcxproj.user b/bin/tests/system/win32/keydelete.vcxproj.user deleted file mode 100644 index ace9a86acb..0000000000 --- a/bin/tests/system/win32/keydelete.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/bin/tests/system/win32/makejournal.vcxproj.filters.in b/bin/tests/system/win32/makejournal.vcxproj.filters.in deleted file mode 100644 index 44aa47be88..0000000000 --- a/bin/tests/system/win32/makejournal.vcxproj.filters.in +++ /dev/null @@ -1,18 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - \ No newline at end of file diff --git a/bin/tests/system/win32/makejournal.vcxproj.in b/bin/tests/system/win32/makejournal.vcxproj.in deleted file mode 100644 index 139dfc856f..0000000000 --- a/bin/tests/system/win32/makejournal.vcxproj.in +++ /dev/null @@ -1,127 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {31715139-2C27-47D2-8394-71B71A8AC3D5} - Win32Proj - makejournal - @WINDOWS_TARGET_PLATFORM_VERSION@ - - - - Application - true - MultiByte - @PLATFORM_TOOLSET@ - - - Application - false - true - MultiByte - @PLATFORM_TOOLSET@ - - - - - - - - - - - - - true - ..\..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - - - false - ..\..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - - - - - - Level4 - false - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - .\$(Configuration)\$(ProjectName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - true - ..\..\..\..\config.h - .\;..\..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\..\lib\isc\win32;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;..\..\..\..\lib\dns\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - true - ..\..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - ..\..\..\..\lib\isc\win32\$(Configuration);..\..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@libisc.lib;libdns.lib;%(AdditionalDependencies) - - - - - Level1 - true - - - MaxSpeed - true - @INTRINSIC@ - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - OnlyExplicitInline - false - true - .\$(Configuration)\$(ProjectName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - ..\..\..\..\config.h - .\;..\..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\..\lib\isc\win32;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;..\..\..\..\lib\dns\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - false - true - true - ..\..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - Default - ..\..\..\..\lib\isc\win32\$(Configuration);..\..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@libisc.lib;libdns.lib;%(AdditionalDependencies) - - - - - - - - {3840E563-D180-4761-AA9C-E6155F02EAFF} - - - {5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A} - - - - - - diff --git a/bin/tests/system/win32/makejournal.vcxproj.user b/bin/tests/system/win32/makejournal.vcxproj.user deleted file mode 100644 index ace9a86acb..0000000000 --- a/bin/tests/system/win32/makejournal.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/bin/tests/system/win32/pipequeries.vcxproj.filters.in b/bin/tests/system/win32/pipequeries.vcxproj.filters.in deleted file mode 100644 index 62374cd5f8..0000000000 --- a/bin/tests/system/win32/pipequeries.vcxproj.filters.in +++ /dev/null @@ -1,22 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - \ No newline at end of file diff --git a/bin/tests/system/win32/pipequeries.vcxproj.in b/bin/tests/system/win32/pipequeries.vcxproj.in deleted file mode 100644 index 870811ba34..0000000000 --- a/bin/tests/system/win32/pipequeries.vcxproj.in +++ /dev/null @@ -1,127 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {E1478F40-786C-4738-8E99-E7A71DD98661} - Win32Proj - pipequeries - @WINDOWS_TARGET_PLATFORM_VERSION@ - - - - Application - true - MultiByte - @PLATFORM_TOOLSET@ - - - Application - false - true - MultiByte - @PLATFORM_TOOLSET@ - - - - - - - - - - - - - true - ..\..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - - - false - ..\..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - - - - - - Level4 - false - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - true - ..\..\..\..\config.h - .\;..\..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\..\lib\isc\win32;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;..\..\..\..\lib\dns\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - true - ..\..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - ..\..\..\..\lib\isc\win32\$(Configuration);..\..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@@LIBXML2_LIB@libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies) - - - - - Level1 - true - - - MaxSpeed - true - @INTRINSIC@ - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - OnlyExplicitInline - false - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - ..\..\..\..\config.h - .\;..\..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\..\lib\isc\win32;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;..\..\..\..\lib\dns\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - false - true - true - ..\..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - Default - ..\..\..\..\lib\isc\win32\$(Configuration);..\..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@@LIBXML2_LIB@libisc.lib;libdns.lib;ws2_32.lib;%(AdditionalDependencies) - - - - - - - - {3840E563-D180-4761-AA9C-E6155F02EAFF} - - - {5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A} - - - - - - diff --git a/bin/tests/system/win32/pipequeries.vcxproj.user b/bin/tests/system/win32/pipequeries.vcxproj.user deleted file mode 100644 index ace9a86acb..0000000000 --- a/bin/tests/system/win32/pipequeries.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/bin/tests/system/win32/resolve.vcxproj.filters.in b/bin/tests/system/win32/resolve.vcxproj.filters.in deleted file mode 100644 index 882e23feeb..0000000000 --- a/bin/tests/system/win32/resolve.vcxproj.filters.in +++ /dev/null @@ -1,22 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - \ No newline at end of file diff --git a/bin/tests/system/win32/resolve.vcxproj.in b/bin/tests/system/win32/resolve.vcxproj.in deleted file mode 100644 index a15a9b36e2..0000000000 --- a/bin/tests/system/win32/resolve.vcxproj.in +++ /dev/null @@ -1,130 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {F66D8B7E-721D-4602-99AD-820D19AD1313} - Win32Proj - resolve - @WINDOWS_TARGET_PLATFORM_VERSION@ - - - - Application - true - MultiByte - @PLATFORM_TOOLSET@ - - - Application - false - true - MultiByte - @PLATFORM_TOOLSET@ - - - - - - - - - - - - - true - ..\..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - - - false - ..\..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - - - - - - Level4 - false - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - true - ..\..\..\..\config.h - .\;..\..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\..\lib\isc\win32;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;..\..\..\..\lib\dns\include;..\..\..\..\lib\irs\win32\include;..\..\..\..\lib\irs\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - true - ..\..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - ..\..\..\..\lib\isc\win32\$(Configuration);..\..\..\..\lib\dns\win32\$(Configuration);..\..\..\..\lib\irs\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@@LIBXML2_LIB@libisc.lib;libdns.lib;libirs.lib;ws2_32.lib;%(AdditionalDependencies) - - - - - Level1 - true - - - MaxSpeed - true - @INTRINSIC@ - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - OnlyExplicitInline - false - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - ..\..\..\..\config.h - .\;..\..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\..\lib\isc\win32;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;..\..\..\..\lib\dns\include;..\..\..\..\lib\irs\win32\include;..\..\..\..\lib\irs\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - false - true - true - ..\..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - Default - ..\..\..\..\lib\isc\win32\$(Configuration);..\..\..\..\lib\dns\win32\$(Configuration);..\..\..\..\lib\irs\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@@LIBXML2_LIB@libisc.lib;libdns.lib;libirs.lib;ws2_32.lib;%(AdditionalDependencies) - - - - - - - - {3840E563-D180-4761-AA9C-E6155F02EAFF} - - - {5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A} - - - {A4F29CEB-7644-4A7F-BE9E-02B6A90E4919} - - - - - - diff --git a/bin/tests/system/win32/resolve.vcxproj.user b/bin/tests/system/win32/resolve.vcxproj.user deleted file mode 100644 index ace9a86acb..0000000000 --- a/bin/tests/system/win32/resolve.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/bin/tools/win32/arpaname.vcxproj.filters.in b/bin/tools/win32/arpaname.vcxproj.filters.in deleted file mode 100644 index 129b93ef6d..0000000000 --- a/bin/tools/win32/arpaname.vcxproj.filters.in +++ /dev/null @@ -1,22 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - \ No newline at end of file diff --git a/bin/tools/win32/arpaname.vcxproj.in b/bin/tools/win32/arpaname.vcxproj.in deleted file mode 100644 index a601b50326..0000000000 --- a/bin/tools/win32/arpaname.vcxproj.in +++ /dev/null @@ -1,124 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {91E60FDA-E48C-4DA0-92A2-97F963348E00} - Win32Proj - arpaname - @WINDOWS_TARGET_PLATFORM_VERSION@ - - - - Application - true - MultiByte - @PLATFORM_TOOLSET@ - - - Application - false - true - MultiByte - @PLATFORM_TOOLSET@ - - - - - - - - - - - - - true - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - - - false - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - - - - - - Level4 - false - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;%(AdditionalIncludeDirectories) - true - .\$(Configuration)\$(TargetName).pch - true - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - CompileAsC - - - Console - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - ..\..\..\lib\isc\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@libisc.lib;ws2_32.lib;%(AdditionalDependencies) - - - - - Level1 - true - - - MaxSpeed - true - @INTRINSIC@ - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;%(AdditionalIncludeDirectories) - OnlyExplicitInline - true - .\$(Configuration)\$(TargetName).pch - false - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - CompileAsC - - - Console - false - true - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - Default - ..\..\..\lib\isc\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@libisc.lib;ws2_32.lib;%(AdditionalDependencies) - - - - - - - - {3840E563-D180-4761-AA9C-E6155F02EAFF} - - - - - - diff --git a/bin/tools/win32/arpaname.vcxproj.user b/bin/tools/win32/arpaname.vcxproj.user deleted file mode 100644 index ace9a86acb..0000000000 --- a/bin/tools/win32/arpaname.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/bin/tools/win32/journalprint.vcxproj.filters.in b/bin/tools/win32/journalprint.vcxproj.filters.in deleted file mode 100644 index cb894707a6..0000000000 --- a/bin/tools/win32/journalprint.vcxproj.filters.in +++ /dev/null @@ -1,18 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - \ No newline at end of file diff --git a/bin/tools/win32/journalprint.vcxproj.in b/bin/tools/win32/journalprint.vcxproj.in deleted file mode 100644 index 08fbaa9dc4..0000000000 --- a/bin/tools/win32/journalprint.vcxproj.in +++ /dev/null @@ -1,129 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {B19042CE-D3D9-469B-BCD2-C3140150939A} - Win32Proj - journalprint - @WINDOWS_TARGET_PLATFORM_VERSION@ - - - - Application - true - MultiByte - @PLATFORM_TOOLSET@ - - - Application - false - true - MultiByte - @PLATFORM_TOOLSET@ - - - - - - - - - - - - - true - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - named-$(ProjectName) - - - false - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - named-$(ProjectName) - - - - - - Level4 - false - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - .\$(Configuration)\$(ProjectName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - true - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - ..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@libisc.lib;libdns.lib;%(AdditionalDependencies) - - - - - Level1 - true - - - MaxSpeed - true - @INTRINSIC@ - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - OnlyExplicitInline - false - true - .\$(Configuration)\$(ProjectName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - false - true - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - Default - ..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@libisc.lib;libdns.lib;%(AdditionalDependencies) - - - - - - - - {3840E563-D180-4761-AA9C-E6155F02EAFF} - - - {5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A} - - - - - - diff --git a/bin/tools/win32/journalprint.vcxproj.user b/bin/tools/win32/journalprint.vcxproj.user deleted file mode 100644 index ace9a86acb..0000000000 --- a/bin/tools/win32/journalprint.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/bin/tools/win32/mdig.vcxproj.filters.in b/bin/tools/win32/mdig.vcxproj.filters.in deleted file mode 100644 index fbb8ba4086..0000000000 --- a/bin/tools/win32/mdig.vcxproj.filters.in +++ /dev/null @@ -1,18 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - diff --git a/bin/tools/win32/mdig.vcxproj.in b/bin/tools/win32/mdig.vcxproj.in deleted file mode 100644 index fdaaa82bfb..0000000000 --- a/bin/tools/win32/mdig.vcxproj.in +++ /dev/null @@ -1,130 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {3115091C-8135-481F-9757-F013A26255E0} - Win32Proj - mdig - @WINDOWS_TARGET_PLATFORM_VERSION@ - - - - Application - true - MultiByte - @PLATFORM_TOOLSET@ - - - Application - false - true - MultiByte - @PLATFORM_TOOLSET@ - - - - - - - - - - - - - true - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - - - false - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - - - - - - Level4 - false - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - true - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - ..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@libisc.lib;libdns.lib;libbind9.lib;ws2_32.lib;%(AdditionalDependencies) - - - - - Level1 - true - - - MaxSpeed - true - @INTRINSIC@ - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - OnlyExplicitInline - false - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - false - true - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - Default - ..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@libisc.lib;libdns.lib;libbind9.lib;ws2_32.lib;%(AdditionalDependencies) - - - - - - - - {3840E563-D180-4761-AA9C-E6155F02EAFF} - - - {5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A} - - - {E741C10B-B075-4206-9596-46765B665E03} - - - - - - diff --git a/bin/tools/win32/mdig.vcxproj.user b/bin/tools/win32/mdig.vcxproj.user deleted file mode 100644 index ace9a86acb..0000000000 --- a/bin/tools/win32/mdig.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/bin/tools/win32/nsec3hash.vcxproj.filters.in b/bin/tools/win32/nsec3hash.vcxproj.filters.in deleted file mode 100644 index 009e9707dd..0000000000 --- a/bin/tools/win32/nsec3hash.vcxproj.filters.in +++ /dev/null @@ -1,18 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - \ No newline at end of file diff --git a/bin/tools/win32/nsec3hash.vcxproj.in b/bin/tools/win32/nsec3hash.vcxproj.in deleted file mode 100644 index 33f648382e..0000000000 --- a/bin/tools/win32/nsec3hash.vcxproj.in +++ /dev/null @@ -1,127 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {4EE91023-94C3-48C0-B71C-5333B726C2EE} - Win32Proj - nsec3hash - @WINDOWS_TARGET_PLATFORM_VERSION@ - - - - Application - true - MultiByte - @PLATFORM_TOOLSET@ - - - Application - false - true - MultiByte - @PLATFORM_TOOLSET@ - - - - - - - - - - - - - true - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - - - false - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - - - - - - Level4 - false - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - true - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - ..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@libisc.lib;libdns.lib;%(AdditionalDependencies) - - - - - Level1 - true - - - MaxSpeed - true - @INTRINSIC@ - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - OnlyExplicitInline - false - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - false - true - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - Default - ..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@libisc.lib;libdns.lib;%(AdditionalDependencies) - - - - - - - - {3840E563-D180-4761-AA9C-E6155F02EAFF} - - - {5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A} - - - - - - diff --git a/bin/tools/win32/nsec3hash.vcxproj.user b/bin/tools/win32/nsec3hash.vcxproj.user deleted file mode 100644 index ace9a86acb..0000000000 --- a/bin/tools/win32/nsec3hash.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/bin/tools/win32/rrchecker.vcxproj.filters.in b/bin/tools/win32/rrchecker.vcxproj.filters.in deleted file mode 100644 index d7f077d424..0000000000 --- a/bin/tools/win32/rrchecker.vcxproj.filters.in +++ /dev/null @@ -1,18 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - diff --git a/bin/tools/win32/rrchecker.vcxproj.in b/bin/tools/win32/rrchecker.vcxproj.in deleted file mode 100644 index 14e4a6145c..0000000000 --- a/bin/tools/win32/rrchecker.vcxproj.in +++ /dev/null @@ -1,129 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {98743A7C-6AF8-467f-9911-FA69C451AF2B} - Win32Proj - rrchecker - @WINDOWS_TARGET_PLATFORM_VERSION@ - - - - Application - true - MultiByte - @PLATFORM_TOOLSET@ - - - Application - false - true - MultiByte - @PLATFORM_TOOLSET@ - - - - - - - - - - - - - true - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - named-$(ProjectName) - - - false - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - named-$(ProjectName) - - - - - - Level4 - false - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - true - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - ..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@libisc.lib;libdns.lib;%(AdditionalDependencies) - - - - - Level1 - true - - - MaxSpeed - true - @INTRINSIC@ - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - OnlyExplicitInline - false - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories) - CompileAsC - - - Console - false - true - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - Default - ..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@libisc.lib;libdns.lib;%(AdditionalDependencies) - - - - - - - - {3840E563-D180-4761-AA9C-E6155F02EAFF} - - - {5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A} - - - - - - diff --git a/bin/tools/win32/rrchecker.vcxproj.user b/bin/tools/win32/rrchecker.vcxproj.user deleted file mode 100644 index ace9a86acb..0000000000 --- a/bin/tools/win32/rrchecker.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/bin/win32/BINDInstall/AccountInfo.cpp b/bin/win32/BINDInstall/AccountInfo.cpp deleted file mode 100644 index bbf01c0af0..0000000000 --- a/bin/win32/BINDInstall/AccountInfo.cpp +++ /dev/null @@ -1,463 +0,0 @@ -/* - * Portions Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/* Compiled with UNICODE */ - -#include "stdafx.h" - -#include -#include -#include - -#include -#include -#include "AccountInfo.h" - -#define MAX_NAME_LENGTH 256 - -NTSTATUS -OpenPolicy( - LPWSTR ServerName, /* machine to open policy on (Unicode) */ - DWORD DesiredAccess, /* desired access to policy */ - PLSA_HANDLE PolicyHandle /* resultant policy handle */ - ); - -BOOL -GetAccountSid( - LPTSTR SystemName, /* where to lookup account */ - LPTSTR AccountName, /* account of interest */ - PSID *Sid /* resultant buffer containing SID */ - ); - -NTSTATUS -SetPrivilegeOnAccount( - LSA_HANDLE PolicyHandle, /* open policy handle */ - PSID AccountSid, /* SID to grant privilege to */ - LPWSTR PrivilegeName, /* privilege to grant (Unicode) */ - BOOL bEnable /* enable or disable */ - ); - -NTSTATUS -GetPrivilegesOnAccount( - LSA_HANDLE PolicyHandle, /* open policy handle */ - PSID AccountSid, /* SID to grant privilege to */ - wchar_t **PrivList, /* Ptr to List of Privileges found */ - unsigned int *PrivCount /* total number of Privileges in list */ - ); - -NTSTATUS -AddPrivilegeToAcccount( - LPTSTR AccountName, /* Name of the account */ - LPWSTR PrivilegeName /* Privilege to Add */ - ); - -void -InitLsaString( - PLSA_UNICODE_STRING LsaString, /* destination */ - LPWSTR String /* source (Unicode) */ - ); - -void -DisplayNtStatus( - LPSTR szAPI, /* pointer to function name (ANSI) */ - NTSTATUS Status /* NTSTATUS error value */ - ); - -void -DisplayWinError( - LPSTR szAPI, /* pointer to function name (ANSI) */ - DWORD WinError /* DWORD WinError */ - ); - -#ifndef STATUS_SUCCESS -#define STATUS_SUCCESS ((NTSTATUS)0x00000000L) -#endif - -/* - * Note that this code only retrieves the list of privileges of the - * requested account or group. However, all accounts belong to the - * Everyone group even though that group is not returned by the - * calls to get the groups to which that account belongs. - * The Everyone group has two privileges associated with it: - * SeChangeNotifyPrivilege and SeNetworkLogonRight - * It is not advisable to disable or remove these privileges - * from the group nor can the account be removed from the Everyone - * group - * The None group has no privileges associated with it and is the group - * to which an account belongs if it is associated with no group. - */ - -int -GetAccountPrivileges(char *name, wchar_t **PrivList, unsigned int *PrivCount, - char **Accounts, unsigned int *totalAccounts, - int maxAccounts) -{ - LSA_HANDLE PolicyHandle; - TCHAR AccountName[256]; /* static account name buffer */ - PSID pSid; - unsigned int i; - NTSTATUS Status; - isc_result_t istatus; - int iRetVal = RTN_ERROR; /* assume error from main */ - int n; - - /* - * Open the policy on the target machine. - */ - if ((Status = OpenPolicy(NULL, - POLICY_LOOKUP_NAMES, - &PolicyHandle)) != STATUS_SUCCESS) - return (RTN_ERROR); - - /* - * Let's see if the account exists. Return if not - */ - n = wnsprintf(AccountName, sizeof(AccountName), TEXT("%hS"), name); - if (n < 0 || (size_t)n >= sizeof(AccountName)) { - LsaClose(PolicyHandle); - return (RTN_ERROR); - } - - if (!GetAccountSid(NULL, AccountName, &pSid)) { - LsaClose(PolicyHandle); - return (RTN_NOACCOUNT); - } - - /* - * Find out what groups the account belongs to - */ - istatus = isc_ntsecurity_getaccountgroups(name, Accounts, maxAccounts, - totalAccounts); - if (istatus == ISC_R_NOMEMORY) { - LsaClose(PolicyHandle); - return (RTN_NOMEMORY); - } else if (istatus != ISC_R_SUCCESS) { - LsaClose(PolicyHandle); - return (RTN_ERROR); - } - - Accounts[*totalAccounts] = name; /* Add the account to the list */ - (*totalAccounts)++; - - /* - * Loop through each Account to get the list of privileges - */ - for (i = 0; i < *totalAccounts; i++) { - n = wnsprintf(AccountName, sizeof(AccountName), TEXT("%hS"), - Accounts[i]); - if (n < 0 || (size_t)n >= sizeof(AccountName)) { - continue; - } - - /* Obtain the SID of the user/group. */ - if (!GetAccountSid(NULL, AccountName, &pSid)) { - continue; /* Try the next one */ - } - - /* Get the Privileges allocated to this SID */ - if ((Status = GetPrivilegesOnAccount(PolicyHandle, pSid, - PrivList, PrivCount)) == STATUS_SUCCESS) - { - iRetVal=RTN_OK; - if (pSid != NULL) - HeapFree(GetProcessHeap(), 0, pSid); - } else { - if (pSid != NULL) - HeapFree(GetProcessHeap(), 0, pSid); - continue; /* Try the next one */ - } - } - - /* - * Close the policy handle. - */ - LsaClose(PolicyHandle); - - (*totalAccounts)--; /* Correct for the number of groups */ - return iRetVal; -} - -BOOL -CreateServiceAccount(char *name, char *password) { - NTSTATUS retstat; - USER_INFO_1 ui; - DWORD dwLevel = 1; - DWORD dwError = 0; - NET_API_STATUS nStatus; - - size_t namelen = strlen(name); - size_t passwdlen = strlen(password); - wchar_t AccountName[MAX_NAME_LENGTH]; - wchar_t AccountPassword[MAX_NAME_LENGTH]; - - mbstowcs(AccountName, name, namelen + 1); - mbstowcs(AccountPassword, password, passwdlen + 1); - - /* - * Set up the USER_INFO_1 structure. - * USER_PRIV_USER: name is required here when creating an account - * rather than an administrator or a guest. - */ - - ui.usri1_name = (LPWSTR) &AccountName; - ui.usri1_password = (LPWSTR) &AccountPassword; - ui.usri1_priv = USER_PRIV_USER; - ui.usri1_home_dir = NULL; - ui.usri1_comment = L"ISC BIND Service Account"; - ui.usri1_flags = UF_PASSWD_CANT_CHANGE | UF_DONT_EXPIRE_PASSWD | - UF_SCRIPT; - ui.usri1_script_path = NULL; - - /* - * Call the NetUserAdd function, specifying level 1. - */ - nStatus = NetUserAdd(NULL, dwLevel, (LPBYTE)&ui, &dwError); - if (nStatus != NERR_Success) { - return (FALSE); - } - - retstat = AddPrivilegeToAcccount(name, SE_SERVICE_LOGON_PRIV); - if (retstat != RTN_OK) { - return (FALSE); - } - - return (TRUE); -} - -NTSTATUS -AddPrivilegeToAcccount(LPTSTR name, LPWSTR PrivilegeName) { - LSA_HANDLE PolicyHandle; - TCHAR AccountName[256]; /* static account name buffer */ - PSID pSid; - NTSTATUS Status; - unsigned long err; - int n; - - /* - * Open the policy on the target machine. - */ - Status = OpenPolicy(NULL, POLICY_ALL_ACCESS, &PolicyHandle); - if (Status != STATUS_SUCCESS) { - return (RTN_ERROR); - } - - /* - * Let's see if the account exists. Return if not - */ - n = wnsprintf(AccountName, sizeof(AccountName), TEXT("%hS"), name); - if (n < 0 || (size_t)n >= sizeof(AccountName)) { - LsaClose(PolicyHandle); - return (RTN_ERROR); - } - - if (!GetAccountSid(NULL, AccountName, &pSid)) { - LsaClose(PolicyHandle); - return (RTN_NOACCOUNT); - } - - err = LsaNtStatusToWinError(SetPrivilegeOnAccount(PolicyHandle, - pSid, PrivilegeName, TRUE)); - - LsaClose(PolicyHandle); - if (err == ERROR_SUCCESS) { - return (RTN_OK); - } else { - return (err); - } -} - -void -InitLsaString(PLSA_UNICODE_STRING LsaString, LPWSTR String){ - size_t StringLength; - - if (String == NULL) { - LsaString->Buffer = NULL; - LsaString->Length = 0; - LsaString->MaximumLength = 0; - return; - } - - StringLength = wcslen(String); - LsaString->Buffer = String; - LsaString->Length = (USHORT) StringLength * sizeof(WCHAR); - LsaString->MaximumLength = (USHORT)(StringLength+1) * sizeof(WCHAR); -} - -NTSTATUS -OpenPolicy(LPWSTR ServerName, DWORD DesiredAccess, PLSA_HANDLE PolicyHandle){ - LSA_OBJECT_ATTRIBUTES ObjectAttributes; - LSA_UNICODE_STRING ServerString; - PLSA_UNICODE_STRING Server = NULL; - - /* - * Always initialize the object attributes to all zeroes. - */ - ZeroMemory(&ObjectAttributes, sizeof(ObjectAttributes)); - - if (ServerName != NULL) { - /* - * Make a LSA_UNICODE_STRING out of the LPWSTR passed in - */ - InitLsaString(&ServerString, ServerName); - Server = &ServerString; - } - - /* - * Attempt to open the policy. - */ - return (LsaOpenPolicy(Server, &ObjectAttributes, DesiredAccess, - PolicyHandle)); -} - -BOOL -GetAccountSid(LPTSTR SystemName, LPTSTR AccountName, PSID *Sid) { - LPTSTR ReferencedDomain = NULL; - DWORD cbSid = 128; /* initial allocation attempt */ - DWORD cbReferencedDomain = 16; /* initial allocation size */ - SID_NAME_USE peUse; - BOOL bSuccess = FALSE; /* assume this function will fail */ - - __try { - /* - * initial memory allocations - */ - if ((*Sid = HeapAlloc(GetProcessHeap(), 0, cbSid)) == NULL) - __leave; - - if ((ReferencedDomain = (LPTSTR) HeapAlloc(GetProcessHeap(), 0, - cbReferencedDomain)) == NULL) __leave; - - /* - * Obtain the SID of the specified account on the specified system. - */ - while (!LookupAccountName(SystemName, AccountName, *Sid, &cbSid, - ReferencedDomain, &cbReferencedDomain, - &peUse)) - { - if (GetLastError() == ERROR_INSUFFICIENT_BUFFER) { - /* reallocate memory */ - if ((*Sid = HeapReAlloc(GetProcessHeap(), 0, - *Sid, cbSid)) == NULL) __leave; - - if ((ReferencedDomain= (LPTSTR) HeapReAlloc( - GetProcessHeap(), 0, ReferencedDomain, - cbReferencedDomain)) == NULL) - __leave; - } - else - __leave; - } - bSuccess = TRUE; - } /* finally */ - __finally { - - /* Cleanup and indicate failure, if appropriate. */ - - HeapFree(GetProcessHeap(), 0, ReferencedDomain); - - if (!bSuccess) { - if (*Sid != NULL) { - HeapFree(GetProcessHeap(), 0, *Sid); - *Sid = NULL; - } - } - - } - - return (bSuccess); -} - -NTSTATUS -SetPrivilegeOnAccount(LSA_HANDLE PolicyHandle, PSID AccountSid, - LPWSTR PrivilegeName, BOOL bEnable) -{ - LSA_UNICODE_STRING PrivilegeString; - - /* Create a LSA_UNICODE_STRING for the privilege name. */ - InitLsaString(&PrivilegeString, PrivilegeName); - - /* grant or revoke the privilege, accordingly */ - if (bEnable) - return (LsaAddAccountRights(PolicyHandle, AccountSid, - &PrivilegeString, 1)); - else - return (LsaRemoveAccountRights(PolicyHandle, AccountSid, - FALSE, &PrivilegeString, 1)); -} - -NTSTATUS -GetPrivilegesOnAccount(LSA_HANDLE PolicyHandle, PSID AccountSid, - wchar_t **PrivList, unsigned int *PrivCount) -{ - NTSTATUS Status; - LSA_UNICODE_STRING *UserRights; - ULONG CountOfRights; - DWORD i, j; - int found; - - Status = LsaEnumerateAccountRights(PolicyHandle, AccountSid, - &UserRights, &CountOfRights); - /* Only continue if there is something */ - if (UserRights == NULL || Status != STATUS_SUCCESS) - return (Status); - - for (i = 0; i < CountOfRights; i++) { - unsigned int retlen; - found = -1; - retlen = UserRights[i].Length/sizeof(wchar_t); - for (j = 0; j < *PrivCount; j++) { - found = wcsncmp(PrivList[j], UserRights[i].Buffer, - retlen); - if (found == 0) - break; - } - if (found != 0) { - PrivList[*PrivCount] = - (wchar_t *)malloc(UserRights[i].MaximumLength); - if (PrivList[*PrivCount] == NULL) - return (RTN_NOMEMORY); - - wcsncpy(PrivList[*PrivCount], UserRights[i].Buffer, - retlen); - PrivList[*PrivCount][retlen] = L'\0'; - (*PrivCount)++; - } - - } - - return (Status); -} - -void -DisplayNtStatus(LPSTR szAPI, NTSTATUS Status) { - /* Convert the NTSTATUS to Winerror. Then call DisplayWinError(). */ - DisplayWinError(szAPI, LsaNtStatusToWinError(Status)); -} - -void -DisplayWinError(LPSTR szAPI, DWORD WinError) { - LPSTR MessageBuffer; - DWORD dwBufferLength; - - if (dwBufferLength=FormatMessageA( - FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, - NULL, WinError, GetUserDefaultLangID(), - (LPSTR) &MessageBuffer, 0, NULL)){ - DWORD dwBytesWritten; /* unused */ - - /* Output message string on stderr. */ - WriteFile(GetStdHandle(STD_ERROR_HANDLE), MessageBuffer, - dwBufferLength, &dwBytesWritten, NULL); - - /* Free the buffer allocated by the system. */ - LocalFree(MessageBuffer); - } -} diff --git a/bin/win32/BINDInstall/AccountInfo.h b/bin/win32/BINDInstall/AccountInfo.h deleted file mode 100644 index 197372318b..0000000000 --- a/bin/win32/BINDInstall/AccountInfo.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#define RTN_OK 0 -#define RTN_NOACCOUNT 1 -#define RTN_NOMEMORY 2 -#define RTN_ERROR 10 - -#define SE_SERVICE_LOGON_PRIV L"SeServiceLogonRight" - -/* - * This routine retrieves the list of all Privileges associated with - * a given account as well as the groups to which it beongs - */ -int -GetAccountPrivileges(char *name, /* Name of Account */ - wchar_t **PrivList, /* List of Privileges returned */ - unsigned int *PrivCount, /* Count of Privileges - returned */ - char **Groups, /* List of Groups to which account - * belongs - */ - unsigned int *totalGroups, /* Count of Groups returned - */ - int maxGroups /* Maximum number of Groups to return */ -); - -/* - * This routine creates an account with the given name which has just - * the logon service privilege and no membership of any groups, - * i.e. it's part of the None group. - */ -BOOL -CreateServiceAccount(char *name, char *password); diff --git a/bin/win32/BINDInstall/BINDInstall.cpp b/bin/win32/BINDInstall/BINDInstall.cpp deleted file mode 100644 index 2046546bdb..0000000000 --- a/bin/win32/BINDInstall/BINDInstall.cpp +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Portions Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/* - * Copyright (c) 1999-2000 by Nortel Networks Corporation - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND NORTEL NETWORKS DISCLAIMS - * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NORTEL NETWORKS - * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ - -#include "stdafx.h" -#include "BINDInstall.h" -#include "BINDInstallDlg.h" - -#ifdef _DEBUG -#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -///////////////////////////////////////////////////////////////////////////// -// CBINDInstallApp - -BEGIN_MESSAGE_MAP(CBINDInstallApp, CWinApp) - //{{AFX_MSG_MAP(CBINDInstallApp) - // NOTE - the ClassWizard will add and remove mapping macros here. - // DO NOT EDIT what you see in these blocks of generated code! - //}}AFX_MSG - ON_COMMAND(ID_HELP, CWinApp::OnHelp) -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CBINDInstallApp construction - -CBINDInstallApp::CBINDInstallApp() -{ - // TODO: add construction code here, - // Place all significant initialization in InitInstance -} - -///////////////////////////////////////////////////////////////////////////// -// The one and only CBINDInstallApp object - -CBINDInstallApp theApp; - -///////////////////////////////////////////////////////////////////////////// -// CBINDInstallApp initialization - -BOOL CBINDInstallApp::InitInstance() -{ - // Standard initialization - // If you are not using these features and wish to reduce the size - // of your final executable, you should remove from the following - // the specific initialization routines you do not need. -#if _MSC_VER < 1300 -#ifdef _AFXDLL - Enable3dControls(); // Call this when using MFC in a shared DLL -#else - Enable3dControlsStatic(); // Call this when linking to MFC statically -#endif -#endif - - CBINDInstallDlg dlg; - m_pMainWnd = &dlg; - INT_PTR nResponse = dlg.DoModal(); - if (nResponse == IDOK) - { - // TODO: Place code here to handle when the dialog is - // dismissed with OK - } - else if (nResponse == IDCANCEL) - { - // TODO: Place code here to handle when the dialog is - // dismissed with Cancel - } - - // Since the dialog has been closed, return FALSE so that we exit the - // application, rather than start the application's message pump. - return FALSE; -} diff --git a/bin/win32/BINDInstall/BINDInstall.h b/bin/win32/BINDInstall/BINDInstall.h deleted file mode 100644 index dc533b625a..0000000000 --- a/bin/win32/BINDInstall/BINDInstall.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Portions Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/* - * Copyright (c) 1999-2000 by Nortel Networks Corporation - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND NORTEL NETWORKS DISCLAIMS - * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NORTEL NETWORKS - * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ - -#ifndef BINDINSTALL_H -#define BINDINSTALL_H - -#ifndef __AFXWIN_H__ -#error include 'stdafx.h' before including this file for PCH -#endif /* ifndef __AFXWIN_H__ */ - -#include "resource.h" /* main symbols */ - -class CBINDInstallApp : public CWinApp { - public: - CBINDInstallApp(); - - /* ClassWizard generated virtual function overrides */ - /*{{AFX_VIRTUAL(CBINDInstallApp) */ - public: - virtual BOOL - InitInstance(); - /*}}AFX_VIRTUAL */ - - /*{{AFX_MSG(CBINDInstallApp) */ - /* NOTE - the ClassWizard will add and remove member functions here. */ - /* DO NOT EDIT what you see in these blocks of generated code ! */ - /*}}AFX_MSG */ - DECLARE_MESSAGE_MAP() -}; - -#endif /* ifndef BINDINSTALL_H */ diff --git a/bin/win32/BINDInstall/BINDInstall.rc b/bin/win32/BINDInstall/BINDInstall.rc deleted file mode 100644 index 5c7dd80d4a..0000000000 --- a/bin/win32/BINDInstall/BINDInstall.rc +++ /dev/null @@ -1,325 +0,0 @@ -// Microsoft Visual C++ generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "afxres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""afxres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "#define _AFX_NO_SPLITTER_RESOURCES\r\n" - "#define _AFX_NO_OLE_RESOURCES\r\n" - "#define _AFX_NO_TRACKER_RESOURCES\r\n" - "#define _AFX_NO_PROPERTY_RESOURCES\r\n" - "\r\n" - "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n" - "#ifdef _WIN32\r\n" - "LANGUAGE 9, 1\r\n" - "#pragma code_page(1252)\r\n" - "#endif //_WIN32\r\n" - "#include ""res\\BINDInstall.rc2"" // non-Microsoft Visual C++ edited resources\r\n" - "#include ""afxres.rc"" // Standard components\r\n" - "#endif\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDR_MAINFRAME ICON "res\\BINDInstall.ico" - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_BINDINSTALL_DIALOG DIALOGEX 0, 0, 210, 311 -STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -EXSTYLE WS_EX_APPWINDOW -CAPTION "BIND 9 Installer" -FONT 8, "MS Sans Serif", 0, 0, 0x1 -BEGIN - EDITTEXT IDC_TARGETDIR,7,62,196,14,ES_AUTOHSCROLL - EDITTEXT IDC_ACCOUNT_NAME,7,94,196,14,ES_AUTOHSCROLL - EDITTEXT IDC_ACCOUNT_PASSWORD,7,122,196,14,ES_PASSWORD | ES_AUTOHSCROLL - EDITTEXT IDC_ACCOUNT_PASSWORD_CONFIRM,7,151,196,14,ES_PASSWORD | ES_AUTOHSCROLL - DEFPUSHBUTTON "&Install",IDC_INSTALL,153,7,50,14 - PUSHBUTTON "E&xit",IDC_EXIT,153,39,50,14 - CONTROL "&Tools Only",IDC_TOOLS_ONLY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,185,72,10 - CONTROL "&Automatic Startup",IDC_AUTO_START,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,195,72,10 - CONTROL "&Keep Config Files After Uninstall",IDC_KEEP_FILES, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,205,116,10 - CONTROL "&Start BIND Service After Install",IDC_START,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,215,113,10 - PUSHBUTTON "&Uninstall",IDC_UNINSTALL,153,23,50,14 - PUSHBUTTON "Browse",IDC_BROWSE,7,22,50,14 - LTEXT "Target Directory:",IDC_STATIC,7,53,54,8 - GROUPBOX "Progress",IDC_STATIC,7,234,196,70 - RTEXT "",IDC_COPY_TAG,14,271,78,8 - LTEXT "",IDC_COPY_FILE,105,271,90,8 - RTEXT "",IDC_SERVICE_TAG,15,281,77,8 - LTEXT "",IDC_REG_SERVICE,105,281,89,8 - RTEXT "",IDC_MESSAGE_TAG,15,291,77,8 - LTEXT "",IDC_REG_MESSAGE,105,291,88,8 - RTEXT "",IDC_DIR_TAG,15,261,77,8 - GROUPBOX "Options",IDC_STATIC,7,172,196,60 - CTEXT "Version Unknown",IDC_VERSION,7,7,61,10,SS_CENTERIMAGE | SS_SUNKEN - RTEXT "Current Operation:",IDC_CURRENT_TAG,34,245,58,8 - LTEXT "",IDC_CURRENT,105,245,90,8 - LTEXT "",IDC_CREATE_DIR,105,261,88,8 - LTEXT "Service Account Name",IDC_STATIC,7,84,74,8 - LTEXT "Service Account Password",IDC_STATIC,7,112,86,8 - LTEXT "Confirm Service Account Password",IDC_STATIC,7,140,112,8 -END - -IDD_BROWSE DIALOG 0, 0, 227, 117 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Select Directory" -FONT 8, "MS Sans Serif" -BEGIN - DEFPUSHBUTTON "OK",IDOK,170,7,50,14 - PUSHBUTTON "Cancel",IDCANCEL,170,24,50,14 - LISTBOX IDC_DIRLIST,7,28,155,82,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP - EDITTEXT IDC_CURDIR,7,7,155,14,ES_AUTOHSCROLL - COMBOBOX IDC_DRIVES,170,98,50,74,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP -END - -IDD_DIALOG1 DIALOG 0, 0, 186, 95 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Dialog" -FONT 8, "MS Sans Serif" -BEGIN - DEFPUSHBUTTON "OK",IDOK,129,7,50,14 - PUSHBUTTON "Cancel",IDCANCEL,129,24,50,14 -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,0,0,0 - PRODUCTVERSION 3,0,0,0 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x1L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "CompanyName", "Internet Systems Consortium" - VALUE "FileDescription", "ISC BIND 9 Install Utility" - VALUE "FileVersion", "3.0.0" - VALUE "InternalName", "BINDInstall" - VALUE "LegalCopyright", "Copyright © 2000,2014" - VALUE "OriginalFilename", "BINDInstall.EXE" - VALUE "ProductName", "ISC BIND 9" - VALUE "ProductVersion", "9.10.0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO -BEGIN - IDD_BINDINSTALL_DIALOG, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 203 - VERTGUIDE, 14 - VERTGUIDE, 92 - VERTGUIDE, 105 - TOPMARGIN, 7 - BOTTOMMARGIN, 294 - HORZGUIDE, 195 - HORZGUIDE, 205 - HORZGUIDE, 215 - HORZGUIDE, 239 - HORZGUIDE, 255 - HORZGUIDE, 265 - HORZGUIDE, 275 - HORZGUIDE, 285 - HORZGUIDE, 295 - END - - IDD_BROWSE, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 220 - TOPMARGIN, 7 - BOTTOMMARGIN, 110 - END - - IDD_DIALOG1, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 179 - TOPMARGIN, 7 - BOTTOMMARGIN, 88 - END -END -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// String Table -// - -STRINGTABLE -BEGIN - IDS_MAINFRAME "BIND 9 Installer" - IDS_CREATEDIR "Directory %s does not exist.\nDo you wish to create it?" - IDS_SUCCESS "BIND installation completed successfully" - IDS_FAIL "BIND installation failed" - IDS_DIREXIST "Directory %s exists.\n Install here anyway?" - IDS_INSTALL_DIR "Create Directories..." - IDS_INSTALL_FILE "Copy Files..." - IDS_INSTALL_SERVICE "Register Service..." - IDS_INSTALL_MESSAGE "Register Messages..." - IDS_UNINSTALL "Do you wish to uninstall BIND?" - IDS_UNINSTALL_DONE "BIND Uninstall Completed" -END - -STRINGTABLE -BEGIN - IDS_CREATE_KEY "Creating BIND registry key" - IDS_ADD_REMOVE "Setting up Add/Remove Programs entry" - IDS_CLEANUP "Cleaning up" - IDS_INSTALL_DONE "Finished Installing" - IDS_CREATE_DIR "Creating directory %s" - IDS_REMOVE_DIR "Removing directory %s" - IDS_COPY_FILE "Copying file %s" - IDS_DELETE_FILE "Deleting file %s" - IDS_OPEN_SCM "Opening Service Control Manager" - IDS_CREATE_SERVICE "Creating BIND service" - IDS_OPEN_SERVICE "Opening BIND service" - IDS_REMOVE_SERVICE "Removing BIND service" - IDS_REGISTER_MESSAGES "Registering BIND message source" - IDS_UNREGISTER_MESSAGES "Unregistering BIND message source" - IDS_STOP_SERVICE "Stopping BIND service" - IDS_START_SERVICE "Starting BIND service" -END - -STRINGTABLE -BEGIN - IDS_UNINSTALL_DIR "Remove Directories..." - IDS_UNINSTALL_FILES "Delete Files..." - IDS_UNINSTALL_SERVICE "Unregister Service..." - IDS_UNINSTALL_MESSAGE "Unregister Messages..." - IDS_ERR_OPEN_SCM "Could not open Service Control Manager\n(%s)" - IDS_ERR_OPEN_SERVICE "Could not open BIND Service\n(%s)" - IDS_ERR_START_SERVICE "Could not start BIND Service\n(%s)" - IDS_ERR_STOP_SERVICE "Could not stop BIND Service\n(%s)" - IDS_ERR_NONCRIT_FILE "An error occurred while copying non-critical file %s\n(%s)\nDo you wish to continue?" - IDS_ERR_COPY_FILE "An error occurred while copying file %s\n(%s)\nInstallation will be terminated" - IDS_ERR_CREATE_SERVICE "Error creating service\n(%s)" - IDS_ERR_REMOVE_SERVICE "Error removing service\n(%s)" - IDS_REBOOT "BINDInstall needs to restart Windows.\nDo you wish to restart now?" - IDS_BAD_PRIVILEGES "This user cannot acquire the privileges necessary to install BIND. Please ensure you are logged on as a member of the Administrators group." - IDS_ERR_CREATE_DIR "An error occurred while creating directory %s\n(%s)" - IDS_VERSION "Version %s" - IDS_ERR_CREATE_KEY "An error occurred while creating registry keys\n(%s)" -END - -STRINGTABLE -BEGIN - IDS_ERR_SET_VALUE "An error occurred while setting registry key values\n(%s)" - IDS_NO_VERSION "Version Unknown" - IDS_EXISTING_NEWER "%s\nThe existing version of this file is newer than the version being installed.\nDo you wish to overwrite the existing file?" - IDS_FILE_BAD "Could not retrieve version info for file %s. Do you wish to continue?\n(Continuing may overwrite a newer version of the file) " - IDS_ERR_TOOPRIVED "Chosen account has too many privileges. Do you wish to choose a different account name?" - IDS_ERR_BADACCOUNT "Error Validating Account. Unable to install service using this account." - IDS_ERR_WRONGPRIV "The wrong privilege: %s was detected. Only the Service Logon Right privilege should be enabled for this account." - IDS_CREATEACCOUNT_FAILED "Unable to Create Account for the Service." - IDS_ERR_PASSWORD "Passwords entered did not match. Please reenter password." - IDS_ERR_UPDATE_SERVICE "Error updating service\n(%s)" - IDS_ERR_NULLPASSWORD "Service account password cannot be null" - IDS_ERR_WHITESPACE "Service account password has leading/trailing whitespace" -END - -#endif // English (U.S.) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// -#define _AFX_NO_SPLITTER_RESOURCES -#define _AFX_NO_OLE_RESOURCES -#define _AFX_NO_TRACKER_RESOURCES -#define _AFX_NO_PROPERTY_RESOURCES - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE 9, 1 -#pragma code_page(1252) -#endif //_WIN32 -#include "res\BINDInstall.rc2" // non-Microsoft Visual C++ edited resources -#include "afxres.rc" // Standard components -#endif - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff --git a/bin/win32/BINDInstall/BINDInstall.vcxproj.filters.in b/bin/win32/BINDInstall/BINDInstall.vcxproj.filters.in deleted file mode 100644 index 0cb0eb444f..0000000000 --- a/bin/win32/BINDInstall/BINDInstall.vcxproj.filters.in +++ /dev/null @@ -1,79 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Resource Files - - - Resource Files - - - - - Resource Files - - - \ No newline at end of file diff --git a/bin/win32/BINDInstall/BINDInstall.vcxproj.in b/bin/win32/BINDInstall/BINDInstall.vcxproj.in deleted file mode 100644 index 2962b9a770..0000000000 --- a/bin/win32/BINDInstall/BINDInstall.vcxproj.in +++ /dev/null @@ -1,311 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {190CC424-E8CC-46F2-9013-3152D6905118} - Win32Proj - BINDInstall - @WINDOWS_TARGET_PLATFORM_VERSION@ - - - - Application - true - MultiByte - @PLATFORM_TOOLSET@ - Static - - - Application - false - true - MultiByte - @PLATFORM_TOOLSET@ - Static - - - - - - - - - - - - - true - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - - - false - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - - - - MultiThreadedDebug - Use - Level4 - false - Disabled - WIN32;@USE_PYTHON@_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - ..\..\..;..\include;..\..\..\include;..\..\named\win32\include;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;%(AdditionalIncludeDirectories) - - - true - .\$(Configuration)\$(TargetName).pch - stdafx.h - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - true - CompileAsCpp - ProgramDatabase - - - Windows - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@nafxcwd.lib;version.lib;netapi32.lib;%(AdditionalDependencies) - false - - - - - MultiThreaded - Level1 - true - Use - MaxSpeed - true - false - WIN32;@USE_PYTHON@NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - ..\..\..;..\include;..\..\..\include;..\..\named\win32\include;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;%(AdditionalIncludeDirectories) - OnlyExplicitInline - true - .\$(Configuration)\$(TargetName).pch - stdafx.h - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - CompileAsCpp - false - - - Windows - false - true - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@nafxcw.lib;version.lib;netapi32.lib;%(AdditionalDependencies) - Default - false - - - - - - - - - - - - - - - NotUsing - - - UNICODE;WIN32;@USE_PYTHON@NDEBUG;_WINDOWS;_MBCS - UNICODE;WIN32;@USE_PYTHON@_DEBUG;_WINDOWS;_MBCS - - - - - - Create - stdafx.h - - - - - - - - - - - - - {03A96113-CB14-43AA-AEB2-48950E3915C5} - - - {2C1F7096-C5B5-48D4-846F-A7ACA454335D} - - - {66028555-7DD5-4016-B601-9EF9A1EE8BFA} - - - {64964B03-4815-41F0-9057-E766A94AF197} - - - {1EA4FC64-F33B-4A50-970A-EA052BBE9CF1} - - - {1E2C1635-3093-4D59-80E7-4743AC10F22F} - - - {BE172EFE-C1DC-4812-BFB9-8C5F8ADB7E9F} - - - {F938F9B8-D395-4A40-BEC7-0122D289C692} - - - {140DE800-E552-43CC-B0C7-A33A92E368CA} - - - {BA1048A8-6961-4A20-BE12-08BE20611C9D} - - - {C15A6E1A-94CE-4686-99F9-6BC5FD623EB5} - - - {0EB1727E-2BBD-47A6-AD12-418F9DEB0531} - - - {2CB7DC75-023B-4AA3-AF3A-AE5046A4EE70} - - - {6E6297F4-69D7-4533-85E1-BD17C30017C8} - - - {AB6690A0-055E-458f-BAC5-BF38BCC5834F} - - - {17455DC6-5FBB-47C3-8F44-7DB574A188D3} - - - {0BF11E21-168C-4CAA-B784-429D126BBAE5} - - - {D171F185-D3C2-4463-9CF3-ED1D0B1D6832} - - - {03FB7588-C5A7-4572-968F-14F1206BC69C} - - - {205ED8A9-2E4C-41CC-9385-F3613402AA90} - - - {FD653434-F1A8-44A9-85B2-A7468491DA6D} - - - {723C65DA-A96C-4BA3-A34E-44F11CA346F9} - - - {C41266C7-E27E-4D60-9815-82D3B32BF82F} - -@IF PKCS11 - - {5B3137E5-7E1F-49AA-8810-A09AA417D326} - - - {5042D371-0402-4FA3-A52A-769708694422} - - - {C663B088-F7BC-4C8C-8D06-A76636EED651} - - - {403FD4B1-A4F9-4159-9013-5860E3A4417D} - -@END PKCS11 - - {39721F26-8B80-4AA9-9826-2AEF7322C3D5} - -@IF STESTS - - {61F9D673-EB5C-47A5-8907-24E034C75EF8} - - - {63A921F6-1200-4723-828A-98960127B73D} - - - {764DBE24-C8B3-46E8-BE73-196431353A5D} - - - {4F9A0F6F-366D-4483-B131-793832840508} - - - {85ADFF2A-BE31-4B8D-9089-9AD56CE78D7E} - - - {31715139-2C27-47D2-8394-71B71A8AC3D5} - - - {E1478F40-786C-4738-8E99-E7A71DD98661} - - - {F66D8B7E-721D-4602-99AD-820D19AD1313} - -@END STESTS - - {91E60FDA-E48C-4DA0-92A2-97F963348E00} - - - {B19042CE-D3D9-469B-BCD2-C3140150939A} - - - {3115091C-8135-481F-9757-F013A26255E0} - - - {4EE91023-94C3-48C0-B71C-5333B726C2EE} - - - {98743A7C-6AF8-467f-9911-FA69C451AF2B} - - - {E741C10B-B075-4206-9596-46765B665E03} - - - {A3F71D12-F38A-4C77-8D87-8E8854CA74A1} - - - {5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A} - - - {A4F29CEB-7644-4A7F-BE9E-02B6A90E4919} - - - {3840E563-D180-4761-AA9C-E6155F02EAFF} - - - {B556705F-1920-4400-878A-B259D3556047} - - - {B2DFA58C-6347-478E-81E8-01E06999D4F1} - - - {82ACD33C-E75F-45B8-BB6D-42643A10D7EE} - - - {0D745CD9-FC3B-49DC-99BE-1E6DF85593F0} - - - - - - diff --git a/bin/win32/BINDInstall/BINDInstall.vcxproj.user b/bin/win32/BINDInstall/BINDInstall.vcxproj.user deleted file mode 100644 index ace9a86acb..0000000000 --- a/bin/win32/BINDInstall/BINDInstall.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/bin/win32/BINDInstall/BINDInstallDlg.cpp b/bin/win32/BINDInstall/BINDInstallDlg.cpp deleted file mode 100644 index b4711ed180..0000000000 --- a/bin/win32/BINDInstall/BINDInstallDlg.cpp +++ /dev/null @@ -1,1593 +0,0 @@ -/* - * Portions Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/* - * Copyright (c) 1999-2000 by Nortel Networks Corporation - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND NORTEL NETWORKS DISCLAIMS - * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NORTEL NETWORKS - * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ - -/* - * Define this to make a standalone installer that will copy msvcrt.dll - * and/or msvcrtd.dll during the install - */ -// #define BINARIES_INSTALL - -/* - * msvcrt.dll is the release c-runtime library for MSVC. msvcrtd.dll - * is the debug c-runtime library for MSVC. If you have debug - * binaries you want to have DEBUG_BINARIES defined. If you have - * release binaries you want to have RELEASE_BINARIES defined. - * If you have both, then define them both. - * Of course, you need msvcrt[d].dll present to install it! - */ -#ifdef BINARIES_INSTALL -// # define DEBUG_BINARIES -// # define RELEASE_BINARIES -#endif - -#include "stdafx.h" -#include "BINDInstall.h" -#include "BINDInstallDlg.h" -#include "DirBrowse.h" -#include -#include -#include -#include -#include -#include -#include -#include "AccountInfo.h" -#include "versioninfo.h" - -#include -#include -#include -#include - -#include - -#undef open - -#define MAX_GROUPS 100 -#define MAX_PRIVS 50 - -#define LOCAL_SERVICE "NT AUTHORITY\\LocalService" - -#ifdef _DEBUG -#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -typedef struct _xexception -{ - _xexception(UINT string, ...); - - CString resString; -} Exception; - -_xexception::_xexception(UINT string, ...) -{ - CString format; - va_list va; - - format.LoadString(string); - - va_start(va, string); - resString.FormatV(format, va); - va_end(va); -} - -typedef struct _filedata { - enum FileDestinations {TargetDir, BinDir, EtcDir, WinSystem}; - enum FileImportance {Trivial, Normal, Critical}; - - char filename[128]; - int destination; - int importance; - BOOL checkVer; - BOOL withTools; -} FileData; - -#if no_longer_used - -const FileData installFiles[] = -{ -#ifdef BINARIES_INSTALL -# ifdef DEBUG_BINARIES - {"msvcrtd.dll", FileData::WinSystem, FileData::Critical, TRUE, TRUE}, -# endif -# ifdef RELEASE_BINARIES - {"msvcrt.dll", FileData::WinSystem, FileData::Critical, TRUE, TRUE}, -# endif -#endif -#if _MSC_VER < 1400 -#if _MSC_VER >= 1310 - {"mfc71.dll", FileData::WinSystem, FileData::Critical, TRUE, TRUE}, - {"msvcr71.dll", FileData::WinSystem, FileData::Critical, TRUE, TRUE}, -#elif _MSC_VER > 1200 && _MSC_VER < 1310 - {"mfc70.dll", FileData::WinSystem, FileData::Critical, TRUE, TRUE}, - {"msvcr70.dll", FileData::WinSystem, FileData::Critical, TRUE, TRUE}, -#endif -#endif - {"bindevt.dll", FileData::BinDir, FileData::Normal, FALSE, TRUE}, - {"libbind9.dll", FileData::BinDir, FileData::Critical, FALSE, TRUE}, - {"libisc.dll", FileData::BinDir, FileData::Critical, FALSE, TRUE}, - {"libisccfg.dll", FileData::BinDir, FileData::Critical, FALSE, TRUE}, - {"libisccc.dll", FileData::BinDir, FileData::Critical, FALSE, TRUE}, - {"libdns.dll", FileData::BinDir, FileData::Critical, FALSE, TRUE}, - {"libirs.dll", FileData::BinDir, FileData::Critical, FALSE, TRUE}, - {"libeay32.dll", FileData::BinDir, FileData::Critical, FALSE, TRUE}, - {"nghttp2.dll", FileData::BinDir, FileData::Critical, FALSE, TRUE}, - {"uv.dll", FileData::BinDir, FileData::Critical, FALSE, TRUE}, -#ifdef HAVE_LIBXML2 - {"libxml2.dll", FileData::BinDir, FileData::Critical, FALSE, TRUE}, -#endif -#ifdef USE_GSSAPI -#ifndef _WIN64 - {"gssapi32.dll", FileData::BinDir, FileData::Critical, FALSE, TRUE}, - {"krb5_32.dll", FileData::BinDir, FileData::Critical, FALSE, TRUE}, -#else - {"gssapi64.dll", FileData::BinDir, FileData::Critical, FALSE, TRUE}, - {"krb5_64.dll", FileData::BinDir, FileData::Critical, FALSE, TRUE}, -#endif -#endif -#ifdef WITH_IDN - {"idnkit.dll", FileData::BinDir, FileData::Critical, FALSE, TRUE}, - {"iconv.dll", FileData::BinDir, FileData::Critical, FALSE, TRUE}, -#endif - {"named.exe", FileData::BinDir, FileData::Critical, FALSE, FALSE}, - {"nsupdate.exe", FileData::BinDir, FileData::Normal, FALSE, TRUE}, - {"BINDInstall.exe", FileData::BinDir, FileData::Normal, FALSE, TRUE}, - {"rndc.exe", FileData::BinDir, FileData::Normal, FALSE, FALSE}, - {"dig.exe", FileData::BinDir, FileData::Normal, FALSE, TRUE}, - {"host.exe", FileData::BinDir, FileData::Normal, FALSE, TRUE}, - {"mdig.exe", FileData::BinDir, FileData::Normal, FALSE, TRUE}, - {"nslookup.exe", FileData::BinDir, FileData::Normal, FALSE, TRUE}, - {"delv.exe", FileData::BinDir, FileData::Normal, FALSE, TRUE}, - {"arpaname.exe", FileData::BinDir, FileData::Normal, FALSE, TRUE}, - {"nsec3hash.exe", FileData::BinDir, FileData::Normal, FALSE, FALSE}, - {"rndc-confgen.exe", FileData::BinDir, FileData::Normal, FALSE, FALSE}, - {"ddns-confgen.exe", FileData::BinDir, FileData::Normal, FALSE, FALSE}, - {"tsig-keygen.exe", FileData::BinDir, FileData::Normal, FALSE, FALSE}, - {"dnssec-keygen.exe", FileData::BinDir, FileData::Normal, FALSE, FALSE}, - {"dnssec-signzone.exe", FileData::BinDir, FileData::Normal, FALSE, FALSE}, - {"dnssec-dsfromkey.exe", FileData::BinDir, FileData::Normal, FALSE, FALSE}, - {"dnssec-importkey.exe", FileData::BinDir, FileData::Normal, FALSE, FALSE}, - {"dnssec-keyfromlabel.exe", FileData::BinDir, FileData::Normal, FALSE, FALSE}, - {"dnssec-revoke.exe", FileData::BinDir, FileData::Normal, FALSE, FALSE}, - {"dnssec-settime.exe", FileData::BinDir, FileData::Normal, FALSE, FALSE}, - {"dnssec-verify.exe", FileData::BinDir, FileData::Normal, FALSE, FALSE}, - {"named-checkconf.exe", FileData::BinDir, FileData::Normal, FALSE, FALSE}, - {"named-checkzone.exe", FileData::BinDir, FileData::Normal, FALSE, FALSE}, - {"named-compilezone.exe", FileData::BinDir, FileData::Normal, FALSE, FALSE}, - {"named-journalprint.exe", FileData::BinDir, FileData::Normal, FALSE, FALSE}, - {"named-rrchecker.exe", FileData::BinDir, FileData::Normal, FALSE, FALSE}, -#ifdef USE_PKCS11 - {"pkcs11-destroy.exe", FileData::BinDir, FileData::Normal, FALSE, FALSE}, - {"pkcs11-keygen.exe", FileData::BinDir, FileData::Normal, FALSE, FALSE}, - {"pkcs11-list.exe", FileData::BinDir, FileData::Normal, FALSE, FALSE}, - {"pkcs11-tokens.exe", FileData::BinDir, FileData::Normal, FALSE, FALSE}, -#endif - {"readme1st.txt", FileData::BinDir, FileData::Trivial, FALSE, TRUE}, - {NULL, -1, -1} -}; - -#else - -typedef std::vector FileDatas; -FileDatas installFiles; -BOOL forwin64 = FALSE; -BOOL runvcredist = FALSE; - -#endif - -///////////////////////////////////////////////////////////////////////////// -// CBINDInstallDlg dialog - -CBINDInstallDlg::CBINDInstallDlg(CWnd* pParent /*=NULL*/) - : CDialog(CBINDInstallDlg::IDD, pParent) { - char winsys[MAX_PATH]; - - //{{AFX_DATA_INIT(CBINDInstallDlg) - /* cppcheck-suppress useInitializationList */ - m_targetDir = _T(""); - m_version = _T(""); - m_toolsOnly = FALSE; - m_autoStart = FALSE; - m_keepFiles = FALSE; - m_current = _T(""); - m_startOnInstall = FALSE; - m_accountName = _T(""); - m_accountPassword = _T(""); - //}}AFX_DATA_INIT - // Note that LoadIcon does not require a subsequent - // DestroyIcon in Win32 - m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); - - GetSystemDirectory(winsys, MAX_PATH); - m_winSysDir = winsys; - - m_defaultDir = "notyetknown"; - - m_installed = FALSE; - m_accountExists = FALSE; - m_accountUsed = FALSE; - m_serviceExists = TRUE; - GetCurrentServiceAccountName(); - m_currentAccount = m_accountName; - if (m_accountName == "") { - m_accountName = "named"; - } -} - -void CBINDInstallDlg::DoDataExchange(CDataExchange* pDX) { - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(CBINDInstallDlg) - DDX_Text(pDX, IDC_TARGETDIR, m_targetDir); - DDX_Text(pDX, IDC_VERSION, m_version); - DDX_Text(pDX, IDC_ACCOUNT_NAME, m_accountName); - DDX_Text(pDX, IDC_ACCOUNT_PASSWORD, m_accountPassword); - DDX_Text(pDX, IDC_ACCOUNT_PASSWORD_CONFIRM, m_accountPasswordConfirm); - DDX_Check(pDX, IDC_TOOLS_ONLY, m_toolsOnly); - DDX_Check(pDX, IDC_AUTO_START, m_autoStart); - DDX_Check(pDX, IDC_KEEP_FILES, m_keepFiles); - DDX_Text(pDX, IDC_CURRENT, m_current); - DDX_Check(pDX, IDC_START, m_startOnInstall); - //}}AFX_DATA_MAP -} - -BEGIN_MESSAGE_MAP(CBINDInstallDlg, CDialog) - //{{AFX_MSG_MAP(CBINDInstallDlg) - ON_WM_PAINT() - ON_WM_QUERYDRAGICON() - ON_BN_CLICKED(IDC_BROWSE, OnBrowse) - ON_BN_CLICKED(IDC_INSTALL, OnInstall) - ON_BN_CLICKED(IDC_EXIT, OnExit) - ON_BN_CLICKED(IDC_UNINSTALL, OnUninstall) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CBINDInstallDlg message handlers - -BOOL CBINDInstallDlg::OnInitDialog() { - CDialog::OnInitDialog(); - - // Set the icon for this dialog. The framework does this automatically - // when the application's main window is not a dialog - SetIcon(m_hIcon, TRUE); // Set big icon - SetIcon(m_hIcon, FALSE); // Set small icon - - char filename[MAX_PATH]; - char dirname[MAX_PATH]; - char *fptr = &filename[0]; - GetModuleFileName(NULL, filename, MAX_PATH); - char *dptr = strrchr(filename,'\\'); - size_t index = dptr - fptr; - strncpy(dirname, filename, index); - dirname[index] = '\0'; - CString Dirname(dirname); - m_currentDir = Dirname; - - ReadInstallFlags(); - char progfiles[MAX_PATH]; - int id_program_files; - if (forwin64) - id_program_files = CSIDL_PROGRAM_FILES; - else - id_program_files = CSIDL_PROGRAM_FILESX86; - SHGetFolderPath(NULL, CSIDL_FLAG_CREATE|id_program_files, - NULL, SHGFP_TYPE_CURRENT, progfiles); - - m_defaultDir = progfiles; - m_defaultDir += "\\ISC BIND 9"; - - CVersionInfo bindInst(filename); - if(bindInst.IsValid()) - m_version.Format(IDS_VERSION, bindInst.GetFileVersionString()); - else - m_version.LoadString(IDS_NO_VERSION); - - DWORD dwBufLen = MAX_PATH; - char buf[MAX_PATH]; - HKEY hKey; - - m_startOnInstall = CheckBINDService(); - - /* See if we are installed already */ - if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, BIND_SUBKEY, 0, KEY_READ, &hKey) - == ERROR_SUCCESS) { - m_installed = TRUE; - memset(buf, 0, MAX_PATH); - // Get the install directory - if (RegQueryValueEx(hKey, "InstallDir", NULL, NULL, (LPBYTE)buf, - &dwBufLen) == ERROR_SUCCESS) - if (strcmp(buf, "")) - m_defaultDir = buf; - - RegCloseKey(hKey); - } - m_targetDir = m_defaultDir; - - // Set checkbox defaults - m_autoStart = TRUE; - m_keepFiles = TRUE; - - UpdateData(FALSE); - - return (TRUE); /* return(TRUE) unless you set the focus to a control */ -} - -/* - * If you add a minimize button to your dialog, you will need the code below - * to draw the icon. For MFC applications using the document/view model, - * this is automatically done for you by the framework. - */ - -void CBINDInstallDlg::OnPaint() { - if (IsIconic()) { - CPaintDC dc(this); // device context for painting - - SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); - - // Center icon in client rectangle - int cxIcon = GetSystemMetrics(SM_CXICON); - int cyIcon = GetSystemMetrics(SM_CYICON); - CRect rect; - GetClientRect(&rect); - int x = (rect.Width() - cxIcon + 1) / 2; - int y = (rect.Height() - cyIcon + 1) / 2; - - // Draw the icon - dc.DrawIcon(x, y, m_hIcon); - } - else { - CDialog::OnPaint(); - } -} - -// The system calls this to obtain the cursor to display while the user drags -// the minimized window. -HCURSOR CBINDInstallDlg::OnQueryDragIcon() { - return((HCURSOR)m_hIcon); -} - -void CBINDInstallDlg::OnBrowse() { - - CDirBrowse browse; - - if (browse.DoModal() == IDOK) { - //m_targetDir = browse.m_selectedDir; - UpdateData(FALSE); - } -} - -/* - * User pressed the exit button - */ -void CBINDInstallDlg::OnExit() { - EndDialog(0); -} - -/* - * User pressed the uninstall button. Make it go. - */ -void CBINDInstallDlg::OnUninstall() { - UpdateData(); - - if (MsgBox(IDS_UNINSTALL, MB_YESNO) == IDYES) { - if (CheckBINDService()) - StopBINDService(); - - SC_HANDLE hSCManager = OpenSCManager(NULL, NULL, - SC_MANAGER_ALL_ACCESS); - if (!hSCManager) { - MsgBox(IDS_ERR_OPEN_SCM, GetErrMessage()); - return; - } - - SC_HANDLE hService = OpenService(hSCManager, BIND_SERVICE_NAME, - SERVICE_ALL_ACCESS); - if (!hService && GetLastError() != ERROR_SERVICE_DOES_NOT_EXIST){ - MsgBox(IDS_ERR_OPEN_SERVICE, GetErrMessage()); - return; - } - - SERVICE_STATUS ss; - QueryServiceStatus(hService, &ss); - if (ss.dwCurrentState == SERVICE_RUNNING) { - BOOL rc = ControlService(hService, - SERVICE_CONTROL_STOP, &ss); - if (rc == FALSE || ss.dwCurrentState != SERVICE_STOPPED) { - MsgBox(IDS_ERR_STOP_SERVICE, GetErrMessage()); - return; - } - - } - CloseServiceHandle(hService); - CloseServiceHandle(hSCManager); - - // Directories - m_etcDir = m_targetDir + "\\etc"; - m_binDir = m_targetDir + "\\bin"; - - UninstallTags(); - UnregisterMessages(TRUE); - UnregisterService(TRUE); - ReadInstallFileList(); - DeleteFiles(TRUE); - if (m_keepFiles == FALSE) - RemoveDirs(TRUE); - else - GetDlgItem(IDC_CREATE_DIR)->SetWindowText("Not Removed"); - - - // Delete registry keys for named - RegDeleteKey(HKEY_LOCAL_MACHINE, BIND_SESSION_SUBKEY); - RegDeleteKey(HKEY_LOCAL_MACHINE, BIND_SUBKEY); - RegDeleteKey(HKEY_LOCAL_MACHINE, BIND_UNINSTALL_SUBKEY); - - ProgramGroup(FALSE); - - SetCurrent(IDS_UNINSTALL_DONE); - MsgBox(IDS_UNINSTALL_DONE); - } -} - -/* - * User pressed the install button. Make it go. - */ -void CBINDInstallDlg::OnInstall() { - BOOL success = FALSE; - int oldlen; - int n; - - if (CheckBINDService()) - StopBINDService(); - - InstallTags(); - - UpdateData(); - - if (!m_toolsOnly && m_accountName != LOCAL_SERVICE) { - /* - * Check that the Passwords entered match. - */ - if (m_accountPassword != m_accountPasswordConfirm) { - MsgBox(IDS_ERR_PASSWORD); - return; - } - - /* - * Check that there is not leading / trailing whitespace. - * This is for compatibility with the standard password dialog. - * Passwords really should be treated as opaque blobs. - */ - oldlen = m_accountPassword.GetLength(); - m_accountPassword.TrimLeft(); - m_accountPassword.TrimRight(); - if (m_accountPassword.GetLength() != oldlen) { - MsgBox(IDS_ERR_WHITESPACE); - return; - } - - /* - * Check the entered account name. - */ - if (ValidateServiceAccount() == FALSE) - return; - - /* - * For Registration we need to know if account was changed. - */ - if (m_accountName != m_currentAccount) - m_accountUsed = FALSE; - - if (m_accountUsed == FALSE && m_serviceExists == FALSE) - { - /* - * Check that the Password is not null. - */ - if (m_accountPassword.GetLength() == 0) { - MsgBox(IDS_ERR_NULLPASSWORD); - return; - } - } - } else if (m_accountName == LOCAL_SERVICE) { - /* The LocalService always exists. */ - m_accountExists = TRUE; - if (m_accountName != m_currentAccount) - m_accountUsed = FALSE; - } - - /* Directories */ - m_etcDir = m_targetDir + "\\etc"; - m_binDir = m_targetDir + "\\bin"; - - if (m_defaultDir != m_targetDir) { - if (GetFileAttributes(m_targetDir) != 0xFFFFFFFF) - { - int install = MsgBox(IDS_DIREXIST, - MB_YESNO | MB_ICONQUESTION, m_targetDir); - if (install == IDNO) - return; - } - else { - int createDir = MsgBox(IDS_CREATEDIR, - MB_YESNO | MB_ICONQUESTION, m_targetDir); - if (createDir == IDNO) - return; - } - } - - if (!m_toolsOnly) { - if (m_accountExists == FALSE) { - success = CreateServiceAccount(m_accountName.GetBuffer(30), - m_accountPassword.GetBuffer(30)); - if (success == FALSE) { - MsgBox(IDS_CREATEACCOUNT_FAILED); - return; - } - m_accountExists = TRUE; - } - } - - ProgramGroup(FALSE); - - /* - * Install Visual Studio libraries. As per: - * http://blogs.msdn.com/astebner/archive/2006/08/23/715755.aspx - * - * Vcredist_x86.exe /q:a /c:"msiexec /i vcredist.msi /qn /l*v %temp%\vcredist_x86.log" - */ - /*system(".\\Vcredist_x86.exe /q:a /c:\"msiexec /i vcredist.msi /qn /l*v %temp%\vcredist_x86.log\"");*/ - - /* - * Enclose full path to Vcredist_x86.exe in quotes as - * m_currentDir may contain spaces. - */ - if (runvcredist) { - char Vcredist_x86[MAX_PATH]; - if (forwin64) - n = snprintf(Vcredist_x86, sizeof(Vcredist_x86), - "\"%s\\Vcredist_x64.exe\"", - (LPCTSTR) m_currentDir); - else - n = snprintf(Vcredist_x86, sizeof(Vcredist_x86), - "\"%s\\Vcredist_x86.exe\"", - (LPCTSTR) m_currentDir); - if (n >= 0 && (size_t)n < sizeof(Vcredist_x86)) - system(Vcredist_x86); - } - try { - CreateDirs(); - ReadInstallFileList(); - CopyFiles(); - if (!m_toolsOnly) - RegisterService(); - RegisterMessages(); - - HKEY hKey; - - /* Create a new key for named */ - SetCurrent(IDS_CREATE_KEY); - if (RegCreateKey(HKEY_LOCAL_MACHINE, BIND_SUBKEY, - &hKey) == ERROR_SUCCESS) { - // Get the install directory - RegSetValueEx(hKey, "InstallDir", 0, REG_SZ, - (LPBYTE)(LPCTSTR)m_targetDir, - m_targetDir.GetLength()); - RegCloseKey(hKey); - } - - - SetCurrent(IDS_ADD_REMOVE); - if (RegCreateKey(HKEY_LOCAL_MACHINE, BIND_UNINSTALL_SUBKEY, - &hKey) == ERROR_SUCCESS) { - CString buf(BIND_DISPLAY_NAME); - - RegSetValueEx(hKey, "DisplayName", 0, REG_SZ, - (LPBYTE)(LPCTSTR)buf, buf.GetLength()); - - buf.Format("%s\\BINDInstall.exe", m_binDir); - - CStringA installLocA(buf); - const char *str = (const char *) installLocA; - char pathBuffer[2 * MAX_PATH]; - strncpy(pathBuffer, str, sizeof(pathBuffer) - 1); - pathBuffer[sizeof(pathBuffer) - 1] = 0; - PathQuoteSpaces(pathBuffer); - - RegSetValueEx(hKey, "UninstallString", 0, REG_SZ, - (LPBYTE)(LPCTSTR)pathBuffer, strlen(pathBuffer)); - RegCloseKey(hKey); - } - - ProgramGroup(FALSE); - - if (m_startOnInstall) - StartBINDService(); - } - catch(Exception e) { - MessageBox(e.resString); - SetCurrent(IDS_CLEANUP); - FailedInstall(); - MsgBox(IDS_FAIL); - return; - } - catch(DWORD dw) { - CString msg; - msg.Format("A fatal error occurred\n(%s)", GetErrMessage(dw)); - MessageBox(msg); - SetCurrent(IDS_CLEANUP); - FailedInstall(); - MsgBox(IDS_FAIL); - return; - } - - SetCurrent(IDS_INSTALL_DONE); - MsgBox(IDS_SUCCESS); -} - -/* - * Methods to do the work - */ -void CBINDInstallDlg::CreateDirs() { - /* s'OK if the directories already exist */ - SetCurrent(IDS_CREATE_DIR, m_targetDir); - if (!CreateDirectory(m_targetDir, NULL) && GetLastError() != ERROR_ALREADY_EXISTS) - throw(Exception(IDS_ERR_CREATE_DIR, m_targetDir, GetErrMessage())); - - SetCurrent(IDS_CREATE_DIR, m_etcDir); - if (!CreateDirectory(m_etcDir, NULL) && GetLastError() != ERROR_ALREADY_EXISTS) - throw(Exception(IDS_ERR_CREATE_DIR, m_etcDir, GetErrMessage())); - - SetCurrent(IDS_CREATE_DIR, m_binDir); - if (!CreateDirectory(m_binDir, NULL) && GetLastError() != ERROR_ALREADY_EXISTS) - throw(Exception(IDS_ERR_CREATE_DIR, m_binDir, GetErrMessage())); - - SetItemStatus(IDC_CREATE_DIR); -} - -void CBINDInstallDlg::RemoveDirs(BOOL uninstall) { - if (!m_keepFiles) { - SetCurrent(IDS_REMOVE_DIR, m_binDir); - // Check for existence then remove if present - if (GetFileAttributes(m_binDir) != 0xFFFFFFFF) - RemoveDirectory(m_binDir); - - SetCurrent(IDS_REMOVE_DIR, m_etcDir); - if (GetFileAttributes(m_etcDir) != 0xFFFFFFFF) - RemoveDirectory(m_etcDir); - - SetCurrent(IDS_REMOVE_DIR, m_targetDir); - if (GetFileAttributes(m_targetDir) != 0xFFFFFFFF) - RemoveDirectory(m_targetDir); - } - - if (uninstall) - SetItemStatus(IDC_CREATE_DIR, TRUE); -} - -// InstallFlags: runvcredist and forwin64 options -void CBINDInstallDlg::ReadInstallFlags() { - std::ifstream ff(m_currentDir + "\\InstallFlags"); - if (!ff) { - throw(Exception(IDS_FILE_BAD, "InstallFlags", "can't open")); - } - while (!ff.eof()) { - std::string line; - getline(ff, line); - if (line.compare("runvcredist") == 0) - runvcredist = TRUE; - else if (line.compare("forwin64") == 0) - forwin64 = TRUE; - } -} - -// InstallFiles: {filename-divt}* -// destination: TBEW -// importance: TNC -// checkVer and withTools: TF (boolean) -void CBINDInstallDlg::ReadInstallFileList() { - std::ifstream fl(m_currentDir + "\\InstallFiles"); - if (!fl) { - throw(Exception(IDS_FILE_BAD, "InstallFiles", "can't open")); - } - while (!fl.eof()) { - std::string line; - getline(fl, line); - if (line.empty()) - continue; - if (line[0] == '#') - continue; - // zip -l adds spurious \r: remove trailing space chars - size_t finish = line.find_last_not_of(" \t\r\n\t\v"); - if ((finish != std::string::npos) && - (finish + 1 != line.size())) { - line.erase(finish + 1); - } - size_t flags = line.find_last_of('-'); - if ((flags == std::string::npos) || - (flags + 5 != line.size())) - goto bad; - std::string file = line.substr(0, flags); - if (file.empty() || (file.size() > 127)) - goto bad; - FileData entry; - memmove(entry.filename, file.c_str(), file.size() + 1); - switch (line[flags + 1]) { - case 'T': - entry.destination = FileData::TargetDir; - break; - case 'B': - entry.destination = FileData::BinDir; - break; - case 'E': - entry.destination = FileData::EtcDir; - break; - case 'W': - entry.destination = FileData::WinSystem; - break; - default: - goto bad; - } - switch (line[flags + 2]) { - case 'T': - entry.importance = FileData::Trivial; - break; - case 'N': - entry.importance = FileData::Normal; - break; - case 'C': - entry.importance = FileData::Critical; - break; - default: - goto bad; - } - switch (line[flags + 3]) { - case 'T': - entry.checkVer = TRUE; - break; - case 'F': - entry.checkVer = FALSE; - break; - default: - goto bad; - } - switch (line[flags + 4]) { - case 'T': - entry.withTools = TRUE; - break; - case 'F': - entry.withTools = FALSE; - break; - default: - goto bad; - } - installFiles.push_back(entry); - } - return; - -bad: - throw(Exception(IDS_FILE_BAD, "InstallFiles", "syntax error")); -} - -void CBINDInstallDlg::CopyFiles() { - CString destFile; - - for (FileDatas::iterator fd = installFiles.begin(); - fd != installFiles.end(); ++fd) { - if (m_toolsOnly && !fd->withTools) - continue; - SetCurrent(IDS_COPY_FILE, fd->filename); - - destFile = DestDir(fd->destination) + "\\" + fd->filename; - CString filespec = m_currentDir + "\\" + fd->filename; - CVersionInfo bindFile(destFile); - - CVersionInfo origFile(filespec); - if (!origFile.IsValid() && fd->checkVer) { - if (MsgBox(IDS_FILE_BAD, MB_YESNO, - fd->filename) == IDNO) - throw(Exception(IDS_ERR_COPY_FILE, - fd->filename, - GetErrMessage())); - } - - try { -/* - * Ignore Version checking. We need to make sure that all files get - * copied regardless of whether or not they are earlier or later - * versions since we cannot guarantee that we have either backward or - * forward compatibility between versions. - */ - bindFile.CopyFileNoVersion(origFile); - } - catch(...) { - if (fd->importance != FileData::Trivial) { - if (fd->importance == FileData::Critical || - MsgBox(IDS_ERR_NONCRIT_FILE, MB_YESNO, - fd->filename, - GetErrMessage()) == IDNO) - { - SetItemStatus(IDC_COPY_FILE, FALSE); - throw(Exception(IDS_ERR_COPY_FILE, - fd->filename, - GetErrMessage())); - } - } - } - } - - SetItemStatus(IDC_COPY_FILE); -} - -void CBINDInstallDlg::DeleteFiles(BOOL uninstall) { - CString destFile; - - for (FileDatas::iterator fd = installFiles.begin(); - fd != installFiles.end(); ++fd) { - if (fd->checkVer) - continue; - - destFile = DestDir(fd->destination) + "\\" + fd->filename; - - if (uninstall) - SetCurrent(IDS_DELETE_FILE, fd->filename); - - DeleteFile(destFile); - } - - if (!m_keepFiles) { - WIN32_FIND_DATA findData; - CString file = m_etcDir + "\\*.*"; - BOOL rc; - HANDLE hFile; - - hFile = FindFirstFile(file, &findData); - rc = hFile != INVALID_HANDLE_VALUE; - - while (rc == TRUE) { - if (strcmp(findData.cFileName, ".") && - strcmp(findData.cFileName, "..")) { - file = m_etcDir + "\\" + findData.cFileName; - SetCurrent(IDS_DELETE_FILE, file); - DeleteFile(file); - } - rc = FindNextFile(hFile, &findData); - } - FindClose(hFile); - } - - if (uninstall) - SetItemStatus(IDC_COPY_FILE, TRUE); -} - -/* - * Get the service account name out of the registry, if any - */ -void -CBINDInstallDlg::GetCurrentServiceAccountName() { - HKEY hKey; - BOOL keyFound = FALSE; - char accountName[MAX_PATH]; - DWORD nameLen = MAX_PATH; - CString Tmp; - m_accountUsed = FALSE; - - memset(accountName, 0, nameLen); - if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, BIND_SERVICE_SUBKEY, 0, KEY_READ, - &hKey) == ERROR_SUCCESS) { - keyFound = TRUE; - } - else { - m_serviceExists = FALSE; - } - - if (keyFound == TRUE) { - /* Get the named service account, if one was specified */ - if (RegQueryValueEx(hKey, "ObjectName", NULL, NULL, - (LPBYTE)accountName, &nameLen) != ERROR_SUCCESS) - keyFound = FALSE; - } - - RegCloseKey(hKey); - if (keyFound == FALSE) - m_accountName = ""; - else if (!strcmp(accountName, LOCAL_SERVICE)) { - m_accountName = LOCAL_SERVICE; - m_accountUsed = TRUE; - } else { - /* - * LocalSystem is not a regular account and is equivalent - * to no account but with lots of privileges - */ - Tmp = accountName; - if (Tmp == ".\\LocalSystem") - m_accountName = ""; - /* Found account strip any ".\" from it */ - if (Tmp.Left(2) == ".\\") { - m_accountName = Tmp.Mid(2); - m_accountUsed = TRUE; - } - } -} - -BOOL -CBINDInstallDlg::ValidateServiceAccount() { - wchar_t *PrivList[MAX_PRIVS]; - unsigned int PrivCount = 0; - char *Groups[MAX_GROUPS]; - unsigned int totalGroups = 0; - int status; - char *name; - - name = m_accountName.GetBuffer(30); - - status = GetAccountPrivileges(name, PrivList, &PrivCount, - Groups, &totalGroups, MAX_GROUPS); - if (status == RTN_NOACCOUNT) { - m_accountExists = FALSE; - /* We need to do this in case an account was previously used */ - m_accountUsed = FALSE; - return (TRUE); - } - if (status != RTN_OK) { - MsgBox(IDS_ERR_BADACCOUNT); - return (FALSE); - } - - m_accountExists = TRUE; - if (PrivCount > 1) { - if (MsgBox(IDS_ERR_TOOPRIVED, MB_YESNO) == IDYES) - return (FALSE); - else - return (TRUE); - } - - /* See if we have the correct privilege */ - if (wcscmp(PrivList[0], SE_SERVICE_LOGON_PRIV) != 0) { - MsgBox(IDS_ERR_WRONGPRIV, PrivList[0]); - return (FALSE); - } - return (TRUE); -} - -void -CBINDInstallDlg::RegisterService() { - SC_HANDLE hSCManager; - SC_HANDLE hService; - CString StartName; - - if (m_accountName == LOCAL_SERVICE) - StartName = LOCAL_SERVICE; - else - StartName = ".\\" + m_accountName; - /* - * We need to change the service rather than create it - * if the service already exists. Do nothing if we are already - * using that account - */ - if (m_serviceExists == TRUE) { - if (m_accountUsed == FALSE) { - UpdateService(StartName); - SetItemStatus(IDC_REG_SERVICE); - return; - } else { - SetItemStatus(IDC_REG_SERVICE); - return; - } - } - - SetCurrent(IDS_OPEN_SCM); - hSCManager= OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS); - if (!hSCManager) - throw(Exception(IDS_ERR_OPEN_SCM, GetErrMessage())); - - DWORD dwStart = SERVICE_DEMAND_START; - if (m_autoStart) - dwStart = SERVICE_AUTO_START; - - DWORD dwServiceType = SERVICE_WIN32_OWN_PROCESS; - - CString namedLoc; - namedLoc.Format("%s\\bin\\named.exe", m_targetDir); - - CStringA namedLocA(namedLoc); - const char *str = (const char *) namedLocA; - char pathBuffer[2 * MAX_PATH]; - strncpy(pathBuffer, str, sizeof(pathBuffer) - 1); - pathBuffer[sizeof(pathBuffer) - 1] = 0; - PathQuoteSpaces(pathBuffer); - - SetCurrent(IDS_CREATE_SERVICE); - hService = CreateService(hSCManager, BIND_SERVICE_NAME, - BIND_DISPLAY_NAME, SERVICE_ALL_ACCESS, dwServiceType, dwStart, - SERVICE_ERROR_NORMAL, pathBuffer, NULL, NULL, NULL, StartName, - m_accountPassword); - - if (!hService && GetLastError() != ERROR_SERVICE_EXISTS) - throw(Exception(IDS_ERR_CREATE_SERVICE, GetErrMessage())); - - if (hService) - CloseServiceHandle(hService); - - if (hSCManager) - CloseServiceHandle(hSCManager); - - SetItemStatus(IDC_REG_SERVICE); -} - -void -CBINDInstallDlg::UpdateService(CString StartName) { - SC_HANDLE hSCManager; - SC_HANDLE hService; - - if(m_toolsOnly) - return; - - SetCurrent(IDS_OPEN_SCM); - hSCManager= OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS); - if (!hSCManager) { - MsgBox(IDS_ERR_OPEN_SCM, GetErrMessage()); - return; - } - - DWORD dwStart = SERVICE_DEMAND_START; - if (m_autoStart) - dwStart = SERVICE_AUTO_START; - - DWORD dwServiceType = SERVICE_WIN32_OWN_PROCESS; - - CString namedLoc; - namedLoc.Format("%s\\bin\\named.exe", m_targetDir); - - CStringA namedLocA(namedLoc); - const char *str = (const char *) namedLocA; - char pathBuffer[2 * MAX_PATH]; - strncpy(pathBuffer, str, sizeof(pathBuffer) - 1); - pathBuffer[sizeof(pathBuffer) - 1] = 0; - PathQuoteSpaces(pathBuffer); - - SetCurrent(IDS_OPEN_SERVICE); - hService = OpenService(hSCManager, BIND_SERVICE_NAME, - SERVICE_CHANGE_CONFIG); - if (!hService) - { - MsgBox(IDS_ERR_OPEN_SERVICE, GetErrMessage()); - if (hSCManager) - CloseServiceHandle(hSCManager); - return; - } else { - if (ChangeServiceConfig(hService, dwServiceType, dwStart, - SERVICE_ERROR_NORMAL, pathBuffer, NULL, NULL, NULL, - StartName, m_accountPassword, BIND_DISPLAY_NAME) - != TRUE) { - MsgBox(IDS_ERR_UPDATE_SERVICE, GetErrMessage()); - } - } - - if (hService) - CloseServiceHandle(hService); - - if (hSCManager) - CloseServiceHandle(hSCManager); - - SetItemStatus(IDC_REG_SERVICE); -} - -void CBINDInstallDlg::UnregisterService(BOOL uninstall) { - BOOL rc = FALSE; - SC_HANDLE hSCManager; - SC_HANDLE hService; - - while(1) { - SetCurrent(IDS_OPEN_SCM); - hSCManager= OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS); - if (!hSCManager && uninstall == TRUE) { - MsgBox(IDS_ERR_OPEN_SCM, GetErrMessage()); - break; - } - - SetCurrent(IDS_OPEN_SERVICE); - hService = OpenService(hSCManager, BIND_SERVICE_NAME, - STANDARD_RIGHTS_REQUIRED); - if (!hService && uninstall == TRUE) - { - if (GetLastError() != ERROR_SERVICE_DOES_NOT_EXIST) { - MsgBox(IDS_ERR_OPEN_SERVICE, GetErrMessage()); - break; - } - } - else { - SetCurrent(IDS_REMOVE_SERVICE); - if (!DeleteService(hService) && uninstall == TRUE) { - DWORD err = GetLastError(); - if (err != ERROR_SERVICE_MARKED_FOR_DELETE && - err != ERROR_SERVICE_DOES_NOT_EXIST) { - MsgBox(IDS_ERR_REMOVE_SERVICE, - GetErrMessage()); - break; - } - } - } - - rc = TRUE; - break; - } - - if (hService) - CloseServiceHandle(hService); - - if (hSCManager) - CloseServiceHandle(hSCManager); - - if (uninstall) - SetItemStatus(IDC_REG_SERVICE, rc); -} - -void CBINDInstallDlg::RegisterMessages() { - HKEY hKey; - DWORD dwData; - char pszMsgDLL[MAX_PATH]; - int n; - - n = snprintf(pszMsgDLL, sizeof(pszMsgDLL), "%s\\%s", - (LPCTSTR)m_binDir, "bindevt.dll"); - if (n < 0 || (size_t)n >= sizeof(pszMsgDLL)) - throw(Exception(IDS_ERR_CREATE_KEY, - "\\bindevt.dll too long")); - - SetCurrent(IDS_REGISTER_MESSAGES); - /* Create a new key for named */ - if (RegCreateKey(HKEY_LOCAL_MACHINE, BIND_MESSAGE_SUBKEY, &hKey) - != ERROR_SUCCESS) - throw(Exception(IDS_ERR_CREATE_KEY, GetErrMessage())); - - /* Add the Event-ID message-file name to the subkey. */ - if (RegSetValueEx(hKey, "EventMessageFile", 0, REG_EXPAND_SZ, - (LPBYTE)pszMsgDLL, (DWORD)(strlen(pszMsgDLL) + 1)) != ERROR_SUCCESS) - throw(Exception(IDS_ERR_SET_VALUE, GetErrMessage())); - - /* Set the supported types flags and addit to the subkey. */ - dwData = EVENTLOG_ERROR_TYPE | EVENTLOG_WARNING_TYPE | EVENTLOG_INFORMATION_TYPE; - if (RegSetValueEx(hKey, "TypesSupported", 0, REG_DWORD, - (LPBYTE)&dwData, sizeof(DWORD)) != ERROR_SUCCESS) - throw(Exception(IDS_ERR_SET_VALUE, GetErrMessage())); - - RegCloseKey(hKey); - - SetItemStatus(IDC_REG_MESSAGE); -} - -void CBINDInstallDlg::UnregisterMessages(BOOL uninstall) { - BOOL rc = FALSE; - HKEY hKey = NULL; - - while(1) { - SetCurrent(IDS_UNREGISTER_MESSAGES); - /* Open key for Application Event Log */ - if (RegOpenKey(HKEY_LOCAL_MACHINE, EVENTLOG_APP_SUBKEY, &hKey) - != ERROR_SUCCESS) - break; - - /* Remove named from the list of messages sources */ - if (RegDeleteKey(hKey, BIND_MESSAGE_NAME) != ERROR_SUCCESS) - break; - - rc = TRUE; - break; - } - - if (hKey) - RegCloseKey(hKey); - - if (uninstall) - SetItemStatus(IDC_REG_MESSAGE, rc); -} - -/* - * Install failed - clean up quietly - */ -void CBINDInstallDlg::FailedInstall() { - UnregisterMessages(FALSE); - UnregisterService(FALSE); - DeleteFiles(FALSE); - RemoveDirs(FALSE); -} - -/* - * Set the checklist tags for install - */ -void CBINDInstallDlg::InstallTags() { - CString tag; - - tag.LoadString(IDS_INSTALL_FILE); - GetDlgItem(IDC_COPY_TAG)->SetWindowText(tag); - GetDlgItem(IDC_COPY_FILE)->SetWindowText(""); - - tag.LoadString(IDS_INSTALL_DIR); - GetDlgItem(IDC_DIR_TAG)->SetWindowText(tag); - GetDlgItem(IDC_CREATE_DIR)->SetWindowText(""); - GetDlgItem(IDC_REG_SERVICE)->SetWindowText(""); - - tag.LoadString(IDS_INSTALL_SERVICE); - GetDlgItem(IDC_SERVICE_TAG)->SetWindowText(tag); - - tag.LoadString(IDS_INSTALL_MESSAGE); - GetDlgItem(IDC_MESSAGE_TAG)->SetWindowText(tag); - GetDlgItem(IDC_REG_MESSAGE)->SetWindowText(""); -} - -/* - * Set the checklist tags for uninstall - */ -void CBINDInstallDlg::UninstallTags() { - CString tag; - - tag.LoadString(IDS_UNINSTALL_FILES); - GetDlgItem(IDC_COPY_TAG)->SetWindowText(tag); - GetDlgItem(IDC_COPY_FILE)->SetWindowText(""); - - tag.LoadString(IDS_UNINSTALL_DIR); - GetDlgItem(IDC_DIR_TAG)->SetWindowText(tag); - GetDlgItem(IDC_CREATE_DIR)->SetWindowText(""); - - tag.LoadString(IDS_UNINSTALL_SERVICE); - GetDlgItem(IDC_SERVICE_TAG)->SetWindowText(tag); - GetDlgItem(IDC_REG_SERVICE)->SetWindowText(""); - - tag.LoadString(IDS_UNINSTALL_MESSAGE); - GetDlgItem(IDC_MESSAGE_TAG)->SetWindowText(tag); - GetDlgItem(IDC_REG_MESSAGE)->SetWindowText(""); -} - -void CBINDInstallDlg::SetItemStatus(UINT nID, BOOL bSuccess) { - GetDlgItem(nID)->SetWindowText(bSuccess == TRUE ? "Done" : "Failed"); -} - - -/* - * Set the text in the current operation field - use a string table string - */ -void CBINDInstallDlg::SetCurrent(int id, ...) { - CString format; - va_list va; - char buf[128]; - - format.LoadString(id); - memset(buf, 0, 128); - - va_start(va, id); - (void)vsnprintf(buf, sizeof(buf), format, va); - buf[sizeof(buf) - 1] = 0; - va_end(va); - - m_current.Format("%s", buf); - UpdateData(FALSE); -} - -/* - * Stop the BIND service - */ -void CBINDInstallDlg::StopBINDService() { - SERVICE_STATUS svcStatus; - - SetCurrent(IDS_STOP_SERVICE); - - SC_HANDLE hSCManager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS); - if (!hSCManager) { - MsgBox(IDS_ERR_OPEN_SCM, GetErrMessage()); - } - - SC_HANDLE hBINDSvc = OpenService(hSCManager, BIND_SERVICE_NAME, - SERVICE_ALL_ACCESS); - if (!hBINDSvc) { - MsgBox(IDS_ERR_OPEN_SERVICE, GetErrMessage()); - } - - BOOL rc = ControlService(hBINDSvc, SERVICE_CONTROL_STOP, &svcStatus); - if (!rc) { - MsgBox(IDS_ERR_STOP_SERVICE, GetErrMessage()); - } -} - -/* - * Start the BIND service - */ -void CBINDInstallDlg::StartBINDService() { - SetCurrent(IDS_START_SERVICE); - - SC_HANDLE hSCManager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS); - if (!hSCManager) { - MsgBox(IDS_ERR_OPEN_SCM, GetErrMessage()); - } - - SC_HANDLE hBINDSvc = OpenService(hSCManager, BIND_SERVICE_NAME, - SERVICE_ALL_ACCESS); - if (!hBINDSvc) { - MsgBox(IDS_ERR_OPEN_SERVICE, GetErrMessage()); - } - BOOL rc = StartService(hBINDSvc, 0, NULL); - if (!rc) { - MsgBox(IDS_ERR_START_SERVICE, GetErrMessage()); - } -} - -/* - * Check to see if the BIND service is running or not - */ -BOOL -CBINDInstallDlg::CheckBINDService() { - SERVICE_STATUS svcStatus; - - SC_HANDLE hSCManager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS); - if (hSCManager) { - SC_HANDLE hBINDSvc = OpenService(hSCManager, BIND_SERVICE_NAME, - SERVICE_ALL_ACCESS); - if (hBINDSvc) { - BOOL rc = ControlService(hBINDSvc, - SERVICE_CONTROL_INTERROGATE, - &svcStatus); - if (!rc) { - /* cppcheck-suppress unreadVariable */ - DWORD err = GetLastError(); - } - - return (rc && - svcStatus.dwCurrentState == SERVICE_RUNNING); - } - } - return (FALSE); -} - -/* - * Display message boxes with variable args, using string table strings - * for the format specifiers - */ -int CBINDInstallDlg::MsgBox(int id, ...) { - CString format; - va_list va; - char buf[BUFSIZ]; - - format.LoadString(id); - memset(buf, 0, BUFSIZ); - - va_start(va, id); - (void)vsnprintf(buf, sizeof(buf), format, va); - buf[sizeof(buf) - 1] = 0; - va_end(va); - - return (MessageBox(buf)); -} - -int CBINDInstallDlg::MsgBox(int id, UINT type, ...) { - CString format; - va_list va; - char buf[BUFSIZ]; - - format.LoadString(id); - memset(buf, 0, BUFSIZ); - - va_start(va, type); - (void)vsnprintf(buf, sizeof(buf), format, va); - buf[sizeof(buf) - 1] = 0; - va_end(va); - - return(MessageBox(buf, NULL, type)); -} - -/* - * Call GetLastError(), retrieve the message associated with the error - */ -CString CBINDInstallDlg::GetErrMessage(DWORD err) { - LPVOID msgBuf; - static char buf[BUFSIZ]; - - DWORD len = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, err == -1 ? GetLastError() : err, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &msgBuf, 0, NULL ); - - - strcpy(buf, (LPTSTR)msgBuf); - LocalFree(msgBuf); - /* Strip off the period and the \n */ - buf[len - 3] = 0; - return(buf); -} - -void CBINDInstallDlg::ProgramGroupCreate(TCHAR *commonPath) { - HRESULT hres; - IShellLink *psl = NULL; - ITEMIDLIST *itemList = NULL; - TCHAR fileloc[MAX_PATH]; - TCHAR linkpath[MAX_PATH]; - TCHAR path[MAX_PATH]; - int n; - - n = snprintf(path, sizeof(path), "%s\\ISC", commonPath); - if (n < 0 || (size_t)n >= sizeof(path)) - return; - CreateDirectory(path, NULL); - - n = snprintf(path, sizeof(path), "%s\\ISC\\BIND", commonPath); - if (n < 0 || (size_t)n >= sizeof(path)) - return; - CreateDirectory(path, NULL); - - hres = CoInitialize(NULL); - if (!SUCCEEDED(hres)) - return; - - // Get a pointer to the IShellLink interface. - hres = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, - IID_IShellLink, (LPVOID *)&psl); - if (!SUCCEEDED(hres)) { - goto cleanup; - } - - IPersistFile* ppf; - n = snprintf(linkpath, sizeof(linkpath), "%s\\BINDCtrl.lnk", path); - if (n < 0 || (size_t)n >= sizeof(path)) { - goto cleanup; - } - - n = snprintf(fileloc, sizeof(fileloc), "%s\\BINDCtrl.exe", - (LPCTSTR) m_binDir); - if (n < 0 || (size_t)n >= sizeof(path)) { - goto cleanup; - } - - psl->SetPath(fileloc); - psl->SetDescription("BIND Control Panel"); - - hres = psl->QueryInterface(IID_IPersistFile, (void **)&ppf); - if (SUCCEEDED(hres)) { - WCHAR wsz[MAX_PATH]; - - MultiByteToWideChar(CP_ACP, 0, linkpath, -1, wsz, MAX_PATH); - hres = ppf->Save(wsz, TRUE); - ppf->Release(); - } - - if (GetFileAttributes("readme.txt") == -1) { - goto cleanup; - } - - n = snprintf(fileloc, sizeof(fileloc), "%s\\Readme.txt", - (LPCTSTR) m_targetDir); - if (n < 0 || (size_t)n >= sizeof(fileloc)) { - goto cleanup; - } - - n = snprintf(linkpath, sizeof(linkpath), "%s\\Readme.lnk", path); - if (n < 0 || (size_t)n >= sizeof(linkpath)) { - goto cleanup; - } - - psl->SetPath(fileloc); - psl->SetDescription("BIND Readme"); - - hres = psl->QueryInterface(IID_IPersistFile, (void **)&ppf); - if (SUCCEEDED(hres)) { - WCHAR wsz[MAX_PATH]; - - MultiByteToWideChar(CP_ACP, 0, linkpath, -1, wsz, MAX_PATH); - hres = ppf->Save(wsz, TRUE); - ppf->Release(); - } - - cleanup: - if (psl) - psl->Release(); - CoUninitialize(); -} - -void CBINDInstallDlg::ProgramGroupRemove(TCHAR *commonPath) { - HANDLE hFind; - TCHAR filename[MAX_PATH]; - TCHAR path[MAX_PATH]; - WIN32_FIND_DATA fd; - int n; - - n = snprintf(path, sizeof(path), "%s\\ISC\\BIND", commonPath); - if (n < 0 || (size_t)n >= sizeof(path)) - goto remove_isc; - - n = snprintf(filename, sizeof(filename), "%s\\*.*", path); - if (n < 0 || (size_t)n >= sizeof(path)) - goto remove_isc_bind; - - hFind = FindFirstFile(filename, &fd); - if (hFind != INVALID_HANDLE_VALUE) { - do { - if (strcmp(fd.cFileName, ".") == 0 || - strcmp(fd.cFileName, "..") == 0) - continue; - n = snprintf(filename, sizeof(filename), "%s\\%s", - path, fd.cFileName); - if (n >= 0 && (size_t)n < sizeof(filename)) { - DeleteFile(filename); - } - } while (FindNextFile(hFind, &fd)); - FindClose(hFind); - } - - remove_isc_bind: - RemoveDirectory(path); - - remove_isc: - n = snprintf(path, sizeof(path), "%s\\ISC", commonPath); - if (n >= 0 && (size_t)n < sizeof(path)) - RemoveDirectory(path); -} - -void CBINDInstallDlg::ProgramGroup(BOOL create) { - HRESULT hr; - ITEMIDLIST *itemList = NULL; - LPMALLOC pMalloc = NULL; - TCHAR commonPath[MAX_PATH]; - - hr = SHGetMalloc(&pMalloc); - if (hr != NOERROR) { - MessageBox("Could not get a handle to Shell memory object"); - return; - } - - hr = SHGetSpecialFolderLocation(m_hWnd, CSIDL_COMMON_PROGRAMS, - &itemList); - if (hr != NOERROR) { - MessageBox("Could not get a handle to the Common Programs " - "folder"); - if (itemList) { - pMalloc->Free(itemList); - } - return; - } - - if (SHGetPathFromIDList(itemList, commonPath)) { - if (create) { - ProgramGroupCreate(commonPath); - } else { - ProgramGroupRemove(commonPath); - } - } else { - MessageBox("SHGetPathFromIDList failed"); - } - pMalloc->Free(itemList); -} - -CString CBINDInstallDlg::DestDir(int destination) { - switch(destination) { - case FileData::TargetDir: - return m_targetDir; - case FileData::BinDir: - return m_binDir; - case FileData::EtcDir: - return m_etcDir; - case FileData::WinSystem: - return m_winSysDir; - } - return(""); -} diff --git a/bin/win32/BINDInstall/BINDInstallDlg.h b/bin/win32/BINDInstall/BINDInstallDlg.h deleted file mode 100644 index 2f58eba4a4..0000000000 --- a/bin/win32/BINDInstall/BINDInstallDlg.h +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Portions Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/* - * Copyright (c) 1999-2000 by Nortel Networks Corporation - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND NORTEL NETWORKS DISCLAIMS - * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NORTEL NETWORKS - * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ - -#ifndef BINDINSTALLDLG_H -#define BINDINSTALLDLG_H - -class CBINDInstallDlg : public CDialog { - public: - CBINDInstallDlg(CWnd *pParent = NULL); /* standard constructor */ - - /*{{AFX_DATA(CBINDInstallDlg) */ - enum { IDD = IDD_BINDINSTALL_DIALOG }; - CString m_targetDir; - CString m_version; - BOOL m_autoStart; - BOOL m_keepFiles; - BOOL m_toolsOnly; - CString m_current; - BOOL m_startOnInstall; - /*}}AFX_DATA */ - - /* ClassWizard generated virtual function overrides */ - /*{{AFX_VIRTUAL(CBINDInstallDlg) */ - protected: - virtual void - DoDataExchange(CDataExchange *pDX); /* DDX/DDV support */ - /*}}AFX_VIRTUAL */ - - protected: - void - StartBINDService(); - void - StopBINDService(); - - void - InstallTags(); - void - UninstallTags(); - - void - CreateDirs(); - void - RemoveDirs(BOOL uninstall); - - void - ReadInstallFlags(); - void - ReadInstallFileList(); - - void - CopyFiles(); - void - DeleteFiles(BOOL uninstall); - - void - RegisterService(); - void - UpdateService(CString StartName); - void - UnregisterService(BOOL uninstall); - - void - RegisterMessages(); - void - UnregisterMessages(BOOL uninstall); - - void - FailedInstall(); - void - SetItemStatus(UINT nID, BOOL bSuccess = TRUE); - - void - GetCurrentServiceAccountName(); - BOOL - ValidateServiceAccount(); - - protected: - CString - DestDir(int destination); - int - MsgBox(int id, ...); - int - MsgBox(int id, UINT type, ...); - CString - GetErrMessage(DWORD err = -1); - BOOL - CheckBINDService(); - void - SetCurrent(int id, ...); - void - ProgramGroup(BOOL create = TRUE); - void - ProgramGroupCreate(TCHAR *commonPath); - void - ProgramGroupRemove(TCHAR *commonPath); - - HICON m_hIcon; - CString m_defaultDir; - CString m_etcDir; - CString m_binDir; - CString m_winSysDir; - BOOL m_installed; - CString m_currentDir; - BOOL m_accountExists; - BOOL m_accountUsed; - CString m_currentAccount; - CString m_accountName; - CString m_accountPasswordConfirm; - CString m_accountPassword; - BOOL m_serviceExists; - - /* Generated message map functions */ - /*{{AFX_MSG(CBINDInstallDlg) */ - virtual BOOL - OnInitDialog(); - afx_msg void - OnPaint(); - afx_msg HCURSOR - OnQueryDragIcon(); - afx_msg void - OnBrowse(); - afx_msg void - OnChangeTargetdir(); - afx_msg void - OnInstall(); - afx_msg void - OnExit(); - afx_msg void - OnUninstall(); - afx_msg void - OnAutoStart(); - afx_msg void - OnKeepFiles(); - afx_msg void - OnStartOnInstall(); - /*}}AFX_MSG */ - DECLARE_MESSAGE_MAP() -}; - -#endif /* ifndef BINDINSTALLDLG_H */ diff --git a/bin/win32/BINDInstall/DirBrowse.cpp b/bin/win32/BINDInstall/DirBrowse.cpp deleted file mode 100644 index e165107f06..0000000000 --- a/bin/win32/BINDInstall/DirBrowse.cpp +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Portions Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/* - * Copyright (c) 1999-2000 by Nortel Networks Corporation - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND NORTEL NETWORKS DISCLAIMS - * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NORTEL NETWORKS - * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ - -#include "stdafx.h" -#include "BINDInstall.h" -#include "DirBrowse.h" - -#ifdef _DEBUG -#define new DEBUG_NEW -#undef THIS_FILE -static char THIS_FILE[] = __FILE__; -#endif - -///////////////////////////////////////////////////////////////////////////// -// CDirBrowse dialog - - -CDirBrowse::CDirBrowse(CString initialDir, CWnd* pParent /*=NULL*/) - : CDialog(CDirBrowse::IDD, pParent) -{ - //{{AFX_DATA_INIT(CDirBrowse) - // NOTE: the ClassWizard will add member initialization here - //}}AFX_DATA_INIT - /* cppcheck-suppress useInitializationList */ - m_selectedDir = initialDir; -} - - -void CDirBrowse::DoDataExchange(CDataExchange* pDX) -{ - CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(CDirBrowse) - // NOTE: the ClassWizard will add DDX and DDV calls here - //}}AFX_DATA_MAP -} - - -BEGIN_MESSAGE_MAP(CDirBrowse, CDialog) - //{{AFX_MSG_MAP(CDirBrowse) - ON_LBN_DBLCLK(IDC_DIRLIST, OnDblclkDirlist) - ON_LBN_SELCHANGE(IDC_DIRLIST, OnSelchangeDirlist) - //}}AFX_MSG_MAP -END_MESSAGE_MAP() - -///////////////////////////////////////////////////////////////////////////// -// CDirBrowse message handlers - -BOOL CDirBrowse::OnInitDialog() -{ - CDialog::OnInitDialog(); - - DlgDirList((LPTSTR)(LPCTSTR)m_selectedDir, IDC_DIRLIST, IDC_CURDIR, DDL_DIRECTORY); - - return TRUE; // return TRUE unless you set the focus to a control - // EXCEPTION: OCX Property Pages should return FALSE -} - -void CDirBrowse::OnDblclkDirlist() -{ - CListBox *lb = (CListBox *)GetDlgItem(IDC_DIRLIST); - CString curSel; - - lb->GetText(lb->GetCurSel(), curSel); - DlgDirList((LPTSTR)(LPCTSTR)curSel, IDC_DIRLIST, IDC_CURDIR, DDL_DIRECTORY); -} - -void CDirBrowse::OnSelchangeDirlist() -{ - // TODO: Add your control notification handler code here - -} diff --git a/bin/win32/BINDInstall/DirBrowse.h b/bin/win32/BINDInstall/DirBrowse.h deleted file mode 100644 index d1adac7732..0000000000 --- a/bin/win32/BINDInstall/DirBrowse.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Portions Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/* - * Copyright (c) 1999-2000 by Nortel Networks Corporation - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND NORTEL NETWORKS DISCLAIMS - * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NORTEL NETWORKS - * BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES - * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, - * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ - -#ifndef DIRBROWSE_H -#define DIRBROWSE_H - -class CDirBrowse : public CDialog { - /* Construction */ - public: - CDirBrowse(CString initialDir = "\\", - CWnd *pParent = NULL); /* standard - * constructor - */ - CString - GetSelectedDir() { - return (m_selectedDir); - } - - /*{{AFX_DATA(CDirBrowse) */ - enum { IDD = IDD_BROWSE }; - /* NOTE: the ClassWizard will add data members here */ - /*}}AFX_DATA */ - - /* ClassWizard generated virtual function overrides */ - /*{{AFX_VIRTUAL(CDirBrowse) */ - protected: - virtual void - DoDataExchange(CDataExchange *pDX); /* DDX/DDV support */ - /*}}AFX_VIRTUAL */ - - protected: - /* Generated message map functions */ - /*{{AFX_MSG(CDirBrowse) */ - virtual BOOL - OnInitDialog(); - afx_msg void - OnDblclkDirlist(); - afx_msg void - OnSelchangeDirlist(); - /*}}AFX_MSG */ - DECLARE_MESSAGE_MAP() - - private: - CString m_selectedDir; -}; - -#endif /* ifndef DIRBROWSE_H */ diff --git a/bin/win32/BINDInstall/StdAfx.cpp b/bin/win32/BINDInstall/StdAfx.cpp deleted file mode 100644 index a4195ca232..0000000000 --- a/bin/win32/BINDInstall/StdAfx.cpp +++ /dev/null @@ -1,8 +0,0 @@ -// stdafx.cpp : source file that includes just the standard includes -// BINDInstall.pch will be the pre-compiled header -// stdafx.obj will contain the pre-compiled type information - -#include "stdafx.h" - - - diff --git a/bin/win32/BINDInstall/StdAfx.h b/bin/win32/BINDInstall/StdAfx.h deleted file mode 100644 index 14cc91075c..0000000000 --- a/bin/win32/BINDInstall/StdAfx.h +++ /dev/null @@ -1,38 +0,0 @@ -/* stdafx.h : include file for standard system include files, */ -/* or project specific include files that are used frequently, but */ -/* are changed infrequently */ -/* */ - -/* - * Minimum version is Windows 8 and Windows Server 2012 - */ -#define _WIN32_WINNT 0x0602 -#define NTDDI_VERSION 0x06020000 - -#ifndef _CRT_SECURE_NO_DEPRECATE -#define _CRT_SECURE_NO_DEPRECATE 1 -#endif /* ifndef _CRT_SECURE_NO_DEPRECATE */ - -#if !defined(AFX_STDAFX_H__61537819_39FC_11D3_A97A_00105A12BD65__INCLUDED_) -#define AFX_STDAFX_H__61537819_39FC_11D3_A97A_00105A12BD65__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif /* _MSC_VER > 1000 */ - -#define VC_EXTRALEAN /* Exclude rarely-used stuff from Windows headers */ - -#include /* MFC support for Internet Explorer 4 Common Controls */ -#include /* MFC extensions */ -#include /* MFC core and standard components */ -#ifndef _AFX_NO_AFXCMN_SUPPORT -#include /* MFC support for Windows Common Controls */ -#endif /* _AFX_NO_AFXCMN_SUPPORT */ - -/*{{AFX_INSERT_LOCATION}} */ -/* Microsoft Visual C++ will insert additional declarations immediately before - */ -/* the previous line. */ - -#endif /* !defined(AFX_STDAFX_H__61537819_39FC_11D3_A97A_00105A12BD65__INCLUDED_) \ - */ diff --git a/bin/win32/BINDInstall/VersionInfo.cpp b/bin/win32/BINDInstall/VersionInfo.cpp deleted file mode 100644 index ddad36b706..0000000000 --- a/bin/win32/BINDInstall/VersionInfo.cpp +++ /dev/null @@ -1,291 +0,0 @@ -// VersionInfo.cpp: implementation of the CVersionInfo class. -// -////////////////////////////////////////////////////////////////////// - -#include "stdafx.h" -#include "bindinstall.h" -#include "VersionInfo.h" -#include - -#include - -#ifdef _DEBUG -#undef THIS_FILE -static char THIS_FILE[]=__FILE__; -#define new DEBUG_NEW -#endif - -////////////////////////////////////////////////////////////////////// -// Construction/Destruction -////////////////////////////////////////////////////////////////////// - -CVersionInfo::CVersionInfo(CString filename) -{ - HANDLE hFile; - WIN32_FIND_DATA fd; - memset(&fd, 0, sizeof(WIN32_FIND_DATA)); - - m_status = ERROR_SUCCESS; - m_isValid = FALSE; - m_filename = filename; - - // See if the given file exists - hFile = FindFirstFile(filename, &fd); - if(hFile == INVALID_HANDLE_VALUE) - { - m_status = ERROR_FILE_NOT_FOUND; - m_versionInfo = NULL; - return; - } - FindClose(hFile); - - // Extract the file info - DWORD handle; - DWORD viSize = GetFileVersionInfoSize((LPTSTR)(LPCTSTR)filename, &handle); - m_versionInfo = NULL; - - if(viSize == 0) - { - m_status = GetLastError(); - } - else - { - m_versionInfo = new char[viSize]; - - // Get the block of version info from the file - if(!GetFileVersionInfo((LPTSTR)(LPCTSTR)filename, handle, viSize, m_versionInfo)) - { - if(m_versionInfo) - { - delete [] m_versionInfo; - m_versionInfo = NULL; - } - return; - } - - // Now extract the sub block we are interested in - UINT versionLen = 0; - LPVOID viBlob = NULL; - if(!VerQueryValue(m_versionInfo, "\\", &viBlob, &versionLen)) - { - if(m_versionInfo) - { - delete [] m_versionInfo; - m_versionInfo = NULL; - } - return; - } - - // And finally the version info is ours - m_fixedInfo = (VS_FIXEDFILEINFO *)viBlob; - - // If we got here, all is good - } - m_isValid = TRUE; -} - -CVersionInfo::~CVersionInfo() -{ - m_fixedInfo = NULL; - if(m_versionInfo) - { - delete [] m_versionInfo; - m_versionInfo = NULL; - } -} - -CString CVersionInfo::GetFileVersionString() -{ - return(QueryStringValue("FileVersion")); -} - -CString CVersionInfo::GetProductVersionString() -{ - return(QueryStringValue("ProductVersion")); -} - -CString CVersionInfo::GetComments() -{ - return(QueryStringValue("Comments")); -} - -CString CVersionInfo::GetFileDescription() -{ - return(QueryStringValue("FileDescription")); -} - -CString CVersionInfo::GetInternalName() -{ - return(QueryStringValue("InternalName")); -} - -CString CVersionInfo::GetLegalCopyright() -{ - return(QueryStringValue("LegalCopyright")); -} - -CString CVersionInfo::GetLegalTrademarks() -{ - return(QueryStringValue("LegalTrademarks")); -} - -CString CVersionInfo::GetOriginalFileName() -{ - return(QueryStringValue("OriginalFilename")); -} - -CString CVersionInfo::GetProductName() -{ - return(QueryStringValue("ProductName")); -} - -CString CVersionInfo::GetSpecialBuildString() -{ - return(QueryStringValue("SpecialBuild")); -} - -CString CVersionInfo::GetPrivateBuildString() -{ - return(QueryStringValue("PrivateBuild")); -} - -CString CVersionInfo::GetCompanyName() -{ - return(QueryStringValue("CompanyName")); -} - -#ifdef NOTUSED -BOOL CVersionInfo::CopyFileCheckVersion(CVersionInfo &originalFile) -{ - _int64 myVer = GetFileVersion(); - _int64 origVer = originalFile.GetFileVersion(); - - if(origVer > myVer) - { - CString msg; - msg.Format(IDS_EXISTING_NEWER, m_filename); - DWORD query = AfxMessageBox(msg, MB_YESNO); - if(query == IDNO) - return(TRUE); - } - - return(CopyFileNoVersion(originalFile)); -} -#endif - -BOOL CVersionInfo::CopyFileNoVersion(CVersionInfo &originalFile) -{ - return(CopyFile(originalFile.GetFilename(), m_filename, FALSE)); -} - - -_int64 CVersionInfo::GetFileVersion() -{ - _int64 ver = 0; - - if(m_versionInfo) - { - ver = m_fixedInfo->dwFileVersionMS; - ver <<= 32; - ver += m_fixedInfo->dwFileVersionLS; - } - return(ver); -} - -_int64 CVersionInfo::GetProductVersion() -{ - _int64 ver = 0; - - if(m_versionInfo) - { - ver = m_fixedInfo->dwProductVersionMS; - ver <<= 32; - ver += m_fixedInfo->dwProductVersionLS; - } - return(ver); -} - -_int64 CVersionInfo::GetFileDate() -{ - _int64 fDate = 0; - - if(m_versionInfo) - { - fDate = m_fixedInfo->dwFileDateMS; - fDate <<= 32; - fDate += m_fixedInfo->dwFileDateLS; - } - return(fDate); -} - -DWORD CVersionInfo::GetFileFlagMask() -{ - if(m_versionInfo) - { - return(m_fixedInfo->dwFileFlagsMask); - } - return(0); -} - -DWORD CVersionInfo::GetFileFlags() -{ - if(m_versionInfo) - { - return(m_fixedInfo->dwFileFlags); - } - return(0); -} - -DWORD CVersionInfo::GetFileOS() -{ - if(m_versionInfo) - { - return(m_fixedInfo->dwFileOS); - } - return(VOS_UNKNOWN); -} - -DWORD CVersionInfo::GetFileType() -{ - if(m_versionInfo) - { - return(m_fixedInfo->dwFileType); - } - return(VFT_UNKNOWN); -} - -DWORD CVersionInfo::GetFileSubType() -{ - if(m_versionInfo) - { - return(m_fixedInfo->dwFileSubtype); - } - return(VFT2_UNKNOWN); -} - -CString CVersionInfo::QueryStringValue(CString value) -{ - UINT blobLen = 0; - LPVOID viBlob = NULL; - int n; - - if(m_versionInfo) - { - char queryString[256]; - - // This code page value is for American English. - // If you change the resources to be other than that - // You probably should change this to match it. - DWORD codePage = 0x040904B0; - - n = snprintf(queryString, sizeof(queryString), - "\\StringFileInfo\\%08X\\%s", - codePage, (LPCTSTR) value); - if (n >= 0 && (size_t)n < sizeof(queryString)) { - if(VerQueryValue(m_versionInfo, queryString, - &viBlob, &blobLen)) - return((char *)viBlob); - } - } - return("Not Available"); -} diff --git a/bin/win32/BINDInstall/VersionInfo.h b/bin/win32/BINDInstall/VersionInfo.h deleted file mode 100644 index 9b8d212b08..0000000000 --- a/bin/win32/BINDInstall/VersionInfo.h +++ /dev/null @@ -1,91 +0,0 @@ -/* VersionInfo.h: interface for the CVersionInfo class. */ -/* */ -/*//////////////////////////////////////////////////////////////////// */ - -#if !defined(AFX_VERSIONINFO_H__F82E9FF3_5298_11D4_AB87_00C04F789BA0__INCLUDED_) -#define AFX_VERSIONINFO_H__F82E9FF3_5298_11D4_AB87_00C04F789BA0__INCLUDED_ - -#if _MSC_VER > 1000 -#pragma once -#endif /* _MSC_VER > 1000 */ - -class CVersionInfo { - public: - CVersionInfo(CString filename); - virtual ~CVersionInfo(); - BOOL - IsValid() { - return (m_isValid); - } - DWORD - GetStatus() { return (m_status); } - - BOOL - CopyFileCheckVersion(CVersionInfo &originalFile); - BOOL - CopyFileNoVersion(CVersionInfo &originalFile); - - const CString & - GetFilename() { - return (m_filename); - } - - /* Extract the elements of the file's string info block */ - CString - GetFileVersionString(); - CString - GetProductVersionString(); - CString - GetComments(); - CString - GetFileDescription(); - CString - GetInternalName(); - CString - GetLegalCopyright(); - CString - GetLegalTrademarks(); - CString - GetOriginalFileName(); - CString - GetProductName(); - CString - GetSpecialBuildString(); - CString - GetPrivateBuildString(); - CString - GetCompanyName(); - - /* Extract the elements of the file's VS_FIXEDFILEINFO block */ - _int64 - GetFileVersion(); - _int64 - GetProductVersion(); - _int64 - GetFileDate(); - - DWORD - GetFileFlagMask(); - DWORD - GetFileFlags(); - DWORD - GetFileOS(); - DWORD - GetFileType(); - DWORD - GetFileSubType(); - - private: - CString m_filename; - BOOL m_isValid; - LPVOID m_versionInfo; - VS_FIXEDFILEINFO *m_fixedInfo; - DWORD m_codePage; - DWORD m_status; - - CString - QueryStringValue(CString value); -}; - -#endif /* !defined(AFX_VERSIONINFO_H__F82E9FF3_5298_11D4_AB87_00C04F789BA0__INCLUDED_) \ - */ diff --git a/bin/win32/BINDInstall/res/BINDInstall.ico b/bin/win32/BINDInstall/res/BINDInstall.ico deleted file mode 100644 index 2cf25fe07f8f855bff3184a56e5e297a9142d713..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1078 zcmb7@!HOF(42CtEffx#%yg_m*d5fJxAeYc*ncMglL7_HuVfr||#q`q4&}UfarN=-I z3AEsT@^s3QZYfprTly`_mOQdZC3mvfti}w1ePnuhFqt*$=+kYwW@$I?n?0w^~vX&w=oI*T&w&IOj>* z_SBa1HL8Oz>(-KsF|enPu|Kz#87X@W)OE~K;=Kzx_`c)Z67QAxOK>@Nj_AQFF+*pZ zQ^$$BGnGF;e{t@9P@^*^}5Q&fkE!&lC3ZqVzZ(db%h^%>U|hmsQ>o<8ol5qFtnc>v8X1h}U|o8yZJluDPW^ z4|cXnhY**%3>~idVf+-Ci3ii%{_De}ce{PzIhU8?xbfc)L*A}M-ZZ4n+g9GV5;+6Y QiZ6JNK0m<~`v);U0Wp?GjsO4v diff --git a/bin/win32/BINDInstall/res/BINDInstall.rc2 b/bin/win32/BINDInstall/res/BINDInstall.rc2 deleted file mode 100644 index 4fc93bb209..0000000000 --- a/bin/win32/BINDInstall/res/BINDInstall.rc2 +++ /dev/null @@ -1,13 +0,0 @@ -// -// BINDINSTALL.RC2 - resources Microsoft Visual C++ does not edit directly -// - -#ifdef APSTUDIO_INVOKED - #error this file is not editable by Microsoft Visual C++ -#endif //APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// Add manually edited resources here... - -///////////////////////////////////////////////////////////////////////////// diff --git a/bin/win32/BINDInstall/resource.h b/bin/win32/BINDInstall/resource.h deleted file mode 100644 index d643b230a0..0000000000 --- a/bin/win32/BINDInstall/resource.h +++ /dev/null @@ -1,105 +0,0 @@ -/*{{NO_DEPENDENCIES}} */ -/* Microsoft Developer Studio generated include file. */ -/* Used by BINDInstall.rc */ -/* */ -#define IDS_MAINFRAME 1 -#define IDS_CREATEDIR 2 -#define IDS_SUCCESS 3 -#define IDS_FAIL 4 -#define IDS_DIREXIST 5 -#define IDS_INSTALL_DIR 6 -#define IDS_INSTALL_FILE 7 -#define IDS_INSTALL_SERVICE 8 -#define IDS_INSTALL_MESSAGE 9 -#define IDS_UNINSTALL 14 -#define IDS_UNINSTALL_DONE 15 -#define IDS_CREATE_KEY 16 -#define IDS_ADD_REMOVE 17 -#define IDS_CLEANUP 18 -#define IDS_INSTALL_DONE 19 -#define IDS_CREATE_DIR 20 -#define IDS_REMOVE_DIR 21 -#define IDS_COPY_FILE 22 -#define IDS_DELETE_FILE 23 -#define IDS_OPEN_SCM 24 -#define IDS_CREATE_SERVICE 25 -#define IDS_OPEN_SERVICE 26 -#define IDS_REMOVE_SERVICE 27 -#define IDS_REGISTER_MESSAGES 28 -#define IDS_UNREGISTER_MESSAGES 29 -#define IDS_STOP_SERVICE 30 -#define IDS_START_SERVICE 31 -#define IDS_UNINSTALL_DIR 32 -#define IDS_UNINSTALL_FILES 33 -#define IDS_UNINSTALL_SERVICE 34 -#define IDS_UNINSTALL_MESSAGE 35 -#define IDS_ERR_OPEN_SCM 36 -#define IDS_ERR_OPEN_SERVICE 37 -#define IDS_ERR_STOP_SERVICE 38 -#define IDS_ERR_NONCRIT_FILE 39 -#define IDS_ERR_CRITICAL_FILE 40 -#define IDS_ERR_COPY_FILE 40 -#define IDS_ERR_CREATE_SERVICE 41 -#define IDS_ERR_REMOVE_SERVICE 42 -#define IDS_REBOOT 43 -#define IDS_BAD_PRIVILEGES 44 -#define IDS_ERR_CREATE_DIR 45 -#define IDS_VERSION 46 -#define IDS_ERR_CREATE_KEY 47 -#define IDS_ERR_SET_VALUE 48 -#define IDS_NO_VERSION 49 -#define IDS_EXISTING_NEWER 50 -#define IDS_FILE_BAD 51 -#define IDS_ERR_TOOPRIVED 52 -#define IDS_ERR_BADACCOUNT 53 -#define IDS_ERR_WRONGPRIV 54 -#define IDS_CREATEACCOUNT_FAILED 55 -#define IDS_ERR_PASSWORD 56 -#define IDS_ERR_UPDATE_SERVICE 57 -#define IDS_ERR_NULLPASSWORD 58 -#define IDS_ERR_WHITESPACE 59 -#define IDD_BINDINSTALL_DIALOG 102 -#define IDR_MAINFRAME 128 -#define IDD_BROWSE 129 -#define IDI_CHECK 130 -#define IDI_X 132 -#define IDC_CURSOR1 142 -#define IDD_DIALOG1 143 -#define IDC_TARGETDIR 1001 -#define IDC_BROWSE 1002 -#define IDC_DIRLIST 1004 -#define IDC_CURDIR 1005 -#define IDC_INSTALL 1006 -#define IDC_COPY_FILE 1007 -#define IDC_REG_SERVICE 1008 -#define IDC_REG_MESSAGE 1009 -#define IDC_CREATE_DIR 1010 -#define IDC_EXIT 1011 -#define IDC_DIR_TAG 1012 -#define IDC_COPY_TAG 1013 -#define IDC_SERVICE_TAG 1014 -#define IDC_MESSAGE_TAG 1015 -#define IDC_AUTO_START 1016 -#define IDC_UNINSTALL 1017 -#define IDC_VERSION 1018 -#define IDC_KEEP_FILES 1019 -#define IDC_CURRENT_TAG 1020 -#define IDC_DRIVES 1021 -#define IDC_CURRENT 1021 -#define IDC_START 1022 -#define IDC_ACCOUNT_NAME 1030 -#define IDC_ACCOUNT_PASSWORD 1031 -#define IDC_ACCOUNT_PASSWORD_CONFIRM 1032 -#define IDC_TOOLS_ONLY 1033 -#define IDS_ERR_START_SERVICE 1034 - -/* Next default values for new objects */ -/* */ -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 144 -#define _APS_NEXT_COMMAND_VALUE 32771 -#define _APS_NEXT_CONTROL_VALUE 1027 -#define _APS_NEXT_SYMED_VALUE 104 -#endif /* ifndef APSTUDIO_READONLY_SYMBOLS */ -#endif /* ifdef APSTUDIO_INVOKED */ diff --git a/config.h.win32 b/config.h.win32 deleted file mode 100644 index 16aab18194..0000000000 --- a/config.h.win32 +++ /dev/null @@ -1,395 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/* - * win32 configuration file - * All definitions, declarations, macros and includes are - * specific to the requirements of the Windows NT and Windows 2000 - * platforms - */ - -/* Define to empty if the keyword does not work. */ -/* #undef const */ - -/* Define as __inline if that's what the C compiler calls it. */ -#define inline __inline - -/* Define to `unsigned int/__int64' if doesn't define. */ -/* #undef size_t */ - -/* - * ANSI C compliance enabled - */ -#define __STDC__ 1 - -/* - * Silence compiler warnings about using strcpy and friends. - */ -#define _CRT_SECURE_NO_DEPRECATE 1 - -/* - * Use 32 bit time. - */ -#ifndef _WIN64 -#define _USE_32BIT_TIME_T 1 -#endif - -/* - * Minimum version is Windows 8 and Windows Server 2012 - */ -#ifndef _WIN32_WINNT -#define _WIN32_WINNT 0x0602 -#endif -#if _WIN32_WINNT < 0x0602 -#error Minimum Target environment is Windows 8 and Windows Server 2012 -#endif -#ifndef NTDDI_VERSION -#define NTDDI_VERSION 0x06020000 -#endif -#if NTDDI_VERSION < 0x06020000 -#error Minimum Target environment is Windows 8 and Windows Server 2012 -#endif -#if _MSC_VER <= 1910 -#error Minimum Visual Studio version is 2017 or higher -#endif - -/* Setup package versions */ -@PACKAGE_VERSION_MAJOR@ -@PACKAGE_VERSION_MINOR@ -@PACKAGE_VERSION_PATCH@ -@PACKAGE_VERSION_EXTRA@ -@PACKAGE_VERSION@ -@PACKAGE_NAME@ -@PACKAGE_DESCRIPTION@ -@PACKAGE_SRCID@ -@PACKAGE_CONFIGARGS@ -@PACKAGE_BUILDER@ -@PACKAGE_STRING@ -@MAPAPI@ - -/* Define if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* define on DEC OSF to enable 4.4BSD style sa_len support */ -/* #undef _SOCKADDR_LEN */ - -/* define if your system has sigwait() */ -/* #undef HAVE_SIGWAIT */ - -/* define on Solaris to get sigwait() to work using pthreads semantics */ -/* #undef _POSIX_PTHREAD_SEMANTICS */ - -/* define if you need to #define _XPG4_2 before including sys/socket.h */ -/* #undef NEED_XPG4_2_BEFORE_SOCKET_H */ - -/* define if you need to #define _XOPEN_SOURCE_ENTENDED before including - * sys/socket.h - */ -/* #undef NEED_XSE_BEFORE_SOCKET_H */ - -/* Define if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define if you have the header file. */ -#define HAVE_SYS_SOCKIO_H 1 - -/* Define if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define if you have the c_r library (-lc_r). */ -/* #undef HAVE_LIBC_R */ - -/* Define if you have the nsl library (-lnsl). */ -/* #undef HAVE_LIBNSL */ - -/* Define if you have the pthread library (-lpthread). */ -/* #undef HAVE_LIBPTHREAD */ - -/* Define if you have the socket library (-lsocket). */ -/* #undef HAVE_LIBSOCKET */ - -/* Define if you have h_errno */ -#define HAVE_H_ERRNO - -/* Define if you have getpassphrase in the C library. */ -#define HAVE_GETPASSPHRASE - -char *getpassphrase(const char *); - -#define S_IFMT _S_IFMT /* file type mask */ -#define S_IFDIR _S_IFDIR /* directory */ -#define S_IFCHR _S_IFCHR /* character special */ -#define S_IFIFO _S_IFIFO /* pipe */ -#define S_IFREG _S_IFREG /* regular */ -#define S_IREAD _S_IREAD /* read permission, owner */ -#define S_IWRITE _S_IWRITE /* write permission, owner */ -#define S_IEXEC _S_IEXEC /* execute/search permission, owner */ - -#define O_RDONLY _O_RDONLY -#define O_WRONLY _O_WRONLY -#define O_RDWR _O_RDWR -#define O_APPEND _O_APPEND -#define O_CREAT _O_CREAT -#define O_TRUNC _O_TRUNC -#define O_EXCL _O_EXCL - -/* open() under unix allows setting of read/write permissions - * at the owner, group and other levels. These don't exist in NT - * We'll just map them all to the NT equivalent - */ - -#define S_IRUSR _S_IREAD /* Owner read permission */ -#define S_IWUSR _S_IWRITE /* Owner write permission */ -#define S_IRGRP _S_IREAD /* Group read permission */ -#define S_IWGRP _S_IWRITE /* Group write permission */ -#define S_IROTH _S_IREAD /* Other read permission */ -#define S_IWOTH _S_IWRITE /* Other write permission */ - - -/* - * WIN32 specials until some other way of dealing with these is decided. - */ - -#if _MSC_VER < 1900 -#define snprintf _snprintf -#endif -#if _MSC_VER < 1800 -#error Use Visual Studio 2013 or later for %zu support. -#endif -#if _MSC_VER <= 1400 -#define vsnprintf _vsnprintf -#endif -#define strcasecmp _stricmp -#define strncasecmp _strnicmp -#define strdup _strdup -#define sopen _sopen -#define isascii __isascii -#ifndef _WIN64 -#define stat _stat -#define fstat _fstat -#else -#define stat _stat64 -#define fstat _fstat64 -#endif -#define fileno _fileno -#define unlink _unlink -#define chdir _chdir -#define mkdir _mkdir -#define rmdir _rmdir -#define getcwd _getcwd -#define utime _utime -#define utimbuf _utimbuf -#ifndef _WIN64 -#define lseek _lseek -#else -#define lseek _lseeki64 -#endif - -/* #define EAFNOSUPPORT EINVAL */ -#define chmod _chmod -#define getpid _getpid -#define getppid _getpid /* WARNING!!! For now this gets the same pid */ -#define random rand /* Random number generator */ -#define srandom srand /* Random number generator seeding */ -/* for the config file */ -typedef unsigned int uid_t; /* user id */ -typedef unsigned int gid_t; /* group id */ -typedef long pid_t; /* PID */ -#ifndef _WIN64 -typedef int ssize_t; -typedef long off_t; -#else -typedef __int64 ssize_t; -#ifndef _AFX -/* BINDInstall defines it with another type but doesn't use it */ -typedef __int64 off_t; -#endif -#endif - -/* - * Set up the Version Information - */ -#include -#include -#include - -/* - * Applications may need to get the configuration path - */ -#ifndef _USRDLL -#include -#endif - -#define fdopen _fdopen -#define read _read -#define open _open -#define close _close -#define write _write -#include -#define isatty _isatty - -#ifndef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN 1 /* Prevent inclusion of winsock.h in windows.h */ -#endif /* WIN32_LEAN_AND_MEAN */ - -/* - * Make the number of available sockets large - * The number of sockets needed can get large and memory's cheap - * This must be defined before winsock2.h gets included as the - * macro is used there. - */ - -#ifndef FD_SETSIZE -#define FD_SETSIZE 16384 -#endif -#include - -/* - * main() is hooked - */ -#define ISC_MAIN_HOOK 1 - -/* - * Configure sensible arguments - */ -@PACKAGE_CONFIGARGS@ - -/* - * Define if libxml2 is present - */ -@HAVE_LIBXML2@ - -/* Define to enable "rrset-order fixed" syntax. */ -@DNS_RDATASET_FIXED@ - -/* Define if OpenSSL includes Ed25519 support */ -#define HAVE_OPENSSL_ED25519 1 - -/* Define if OpenSSL includes Ed448 support */ -#define HAVE_OPENSSL_ED448 1 - -/* Define if your OpenSSL version supports DH functions. */ -#define HAVE_DH_GET0_KEY 1 - -/* Define if your OpenSSL version supports ECDSA functions. */ -#define HAVE_ECDSA_SIG_GET0 1 - -/* Define if your OpenSSL version supports RSA functions. */ -#define HAVE_RSA_SET0_KEY 1 - -/* define if OpenSSL is used for Public-Key Cryptography */ -@USE_OPENSSL@ - -/* Define if native PKCS#11 is used as cryptographic library provider */ -@USE_PKCS11@ - -/* Define to 1 if you have the `readline' function. */ -@HAVE_READLINE@ - -/* Build with GeoIP2 support */ -@HAVE_GEOIP2@ - -/* define if idnkit support is to be included. */ -@WITH_IDN@ - -/* Define if zlib was found */ -@HAVE_ZLIB@ - -/* From enable developer */ -@ISC_LIST_CHECKINIT@ - -/* Large system tuning */ -@TUNE_LARGE@ - -/* define if we can use backtrace */ -@USE_BACKTRACE@ - -/* the default value of dnssec-validation option */ -@VALIDATION_DEFAULT@ - -/* Verbose query trace logging */ -@WANT_QUERYTRACE@ - -/* Define to 1 if you have the `CRYPTO_zalloc' function. */ -#define HAVE_CRYPTO_ZALLOC 1 - -/* Define to 1 if you have the `EVP_CIPHER_CTX_free' function. */ -#define HAVE_EVP_CIPHER_CTX_FREE 1 - -/* Define to 1 if you have the `EVP_CIPHER_CTX_new' function. */ -#define HAVE_EVP_CIPHER_CTX_NEW 1 - -/* Define to 1 if you have the `EVP_MD_CTX_free' function. */ -#define HAVE_EVP_MD_CTX_FREE 1 - -/* Define to 1 if you have the `EVP_MD_CTX_new' function. */ -#define HAVE_EVP_MD_CTX_NEW 1 - -/* Define to 1 if you have the `EVP_MD_CTX_reset' function. */ -#define HAVE_EVP_MD_CTX_RESET 1 - -/* Define to 1 if you have the `HMAC_CTX_free' function. */ -#define HAVE_HMAC_CTX_FREE 1 - -/* Define to 1 if you have the `HMAC_CTX_get_md' function. */ -#define HAVE_HMAC_CTX_GET_MD 1 - -/* Define to 1 if you have the `HMAC_CTX_new' function. */ -#define HAVE_HMAC_CTX_NEW 1 - -/* Define to 1 if you have the `HMAC_CTX_reset' function. */ -#define HAVE_HMAC_CTX_RESET 1 - -/* Define to 1 if you have the `SSL_read_ex' function. */ -#define HAVE_SSL_READ_EX 1 - -/* Define to 1 if you have the `SSL_peek_ex' function. */ -#define HAVE_SSL_PEEK_EX 1 - -/* Define to 1 if you have the `SSL_write_ex' function. */ -#define HAVE_SSL_WRITE_EX 1 - -/* Define to 1 if you have the `BIO_read_ex' function. */ -#define HAVE_BIO_READ_EX 1 - -/* Define to 1 if you have the `BIO_write_ex' function. */ -#define HAVE_BIO_WRITE_EX 1 - -/* Define to 1 if you have the `OPENSSL_init_crypto' function. */ -#define HAVE_OPENSSL_INIT_CRYPTO 1 - -/* Define to 1 if you have the `OPENSSL_init_ssl' function. */ -#define HAVE_OPENSSL_INIT_SSL 1 - -/* Define to 1 if you have the `TLS_client_method' function. */ -#define HAVE_TLS_CLIENT_METHOD 1 - -/* Define to 1 if you have the `TLS_server_method' function. */ -#define HAVE_TLS_SERVER_METHOD 1 - -/* Define to 1 if you have the `SSL_CTX_up_ref' function. */ -#define SSL_CTX_UP_REF 1 - -/* GSSAPI Related defines */ -@HAVE_GSSAPI@ -@HAVE_GSSAPI_H@ -@HAVE_GSSAPI_GSSAPI_H@ -@HAVE_GSSAPI_KRB5_H@ -@HAVE_GSSAPI_GSSAPI_KRB5_H@ -@HAVE_KRB5_H@ -@HAVE_KRB5_KRB5_H@ - -/* Avoid warnings with strlen() */ -#ifdef _WIN64 -#define strlen(x) (unsigned int) strlen(x) -#endif - -/* Hey Emacs, this is -*- c -*- file! */ diff --git a/configure.ac b/configure.ac index b0cd88496f..36d612d4c6 100644 --- a/configure.ac +++ b/configure.ac @@ -997,7 +997,7 @@ AC_COMPILE_IFELSE( # # Allow forcibly disabling TCP Fast Open support as autodetection might yield # confusing results on some systems (e.g. FreeBSD; see set_tcp_fastopen() -# comment in lib/isc/unix/socket.c). +# comment in lib/isc/socket.c). # # [pairwise: --enable-tcp-fastopen, --disable-tcp-fastopen] AC_ARG_ENABLE([tcp_fastopen], diff --git a/conftools/perllib/dnsconf/Makefile.PL b/conftools/perllib/dnsconf/Makefile.PL index 350a69ac9f..a8e3611146 100644 --- a/conftools/perllib/dnsconf/Makefile.PL +++ b/conftools/perllib/dnsconf/Makefile.PL @@ -15,6 +15,6 @@ WriteMakefile('NAME' => 'DNSConf', 'OPTIMIZE' => '-g', 'PERLMAINCC' => 'gcc', 'LIBS' => [ '-L../../isc -L../../dns -ldns -lisc -lc_r' ], - 'INC' => '-I../../isc/include -I../../isc/unix/include -I../../dns/include', + 'INC' => '-I../../isc/include -I../../dns/include', 'dynamic_lib' => { OTHERLDFLAGS => '-pthread' }, 'OBJECT' => 'DNSConf_wrap.o'); diff --git a/contrib/dlz/example/dlz_example.c b/contrib/dlz/example/dlz_example.c index cd4db52d87..1df74af6f3 100644 --- a/contrib/dlz/example/dlz_example.c +++ b/contrib/dlz/example/dlz_example.c @@ -692,9 +692,9 @@ modrdataset(struct dlz_example_data *state, const char *name, char *full_name, *dclass, *type, *data, *ttlstr, *buf; char absolute[1024]; isc_result_t result; -#if defined(WIN32) || defined(_REENTRANT) +#if defined(_REENTRANT) char *saveptr = NULL; -#endif /* if defined(WIN32) || defined(_REENTRANT) */ +#endif /* defined(_REENTRANT) */ buf = strdup(rdatastr); if (buf == NULL) { diff --git a/contrib/dlz/example/win32/DLLMain.c b/contrib/dlz/example/win32/DLLMain.c deleted file mode 100644 index f21ad25eec..0000000000 --- a/contrib/dlz/example/win32/DLLMain.c +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (C) 2001, 2004, 2007, 2016 Internet Systems Consortium, Inc. - * ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -#include -#include - -/* - * Called when we enter the DLL - */ -__declspec(dllexport) BOOL WINAPI - DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { - switch (fdwReason) { - /* - * The DLL is loading due to process - * initialization or a call to LoadLibrary. - */ - case DLL_PROCESS_ATTACH: - break; - - /* The attached process creates a new thread. */ - case DLL_THREAD_ATTACH: - break; - - /* The thread of the attached process terminates. */ - case DLL_THREAD_DETACH: - break; - - /* - * The DLL is unloading from a process due to - * process termination or a call to FreeLibrary. - */ - case DLL_PROCESS_DETACH: - break; - - default: - break; - } - return (TRUE); -} diff --git a/contrib/dlz/example/win32/dxdriver.def b/contrib/dlz/example/win32/dxdriver.def deleted file mode 100644 index 6d97466d79..0000000000 --- a/contrib/dlz/example/win32/dxdriver.def +++ /dev/null @@ -1,20 +0,0 @@ -LIBRARY dxdriver - -; Exported Functions -EXPORTS -dlz_addrdataset -dlz_allnodes -dlz_allowzonexfr -dlz_closeversion -dlz_configure -dlz_create -dlz_delrdataset -dlz_destroy -dlz_findzonedb -dlz_lookup -dlz_newversion -dlz_ssumatch -dlz_subrdataset -dlz_version - - diff --git a/contrib/dlz/example/win32/dxdriver.dsp b/contrib/dlz/example/win32/dxdriver.dsp deleted file mode 100644 index c096b0810c..0000000000 --- a/contrib/dlz/example/win32/dxdriver.dsp +++ /dev/null @@ -1,121 +0,0 @@ -# Microsoft Developer Studio Project File - Name="dxdriver" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=dxdriver - Win32 Release -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "dxdriver.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "dxdriver.mak" CFG="dxdriver - Win32 Release" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "dxdriver - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "dxdriver - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "dxdriver - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /YX /FD /c -# ADD CPP /nologo /MD /W3 /GX /O2 /I "../" /I "../../../../../" /I "../../../../../lib/isc/win32" /I "../../../../../lib/isc/win32/include" /I "../../../../../lib/isc/include" /I "../../../../../lib/dns/include" /D "NDEBUG" /D "WIN32" /D "__STDC__" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /YX /FD /c -# SUBTRACT CPP /X -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 -# ADD LINK32 user32.lib advapi32.lib ws2_32.lib /nologo /dll /machine:I386 /out:"../../../../../Build/Release/dxdriver.dll" - -!ELSEIF "$(CFG)" == "dxdriver - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /YX /FD /GZ /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../" /I "../../../../../" /I "../../../../../lib/isc/win32" /I "../../../../../lib/isc/win32/include" /I "../../../../../lib/isc/include" /I "../../../../../lib/dns/include" /D "_DEBUG" /D "WIN32" /D "__STDC__" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /FR /YX /FD /GZ /c -# SUBTRACT CPP /X -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 user32.lib advapi32.lib ws2_32.lib /nologo /dll /debug /machine:I386 /out:"../../../../../Build/Debug/dxdriver.dll" /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "dxdriver - Win32 Release" -# Name "dxdriver - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=..\driver.c -# End Source File -# Begin Source File - -SOURCE=.\DLLMain.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\driver.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=.\dxdriver.def -# End Source File -# End Target -# End Project diff --git a/contrib/dlz/example/win32/dxdriver.dsw b/contrib/dlz/example/win32/dxdriver.dsw deleted file mode 100644 index b0212fe72e..0000000000 --- a/contrib/dlz/example/win32/dxdriver.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "dxdriver"=.\dxdriver.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/contrib/dlz/example/win32/dxdriver.mak b/contrib/dlz/example/win32/dxdriver.mak deleted file mode 100644 index 1d8506b15e..0000000000 --- a/contrib/dlz/example/win32/dxdriver.mak +++ /dev/null @@ -1,298 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Based on dxdriver.dsp -!IF "$(CFG)" == "" -CFG=dxdriver - Win32 Release -!MESSAGE No configuration specified. Defaulting to dxdriver - Win32 Release. -!ENDIF - -!IF "$(CFG)" != "dxdriver - Win32 Release" && "$(CFG)" != "dxdriver - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "dxdriver.mak" CFG="dxdriver - Win32 Release" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "dxdriver - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "dxdriver - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF - -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "dxdriver - Win32 Release" -_VC_MANIFEST_INC=0 -_VC_MANIFEST_BASENAME=__VC80 -!ELSE -_VC_MANIFEST_INC=1 -_VC_MANIFEST_BASENAME=__VC80.Debug -!ENDIF - -#################################################### -# Specifying name of temporary resource file used only in incremental builds: - -!if "$(_VC_MANIFEST_INC)" == "1" -_VC_MANIFEST_AUTO_RES=$(_VC_MANIFEST_BASENAME).auto.res -!else -_VC_MANIFEST_AUTO_RES= -!endif - -#################################################### -# _VC_MANIFEST_EMBED_EXE - command to embed manifest in EXE: - -!if "$(_VC_MANIFEST_INC)" == "1" - -#MT_SPECIAL_RETURN=1090650113 -#MT_SPECIAL_SWITCH=-notify_resource_update -MT_SPECIAL_RETURN=0 -MT_SPECIAL_SWITCH= -_VC_MANIFEST_EMBED_EXE= \ -if exist $@.manifest mt.exe -manifest $@.manifest -out:$(_VC_MANIFEST_BASENAME).auto.manifest $(MT_SPECIAL_SWITCH) & \ -if "%ERRORLEVEL%" == "$(MT_SPECIAL_RETURN)" \ -rc /r $(_VC_MANIFEST_BASENAME).auto.rc & \ -link $** /out:$@ $(LFLAGS) - -!else - -_VC_MANIFEST_EMBED_EXE= \ -if exist $@.manifest mt.exe -manifest $@.manifest -outputresource:$@;1 - -!endif - -#################################################### -# _VC_MANIFEST_EMBED_DLL - command to embed manifest in DLL: - -!if "$(_VC_MANIFEST_INC)" == "1" - -#MT_SPECIAL_RETURN=1090650113 -#MT_SPECIAL_SWITCH=-notify_resource_update -MT_SPECIAL_RETURN=0 -MT_SPECIAL_SWITCH= -_VC_MANIFEST_EMBED_EXE= \ -if exist $@.manifest mt.exe -manifest $@.manifest -out:$(_VC_MANIFEST_BASENAME).auto.manifest $(MT_SPECIAL_SWITCH) & \ -if "%ERRORLEVEL%" == "$(MT_SPECIAL_RETURN)" \ -rc /r $(_VC_MANIFEST_BASENAME).auto.rc & \ -link $** /out:$@ $(LFLAGS) - -!else - -_VC_MANIFEST_EMBED_EXE= \ -if exist $@.manifest mt.exe -manifest $@.manifest -outputresource:$@;2 - -!endif -#################################################### -# _VC_MANIFEST_CLEAN - command to clean resources files generated temporarily: - -!if "$(_VC_MANIFEST_INC)" == "1" - -_VC_MANIFEST_CLEAN=-del $(_VC_MANIFEST_BASENAME).auto.res \ - $(_VC_MANIFEST_BASENAME).auto.rc \ - $(_VC_MANIFEST_BASENAME).auto.manifest - -!else - -_VC_MANIFEST_CLEAN= - -!endif - -!IF "$(CFG)" == "dxdriver - Win32 Release" - -OUTDIR=.\Release -INTDIR=.\Release - -ALL : "..\..\..\..\..\Build\Release\dxdriver.dll" - -CLEAN : - -@erase "$(INTDIR)\DLLMain.obj" - -@erase "$(INTDIR)\driver.obj" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(OUTDIR)\dxdriver.exp" - -@erase "$(OUTDIR)\dxdriver.lib" - -@erase "..\..\..\..\..\Build\Release\dxdriver.dll" - -@$(_VC_MANIFEST_CLEAN) - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "../" /I "../../../../../" /I "../../../../../lib/isc/win32" /I "../../../../../lib/isc/win32/include" /I "../../../../../lib/isc/include" /I "../../../../../lib/dns/include" /D "NDEBUG" /D "WIN32" /D "__STDC__" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /Fp"$(INTDIR)\dxdriver.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c -MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\dxdriver.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=user32.lib advapi32.lib ws2_32.lib /nologo /dll /incremental:no /pdb:"$(OUTDIR)\dxdriver.pdb" /machine:I386 /def:".\dxdriver.def" /out:"../../../../../Build/Release/dxdriver.dll" /implib:"$(OUTDIR)\dxdriver.lib" -DEF_FILE= \ - ".\dxdriver.def" -LINK32_OBJS= \ - "$(INTDIR)\DLLMain.obj" \ - "$(INTDIR)\driver.obj" - -"..\..\..\..\..\Build\Release\dxdriver.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - $(_VC_MANIFEST_EMBED_DLL) - -!ELSEIF "$(CFG)" == "dxdriver - Win32 Debug" - -OUTDIR=.\Debug -INTDIR=.\Debug -# Begin Custom Macros -OutDir=.\Debug -# End Custom Macros - -ALL : "..\..\..\..\..\Build\Debug\dxdriver.dll" "$(OUTDIR)\dxdriver.bsc" - -CLEAN : - -@erase "$(INTDIR)\DLLMain.obj" - -@erase "$(INTDIR)\DLLMain.sbr" - -@erase "$(INTDIR)\driver.obj" - -@erase "$(INTDIR)\driver.sbr" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(INTDIR)\vc60.pdb" - -@erase "$(OUTDIR)\dxdriver.bsc" - -@erase "$(OUTDIR)\dxdriver.exp" - -@erase "$(OUTDIR)\dxdriver.lib" - -@erase "$(OUTDIR)\dxdriver.pdb" - -@erase "..\..\..\..\..\Build\Debug\dxdriver.dll" - -@erase "..\..\..\..\..\Build\Debug\dxdriver.ilk" - -@$(_VC_MANIFEST_CLEAN) - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP_PROJ=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "../" /I "../../../../../" /I "../../../../../lib/isc/win32" /I "../../../../../lib/isc/win32/include" /I "../../../../../lib/isc/include" /I "../../../../../lib/dns/include" /D "_DEBUG" /D "WIN32" /D "__STDC__" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /FR"$(INTDIR)\\" /Fp"$(INTDIR)\dxdriver.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c -MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\dxdriver.bsc" -BSC32_SBRS= \ - "$(INTDIR)\DLLMain.sbr" \ - "$(INTDIR)\driver.sbr" - -"$(OUTDIR)\dxdriver.bsc" : "$(OUTDIR)" $(BSC32_SBRS) - $(BSC32) @<< - $(BSC32_FLAGS) $(BSC32_SBRS) -<< - -LINK32=link.exe -LINK32_FLAGS=user32.lib advapi32.lib ws2_32.lib /nologo /dll /incremental:yes /pdb:"$(OUTDIR)\dxdriver.pdb" /debug /machine:I386 /def:".\dxdriver.def" /out:"../../../../../Build/Debug/dxdriver.dll" /implib:"$(OUTDIR)\dxdriver.lib" /pdbtype:sept -DEF_FILE= \ - ".\dxdriver.def" -LINK32_OBJS= \ - "$(INTDIR)\DLLMain.obj" \ - "$(INTDIR)\driver.obj" - -"..\..\..\..\..\Build\Debug\dxdriver.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - $(_VC_MANIFEST_EMBED_DLL) - -!ENDIF - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - - -!IF "$(NO_EXTERNAL_DEPS)" != "1" -!IF EXISTS("dxdriver.dep") -!INCLUDE "dxdriver.dep" -!ELSE -!MESSAGE Warning: cannot find "dxdriver.dep" -!ENDIF -!ENDIF - - -!IF "$(CFG)" == "dxdriver - Win32 Release" || "$(CFG)" == "dxdriver - Win32 Debug" -SOURCE=.\DLLMain.c - -!IF "$(CFG)" == "dxdriver - Win32 Release" - - -"$(INTDIR)\DLLMain.obj" : $(SOURCE) "$(INTDIR)" - - -!ELSEIF "$(CFG)" == "dxdriver - Win32 Debug" - - -"$(INTDIR)\DLLMain.obj" "$(INTDIR)\DLLMain.sbr" : $(SOURCE) "$(INTDIR)" - - -!ENDIF - -SOURCE=..\driver.c - -!IF "$(CFG)" == "dxdriver - Win32 Release" - - -"$(INTDIR)\driver.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "dxdriver - Win32 Debug" - - -"$(INTDIR)\driver.obj" "$(INTDIR)\driver.sbr" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ENDIF - - -!ENDIF - -#################################################### -# Commands to generate initial empty manifest file and the RC file -# that references it, and for generating the .res file: - -$(_VC_MANIFEST_BASENAME).auto.res : $(_VC_MANIFEST_BASENAME).auto.rc - -$(_VC_MANIFEST_BASENAME).auto.rc : $(_VC_MANIFEST_BASENAME).auto.manifest - type <<$@ -#include -1RT_MANIFEST"$(_VC_MANIFEST_BASENAME).auto.manifest" -<< KEEP - -$(_VC_MANIFEST_BASENAME).auto.manifest : - type <<$@ - - - -<< KEEP diff --git a/contrib/dlz/modules/include/dlz_minimal.h b/contrib/dlz/modules/include/dlz_minimal.h index ff87532a84..f715b9feab 100644 --- a/contrib/dlz/modules/include/dlz_minimal.h +++ b/contrib/dlz/modules/include/dlz_minimal.h @@ -29,14 +29,12 @@ #include #include -#include -#include -#ifndef _WIN32 -#include -#endif /* ifndef _WIN32 */ #include #include #include +#include +#include +#include typedef unsigned int isc_result_t; typedef uint32_t dns_ttl_t; @@ -104,9 +102,7 @@ typedef struct isc_sockaddr { struct sockaddr sa; struct sockaddr_in sin; struct sockaddr_in6 sin6; -#ifndef _WIN32 - struct sockaddr_un sunix; -#endif /* ifndef _WIN32 */ + struct sockaddr_un sunix; } type; unsigned int length; void * link; diff --git a/doc/arm/notes.rst b/doc/arm/notes.rst index 0a526d7cad..c83e2b1561 100644 --- a/doc/arm/notes.rst +++ b/doc/arm/notes.rst @@ -49,8 +49,7 @@ Download The latest versions of BIND 9 software can always be found at https://www.isc.org/download/. There you will find additional -information about each release, source code, and pre-compiled versions -for Microsoft Windows operating systems. +information about each release, and source code. .. include:: ../notes/notes-current.rst .. include:: ../notes/notes-9.17.13.rst diff --git a/doc/arm/reference.rst b/doc/arm/reference.rst index e8c348846c..6b8cf4422a 100644 --- a/doc/arm/reference.rst +++ b/doc/arm/reference.rst @@ -580,8 +580,6 @@ handles messages sent to this facility is described in the version of ``syslog``, which only uses two arguments to the ``openlog()`` function, this clause is silently ignored. -On Windows machines, syslog messages are directed to the EventViewer. - The ``severity`` clause works like ``syslog``'s "priorities," except that they can also be used when writing straight to a file rather than using ``syslog``. Messages which are not at least of the severity @@ -1074,8 +1072,7 @@ default is used. specifies the directory containing GeoIP database files. By default, the option is set based on the prefix used to build the ``libmaxminddb`` module; for example, if the library is installed in ``/usr/local/lib``, then the - default ``geoip-directory`` is ``/usr/local/share/GeoIP``. On Windows, - the default is the ``named`` working directory. See :ref:`acl` + default ``geoip-directory`` is ``/usr/local/share/GeoIP``. See :ref:`acl` for details about ``geoip`` ACLs. ``key-directory`` @@ -3016,8 +3013,6 @@ system. ``128`` fewer than maxsockets (-S). This option may be removed in the future. - This option has little effect on Windows. - ``max-cache-size`` This sets the maximum amount of memory to use for the server's cache, in bytes or percentage of total physical memory. When the amount of data in the cache diff --git a/doc/design/windows-nt b/doc/design/windows-nt deleted file mode 100644 index c5a62e9608..0000000000 --- a/doc/design/windows-nt +++ /dev/null @@ -1,138 +0,0 @@ -Copyright (C) Internet Systems Consortium, Inc. ("ISC") - -See COPYRIGHT in the source root or https://isc.org/copyright.html for terms. - - Windows NT Portability Notes - -OVERVIEW - -A primary goal in the overall design of BIND9 was to isolate functions -that were specific to operating systems from those that are available -with ANSI C. Even though development was being done on Unix-like -machines, the main intention was that a Windows NT port could be done -with far less hassle if the incompatible bits were encapsulated into -their own dedicated modules. A libisc API was designed for each -operating system feature that was needed, and initial implementations -of those APIs were done for the various Unix operating systems. Some -of the APIs have been implemented in Win32, but not yet all. - -The target Windows NT build environment was specified as having nmake -and the Microsoft Visual C++ 6.0 compiler, but explicitly _not_ having -Cygwin or any other external portability package, because we wanted to -keep the prerequisites as minimal as possible. - -In the source tree, the Unix implementations for the OS APIs are in a -"unix" subdirectory of lib/isc, while the thread APIs based on POSIX -threads are in lib/isc/pthreads. The Windows versions of the APIs are -in lib/isc/win32. - -COMPILING - -XXX expand this section - -To build a kit for Windows NT, run util/nt-kit while in the top level -directory of the BIND9 sources. Its usage is: - util/nt-kit [-zip|-nozip] [remotedest [localdest]] -where "remotedest" is the path under which the sources will be -compiled on the NT machine, and "localdest" is where the munged -source tree will be placed on the local machine in preparation for -mounting/zipping/whatever to get it to the remote machine. - -The default remotedest is g:/proj/bind9-nt, because that suits my -environment and I'm the one working on this. Use forward slashes when -specifying the remote path. - -The default localdest is ../bind9-nt. - -A zip archive named "bind9-nt.zip" can be created in the parent -directory of "localdest" if the -zip flag is specified; otherwise, -none is made by default. - -...XXX describe what nt-kit does - -...XXX config.status.win32, config.h.win32 - -MODULES - -App - -This module defines several functions that are useful for writing an -application that uses the ISC library. Bob Halley originally said, -"The main reason I wrote it was to help with the sometimes difficult -problems that occur when you try to do a controlled shutdown of a -multithreaded application. This scheme [using isc_app_start/ -isc_app_run/isc_app_finish] will allow an application to use the -as-yet-unwritten single-threaded version of the ISC library without -any source code changes." XXX It has not yet been implemented for -Win32. - -Condition - -This module provides compatibility with the pthread_cond_* functions -of POSIX, which can be used to synchronize threads based on a -condition variable. - -Dir - -This module implements the directory scanning routines isc_dir_open, -isc_dir_read and isc_dir_close, used to iterate over the filenames in -a directory. XXX It also implements isc_dir_chdir to set the current -directory, but this function has not yet been written for Win32. - -File - -The File module is for functions that access and/or modify operating -system information about files. XXX It has not yet been written for Win32. - -Filelock - -This module implements the pthreads functions flockfile, funlockfile -and getc_unlocked, which synchronize stdio calls from multiple -threads. XXX It has not yet been written for Win32. Or for Unix -for that matter. Merge into File? - -Interfaceiter - -This module implements the isc_interfaceiter_first, _next, _current -and _destroy functions to list all of the network interfaces on a -machine. XXX It has not yet been written for Win32. - -Ipv6 - -XXX It has not yet been written for Win32. - -Net - -XXX It has not yet been written for Win32. - -Once - -This module ensures that a particular function, such as an -initialization routine, is only executed once, ensuring that any other -threads that need to have the target function executed before they can -work are blocked until the target function has completely finished. - -Socket - -XXX It has not yet been written for Win32. - -Stdtime - -This module defines isc_stdtime_get, which stores the number of -seconds since 1 Jan 1970 00:00:00 UTC in an isc_stdtime_t variable. - -Thread - -This module provides the isc_thread_create and isc_thread_join -functions, which behave like the POSIX Thread routines pthread_create -and pthread_join. XXX It also defines isc_thread_self to return the id of -the calling thread. - -Time - -This module defines several time management routines, such getting the -current time, adding or subtracting an interval, finding the -difference between two times, or simply determining whether one time -is earlier than another. - - diff --git a/doc/dev/style.md b/doc/dev/style.md index 50b767da27..b20cde8565 100644 --- a/doc/dev/style.md +++ b/doc/dev/style.md @@ -782,9 +782,6 @@ have them: for example, `isc_string_strlcpy()` is an implementation of the BSD-specific `strlcpy()` function. On Linux and systems without a `strlcpy()` function, it is `#define`d to `isc_string_strlcpy()` -In some cases, UNIX and Windows implementations of functions are kept -in separate files, such as `lib/isc/unix/file.c` and `lib/isc/win32/file.c`. - #### Some notes on standard functions * Always use `memmove()` rather than `memcpy()`. diff --git a/doc/doxygen/Doxyfile.in b/doc/doxygen/Doxyfile.in index d43508595d..2adda13112 100644 --- a/doc/doxygen/Doxyfile.in +++ b/doc/doxygen/Doxyfile.in @@ -506,7 +506,7 @@ EXCLUDE_SYMLINKS = NO # against the file with absolute path, so to exclude all test directories # for example use the pattern */test/* -EXCLUDE_PATTERNS = */win32/* */lib/dns/gen* */lib/dns/rdata/*.h +EXCLUDE_PATTERNS = */lib/dns/gen* */lib/dns/rdata/*.h # The EXAMPLE_PATH tag can be used to specify one or more files or # directories that contain example code fragments that are included (see diff --git a/doc/man/named.8in b/doc/man/named.8in index c5d81eac5c..3644de685c 100644 --- a/doc/man/named.8in +++ b/doc/man/named.8in @@ -179,8 +179,7 @@ number of detected CPUs minus one for machines with more than 1 CPU. This cannot be increased to a value higher than the number of CPUs. If \fB\-n\fP has been set to a higher value than the number of detected CPUs, then \fB\-U\fP may be increased as high as that value, but no -higher. On Windows, the number of UDP listeners is hardwired to 1 and -this option has no effect. +higher. .TP .B \fB\-u user\fP This option sets the setuid to \fBuser\fP after completing privileged operations, such as diff --git a/lib/bind9/win32/DLLMain.c b/lib/bind9/win32/DLLMain.c deleted file mode 100644 index 150de214e4..0000000000 --- a/lib/bind9/win32/DLLMain.c +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#include -#include - -/* - * Called when we enter the DLL - */ -__declspec(dllexport) BOOL WINAPI - DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { - switch (fdwReason) { - /* - * The DLL is loading due to process - * initialization or a call to LoadLibrary. - */ - case DLL_PROCESS_ATTACH: - break; - - /* The attached process creates a new thread. */ - case DLL_THREAD_ATTACH: - break; - - /* The thread of the attached process terminates. */ - case DLL_THREAD_DETACH: - break; - - /* - * The DLL is unloading from a process due to - * process termination or a call to FreeLibrary. - */ - case DLL_PROCESS_DETACH: - break; - - default: - break; - } - return (TRUE); -} diff --git a/lib/bind9/win32/libbind9.def b/lib/bind9/win32/libbind9.def deleted file mode 100644 index b9a14ad3e8..0000000000 --- a/lib/bind9/win32/libbind9.def +++ /dev/null @@ -1,8 +0,0 @@ -LIBRARY libbind9 - -; Exported Functions -EXPORTS -bind9_check_namedconf -bind9_check_key -bind9_getaddresses - diff --git a/lib/bind9/win32/libbind9.vcxproj.filters.in b/lib/bind9/win32/libbind9.vcxproj.filters.in deleted file mode 100644 index 3ea1f2067d..0000000000 --- a/lib/bind9/win32/libbind9.vcxproj.filters.in +++ /dev/null @@ -1,39 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - diff --git a/lib/bind9/win32/libbind9.vcxproj.in b/lib/bind9/win32/libbind9.vcxproj.in deleted file mode 100644 index fe9d00b9bd..0000000000 --- a/lib/bind9/win32/libbind9.vcxproj.in +++ /dev/null @@ -1,146 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {E741C10B-B075-4206-9596-46765B665E03} - Win32Proj - libbind9 - @WINDOWS_TARGET_PLATFORM_VERSION@ - - - - DynamicLibrary - true - MultiByte - @PLATFORM_TOOLSET@ - - - DynamicLibrary - false - true - MultiByte - @PLATFORM_TOOLSET@ - - - - - - - - - - - - - true - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - - - false - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - - - - - - Level4 - false - Disabled - WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBBIND9_EXPORTS;%(PreprocessorDefinitions);%(PreprocessorDefinitions) - ..\..\..\config.h - .\;..\..\..\;include;..\include;..\..\isc\win32;..\..\isc\win32\include;..\..\isc\include;..\..\isccfg\include;..\..\dns\include;..\..\ns\include;@LIBXML2_INC@@OPENSSL_INC@@GEOIP_INC@%(AdditionalIncludeDirectories) - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - true - CompileAsC - - - Console - true - ..\..\isc\win32\$(Configuration);..\..\dns\win32\$(Configuration);..\..\isccfg\win32\$(Configuration);..\..\ns\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@libisc.lib;libdns.lib;libisccfg.lib;libns.lib;ws2_32.lib;%(AdditionalDependencies) - .\libbind9.def - .\$(Configuration)\$(ProjectName).lib - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - - - - - Level1 - true - - - MaxSpeed - true - @INTRINSIC@ - WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBBIND9_EXPORTS;%(PreprocessorDefinitions);%(PreprocessorDefinitions) - ..\..\..\config.h - .\;..\..\..\;include;..\include;..\..\isc\win32;..\..\isc\win32\include;..\..\isc\include;..\..\isccfg\include;..\..\dns\include;..\..\ns\include;@LIBXML2_INC@@OPENSSL_INC@@GEOIP_INC@%(AdditionalIncludeDirectories) - OnlyExplicitInline - false - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - CompileAsC - - - Console - false - true - true - ..\..\isc\win32\$(Configuration);..\..\dns\win32\$(Configuration);..\..\isccfg\win32\$(Configuration);..\..\ns\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@libisc.lib;libdns.lib;libisccfg.lib;libns.lib;ws2_32.lib;%(AdditionalDependencies) - .\libbind9.def - .\$(Configuration)\$(ProjectName).lib - Default - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - - - - - - - - - - - - - - - - - {3840E563-D180-4761-AA9C-E6155F02EAFF} - - - {5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A} - - - {82ACD33C-E75F-45B8-BB6D-42643A10D7EE} - - - {B2DFA58C-6347-478E-81E8-01E06999D4F1} - - - - - - diff --git a/lib/bind9/win32/libbind9.vcxproj.user b/lib/bind9/win32/libbind9.vcxproj.user deleted file mode 100644 index ace9a86acb..0000000000 --- a/lib/bind9/win32/libbind9.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/lib/dns/Makefile.am b/lib/dns/Makefile.am index b33df85cd9..7bf84d2f2a 100644 --- a/lib/dns/Makefile.am +++ b/lib/dns/Makefile.am @@ -19,14 +19,13 @@ CLEANFILES = \ $(nodist_libdns_la_SOURCES) \ gen$(BUILD_EXEEXT) -gen$(BUILD_EXEEXT): gen.c gen-unix.h +gen$(BUILD_EXEEXT): gen.c gen.h $(CC_FOR_BUILD) -g -I. $(GEN_NEED_OPTARG) $(srcdir)/gen.c -o $@ EXTRA_DIST = \ dnstap.proto \ gen.c \ - gen-unix.h \ - gen-win32.h \ + gen.h \ rdata/* include/dns/enumtype.h: gen Makefile diff --git a/lib/dns/dst_api.c b/lib/dns/dst_api.c index 8083df6af5..6a2e018517 100644 --- a/lib/dns/dst_api.c +++ b/lib/dns/dst_api.c @@ -580,15 +580,9 @@ dst_key_fromnamedfile(const char *filename, const char *dirname, int type, REQUIRE(keyp != NULL && *keyp == NULL); /* If an absolute path is specified, don't use the key directory */ -#ifndef WIN32 if (filename[0] == '/') { dirname = NULL; } -#else /* WIN32 */ - if (filename[0] == '/' || filename[0] == '\\') { - dirname = NULL; - } -#endif /* ifndef WIN32 */ newfilenamelen = strlen(filename) + 5; if (dirname != NULL) { diff --git a/lib/dns/dst_parse.c b/lib/dns/dst_parse.c index 7d941005b4..751180f462 100644 --- a/lib/dns/dst_parse.c +++ b/lib/dns/dst_parse.c @@ -648,13 +648,7 @@ dst__privstruct_writefile(const dst_key_t *key, const dst_private_t *priv, /* File exists; warn that we are changing its permissions */ int level; -#ifdef _WIN32 - /* Windows security model is pretty different, - * e.g., there is no umask... */ - level = ISC_LOG_NOTICE; -#else /* ifdef _WIN32 */ level = ISC_LOG_WARNING; -#endif /* ifdef _WIN32 */ isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL, DNS_LOGMODULE_DNSSEC, level, "Permissions on the file %s " diff --git a/lib/dns/gen-win32.h b/lib/dns/gen-win32.h deleted file mode 100644 index f50510e4ce..0000000000 --- a/lib/dns/gen-win32.h +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/* - * Copyright (c) 1987, 1993, 1994 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -/* - * \note This file was adapted from the NetBSD project's source tree, RCS ID: - * NetBSD: getopt.c,v 1.15 1999/09/20 04:39:37 lukem Exp - * - * The primary change has been to rename items to the ISC namespace - * and format in the ISC coding style. - * - * This file is responsible for defining two operations that are not - * directly portable between Unix-like systems and Windows NT, option - * parsing and directory scanning. It is here because it was decided - * that the "gen" build utility was not to depend on libisc.a, so - * the functions declared in isc/commandline.h and isc/dir.h could not - * be used. - * - * The commandline stuff is pretty much a straight copy from the initial - * isc/commandline.c. The dir stuff was shrunk to fit the needs of gen.c. - */ - -#ifndef DNS_GEN_WIN32_H -#define DNS_GEN_WIN32_H 1 - -#include -#include -#include -#include -#include - -#ifdef __cplusplus -#define ISC_LANG_BEGINDECLS extern "C" { -#define ISC_LANG_ENDDECLS } -#else /* ifdef __cplusplus */ -#define ISC_LANG_BEGINDECLS -#define ISC_LANG_ENDDECLS -#endif /* ifdef __cplusplus */ - -int isc_commandline_index = 1; /* Index into parent argv vector. */ -int isc_commandline_option; /* Character checked for validity. */ - -char *isc_commandline_argument; /* Argument associated with option. */ -char *isc_commandline_progname; /* For printing error messages. */ - -bool isc_commandline_errprint = true; /* Print error messages. */ -bool isc_commandline_reset = true; /* Reset processing. */ - -#define BADOPT '?' -#define BADARG ':' -#define ENDOPT "" - -ISC_LANG_BEGINDECLS - -/* - * getopt -- - * Parse argc/argv argument vector. - */ -int -isc_commandline_parse(int argc, char *const *argv, const char *options) { - static char *place = ENDOPT; - char *option; /* Index into *options of option. */ - - /* - * Update scanning pointer, either because a reset was requested or - * the previous argv was finished. - */ - if (isc_commandline_reset || *place == '\0') { - isc_commandline_reset = false; - - if (isc_commandline_progname == NULL) { - isc_commandline_progname = argv[0]; - } - - if (isc_commandline_index >= argc || - *(place = argv[isc_commandline_index]) != '-') - { - /* - * Index out of range or points to non-option. - */ - place = ENDOPT; - return (-1); - } - - if (place[1] != '\0' && *++place == '-' && place[1] == '\0') { - /* - * Found '--' to signal end of options. Advance - * index to next argv, the first non-option. - */ - isc_commandline_index++; - place = ENDOPT; - return (-1); - } - } - - isc_commandline_option = *place++; - option = strchr(options, isc_commandline_option); - - /* - * Ensure valid option has been passed as specified by options string. - * '-:' is never a valid command line option because it could not - * distinguish ':' from the argument specifier in the options string. - */ - if (isc_commandline_option == ':' || option == NULL) { - if (*place == '\0') { - isc_commandline_index++; - } - - if (isc_commandline_errprint && *options != ':') { - fprintf(stderr, "%s: illegal option -- %c\n", - isc_commandline_progname, - isc_commandline_option); - } - - return (BADOPT); - } - - if (*++option != ':') { - /* - * Option does not take an argument. - */ - isc_commandline_argument = NULL; - - /* - * Skip to next argv if at the end of the current argv. - */ - if (*place == '\0') { - ++isc_commandline_index; - } - } else { - /* - * Option needs an argument. - */ - if (*place != '\0') { - /* - * Option is in this argv, -D1 style. - */ - isc_commandline_argument = place; - } else if (argc > ++isc_commandline_index) { - /* - * Option is next argv, -D 1 style. - */ - isc_commandline_argument = argv[isc_commandline_index]; - } else { - /* - * Argument needed, but no more argv. - */ - place = ENDOPT; - - /* - * Silent failure with "missing argument" return - * when ':' starts options string, per historical spec. - */ - if (*options == ':') { - return (BADARG); - } - - if (isc_commandline_errprint) { - fprintf(stderr, - "%s: option requires an argument -- " - "%c\n", - isc_commandline_progname, - isc_commandline_option); - } - - return (BADOPT); - } - - place = ENDOPT; - - /* - * Point to argv that follows argument. - */ - isc_commandline_index++; - } - - return (isc_commandline_option); -} - -typedef struct { - HANDLE handle; - WIN32_FIND_DATA find_data; - bool first_file; - char *filename; -} isc_dir_t; - -bool -start_directory(const char *path, isc_dir_t *dir) { - char pattern[_MAX_PATH], *p; - - /* - * Need space for slash-splat and final NUL. - */ - if (strlen(path) + 3 > sizeof(pattern)) { - return (false); - } - - strcpy(pattern, path); - - /* - * Append slash (if needed) and splat. - */ - p = pattern + strlen(pattern); - if (p != pattern && p[-1] != '\\' && p[-1] != ':') { - *p++ = '\\'; - } - *p++ = '*'; - *p++ = '\0'; - - dir->first_file = true; - - dir->handle = FindFirstFile(pattern, &dir->find_data); - - if (dir->handle == INVALID_HANDLE_VALUE) { - dir->filename = NULL; - return (false); - } else { - dir->filename = dir->find_data.cFileName; - return (true); - } -} - -bool -next_file(isc_dir_t *dir) { - if (dir->first_file) { - dir->first_file = false; - } else if (dir->handle != INVALID_HANDLE_VALUE) { - if (FindNextFile(dir->handle, &dir->find_data) == TRUE) { - dir->filename = dir->find_data.cFileName; - } else { - dir->filename = NULL; - } - } else { - dir->filename = NULL; - } - - if (dir->filename != NULL) { - return (true); - } else { - return (false); - } -} - -void -end_directory(isc_dir_t *dir) { - if (dir->handle != INVALID_HANDLE_VALUE) { - FindClose(dir->handle); - } -} - -inline struct tm * -gmtime_r(const time_t *clock, struct tm *result) { - errno_t ret = gmtime_s(result, clock); - if (ret != 0) { - errno = ret; - return (NULL); - } - return (result); -} - -ISC_LANG_ENDDECLS - -#endif /* DNS_GEN_WIN32_H */ diff --git a/lib/dns/gen.c b/lib/dns/gen.c index 3a84a7a7f3..2939c175e7 100644 --- a/lib/dns/gen.c +++ b/lib/dns/gen.c @@ -11,19 +11,6 @@ /*! \file */ -#ifdef WIN32 -/* - * Silence compiler warnings about using strcpy and friends. - */ -#define _CRT_SECURE_NO_DEPRECATE 1 -/* - * We use snprintf which was defined late in Windows even it is in C99. - */ -#if _MSC_VER < 1900 -#define snprintf _snprintf -#endif /* if _MSC_VER < 1900 */ -#endif /* ifdef WIN32 */ - #include #include #include @@ -38,11 +25,7 @@ #define PATH_MAX 1024 #endif /* ifndef PATH_MAX */ -#ifdef WIN32 -#include "gen-win32.h" -#else /* ifdef WIN32 */ -#include "gen-unix.h" -#endif /* ifdef WIN32 */ +#include "gen.h" #ifndef ULLONG_MAX #define ULLONG_MAX (~0ULL) diff --git a/lib/dns/gen-unix.h b/lib/dns/gen.h similarity index 100% rename from lib/dns/gen-unix.h rename to lib/dns/gen.h diff --git a/lib/dns/geoip2.c b/lib/dns/geoip2.c index 0a2d2dc718..012c60e4cc 100644 --- a/lib/dns/geoip2.c +++ b/lib/dns/geoip2.c @@ -20,6 +20,7 @@ */ #include #include +#include #include #include @@ -30,14 +31,6 @@ #include #include -#ifndef WIN32 -#include -#else /* ifndef WIN32 */ -#ifndef _WINSOCKAPI_ -#define _WINSOCKAPI_ /* Prevent inclusion of winsock.h in windows.h */ -#endif /* ifndef _WINSOCKAPI_ */ -#include -#endif /* WIN32 */ #include /* diff --git a/lib/dns/gssapictx.c b/lib/dns/gssapictx.c index 6132d863e6..1443ffef68 100644 --- a/lib/dns/gssapictx.c +++ b/lib/dns/gssapictx.c @@ -678,7 +678,7 @@ dst_gssapi_acceptctx(dns_gss_cred_id_t cred, const char *gssapi_keytab, } if (gssapi_keytab != NULL) { -#if HAVE_GSSAPI_GSSAPI_KRB5_H || HAVE_GSSAPI_KRB5_H || defined(WIN32) +#if HAVE_GSSAPI_GSSAPI_KRB5_H || HAVE_GSSAPI_KRB5_H gret = gsskrb5_register_acceptor_identity(gssapi_keytab); if (gret != GSS_S_COMPLETE) { gss_log(3, diff --git a/lib/dns/hmac_link.c b/lib/dns/hmac_link.c index efdcb4ae8b..ee4c67bd73 100644 --- a/lib/dns/hmac_link.c +++ b/lib/dns/hmac_link.c @@ -23,10 +23,8 @@ * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include -#ifndef WIN32 #include -#endif /* WIN32 */ +#include #include #include diff --git a/lib/dns/journal.c b/lib/dns/journal.c index 10c032b6ba..36ebbd1718 100644 --- a/lib/dns/journal.c +++ b/lib/dns/journal.c @@ -2734,8 +2734,7 @@ dns_journal_compact(isc_mem_t *mctx, char *filename, uint32_t serial, } /* - * Close both journals before trying to rename files (this is - * necessary on WIN32). + * Close both journals before trying to rename files. */ dns_journal_destroy(&j1); dns_journal_destroy(&j2); diff --git a/lib/dns/opensslrsa_link.c b/lib/dns/opensslrsa_link.c index 08be43d3fe..e088d5e57e 100644 --- a/lib/dns/opensslrsa_link.c +++ b/lib/dns/opensslrsa_link.c @@ -42,14 +42,6 @@ #define RSA_MAX_PUBEXP_BITS 35 #endif /* ifndef RSA_MAX_PUBEXP_BITS */ -/* - * We don't use configure for windows so enforce the OpenSSL version - * here. Unlike with configure we don't support overriding this test. - */ -#if defined(WIN32) && (OPENSSL_VERSION_NUMBER < 0x10000000L) -#error Please upgrade OpenSSL to 1.0.0 or greater. -#endif /* if defined(WIN32) && (OPENSSL_VERSION_NUMBER < 0x10000000L) */ - #define DST_RET(a) \ { \ ret = a; \ diff --git a/lib/dns/rbtdb.c b/lib/dns/rbtdb.c index 4d37a36ba3..7e8552ed06 100644 --- a/lib/dns/rbtdb.c +++ b/lib/dns/rbtdb.c @@ -15,6 +15,7 @@ #include #include +#include #include #include @@ -62,15 +63,6 @@ #include #include -#ifndef WIN32 -#include -#else /* ifndef WIN32 */ -#define PROT_READ 0x01 -#define PROT_WRITE 0x02 -#define MAP_PRIVATE 0x0002 -#define MAP_FAILED ((void *)-1) -#endif /* ifndef WIN32 */ - #include "rbtdb.h" #define RBTDB_MAGIC ISC_MAGIC('R', 'B', 'D', '4') @@ -284,8 +276,6 @@ typedef ISC_LIST(dns_rbtnode_t) rbtnodelist_t; * expired. */ -#undef IGNORE /* WIN32 winbase.h defines this. */ - #define EXISTS(header) \ ((atomic_load_acquire(&(header)->attributes) & \ RDATASET_ATTR_NONEXISTENT) == 0) diff --git a/lib/dns/rdata/in_1/wks_11.c b/lib/dns/rdata/in_1/wks_11.c index 17ce00bfd0..caa3892b64 100644 --- a/lib/dns/rdata/in_1/wks_11.c +++ b/lib/dns/rdata/in_1/wks_11.c @@ -66,12 +66,6 @@ mygetservbyname(const char *name, const char *proto, long *port) { return (se != NULL); } -#ifdef _WIN32 -#include -#include -#include -#endif /* ifdef _WIN32 */ - static inline isc_result_t fromtext_in_wks(ARGS_FROMTEXT) { static isc_once_t once = ISC_ONCE_INIT; @@ -100,21 +94,6 @@ fromtext_in_wks(ARGS_FROMTEXT) { RUNTIME_CHECK(isc_once_do(&once, init_lock) == ISC_R_SUCCESS); -#ifdef _WIN32 - { - WORD wVersionRequested; - WSADATA wsaData; - int err; - - wVersionRequested = MAKEWORD(2, 0); - - err = WSAStartup(wVersionRequested, &wsaData); - if (err != 0) { - return (ISC_R_FAILURE); - } - } -#endif /* ifdef _WIN32 */ - /* * IPv4 dotted quad. */ @@ -197,10 +176,6 @@ fromtext_in_wks(ARGS_FROMTEXT) { result = mem_tobuffer(target, bm, n); cleanup: -#ifdef _WIN32 - WSACleanup(); -#endif /* ifdef _WIN32 */ - return (result); } diff --git a/lib/dns/ssu_external.c b/lib/dns/ssu_external.c index 111347f7d7..700a4e25bf 100644 --- a/lib/dns/ssu_external.c +++ b/lib/dns/ssu_external.c @@ -18,12 +18,9 @@ #include #include #include -#include - -#ifndef _WIN32 #include #include -#endif /* ifndef _WIN32 */ +#include #include #include @@ -58,7 +55,6 @@ ssu_e_log(int level, const char *fmt, ...) { static int ux_socket_connect(const char *path) { int fd = -1; -#ifndef _WIN32 struct sockaddr_un addr; REQUIRE(path != NULL); @@ -94,7 +90,6 @@ ux_socket_connect(const char *path) { close(fd); return (-1); } -#endif /* ifndef _WIN32 */ return (fd); } diff --git a/lib/dns/win32/DLLMain.c b/lib/dns/win32/DLLMain.c deleted file mode 100644 index 150de214e4..0000000000 --- a/lib/dns/win32/DLLMain.c +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#include -#include - -/* - * Called when we enter the DLL - */ -__declspec(dllexport) BOOL WINAPI - DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { - switch (fdwReason) { - /* - * The DLL is loading due to process - * initialization or a call to LoadLibrary. - */ - case DLL_PROCESS_ATTACH: - break; - - /* The attached process creates a new thread. */ - case DLL_THREAD_ATTACH: - break; - - /* The thread of the attached process terminates. */ - case DLL_THREAD_DETACH: - break; - - /* - * The DLL is unloading from a process due to - * process termination or a call to FreeLibrary. - */ - case DLL_PROCESS_DETACH: - break; - - default: - break; - } - return (TRUE); -} diff --git a/lib/dns/win32/gen.vcxproj.filters.in b/lib/dns/win32/gen.vcxproj.filters.in deleted file mode 100644 index f6b3bb0bab..0000000000 --- a/lib/dns/win32/gen.vcxproj.filters.in +++ /dev/null @@ -1,27 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - - - Header Files - - - \ No newline at end of file diff --git a/lib/dns/win32/gen.vcxproj.in b/lib/dns/win32/gen.vcxproj.in deleted file mode 100644 index ea3adc30c0..0000000000 --- a/lib/dns/win32/gen.vcxproj.in +++ /dev/null @@ -1,134 +0,0 @@ - - - - - Debug - @BUILD_PLATFORM@ - - - Release - @BUILD_PLATFORM@ - - - - {A3F71D12-F38A-4C77-8D87-8E8854CA74A1} - Win32Proj - gen - @WINDOWS_TARGET_PLATFORM_VERSION@ - - - - Application - true - MultiByte - @PLATFORM_TOOLSET@ - - - Application - false - true - MultiByte - @PLATFORM_TOOLSET@ - - - - - - - - - - - - - true - ..\ - .\$(Configuration)\ - None - - - false - ..\ - .\$(Configuration)\ - None - - - - - - Level4 - false - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - .\;..\..\..\;..\..\isc\win32;..\..\isc\win32\include;..\..\isc\include;%(AdditionalIncludeDirectories) - true - .\$(Configuration)\$(TargetName).pch - $(OutDir)$(TargetName).pdb - true - MultiThreadedDebugDLL - .\$(Configuration)\ - .\$(Configuration)\ - CompileAsC - - - Console - true - ..\$(TargetName)$(TargetExt) - - - cd .. -gen -s . -t > include\dns\enumtype.h -gen -s . -c > include\dns\enumclass.h -gen -s . -i -P ./rdata/rdatastructpre.h -S ./rdata/rdatastructsuf.h > include\dns\rdatastruct.h -gen -s . > code.h - - - - - - Level1 - true - - - MaxSpeed - true - @INTRINSIC@ - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - .\;..\..\..\;..\..\isc\win32;..\..\isc\win32\include;..\..\isc\include;%(AdditionalIncludeDirectories) - OnlyExplicitInline - true - .\$(Configuration)\$(TargetName).pch - $(OutDir)$(TargetName).pdb - MultiThreadedDLL - false - .\$(Configuration)\ - .\$(Configuration)\ - CompileAsC - - - Console - false - true - true - ..\$(TargetName)$(TargetExt) - Default - - - cd .. -gen -s . -t > include\dns\enumtype.h -gen -s . -c > include\dns\enumclass.h -gen -s . -i -P ./rdata/rdatastructpre.h -S ./rdata/rdatastructsuf.h > include\dns\rdatastruct.h -gen -s . > code.h - - - - - - - - - - - - - diff --git a/lib/dns/win32/gen.vcxproj.user b/lib/dns/win32/gen.vcxproj.user deleted file mode 100644 index ace9a86acb..0000000000 --- a/lib/dns/win32/gen.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/lib/dns/win32/libdns.def.in b/lib/dns/win32/libdns.def.in deleted file mode 100644 index 97208946ef..0000000000 --- a/lib/dns/win32/libdns.def.in +++ /dev/null @@ -1,1528 +0,0 @@ -LIBRARY libdns - -; Exported Functions -EXPORTS - -; test only -dns__rbt_checkproperties -dns__rbt_getheight -dns__rbtnode_getdistance -dns__rbtnode_namelen -dns__zone_findkeys -dns__zone_loadpending -dns__zone_updatesigs - -dns_acl_allowed -dns_acl_any -dns_acl_attach -dns_acl_create -dns_acl_detach -dns_acl_isany -dns_acl_isinsecure -dns_acl_isnone -dns_acl_match -dns_acl_merge -dns_acl_none -dns_aclelement_match -dns_aclenv_attach -dns_aclenv_copy -dns_aclenv_create -dns_aclenv_detach -dns_adb_adjustsrtt -dns_adb_agesrtt -dns_adb_attach -dns_adb_beginudpfetch -dns_adb_cancelfind -dns_adb_changeflags -dns_adb_create -dns_adb_createfind -dns_adb_destroyfind -dns_adb_detach -dns_adb_dump -dns_adb_dumpfind -dns_adb_ednsto -dns_adb_endudpfetch -dns_adb_findaddrinfo -dns_adb_flush -dns_adb_flushname -dns_adb_flushnames -dns_adb_freeaddrinfo -dns_adb_getcookie -dns_adb_getudpsize -dns_adb_marklame -dns_adb_plainresponse -dns_adb_setadbsize -dns_adb_setcookie -dns_adb_setquota -dns_adb_setudpsize -dns_adb_shutdown -dns_adb_timeout -dns_adb_whenshutdown -dns_adbentry_overquota -dns_badcache_add -dns_badcache_destroy -dns_badcache_find -dns_badcache_flush -dns_badcache_flushname -dns_badcache_flushtree -dns_badcache_init -dns_badcache_print -dns_byaddr_cancel -dns_byaddr_create -dns_byaddr_createptrname -dns_byaddr_destroy -dns_cache_attach -dns_cache_attachdb -dns_cache_clean -dns_cache_create -dns_cache_detach -dns_cache_dump -dns_cache_dumpstats -dns_cache_flush -dns_cache_flushname -dns_cache_flushnode -dns_cache_getcachesize -dns_cache_getname -dns_cache_getservestalerefresh -dns_cache_getservestalettl -dns_cache_getstats -dns_cache_load -@IF NOTYET -dns_cache_renderjson -@END NOTYET -@IF LIBXML2 -dns_cache_renderxml -@END LIBXML2 -dns_cache_setcachesize -dns_cache_setfilename -dns_cache_setservestalerefresh -dns_cache_setservestalettl -dns_cache_updatestats -dns_catz_add_zone -dns_catz_catzs_attach -dns_catz_catzs_detach -dns_catz_catzs_set_view -dns_catz_dbupdate_callback -dns_catz_entry_attach -dns_catz_entry_cmp -dns_catz_entry_copy -dns_catz_entry_detach -dns_catz_entry_getname -dns_catz_entry_new -dns_catz_entry_validate -dns_catz_generate_masterfilename -dns_catz_generate_zonecfg -dns_catz_get_iterator -dns_catz_get_zone -dns_catz_new_zone -dns_catz_new_zones -dns_catz_options_copy -dns_catz_options_free -dns_catz_options_init -dns_catz_options_setdefault -dns_catz_postreconfig -dns_catz_prereconfig -dns_catz_update_from_db -dns_catz_update_process -dns_catz_update_taskaction -dns_catz_zone_attach -dns_catz_zone_detach -dns_catz_zone_getdefoptions -dns_catz_zone_getname -dns_catz_zone_resetdefoptions -dns_catz_zones_merge -dns_cert_fromtext -dns_cert_totext -dns_client_addtrustedkey -dns_client_cancelresolve -dns_client_clearservers -dns_client_create -dns_client_destroy -dns_client_destroyrestrans -dns_client_freeresanswer -dns_client_resolve -dns_client_setservers -dns_client_startresolve -dns_clientinfo_init -dns_clientinfomethods_init -dns_compress_add -dns_compress_disable -dns_compress_findglobal -dns_compress_getedns -dns_compress_getmethods -dns_compress_getsensitive -dns_compress_init -dns_compress_invalidate -dns_compress_rollback -dns_compress_setmethods -dns_compress_setsensitive -dns_counter_fromtext -dns_db_addrdataset -dns_db_adjusthashsize -dns_db_allrdatasets -dns_db_attach -dns_db_attachnode -dns_db_attachversion -dns_db_beginload -dns_db_class -dns_db_closeversion -dns_db_create -dns_db_createiterator -dns_db_createsoatuple -dns_db_currentversion -dns_db_deleterdataset -dns_db_detach -dns_db_detachnode -dns_db_diff -dns_db_diffx -dns_db_dump -dns_db_endload -dns_db_expirenode -dns_db_find -dns_db_findext -dns_db_findnode -dns_db_findnodeext -dns_db_findnsec3node -dns_db_findrdataset -dns_db_findzonecut -dns_db_getnsec3parameters -dns_db_getoriginnode -dns_db_getrrsetstats -dns_db_getservestalettl -dns_db_getservestalerefresh -dns_db_getsigningtime -dns_db_getsize -dns_db_getsoaserial -dns_db_hashsize -dns_db_iscache -dns_db_isdnssec -dns_db_ispersistent -dns_db_issecure -dns_db_isstub -dns_db_iszone -dns_db_load -dns_db_newversion -dns_db_nodecount -dns_db_nodefullname -dns_db_origin -dns_db_overmem -dns_db_printnode -dns_db_register -dns_db_resigned -dns_db_rpz_attach -dns_db_rpz_ready -dns_db_serialize -dns_db_setcachestats -dns_db_setgluecachestats -dns_db_setservestalettl -dns_db_setservestalerefresh -dns_db_setsigningtime -dns_db_settask -dns_db_subtractrdataset -dns_db_transfernode -dns_db_unregister -dns_db_updatenotify_register -dns_db_updatenotify_unregister -dns_dbiterator_current -dns_dbiterator_destroy -dns_dbiterator_first -dns_dbiterator_last -dns_dbiterator_next -dns_dbiterator_origin -dns_dbiterator_pause -dns_dbiterator_prev -dns_dbiterator_seek -dns_dbiterator_setcleanmode -dns_decompress_edns -dns_decompress_getmethods -dns_decompress_init -dns_decompress_invalidate -dns_decompress_setmethods -dns_decompress_type -dns_diff_append -dns_diff_appendminimal -dns_diff_apply -dns_diff_applysilently -dns_diff_clear -dns_diff_init -dns_diff_load -dns_diff_print -dns_diff_sort -dns_difftuple_copy -dns_difftuple_create -dns_difftuple_free -dns_dispatch_addresponse -dns_dispatch_attach -dns_dispatch_cancel -dns_dispatch_changeattributes -dns_dispatch_createtcp -dns_dispatch_detach -dns_dispatch_getattributes -dns_dispatch_getdscp -dns_dispatch_getentrysocket -dns_dispatch_getlocaladdress -dns_dispatch_getnext -dns_dispatch_getsocket -dns_dispatch_gettcp -dns_dispatch_getudp -dns_dispatch_getudp_dup -dns_dispatch_importrecv -dns_dispatch_removeresponse -dns_dispatch_setdscp -dns_dispatch_starttcp -dns_dispatchmgr_create -dns_dispatchmgr_destroy -dns_dispatchmgr_getblackhole -dns_dispatchmgr_setavailports -dns_dispatchmgr_setblackhole -dns_dispatchmgr_setstats -dns_dispatchset_cancelall -dns_dispatchset_create -dns_dispatchset_destroy -dns_dispatchset_get -dns_dlz_ssumatch -dns_dlz_writeablezone -dns_dlzallowzonexfr -dns_dlzconfigure -dns_dlzcreate -dns_dlzdestroy -dns_dlzregister -dns_dlzstrtoargv -dns_dlzunregister -dns_dns64_aaaafroma -dns_dns64_aaaaok -dns_dns64_append -dns_dns64_create -dns_dns64_destroy -dns_dns64_findprefix -dns_dns64_next -dns_dns64_unlink -@IF NOTYET -dns_dnsrps_2policy -dns_dnsrps_trig2type -dns_dnsrps_type2trig -dns_dnsrps_server_create -dns_dnsrps_server_destroy -dns_dnsrps_view_init -dns_dnsrps_connect -dns_dnsrps_rewrite_init -@END NOTYET -@IF NOTYET -dns_resolver_setfuzzing -@END NOTYET -dns_dnssec_findmatchingkeys -dns_dnssec_findzonekeys -dns_dnssec_get_hints -dns_dnssec_keyactive -dns_dnssec_keyfromrdata -dns_dnssec_keylistfromrdataset -dns_dnssec_matchdskey -dns_dnssec_selfsigns -dns_dnssec_sign -dns_dnssec_signmessage -dns_dnssec_signs -dns_dnssec_syncdelete -dns_dnssec_syncupdate -dns_dnssec_updatekeys -dns_dnssec_verify -dns_dnssec_verifymessage -dns_dnsseckey_create -dns_dnsseckey_destroy -dns_dnssecsignstats_create -dns_dnssecsignstats_dump -dns_dnssecsignstats_increment -dns_ds_buildrdata -dns_ds_fromkeyrdata -dns_dsdigest_format -dns_dsdigest_fromtext -dns_dsdigest_totext -@IF NOTYET -dns_dt_attach -dns_dt_close -dns_dt_create -dns_dt_datatotext -dns_dt_detach -dns_dt_getframe -dns_dt_getstats -dns_dt_open -dns_dt_parse -dns_dt_reopen -dns_dt_send -dns_dt_setidentity -dns_dt_setupfile -dns_dt_setversion -dns_dtdata_free -@END NOTYET -dns_dumpctx_attach -dns_dumpctx_cancel -dns_dumpctx_db -dns_dumpctx_detach -dns_dumpctx_version -dns_dyndb_load -dns_dyndb_cleanup -dns_dyndb_createctx -dns_dyndb_destroyctx -dns_ecs_init -dns_ecs_format -dns_fixedname_init -dns_fixedname_invalidate -dns_fixedname_name -dns_fixedname_initname -dns_fwdtable_add -dns_fwdtable_addfwd -dns_fwdtable_create -dns_fwdtable_delete -dns_fwdtable_destroy -dns_fwdtable_find -dns_generalstats_create -dns_generalstats_dump -dns_generalstats_increment -@IF GEOIP -dns_geoip_match -@END GEOIP -dns_hashalg_fromtext -dns_ipkeylist_clear -dns_ipkeylist_copy -dns_ipkeylist_init -dns_ipkeylist_resize -dns_iptable_addprefix -dns_iptable_attach -dns_iptable_create -dns_iptable_detach -dns_iptable_merge -dns_journal_begin_transaction -dns_journal_commit -dns_journal_compact -dns_journal_current_rr -dns_journal_destroy -dns_journal_empty -dns_journal_first_rr -dns_journal_first_serial -dns_journal_get_sourceserial -dns_journal_iter_init -dns_journal_last_serial -dns_journal_next_rr -dns_journal_open -dns_journal_print -dns_journal_recovered -dns_journal_rollforward -dns_journal_set_sourceserial -dns_journal_write_transaction -dns_journal_writediff -dns_kasp_addkey -dns_kasp_attach -dns_kasp_create -dns_kasp_detach -dns_kasp_dnskeyttl -dns_kasp_dsttl -dns_kasp_freeze -dns_kasp_getname -dns_kasp_key_algorithm -dns_kasp_key_create -dns_kasp_key_destroy -dns_kasp_key_ksk -dns_kasp_key_lifetime -dns_kasp_key_size -dns_kasp_key_zsk -dns_kasp_keylist_empty -dns_kasp_keys -dns_kasp_nsec3 -dns_kasp_nsec3flags -dns_kasp_nsec3iter -dns_kasp_nsec3saltlen -dns_kasp_parentpropagationdelay -dns_kasp_publishsafety -dns_kasp_purgekeys -dns_kasp_retiresafety -dns_kasp_setdnskeyttl -dns_kasp_setdsttl -dns_kasp_setnsec3 -dns_kasp_setnsec3param -dns_kasp_setparentpropagationdelay -dns_kasp_setpublishsafety -dns_kasp_setpurgekeys -dns_kasp_setretiresafety -dns_kasp_setsigrefresh -dns_kasp_setsigvalidity -dns_kasp_setsigvalidity_dnskey -dns_kasp_setzonemaxttl -dns_kasp_setzonepropagationdelay -dns_kasp_signdelay -dns_kasp_sigrefresh -dns_kasp_sigvalidity -dns_kasp_sigvalidity_dnskey -dns_kasp_thaw -dns_kasp_zonemaxttl -dns_kasp_zonepropagationdelay -dns_kasplist_find -dns_keydata_fromdnskey -dns_keydata_todnskey -dns_keyflags_fromtext -dns_keymgr_checkds -dns_keymgr_checkds_id -dns_keymgr_rollover -dns_keymgr_run -dns_keymgr_status -dns_keynode_dsset -dns_keynode_initial -dns_keynode_managed -dns_keynode_trust -dns_keyring_restore -dns_keytable_add -dns_keytable_attach -dns_keytable_create -dns_keytable_delete -dns_keytable_deletekey -dns_keytable_detach -dns_keytable_detachkeynode -dns_keytable_dump -dns_keytable_find -dns_keytable_finddeepestmatch -dns_keytable_forall -dns_keytable_issecuredomain -dns_keytable_marksecure -dns_keytable_totext -dns_lib_init -dns_lib_shutdown -dns_loadctx_attach -dns_loadctx_cancel -dns_loadctx_detach -dns_log_init -dns_log_setcontext -dns_lookup_cancel -dns_lookup_create -dns_lookup_destroy -dns_master_dump -dns_master_dumpasync -dns_master_dumpnode -dns_master_dumpnodetostream -dns_master_dumptostream -dns_master_dumptostreamasync -dns_master_initrawheader -dns_master_loadbuffer -dns_master_loadbufferinc -dns_master_loadfile -dns_master_loadfileinc -dns_master_loadlexer -dns_master_loadlexerinc -dns_master_loadstream -dns_master_loadstreaminc -dns_master_questiontotext -dns_master_rdatasettotext -dns_master_stylecreate -dns_master_styledestroy -dns_master_styleflags -dns_message_addname -dns_message_attach -dns_message_buildopt -dns_message_checksig -dns_message_clonebuffer -dns_message_create -dns_message_currentname -dns_message_detach -dns_message_find -dns_message_findname -dns_message_findtype -dns_message_firstname -dns_message_getopt -dns_message_getquerytsig -dns_message_getrawmessage -dns_message_getsig0 -dns_message_getsig0key -dns_message_gettempname -dns_message_gettemprdata -dns_message_gettemprdatalist -dns_message_gettemprdataset -dns_message_gettimeadjust -dns_message_gettsig -dns_message_gettsigkey -dns_message_headertotext -dns_message_logfmtpacket -dns_message_logpacket -dns_message_movename -dns_message_nextname -dns_message_parse -dns_message_peekheader -dns_message_pseudosectiontotext -dns_message_puttempname -dns_message_puttemprdata -dns_message_puttemprdatalist -dns_message_puttemprdataset -dns_message_rechecksig -dns_message_removename -dns_message_renderbegin -dns_message_renderchangebuffer -dns_message_renderend -dns_message_renderheader -dns_message_renderrelease -dns_message_renderreserve -dns_message_renderreset -dns_message_rendersection -dns_message_reply -dns_message_reset -dns_message_resetsig -dns_message_sectiontotext -dns_message_setclass -dns_message_setopt -dns_message_setpadding -dns_message_setquerytsig -dns_message_setsig0key -dns_message_setsortorder -dns_message_settimeadjust -dns_message_settsigkey -dns_message_signer -dns_message_takebuffer -dns_message_totext -dns_name_caseequal -dns_name_clone -dns_name_compare -dns_name_concatenate -dns_name_copy -dns_name_countlabels -dns_name_digest -dns_name_downcase -dns_name_dup -dns_name_dupwithoffsets -dns_name_dynamic -dns_name_equal -dns_name_format -dns_name_free -dns_name_fromregion -dns_name_fromstring -dns_name_fromstring2 -dns_name_fromtext -dns_name_fromwire -dns_name_fullcompare -dns_name_fullhash -dns_name_getlabel -dns_name_getlabelsequence -dns_name_hasbuffer -dns_name_hash -dns_name_init -dns_name_internalwildcard -dns_name_invalidate -dns_name_isabsolute -dns_name_isdnssd -dns_name_ishostname -dns_name_ismailbox -dns_name_isrfc1918 -dns_name_issubdomain -dns_name_istat -dns_name_isula -dns_name_isvalid -dns_name_iswildcard -dns_name_matcheswildcard -dns_name_print -dns_name_rdatacompare -dns_name_reset -dns_name_setbuffer -dns_name_settotextfilter -dns_name_split -dns_name_tofilenametext -dns_name_toprincipal -dns_name_toregion -dns_name_tostring -dns_name_totext -dns_name_totext2 -dns_name_towire -dns_name_towire2 -dns_ncache_add -dns_ncache_addoptout -dns_ncache_current -dns_ncache_getrdataset -dns_ncache_getsigrdataset -dns_ncache_towire -dns_nsec3_active -dns_nsec3_activex -dns_nsec3_addnsec3 -dns_nsec3_addnsec3s -dns_nsec3_addnsec3sx -dns_nsec3_buildrdata -dns_nsec3_delnsec3 -dns_nsec3_delnsec3s -dns_nsec3_delnsec3sx -dns_nsec3_generate_salt -dns_nsec3_hashlength -dns_nsec3_hashname -dns_nsec3_maxiterations -dns_nsec3_noexistnodata -dns_nsec3_supportedhash -dns_nsec3_typepresent -dns_nsec3param_deletechains -dns_nsec3param_fromprivate -dns_nsec3param_salttotext -dns_nsec3param_toprivate -dns_nsec_build -dns_nsec_buildrdata -dns_nsec_compressbitmap -dns_nsec_isset -dns_nsec_noexistnodata -dns_nsec_nseconly -dns_nsec_setbit -dns_nsec_typepresent -dns_ntatable_add -dns_ntatable_attach -dns_ntatable_covered -dns_ntatable_create -dns_ntatable_delete -dns_ntatable_detach -dns_ntatable_save -dns_ntatable_shutdown -dns_ntatable_totext -dns_opcode_totext -dns_opcodestats_create -dns_opcodestats_dump -dns_opcodestats_increment -dns_order_add -dns_order_attach -dns_order_create -dns_order_detach -dns_order_find -dns_peer_attach -dns_peer_detach -dns_peer_getbogus -dns_peer_getednsversion -dns_peer_getforcetcp -dns_peer_getkey -dns_peer_getmaxudp -dns_peer_getnotifydscp -dns_peer_getnotifysource -dns_peer_getpadding -dns_peer_getprovideixfr -dns_peer_getquerydscp -dns_peer_getquerysource -dns_peer_getrequestexpire -dns_peer_getrequestixfr -dns_peer_getrequestnsid -dns_peer_getsendcookie -dns_peer_getsupportedns -dns_peer_gettcpkeepalive -dns_peer_gettransferdscp -dns_peer_gettransferformat -dns_peer_gettransfers -dns_peer_gettransfersource -dns_peer_getudpsize -dns_peer_new -dns_peer_newprefix -dns_peer_setbogus -dns_peer_setednsversion -dns_peer_setforcetcp -dns_peer_setkey -dns_peer_setkeybycharp -dns_peer_setmaxudp -dns_peer_setnotifydscp -dns_peer_setnotifysource -dns_peer_setpadding -dns_peer_setprovideixfr -dns_peer_setquerydscp -dns_peer_setquerysource -dns_peer_setrequestexpire -dns_peer_setrequestixfr -dns_peer_setrequestnsid -dns_peer_setsendcookie -dns_peer_setsupportedns -dns_peer_settcpkeepalive -dns_peer_settransferdscp -dns_peer_settransferformat -dns_peer_settransfers -dns_peer_settransfersource -dns_peer_setudpsize -dns_peerlist_addpeer -dns_peerlist_attach -dns_peerlist_currpeer -dns_peerlist_detach -dns_peerlist_new -dns_peerlist_peerbyaddr -dns_private_chains -dns_private_totext -dns_rbt_addname -dns_rbt_addnode -dns_rbt_adjusthashsize -dns_rbt_create -dns_rbt_deletename -dns_rbt_deletenode -dns_rbt_deserialize_tree -dns_rbt_destroy -dns_rbt_destroy2 -dns_rbt_findname -dns_rbt_findnode -dns_rbt_formatnodename -dns_rbt_fullnamefromnode -dns_rbt_hashsize -dns_rbt_namefromnode -dns_rbt_nodecount -dns_rbt_printdot -dns_rbt_printnodeinfo -dns_rbt_printtext -dns_rbt_serialize_align -dns_rbt_serialize_tree -dns_rbtnodechain_current -dns_rbtnodechain_down -dns_rbtnodechain_first -dns_rbtnodechain_init -dns_rbtnodechain_invalidate -dns_rbtnodechain_last -dns_rbtnodechain_next -dns_rbtnodechain_nextflat -dns_rbtnodechain_prev -dns_rbtnodechain_reset -dns_rcode_fromtext -dns_rcode_totext -dns_rcodestats_create -dns_rcodestats_dump -dns_rcodestats_increment -dns_rdata_additionaldata -dns_rdata_apl_current -dns_rdata_apl_first -dns_rdata_apl_next -dns_rdata_casecompare -dns_rdata_checknames -dns_rdata_checkowner -dns_rdata_clone -dns_rdata_compare -dns_rdata_covers -dns_rdata_deleterrset -dns_rdata_digest -dns_rdata_exists -dns_rdata_freestruct -dns_rdata_fromregion -dns_rdata_fromstruct -dns_rdata_fromtext -dns_rdata_fromwire -dns_rdata_hip_current -dns_rdata_hip_first -dns_rdata_hip_next -dns_rdata_init -dns_rdata_makedelete -dns_rdata_notexist -dns_rdata_opt_current -dns_rdata_opt_first -dns_rdata_opt_next -dns_rdata_reset -dns_rdata_tofmttext -dns_rdata_toregion -dns_rdata_tostruct -dns_rdata_totext -dns_rdata_towire -dns_rdata_txt_current -dns_rdata_txt_first -dns_rdata_txt_next -dns_rdata_updateop -dns_rdatacallbacks_init -dns_rdatacallbacks_init_stdio -dns_rdataclass_format -dns_rdataclass_fromtext -dns_rdataclass_ismeta -dns_rdataclass_totext -dns_rdataclass_tounknowntext -dns_rdatalist_fromrdataset -dns_rdatalist_init -dns_rdatalist_tordataset -dns_rdataset_addclosest -dns_rdataset_addglue -dns_rdataset_additionaldata -dns_rdataset_addnoqname -dns_rdataset_clearprefetch -dns_rdataset_clone -dns_rdataset_count -dns_rdataset_current -dns_rdataset_disassociate -dns_rdataset_expire -dns_rdataset_first -dns_rdataset_getclosest -dns_rdataset_getnoqname -dns_rdataset_getownercase -dns_rdataset_init -dns_rdataset_invalidate -dns_rdataset_isassociated -dns_rdataset_makequestion -dns_rdataset_next -dns_rdataset_setownercase -dns_rdataset_settrust -dns_rdataset_totext -dns_rdataset_towire -dns_rdataset_towirepartial -dns_rdataset_towiresorted -dns_rdataset_trimttl -dns_rdatasetiter_current -dns_rdatasetiter_destroy -dns_rdatasetiter_first -dns_rdatasetiter_next -dns_rdatasetstats_create -dns_rdatasetstats_decrement -dns_rdatasetstats_dump -dns_rdatasetstats_increment -dns_rdataslab_count -dns_rdataslab_equal -dns_rdataslab_equalx -dns_rdataslab_fromrdataset -dns_rdataslab_merge -dns_rdataslab_rdatasize -dns_rdataslab_size -dns_rdataslab_subtract -dns_rdatatype_atcname -dns_rdatatype_atparent -dns_rdatatype_attributes -dns_rdatatype_format -dns_rdatatype_fromtext -dns_rdatatype_isdnssec -dns_rdatatype_isknown -dns_rdatatype_ismeta -dns_rdatatype_issingleton -dns_rdatatype_iszonecutauth -dns_rdatatype_notquestion -dns_rdatatype_questiononly -dns_rdatatype_totext -dns_rdatatype_tounknowntext -dns_rdatatypestats_create -dns_rdatatypestats_dump -dns_rdatatypestats_increment -dns_request_cancel -dns_request_create -dns_request_createraw -dns_request_createvia -dns_request_destroy -dns_request_getanswer -dns_request_getresponse -dns_request_usedtcp -dns_requestmgr_attach -dns_requestmgr_create -dns_requestmgr_detach -dns_requestmgr_shutdown -dns_requestmgr_whenshutdown -dns_resolver_addalternate -dns_resolver_addbadcache -dns_resolver_algorithm_supported -dns_resolver_attach -dns_resolver_cancelfetch -dns_resolver_create -dns_resolver_createfetch -dns_resolver_destroyfetch -dns_resolver_detach -dns_resolver_disable_algorithm -dns_resolver_disable_ds_digest -dns_resolver_dispatchmgr -dns_resolver_dispatchv4 -dns_resolver_dispatchv6 -dns_resolver_ds_digest_supported -dns_resolver_dumpfetches -dns_resolver_flushbadcache -dns_resolver_flushbadnames -dns_resolver_freeze -dns_resolver_getbadcache -dns_resolver_getclientsperquery -dns_resolver_getlamettl -dns_resolver_getmaxdepth -dns_resolver_getmaxqueries -dns_resolver_getmustbesecure -dns_resolver_getnonbackofftries -dns_resolver_getoptions -dns_resolver_getquerydscp4 -dns_resolver_getquerydscp6 -dns_resolver_getquotaresponse -dns_resolver_getretryinterval -dns_resolver_gettimeout -dns_resolver_getudpsize -dns_resolver_getzeronosoattl -dns_resolver_logfetch -dns_resolver_prime -dns_resolver_printbadcache -dns_resolver_reset_algorithms -dns_resolver_reset_ds_digests -dns_resolver_resetmustbesecure -dns_resolver_setclientsperquery -dns_resolver_setfetchesperzone -dns_resolver_setlamettl -dns_resolver_setmaxdepth -dns_resolver_setmaxqueries -dns_resolver_setmustbesecure -dns_resolver_setnonbackofftries -dns_resolver_setquerydscp4 -dns_resolver_setquerydscp6 -dns_resolver_setquotaresponse -dns_resolver_setretryinterval -dns_resolver_settimeout -dns_resolver_setudpsize -dns_resolver_setzeronosoattl -dns_resolver_shutdown -dns_resolver_socketmgr -dns_resolver_taskmgr -dns_resolver_whenshutdown -dns_result_register -dns_result_torcode -dns_result_totext -dns_root_checkhints -dns_rootns_create -dns_rpz_add -dns_rpz_attach_rpzs -dns_rpz_beginload -dns_rpz_dbupdate_callback -dns_rpz_decode_cname -dns_rpz_delete -dns_rpz_detach_rpzs -dns_rpz_find_ip -dns_rpz_find_name -dns_rpz_new_zone -dns_rpz_new_zones -dns_rpz_policy2str -dns_rpz_ready -dns_rpz_str2policy -dns_rpz_type2str -dns_rriterator_current -dns_rriterator_destroy -dns_rriterator_first -dns_rriterator_init -dns_rriterator_next -dns_rriterator_nextrrset -dns_rriterator_pause -dns_rrl -dns_rrl_init -dns_rrl_view_destroy -dns_sdb_putnamedrdata -dns_sdb_putnamedrr -dns_sdb_putrdata -dns_sdb_putrr -dns_sdb_putsoa -dns_sdb_register -dns_sdb_unregister -dns_sdlz_putnamedrr -dns_sdlz_putrr -dns_sdlz_putsoa -dns_sdlz_setdb -dns_sdlzregister -dns_sdlzunregister -dns_secalg_format -dns_secalg_fromtext -dns_secalg_totext -dns_secproto_fromtext -dns_secproto_totext -dns_soa_buildrdata -dns_soa_getexpire -dns_soa_getminimum -dns_soa_getrefresh -dns_soa_getretry -dns_soa_getserial -dns_soa_setexpire -dns_soa_setminimum -dns_soa_setrefresh -dns_soa_setretry -dns_soa_setserial -dns_ssu_external_match -dns_ssu_mtypefromstring -dns_ssurule_identity -dns_ssurule_isgrant -dns_ssurule_matchtype -dns_ssurule_max -dns_ssurule_name -dns_ssurule_types -dns_ssutable_firstrule -dns_ssutable_nextrule -dns_ssutable_addrule -dns_ssutable_attach -dns_ssutable_checkrules -dns_ssutable_create -dns_ssutable_createdlz -dns_ssutable_detach -dns_stats_alloccounters -dns_stats_attach -dns_stats_detach -dns_stats_freecounters -dns_tcpmsg_cancelread -dns_tcpmsg_init -dns_tcpmsg_invalidate -dns_tcpmsg_keepbuffer -dns_tcpmsg_readmessage -dns_tcpmsg_setmaxsize -dns_time32_fromtext -dns_time32_totext -dns_time64_from32 -dns_time64_fromtext -dns_time64_totext -dns_timer_setidle -dns_tkey_builddeletequery -dns_tkey_builddhquery -dns_tkey_buildgssquery -dns_tkey_gssnegotiate -dns_tkey_processdeleteresponse -dns_tkey_processdhresponse -dns_tkey_processgssresponse -dns_tkey_processquery -dns_tkeyctx_create -dns_tkeyctx_destroy -dns_transport_attach -dns_transport_detach -dns_transport_find -dns_transport_get_cafile -dns_transport_get_certfile -dns_transport_get_endpoint -dns_transport_get_hostname -dns_transport_get_keyfile -dns_transport_get_mode -dns_transport_get_type -dns_transport_list_attach -dns_transport_list_detach -dns_transport_list_new -dns_transport_new -dns_transport_set_cafile -dns_transport_set_certfile -dns_transport_set_endpoint -dns_transport_set_hostname -dns_transport_set_keyfile -dns_transport_set_mode -dns_trust_totext -dns_tsec_create -dns_tsec_destroy -dns_tsec_getkey -dns_tsec_gettype -dns_tsig_sign -dns_tsig_verify -dns_tsigkey_attach -dns_tsigkey_create -dns_tsigkey_createfromkey -dns_tsigkey_detach -dns_tsigkey_find -dns_tsigkey_identity -dns_tsigkey_setdeleted -dns_tsigkeyring_add -dns_tsigkeyring_attach -dns_tsigkeyring_create -dns_tsigkeyring_detach -dns_tsigkeyring_dumpanddetach -dns_tsigrcode_fromtext -dns_tsigrcode_totext -dns_ttl_fromtext -dns_ttl_totext -dns_update_signatures -dns_update_signaturesinc -dns_update_soaserial -dns_validator_cancel -dns_validator_create -dns_validator_destroy -dns_validator_send -dns_view_adddelegationonly -dns_view_addzone -dns_view_asyncload -dns_view_attach -dns_view_checksig -dns_view_create -dns_view_createresolver -dns_view_createzonetable -dns_view_detach -dns_view_dialup -dns_view_dumpdbtostream -dns_view_excludedelegationonly -dns_view_find -dns_view_findzone -dns_view_findzonecut -dns_view_flushanddetach -dns_view_flushcache -dns_view_flushname -dns_view_flushnode -dns_view_freeze -dns_view_freezezones -dns_view_getadbstats -dns_view_getdynamickeyring -dns_view_getfailttl -dns_view_getnewzonedir -dns_view_getntatable -dns_view_getpeertsig -dns_view_getresquerystats -dns_view_getresstats -dns_view_getrootdelonly -dns_view_getsecroots -dns_view_gettransport -dns_view_gettsig -dns_view_initntatable -dns_view_initsecroots -dns_view_iscacheshared -dns_view_isdelegationonly -dns_view_issecuredomain -dns_view_load -dns_view_loadnta -dns_view_ntacovers -dns_view_restorekeyring -dns_view_saventa -dns_view_searchdlz -dns_view_setadbstats -dns_view_setcache -dns_view_setdstport -dns_view_setdynamickeyring -dns_view_setfailttl -dns_view_sethints -dns_view_setkeyring -dns_view_setnewzonedir -dns_view_setnewzones -dns_view_setresquerystats -dns_view_setresstats -dns_view_setrootdelonly -dns_view_settransports -dns_view_setviewcommit -dns_view_setviewrevert -dns_view_simplefind -dns_view_staleanswerenabled -dns_view_thaw -dns_view_untrust -dns_view_weakattach -dns_view_weakdetach -dns_viewlist_find -dns_viewlist_findzone -dns_xfrin_attach -dns_xfrin_create -dns_xfrin_detach -dns_xfrin_shutdown -dns_zone_addnsec3chain -dns_zone_asyncload -dns_zone_attach -dns_zone_catz_enable -dns_zone_catz_enable_db -dns_zone_cdscheck -dns_zone_checknames -dns_zone_clearforwardacl -dns_zone_clearnotifyacl -dns_zone_clearqueryacl -dns_zone_clearqueryonacl -dns_zone_clearupdateacl -dns_zone_clearxfracl -dns_zone_create -dns_zone_detach -dns_zone_dialup -dns_zone_dlzpostload -dns_zone_dump -dns_zone_dumptostream -dns_zone_expire -dns_zone_first -dns_zone_flush -dns_zone_forcereload -dns_zone_forwardupdate -dns_zone_get_parentcatz -dns_zone_get_rpz_num -dns_zone_getadded -dns_zone_getaltxfrsource4 -dns_zone_getaltxfrsource4dscp -dns_zone_getaltxfrsource6 -dns_zone_getaltxfrsource6dscp -dns_zone_getautomatic -dns_zone_getchecknames -dns_zone_getclass -dns_zone_getdb -dns_zone_getdbtype -dns_zone_getdnssecsignstats -dns_zone_getexpiretime -dns_zone_getfile -dns_zone_getforwardacl -dns_zone_getgluecachestats -dns_zone_getidlein -dns_zone_getidleout -dns_zone_getincludes -dns_zone_getixfrratio -dns_zone_getjournal -dns_zone_getjournalsize -dns_zone_getkasp -dns_zone_getkeydirectory -dns_zone_getkeyopts -dns_zone_getkeyvalidityinterval -dns_zone_getloadtime -dns_zone_getmaxrecords -dns_zone_getmaxttl -dns_zone_getmaxxfrin -dns_zone_getmaxxfrout -dns_zone_getmctx -dns_zone_getmgr -dns_zone_getnotifyacl -dns_zone_getnotifydelay -dns_zone_getnotifysrc4 -dns_zone_getnotifysrc4dscp -dns_zone_getnotifysrc6 -dns_zone_getnotifysrc6dscp -dns_zone_getoptions -dns_zone_getorigin -dns_zone_getprivatetype -dns_zone_getqueryacl -dns_zone_getqueryonacl -dns_zone_getraw -dns_zone_getrcvquerystats -dns_zone_getredirecttype -dns_zone_getrefreshkeytime -dns_zone_getrefreshtime -dns_zone_getrequestexpire -dns_zone_getrequestixfr -dns_zone_getrequeststats -dns_zone_getserial -dns_zone_getserialupdatemethod -dns_zone_getsignatures -dns_zone_getsigresigninginterval -dns_zone_getsigvalidityinterval -dns_zone_getssutable -dns_zone_getstatlevel -dns_zone_getstatscounters -dns_zone_gettask -dns_zone_gettype -dns_zone_getupdateacl -dns_zone_getupdatedisabled -dns_zone_getview -dns_zone_getxfracl -dns_zone_getxfrsource4 -dns_zone_getxfrsource4dscp -dns_zone_getxfrsource6 -dns_zone_getxfrsource6dscp -dns_zone_getzeronosoattl -dns_zone_iattach -dns_zone_idetach -dns_zone_isdynamic -dns_zone_isforced -dns_zone_isloaded -dns_zone_keydone -dns_zone_link -dns_zone_load -dns_zone_loadandthaw -dns_zone_lock_keyfiles -dns_zone_log -dns_zone_logc -dns_zone_logv -dns_zone_maintenance -dns_zone_markdirty -dns_zone_name -dns_zone_nameonly -dns_zone_next -dns_zone_notify -dns_zone_notifyreceive -dns_zone_nscheck -dns_zone_refresh -dns_zone_rekey -dns_zone_replacedb -dns_zone_rpz_enable -dns_zone_rpz_enable_db -dns_zone_set_parentcatz -dns_zone_setadded -dns_zone_setalsonotify -dns_zone_setaltxfrsource4 -dns_zone_setaltxfrsource4dscp -dns_zone_setaltxfrsource6 -dns_zone_setaltxfrsource6dscp -dns_zone_setautomatic -dns_zone_setcheckmx -dns_zone_setchecknames -dns_zone_setcheckns -dns_zone_setchecksrv -dns_zone_setclass -dns_zone_setdb -dns_zone_setdbtype -dns_zone_setdialup -dns_zone_setdnssecsignstats -dns_zone_setfile -dns_zone_setforwardacl -dns_zone_setidlein -dns_zone_setidleout -dns_zone_setisself -dns_zone_setixfrratio -dns_zone_setjournal -dns_zone_setjournalsize -dns_zone_setkasp -dns_zone_setkeydirectory -dns_zone_setkeyopt -dns_zone_setkeyvalidityinterval -dns_zone_setmaxrecords -dns_zone_setmaxrefreshtime -dns_zone_setmaxretrytime -dns_zone_setmaxttl -dns_zone_setmaxxfrin -dns_zone_setmaxxfrout -dns_zone_setminrefreshtime -dns_zone_setminretrytime -dns_zone_setnodes -dns_zone_setnotifyacl -dns_zone_setnotifydelay -dns_zone_setnotifysrc4 -dns_zone_setnotifysrc4dscp -dns_zone_setnotifysrc6 -dns_zone_setnotifysrc6dscp -dns_zone_setnotifytype -dns_zone_setnsec3param -dns_zone_setoption -dns_zone_setorigin -dns_zone_setprimaries -dns_zone_setprivatetype -dns_zone_setqueryacl -dns_zone_setqueryonacl -dns_zone_setrawdata -dns_zone_setrcvquerystats -dns_zone_setrefreshkeyinterval -dns_zone_setrequestexpire -dns_zone_setrequestixfr -dns_zone_setrequeststats -dns_zone_setserial -dns_zone_setserialupdatemethod -dns_zone_setsignatures -dns_zone_setsigresigninginterval -dns_zone_setsigvalidityinterval -dns_zone_setssutable -dns_zone_setstatistics -dns_zone_setstatlevel -dns_zone_setstats -dns_zone_setstream -dns_zone_settask -dns_zone_settype -dns_zone_setupdateacl -dns_zone_setupdatedisabled -dns_zone_setview -dns_zone_setviewcommit -dns_zone_setviewrevert -dns_zone_setxfracl -dns_zone_setxfrsource4 -dns_zone_setxfrsource4dscp -dns_zone_setxfrsource6 -dns_zone_setxfrsource6dscp -dns_zone_setzeronosoattl -dns_zone_signwithkey -dns_zone_synckeyzone -dns_zone_unload -dns_zone_unlock_keyfiles -dns_zone_verifydb -dns_zonekey_iszonekey -dns_zonemgr_attach -dns_zonemgr_create -dns_zonemgr_createzone -dns_zonemgr_detach -dns_zonemgr_forcemaint -dns_zonemgr_getcount -dns_zonemgr_getiolimit -dns_zonemgr_getnotifyrate -dns_zonemgr_getserialqueryrate -dns_zonemgr_getstartupnotifyrate -dns_zonemgr_gettaskmgr -dns_zonemgr_gettransfersin -dns_zonemgr_gettransfersperns -dns_zonemgr_managezone -dns_zonemgr_releasezone -dns_zonemgr_resumexfrs -dns_zonemgr_setiolimit -dns_zonemgr_setnotifyrate -dns_zonemgr_setserialqueryrate -dns_zonemgr_setsize -dns_zonemgr_setstartupnotifyrate -dns_zonemgr_settransfersin -dns_zonemgr_settransfersperns -dns_zonemgr_shutdown -dns_zonemgr_unreachable -dns_zonemgr_unreachableadd -dns_zonemgr_unreachabledel -dns_zonetype_name -dns_zoneverify_dnssec -dns_zt_apply -dns_zt_asyncload -dns_zt_attach -dns_zt_create -dns_zt_detach -dns_zt_find -dns_zt_flushanddetach -dns_zt_freezezones -dns_zt_load -dns_zt_mount -dns_zt_setviewcommit -dns_zt_setviewrevert -dns_zt_unmount -dst_algorithm_supported -dst_context_adddata -dst_context_create -dst_context_destroy -dst_context_sign -dst_context_verify -dst_context_verify2 -dst_ds_digest_supported -dst_gssapi_acceptctx -dst_gssapi_acquirecred -dst_gssapi_deletectx -dst_gssapi_identitymatchesrealmkrb5 -dst_gssapi_identitymatchesrealmms -dst_gssapi_initctx -dst_gssapi_releasecred -dst_key_alg -dst_key_attach -dst_key_buildfilename -dst_key_buildinternal -dst_key_class -dst_key_copy_metadata -dst_key_compare -dst_key_computesecret -dst_key_dump -dst_key_flags -dst_key_format -dst_key_free -dst_key_frombuffer -dst_key_fromdns -dst_key_fromfile -dst_key_fromgssapi -dst_key_fromlabel -dst_key_fromnamedfile -dst_key_generate -dst_key_getbits -dst_key_getbool -dst_key_getfilename -dst_key_getgssctx -dst_key_getnum -dst_key_getprivateformat -dst_key_getstate -dst_key_gettime -dst_key_getttl -dst_key_goal -dst_key_haskasp -dst_key_id -dst_key_is_active -dst_key_is_published -dst_key_is_removed -dst_key_is_revoked -dst_key_is_signing -dst_key_is_unused -dst_key_inactive -dst_key_isexternal -dst_key_isnullkey -dst_key_isprivate -dst_key_iszonekey -dst_key_name -dst_key_paramcompare -dst_key_privatefrombuffer -dst_key_proto -dst_key_pubcompare -dst_key_read_public -dst_key_read_state -dst_key_restore -dst_key_rid -dst_key_secretsize -dst_key_setbits -dst_key_setbool -dst_key_setexternal -dst_key_setflags -dst_key_setinactive -dst_key_setnum -dst_key_setprivateformat -dst_key_setstate -dst_key_settime -dst_key_setttl -dst_key_sigsize -dst_key_size -dst_key_tkeytoken -dst_key_tobuffer -dst_key_todns -dst_key_tofile -dst_key_unsetbool -dst_key_unsetnum -dst_key_unsetstate -dst_key_unsettime -dst_lib_destroy -dst_lib_init -dst_region_computeid -dst_region_computerid -dst_result_register -dst_result_totext -@IF NOLONGER -; Exported Data - -EXPORTS - -dns_pps DATA -dns_master_style_full DATA -dns_tsig_hmacmd5_name DATA -dns_zone_mkey_day DATA -dns_zone_mkey_hour DATA -dns_zone_mkey_month DATA -@END NOLONGER diff --git a/lib/dns/win32/libdns.vcxproj.filters.in b/lib/dns/win32/libdns.vcxproj.filters.in deleted file mode 100644 index 503464efee..0000000000 --- a/lib/dns/win32/libdns.vcxproj.filters.in +++ /dev/null @@ -1,652 +0,0 @@ - - - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {c76276a2-cee5-4b70-bf37-e0f2ef1ae4d6} - - - {ae84c9c7-5da5-4c0e-9e53-bfc34a5825ae} - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - - - - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - -@IF GEOIP - - Library Source Files - -@END GEOIP - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Dst Source Files - - - Dst Source Files - - - Dst Source Files - -@IF GSSAPI - - Dst Source Files - -@END GSSAPI - - Dst Source Files - - - Dst Source Files - - - Dst Source Files - - - Dst Source Files - - - Dst Source Files - - - Dst Source Files - - - Dst Source Files - - - Dst Source Files - -@IF PKCS11 - - Dst Source Files - - - Dst Source Files - - - Dst Source Files - - - Dst Source Files - -@END PKCS11 - - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - -@IF GEOIP - - Library Header Files - -@END GEOIP - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Dst Header Files - - - Dst Header Files - - - Dst Header Files - - - Dst Header Files - - - Dst Header Files - - - Dst Header Files - -@IF PKCS11 - - Dst Header Files - -@END PKCS11 - - diff --git a/lib/dns/win32/libdns.vcxproj.in b/lib/dns/win32/libdns.vcxproj.in deleted file mode 100644 index a5f31f1752..0000000000 --- a/lib/dns/win32/libdns.vcxproj.in +++ /dev/null @@ -1,350 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A} - Win32Proj - libdns - @WINDOWS_TARGET_PLATFORM_VERSION@ - - - - DynamicLibrary - true - MultiByte - @PLATFORM_TOOLSET@ - - - DynamicLibrary - false - true - MultiByte - @PLATFORM_TOOLSET@ - - - - - - - - - - - - - true - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - - - false - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - - - - - - Level4 - false - Disabled - BIND9;WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBDNS_EXPORTS;%(PreprocessorDefinitions);%(PreprocessorDefinitions);%(PreprocessorDefinitions) - ..\..\..\config.h - .\;..\..\..\;include;..\include;..\..\isc;..\..\isc\win32;..\..\isc\win32\include;..\..\isc\include;@LIBXML2_INC@@LIBUV_INC@@OPENSSL_INC@@GSSAPI_INC@@GEOIP_INC@%(AdditionalIncludeDirectories) - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - true - CompileAsC - - - Console - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - ..\..\isc\win32\$(Configuration);%(AdditionalLibraryDirectories) - @LIBUV_LIB@@OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@libisc.lib;@LIBXML2_LIB@@GSSAPI_LIB@@KRB5_LIB@@GEOIP_LIB@ws2_32.lib;%(AdditionalDependencies) - $(ProjectName).def - .\$(Configuration)\$(ProjectName).lib - - - - - Level1 - true - - - MaxSpeed - true - @INTRINSIC@ - BIND9;WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBDNS_EXPORTS;%(PreprocessorDefinitions);%(PreprocessorDefinitions);%(PreprocessorDefinitions) - ..\..\..\config.h - .\;..\..\..\;include;..\include;..\..\isc;..\..\isc\win32;..\..\isc\win32\include;..\..\isc\include;@LIBXML2_INC@@LIBUV_INC@@OPENSSL_INC@@GSSAPI_INC@@GEOIP_INC@%(AdditionalIncludeDirectories) - OnlyExplicitInline - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - false - CompileAsC - - - Console - false - true - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - ..\..\isc\win32\$(Configuration);%(AdditionalLibraryDirectories) - @LIBUV_LIB@@OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@libisc.lib;@LIBXML2_LIB@@GSSAPI_LIB@@KRB5_LIB@@GEOIP_LIB@ws2_32.lib;%(AdditionalDependencies) - $(ProjectName).def - .\$(Configuration)\$(ProjectName).lib - Default - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@IF GEOIP - -@END GEOIP - -@IF GSSAPI - -@END GSSAPI - - - - - - - - - - - - - - - - - - - - - - - - - - - -@IF PKCS11 - - - - -@END PKCS11 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@IF PKCS11 - -@END PKCS11 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@IF GEOIP - -@END GEOIP - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {3840E563-D180-4761-AA9C-E6155F02EAFF} - - - {A3F71D12-F38A-4C77-8D87-8E8854CA74A1} - - - - - - diff --git a/lib/dns/win32/libdns.vcxproj.user b/lib/dns/win32/libdns.vcxproj.user deleted file mode 100644 index ace9a86acb..0000000000 --- a/lib/dns/win32/libdns.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/lib/irs/resconf.c b/lib/irs/resconf.c index e5660df124..8aa723c21c 100644 --- a/lib/irs/resconf.c +++ b/lib/irs/resconf.c @@ -32,18 +32,15 @@ * /etc/resolv.conf */ -#ifndef WIN32 -#include -#include -#include -#endif /* ifndef WIN32 */ - #include #include #include +#include #include #include #include +#include +#include #include #include @@ -124,11 +121,6 @@ resconf_parsesortlist(irs_resconf_t *conf, FILE *fp); static isc_result_t resconf_parseoption(irs_resconf_t *ctx, FILE *fp); -#if HAVE_GET_WIN32_NAMESERVERS -static isc_result_t -get_win32_nameservers(irs_resconf_t *conf); -#endif /* if HAVE_GET_WIN32_NAMESERVERS */ - /*! * Eat characters from FP until EOL or EOF. Returns EOF or '\n' */ @@ -598,13 +590,6 @@ irs_resconf_load(isc_mem_t *mctx, const char *filename, irs_resconf_t **confp) { } } -#if HAVE_GET_WIN32_NAMESERVERS - ret = get_win32_nameservers(conf); - if (ret != ISC_R_SUCCESS) { - goto error; - } -#endif /* if HAVE_GET_WIN32_NAMESERVERS */ - /* If we don't find a nameserver fall back to localhost */ if (conf->numns == 0U) { INSIST(ISC_LIST_EMPTY(conf->nameservers)); diff --git a/lib/irs/win32/DLLMain.c b/lib/irs/win32/DLLMain.c deleted file mode 100644 index 150de214e4..0000000000 --- a/lib/irs/win32/DLLMain.c +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#include -#include - -/* - * Called when we enter the DLL - */ -__declspec(dllexport) BOOL WINAPI - DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { - switch (fdwReason) { - /* - * The DLL is loading due to process - * initialization or a call to LoadLibrary. - */ - case DLL_PROCESS_ATTACH: - break; - - /* The attached process creates a new thread. */ - case DLL_THREAD_ATTACH: - break; - - /* The thread of the attached process terminates. */ - case DLL_THREAD_DETACH: - break; - - /* - * The DLL is unloading from a process due to - * process termination or a call to FreeLibrary. - */ - case DLL_PROCESS_DETACH: - break; - - default: - break; - } - return (TRUE); -} diff --git a/lib/irs/win32/include/.clang-format b/lib/irs/win32/include/.clang-format deleted file mode 120000 index e919bbad93..0000000000 --- a/lib/irs/win32/include/.clang-format +++ /dev/null @@ -1 +0,0 @@ -../../../../.clang-format.headers \ No newline at end of file diff --git a/lib/irs/win32/include/irs/.gitignore b/lib/irs/win32/include/irs/.gitignore deleted file mode 100644 index 734ffcd9b4..0000000000 --- a/lib/irs/win32/include/irs/.gitignore +++ /dev/null @@ -1 +0,0 @@ -!netdb.h diff --git a/lib/irs/win32/libirs.def b/lib/irs/win32/libirs.def deleted file mode 100644 index 9a86c7c63c..0000000000 --- a/lib/irs/win32/libirs.def +++ /dev/null @@ -1,9 +0,0 @@ -LIBRARY libirs - -; Exported Functions -EXPORTS -irs_resconf_destroy -irs_resconf_getnameservers -irs_resconf_getndots -irs_resconf_getsearchlist -irs_resconf_load diff --git a/lib/irs/win32/libirs.vcxproj.filters.in b/lib/irs/win32/libirs.vcxproj.filters.in deleted file mode 100644 index ca2d7c1b57..0000000000 --- a/lib/irs/win32/libirs.vcxproj.filters.in +++ /dev/null @@ -1,33 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - - - - Source Files - - - Source Files - - - - - Header Files - - - diff --git a/lib/irs/win32/libirs.vcxproj.in b/lib/irs/win32/libirs.vcxproj.in deleted file mode 100644 index b5a96a0b11..0000000000 --- a/lib/irs/win32/libirs.vcxproj.in +++ /dev/null @@ -1,140 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {A4F29CEB-7644-4A7F-BE9E-02B6A90E4919} - Win32Proj - libirs - @WINDOWS_TARGET_PLATFORM_VERSION@ - - - - DynamicLibrary - true - MultiByte - @PLATFORM_TOOLSET@ - - - DynamicLibrary - false - true - MultiByte - @PLATFORM_TOOLSET@ - - - - - - - - - - - - - true - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - - - false - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - - - - - - Level4 - false - Disabled - WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBIRS_EXPORTS;%(PreprocessorDefinitions);%(PreprocessorDefinitions) - ..\..\..\config.h - .\;..\..\..\;include;..\include;..\..\isc\win32;..\..\isc\win32\include;..\..\isc\include;..\..\isccfg\include;..\..\dns\include;@LIBXML2_INC@@OPENSSL_INC@@GEOIP_INC@%(AdditionalIncludeDirectories) - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - true - CompileAsC - - - Console - true - ..\..\isc\win32\$(Configuration);..\..\dns\win32\$(Configuration);..\..\isccfg\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@libisc.lib;libdns.lib;libisccfg.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) - .\libirs.def - .\$(Configuration)\$(ProjectName).lib - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - - - - - Level1 - true - - - MaxSpeed - true - @INTRINSIC@ - WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBIRS_EXPORTS;%(PreprocessorDefinitions);%(PreprocessorDefinitions) - ..\..\..\config.h - .\;..\..\..\;include;..\include;..\..\isc\win32;..\..\isc\win32\include;..\..\isc\include;..\..\isccfg\include;..\..\dns\include;@LIBXML2_INC@@OPENSSL_INC@@GEOIP_INC@%(AdditionalIncludeDirectories) - OnlyExplicitInline - false - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - CompileAsC - - - Console - false - true - true - ..\..\isc\win32\$(Configuration);..\..\dns\win32\$(Configuration);..\..\isccfg\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@libisc.lib;libdns.lib;libisccfg.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) - .\libirs.def - .\$(Configuration)\$(ProjectName).lib - Default - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - - - - - - - - - - - - - - {3840E563-D180-4761-AA9C-E6155F02EAFF} - - - {5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A} - - - {B2DFA58C-6347-478E-81E8-01E06999D4F1} - - - - - - diff --git a/lib/irs/win32/libirs.vcxproj.user b/lib/irs/win32/libirs.vcxproj.user deleted file mode 100644 index ace9a86acb..0000000000 --- a/lib/irs/win32/libirs.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/lib/irs/win32/resconf.c b/lib/irs/win32/resconf.c deleted file mode 100644 index d461502f14..0000000000 --- a/lib/irs/win32/resconf.c +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/* - * Note that on Win32 there is normally no resolv.conf since all information - * is stored in the registry. Therefore there is no ordering like the - * contents of resolv.conf. Since the "search" or "domain" keyword, on - * Win32 if a search list is found it is used, otherwise the domain name - * is used since they are mutually exclusive. The search list can be entered - * in the DNS tab of the "Advanced TCP/IP settings" window under the same place - * that you add your nameserver list. - */ - -#define HAVE_GET_WIN32_NAMESERVERS 1 - -#include "../resconf.c" -#include - -#define TCPIP_SUBKEY "SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters" - -isc_result_t -get_win32_searchlist(irs_resconf_t *conf) { - isc_result_t result = ISC_R_SUCCESS; - HKEY hKey; - char searchlist[MAX_PATH]; - DWORD searchlen = MAX_PATH; - LSTATUS status; - char *cp; - - REQUIRE(conf != NULL); - - memset(searchlist, 0, MAX_PATH); - status = RegOpenKeyEx(HKEY_LOCAL_MACHINE, TCPIP_SUBKEY, 0, KEY_READ, - &hKey); - if (status != ERROR_SUCCESS) { - return (ISC_R_SUCCESS); - } - - status = RegQueryValueEx(hKey, "SearchList", NULL, NULL, - (LPBYTE)searchlist, &searchlen); - RegCloseKey(hKey); - if (status != ERROR_SUCCESS) { - return (ISC_R_SUCCESS); - } - - cp = strtok((char *)searchlist, ", \0"); - while (cp != NULL) { - result = add_search(conf, cp); - if (result != ISC_R_SUCCESS) { - break; - } - cp = strtok(NULL, ", \0"); - } - return (result); -} - -isc_result_t -get_win32_nameservers(irs_resconf_t *conf) { - isc_result_t result; - FIXED_INFO *FixedInfo; - ULONG BufLen = sizeof(FIXED_INFO); - DWORD dwRetVal; - IP_ADDR_STRING *pIPAddr; - - REQUIRE(conf != NULL); - - FixedInfo = (FIXED_INFO *)GlobalAlloc(GPTR, BufLen); - if (FixedInfo == NULL) { - return (ISC_R_NOMEMORY); - } - dwRetVal = GetNetworkParams(FixedInfo, &BufLen); - if (dwRetVal == ERROR_BUFFER_OVERFLOW) { - GlobalFree(FixedInfo); - FixedInfo = GlobalAlloc(GPTR, BufLen); - if (FixedInfo == NULL) { - return (ISC_R_NOMEMORY); - } - dwRetVal = GetNetworkParams(FixedInfo, &BufLen); - } - if (dwRetVal != ERROR_SUCCESS) { - GlobalFree(FixedInfo); - return (ISC_R_FAILURE); - } - - result = get_win32_searchlist(conf); - if (result != ISC_R_SUCCESS) { - goto cleanup; - } - - if (ISC_LIST_EMPTY(conf->searchlist) && - strlen(FixedInfo->DomainName) > 0) { - result = add_search(conf, FixedInfo->DomainName); - if (result != ISC_R_SUCCESS) { - goto cleanup; - } - } - - /* Get the list of nameservers */ - pIPAddr = &FixedInfo->DnsServerList; - while (pIPAddr) { - if (conf->numns >= RESCONFMAXNAMESERVERS) { - break; - } - - result = add_server(conf->mctx, pIPAddr->IpAddress.String, - &conf->nameservers); - if (result != ISC_R_SUCCESS) { - break; - } - conf->numns++; - pIPAddr = pIPAddr->Next; - } - -cleanup: - if (FixedInfo != NULL) { - GlobalFree(FixedInfo); - } - return (result); -} diff --git a/lib/isc/Makefile.am b/lib/isc/Makefile.am index c5368309f4..685398e062 100644 --- a/lib/isc/Makefile.am +++ b/lib/isc/Makefile.am @@ -5,6 +5,7 @@ lib_LTLIBRARIES = libisc.la libisc_ladir = $(includedir)/isc libisc_la_HEADERS = \ include/isc/aes.h \ + include/isc/align.h \ include/isc/app.h \ include/isc/assertions.h \ include/isc/astack.h \ @@ -18,9 +19,11 @@ libisc_la_HEADERS = \ include/isc/buffer.h \ include/isc/cmocka.h \ include/isc/commandline.h \ + include/isc/condition.h \ include/isc/counter.h \ include/isc/crc64.h \ include/isc/deprecated.h \ + include/isc/dir.h \ include/isc/endian.h \ include/isc/errno.h \ include/isc/error.h \ @@ -51,17 +54,22 @@ libisc_la_HEADERS = \ include/isc/md.h \ include/isc/mem.h \ include/isc/meminfo.h \ + include/isc/mutex.h \ include/isc/mutexatomic.h \ include/isc/mutexblock.h \ + include/isc/net.h \ include/isc/netaddr.h \ + include/isc/netdb.h \ include/isc/netmgr.h \ include/isc/netscope.h \ include/isc/nonce.h \ + include/isc/offset.h \ + include/isc/once.h \ include/isc/os.h \ include/isc/parseint.h \ + include/isc/platform.h \ include/isc/pool.h \ include/isc/portset.h \ - include/isc/platform.h \ include/isc/print.h \ include/isc/queue.h \ include/isc/quota.h \ @@ -80,35 +88,26 @@ libisc_la_HEADERS = \ include/isc/siphash.h \ include/isc/sockaddr.h \ include/isc/socket.h \ + include/isc/stat.h \ include/isc/stats.h \ + include/isc/stdatomic.h \ include/isc/stdio.h \ + include/isc/stdtime.h \ include/isc/strerr.h \ include/isc/string.h \ include/isc/symtab.h \ + include/isc/syslog.h \ include/isc/task.h \ include/isc/taskpool.h \ + include/isc/thread.h \ + include/isc/time.h \ include/isc/timer.h \ include/isc/tls.h \ include/isc/tm.h \ include/isc/types.h \ include/isc/url.h \ include/isc/utf8.h \ - include/isc/util.h \ - pthreads/include/isc/condition.h\ - pthreads/include/isc/mutex.h \ - pthreads/include/isc/once.h \ - pthreads/include/isc/thread.h \ - unix/errno2result.h \ - unix/include/isc/align.h \ - unix/include/isc/dir.h \ - unix/include/isc/netdb.h \ - unix/include/isc/net.h \ - unix/include/isc/offset.h \ - unix/include/isc/stat.h \ - unix/include/isc/stdatomic.h \ - unix/include/isc/stdtime.h \ - unix/include/isc/syslog.h \ - unix/include/isc/time.h + include/isc/util.h pk11dir = $(includedir)/pk11 pk11_HEADERS = \ @@ -132,30 +131,11 @@ libisc_la_SOURCES = \ netmgr/tcp.c \ netmgr/tcpdns.c \ netmgr/tlsdns.c \ - netmgr/tlsstream.c \ + netmgr/tlsstream.c \ netmgr/udp.c \ netmgr/uv-compat.c \ netmgr/uv-compat.h \ netmgr/uverr2result.c \ - unix/pk11_api.c \ - unix/dir.c \ - unix/errno.c \ - unix/errno2result.c \ - unix/file.c \ - unix/fsaccess.c \ - unix/interfaceiter.c \ - unix/meminfo.c \ - unix/net.c \ - unix/os.c \ - unix/resource.c \ - unix/socket.c \ - unix/stdio.c \ - unix/stdtime.c \ - unix/syslog.c \ - unix/time.c \ - url.c \ - pk11.c \ - pk11_result.c \ aes.c \ app.c \ assertions.c \ @@ -166,20 +146,30 @@ libisc_la_SOURCES = \ bind9.c \ buffer.c \ commandline.c \ + condition.c \ counter.c \ crc64.c \ + dir.c \ entropy.c \ + entropy_private.h \ + errno.c \ + errno2result.c \ + errno2result.h \ error.c \ event.c \ + file.c \ + fsaccess.c \ fsaccess_common.c \ + fsaccess_common_p.h \ glob.c \ hash.c \ - hp.c \ - ht.c \ heap.c \ hex.c \ hmac.c \ + hp.c \ + ht.c \ httpd.c \ + interfaceiter.c \ iterated_hash.c \ lex.c \ lib.c \ @@ -187,51 +177,60 @@ libisc_la_SOURCES = \ managers.c \ md.c \ mem.c \ + mem_p.h \ + meminfo.c \ + mutex.c \ mutexblock.c \ + net.c \ netaddr.c \ + netmgr_p.h \ netscope.c \ nonce.c \ openssl_shim.c \ - queue.c \ openssl_shim.h \ - pool.c \ + os.c \ parseint.c \ + pk11.c \ + pk11_api.c \ + pk11_result.c \ + pool.c \ portset.c \ + queue.c \ quota.c \ radix.c \ random.c \ ratelimiter.c \ - region.c \ regex.c \ + region.c \ + resource.c \ result.c \ rwlock.c \ safe.c \ serial.c \ siphash.c \ sockaddr.c \ + socket.c \ + socket_p.h \ stats.c \ + stdio.c \ + stdtime.c \ string.c \ symtab.c \ + syslog.c \ task.c \ + task_p.h \ taskpool.c \ + thread.c \ + time.c \ timer.c \ + timer_p.h \ tls.c \ + tls_p.h \ + tm.c \ trampoline.c \ trampoline_p.h \ - tm.c \ - utf8.c \ - pthreads/condition.c \ - pthreads/mutex.c \ - pthreads/thread.c \ - entropy_private.h \ - fsaccess_common_p.h \ - task_p.h \ - timer_p.h \ - socket_p.h \ - netmgr_p.h \ - lib_p.h \ - mem_p.h \ - tls_p.h + url.c \ + utf8.c libisc_la_CPPFLAGS = \ $(AM_CPPFLAGS) \ diff --git a/lib/isc/app.c b/lib/isc/app.c index 6a9e40acdf..50353705b2 100644 --- a/lib/isc/app.c +++ b/lib/isc/app.c @@ -12,18 +12,16 @@ /*! \file */ #include +#include +#include +#include #include #include #include +#include #include #include -#ifndef WIN32 -#include -#include -#include -#endif /* WIN32 */ - #include #include #include @@ -38,12 +36,6 @@ #include #include -#ifdef WIN32 -#include -#else /* WIN32 */ -#include -#endif /* WIN32 */ - /*% * For BIND9 internal applications built with threads, we use a single app * context and let multiple worker, I/O, timer threads do actual jobs. @@ -52,25 +44,12 @@ static isc_thread_t blockedthread; static atomic_bool is_running = ATOMIC_VAR_INIT(0); -#ifdef WIN32 -/* - * We need to remember which thread is the main thread... - */ -static isc_thread_t main_thread; -#endif /* ifdef WIN32 */ - /* * The application context of this module. */ #define APPCTX_MAGIC ISC_MAGIC('A', 'p', 'c', 'x') #define VALID_APPCTX(c) ISC_MAGIC_VALID(c, APPCTX_MAGIC) -#ifdef WIN32 -#define NUM_EVENTS 2 - -enum { RELOAD_EVENT, SHUTDOWN_EVENT }; -#endif /* WIN32 */ - struct isc_appctx { unsigned int magic; isc_mem_t *mctx; @@ -81,17 +60,12 @@ struct isc_appctx { atomic_bool want_shutdown; atomic_bool want_reload; atomic_bool blocked; -#ifdef WIN32 - HANDLE hEvents[NUM_EVENTS]; -#else /* WIN32 */ isc_mutex_t readylock; isc_condition_t ready; -#endif /* WIN32 */ }; static isc_appctx_t isc_g_appctx; -#ifndef WIN32 static void handle_signal(int sig, void (*handler)(int)) { struct sigaction sa; @@ -106,7 +80,6 @@ handle_signal(int sig, void (*handler)(int)) { "handle_signal() %d setup: %s", sig, strbuf); } } -#endif /* ifndef WIN32 */ isc_result_t isc_app_ctxstart(isc_appctx_t *ctx) { @@ -118,10 +91,8 @@ isc_app_ctxstart(isc_appctx_t *ctx) { isc_mutex_init(&ctx->lock); -#ifndef WIN32 isc_mutex_init(&ctx->readylock); isc_condition_init(&ctx->ready); -#endif /* WIN32 */ ISC_LIST_INIT(ctx->on_run); @@ -131,15 +102,6 @@ isc_app_ctxstart(isc_appctx_t *ctx) { atomic_init(&ctx->want_reload, false); atomic_init(&ctx->blocked, false); -#ifdef WIN32 - main_thread = GetCurrentThread(); - - /* Create the reload event in a non-signaled state */ - ctx->hEvents[RELOAD_EVENT] = CreateEvent(NULL, FALSE, FALSE, NULL); - - /* Create the shutdown event in a non-signaled state */ - ctx->hEvents[SHUTDOWN_EVENT] = CreateEvent(NULL, FALSE, FALSE, NULL); -#else /* WIN32 */ int presult; sigset_t sset; char strbuf[ISC_STRERRORSIZE]; @@ -176,8 +138,6 @@ isc_app_ctxstart(isc_appctx_t *ctx) { "isc_app_start() pthread_sigmask: %s", strbuf); } -#endif /* WIN32 */ - return (ISC_R_SUCCESS); } @@ -229,10 +189,6 @@ isc_app_ctxrun(isc_appctx_t *ctx) { REQUIRE(VALID_APPCTX(ctx)); -#ifdef WIN32 - REQUIRE(main_thread == GetCurrentThread()); -#endif /* ifdef WIN32 */ - if (atomic_compare_exchange_strong_acq_rel(&ctx->running, &(bool){ false }, true)) { @@ -251,14 +207,12 @@ isc_app_ctxrun(isc_appctx_t *ctx) { UNLOCK(&ctx->lock); } -#ifndef WIN32 /* * BIND9 internal tools using multiple contexts do not * rely on signal. */ if (isc_bind9 && ctx != &isc_g_appctx) { return (ISC_R_SUCCESS); } -#endif /* WIN32 */ /* * There is no danger if isc_app_shutdown() is called before we @@ -267,29 +221,6 @@ isc_app_ctxrun(isc_appctx_t *ctx) { * sigwait(). */ while (!atomic_load_acquire(&ctx->want_shutdown)) { -#ifdef WIN32 - DWORD dwWaitResult = WaitForMultipleObjects( - NUM_EVENTS, ctx->hEvents, FALSE, INFINITE); - - /* See why we returned */ - - if (WaitSucceeded(dwWaitResult, NUM_EVENTS)) { - /* - * The return was due to one of the events - * being signaled - */ - switch (WaitSucceededIndex(dwWaitResult)) { - case RELOAD_EVENT: - atomic_store_release(&ctx->want_reload, true); - - break; - - case SHUTDOWN_EVENT: - atomic_store_release(&ctx->want_shutdown, true); - break; - } - } -#else /* WIN32 */ if (isc_bind9) { sigset_t sset; int sig; @@ -339,7 +270,6 @@ isc_app_ctxrun(isc_appctx_t *ctx) { UNLOCK(&ctx->readylock); } } -#endif /* WIN32 */ if (atomic_compare_exchange_strong_acq_rel( &ctx->want_reload, &(bool){ true }, false)) { @@ -385,9 +315,6 @@ isc_app_ctxshutdown(isc_appctx_t *ctx) { if (atomic_compare_exchange_strong_acq_rel(&ctx->shutdown_requested, &(bool){ false }, true)) { -#ifdef WIN32 - SetEvent(ctx->hEvents[SHUTDOWN_EVENT]); -#else /* WIN32 */ if (isc_bind9 && ctx != &isc_g_appctx) { /* BIND9 internal, but using multiple contexts */ atomic_store_release(&ctx->want_shutdown, true); @@ -406,7 +333,6 @@ isc_app_ctxshutdown(isc_appctx_t *ctx) { atomic_store_release(&ctx->want_shutdown, true); SIGNAL(&ctx->ready); } -#endif /* WIN32 */ } } @@ -425,9 +351,6 @@ isc_app_ctxsuspend(isc_appctx_t *ctx) { * Don't send the reload signal if we're shutting down. */ if (!atomic_load_acquire(&ctx->shutdown_requested)) { -#ifdef WIN32 - SetEvent(ctx->hEvents[RELOAD_EVENT]); -#else /* WIN32 */ if (isc_bind9 && ctx != &isc_g_appctx) { /* BIND9 internal, but using multiple contexts */ atomic_store_release(&ctx->want_reload, true); @@ -446,7 +369,6 @@ isc_app_ctxsuspend(isc_appctx_t *ctx) { atomic_store_release(&ctx->want_reload, true); SIGNAL(&ctx->ready); } -#endif /* WIN32 */ } } @@ -460,10 +382,8 @@ isc_app_ctxfinish(isc_appctx_t *ctx) { REQUIRE(VALID_APPCTX(ctx)); isc_mutex_destroy(&ctx->lock); -#ifndef WIN32 isc_mutex_destroy(&ctx->readylock); isc_condition_destroy(&ctx->ready); -#endif /* WIN32 */ } void @@ -477,16 +397,12 @@ isc_app_block(void) { REQUIRE(atomic_compare_exchange_strong_acq_rel(&isc_g_appctx.blocked, &(bool){ false }, true)); -#ifdef WIN32 - blockedthread = GetCurrentThread(); -#else /* WIN32 */ sigset_t sset; blockedthread = pthread_self(); RUNTIME_CHECK(sigemptyset(&sset) == 0 && sigaddset(&sset, SIGINT) == 0 && sigaddset(&sset, SIGTERM) == 0); RUNTIME_CHECK(pthread_sigmask(SIG_UNBLOCK, &sset, NULL) == 0); -#endif /* WIN32 */ } void @@ -495,9 +411,6 @@ isc_app_unblock(void) { REQUIRE(atomic_compare_exchange_strong_acq_rel(&isc_g_appctx.blocked, &(bool){ true }, false)); -#ifdef WIN32 - REQUIRE(blockedthread == GetCurrentThread()); -#else /* WIN32 */ REQUIRE(blockedthread == pthread_self()); sigset_t sset; @@ -505,7 +418,6 @@ isc_app_unblock(void) { sigaddset(&sset, SIGINT) == 0 && sigaddset(&sset, SIGTERM) == 0); RUNTIME_CHECK(pthread_sigmask(SIG_BLOCK, &sset, NULL) == 0); -#endif /* WIN32 */ } isc_result_t diff --git a/lib/isc/assertions.c b/lib/isc/assertions.c index fc6b7495b4..0e89835a4d 100644 --- a/lib/isc/assertions.c +++ b/lib/isc/assertions.c @@ -21,10 +21,6 @@ #include #include -#if _WIN32 -#include -#endif - /* * The maximum number of stack frames to dump on assertion failure. */ diff --git a/lib/isc/backtrace.c b/lib/isc/backtrace.c index 410fc781b1..4fc3200bb0 100644 --- a/lib/isc/backtrace.c +++ b/lib/isc/backtrace.c @@ -23,176 +23,7 @@ #include #include -#if defined(_WIN32) && defined(_DEBUG) - -#include - -int -isc_backtrace(void **addrs, int maxaddrs, int *nframes) { - USHORT n = CaptureStackBackTrace(1, maxaddrs, addrs, NULL); - - return (n); -} - -#define TRACE_MAX_DEPTH 128 -#define TRACE_MAX_FUNCTION_NAME_LENGTH 1024 - -int -vasprintf(char **strp, const char *format, va_list ap) { - int len, retval; - char *str = NULL; - - len = _vscprintf(format, ap); - if (len == -1) { - return (-1); - } - - str = malloc((size_t)len + 1); - if (str == NULL) { - return (-1); - } - - retval = vsnprintf(str, len + 1, format, ap); - if (retval == -1) { - free(str); - return (-1); - } - - *strp = str; - return (retval); -} - -int -asprintf(char **strp, const char *format, ...) { - va_list ap; - int retval; - - va_start(ap, format); - retval = vasprintf(strp, format, ap); - va_end(ap); - - return (retval); -} - -static char ** -_backtrace_symbols(void *const *buffer, size_t size, bool add_cr) { - HANDLE process = GetCurrentProcess(); - DWORD displacement; - uint8_t symbol_storage[sizeof(SYMBOL_INFO) + - (TRACE_MAX_FUNCTION_NAME_LENGTH - 1) * - sizeof(TCHAR)]; - SYMBOL_INFO *symbol = (SYMBOL_INFO *)symbol_storage; - uint8_t line_storage[sizeof(IMAGEHLP_LINE64)]; - IMAGEHLP_LINE64 *line = (IMAGEHLP_LINE64 *)line_storage; - char **lines = NULL; - char **outbuf = NULL; - char *cur = NULL; - size_t outsize = 0; - - if (buffer == NULL || size <= 0) { - return (NULL); - } - - lines = malloc(size * sizeof(*lines)); - if (lines == NULL) { - return (NULL); - } - - /* Initialize symbol_info */ - symbol->MaxNameLen = TRACE_MAX_FUNCTION_NAME_LENGTH; - symbol->SizeOfStruct = sizeof(SYMBOL_INFO); - - line->SizeOfStruct = sizeof(IMAGEHLP_LINE64); - - SymInitialize(process, NULL, TRUE); - - /* adjust for the char ** array size */ - outsize = size * sizeof(char *); - for (size_t i = 0; i < size; i++) { - DWORD64 address = (DWORD64)(buffer[i]); - BOOL r; - char *file = NULL; - unsigned int lineno; - int len; - - if (SymFromAddr(process, address, NULL, symbol) && - SymGetLineFromAddr64(process, address, &displacement, line)) - { - file = line->FileName; - lineno = line->LineNumber; - } else { - file = "??"; - lineno = 0; - } - - len = asprintf(&lines[i], "#%-2d %p in %s at %s:%lu%s", i, - (void *)symbol->Address, symbol->Name, - line->FileName, line->LineNumber, - (add_cr) ? "\n" : ""); - if (len == -1) { - goto cleanup; - } - - outsize += strlen(lines[i]) + 1; - } - - outbuf = malloc(outsize); - if (outbuf == NULL) { - goto cleanup; - } - - cur = (char *)&outbuf[size]; - for (size_t i = 0; i < size; i++) { - size_t remaining = outsize - (cur - (char *)outbuf); - size_t copied = strlcpy(cur, lines[i], remaining); - if (copied >= remaining) { - free(outbuf); - outbuf = NULL; - goto cleanup; - } - - outbuf[i] = cur; - cur += copied + 1; - } - -cleanup: - for (size_t i = 0; i < size; i++) { - free(lines[i]); - } - free(lines); - - return (outbuf); -} - -char ** -isc_backtrace_symbols(void *const *buffer, int size) { - if (buffer == NULL || size <= 0) { - return (NULL); - } - return (_backtrace_symbols(buffer, size, false)); -} - -void -isc_backtrace_symbols_fd(void *const *buffer, int size, int fd) { - char **strings = NULL; - size_t sz; - - strings = _backtrace_symbols(buffer, size, true); - if (strings == NULL) { - return; - } - - for (size_t i = 0; i < (size_t)size; i++) { - sz = strlen(strings[i]); - if (write(fd, strings[i], sz) == -1) { - return; - } - } - - free(strings); -} - -#elif HAVE_BACKTRACE_SYMBOLS +#if HAVE_BACKTRACE_SYMBOLS int isc_backtrace(void **addrs, int maxaddrs) { int n; diff --git a/lib/isc/pthreads/condition.c b/lib/isc/condition.c similarity index 100% rename from lib/isc/pthreads/condition.c rename to lib/isc/condition.c diff --git a/lib/isc/unix/dir.c b/lib/isc/dir.c similarity index 100% rename from lib/isc/unix/dir.c rename to lib/isc/dir.c diff --git a/lib/isc/unix/errno.c b/lib/isc/errno.c similarity index 100% rename from lib/isc/unix/errno.c rename to lib/isc/errno.c diff --git a/lib/isc/unix/errno2result.c b/lib/isc/errno2result.c similarity index 100% rename from lib/isc/unix/errno2result.c rename to lib/isc/errno2result.c diff --git a/lib/isc/unix/errno2result.h b/lib/isc/errno2result.h similarity index 100% rename from lib/isc/unix/errno2result.h rename to lib/isc/errno2result.h diff --git a/lib/isc/unix/file.c b/lib/isc/file.c similarity index 100% rename from lib/isc/unix/file.c rename to lib/isc/file.c diff --git a/lib/isc/unix/fsaccess.c b/lib/isc/fsaccess.c similarity index 100% rename from lib/isc/unix/fsaccess.c rename to lib/isc/fsaccess.c diff --git a/lib/isc/glob.c b/lib/isc/glob.c index bf9daa9987..6a265bf5a1 100644 --- a/lib/isc/glob.c +++ b/lib/isc/glob.c @@ -10,6 +10,7 @@ */ #include +#include #include #include @@ -20,28 +21,6 @@ #include #include -#if HAVE_GLOB_H -#include -#elif defined(_WIN32) -#include -#include - -#include -#define GLOB_ERR 0x0004 /* Return on error. */ -#define GLOB_NOSPACE (-1) -#define GLOB_NOMATCH (-3) - -/* custom glob implementation for windows */ -static int -glob(const char *pattern, int flags, void *unused, glob_t *pglob); - -static void -globfree(glob_t *pglob); - -#else -#error "Required header missing: glob.h" -#endif - isc_result_t isc_glob(const char *pattern, glob_t *pglob) { REQUIRE(pattern != NULL); @@ -70,174 +49,3 @@ isc_globfree(glob_t *pglob) { REQUIRE(pglob != NULL); globfree(pglob); } - -#if defined(_WIN32) - -typedef struct file_path file_path_t; - -struct file_path { - char *path; - ISC_LINK(file_path_t) link; -}; - -typedef ISC_LIST(file_path_t) file_list_t; - -/* map a winapi error to a convenient errno code */ -static int -map_error(DWORD win_err_code) { - switch (win_err_code) { - case ERROR_FILE_NOT_FOUND: - case ERROR_PATH_NOT_FOUND: - return (GLOB_NOMATCH); - case ERROR_ACCESS_DENIED: - return (EACCES); - case ERROR_NOT_ENOUGH_MEMORY: - return (GLOB_NOSPACE); - default: - return (EIO); - } -} - -/* add file in directory dir, that matches glob expression - * provided in function glob(), to the linked list fl */ -static void -append_file(isc_mem_t *mctx, file_list_t *fl, const char *dir, const char *file, - size_t full_path_len) { - file_path_t *fp = isc_mem_get(mctx, sizeof(file_path_t)); - fp->path = isc_mem_get(mctx, full_path_len + 1); - _snprintf(fp->path, full_path_len + 1, "%s%s", dir, file); - - ISC_LINK_INIT(fp, link); - ISC_LIST_PREPEND(*fl, fp, link); -} - -/* sort files alphabetically case insensitive on windows */ -static int -path_cmp(const void *path1, const void *path2) { - return _stricmp((const char *)path1, (const char *)path2); -} - -static int -glob(const char *pattern, int flags, void *unused, glob_t *pglob) { - char path[MAX_PATH]; - WIN32_FIND_DATAA find_data; - int ec; - HANDLE hnd; - - REQUIRE(pattern != NULL); - REQUIRE(pglob != NULL); - - UNUSED(flags); - UNUSED(unused); - - pglob->mctx = NULL; - pglob->gl_pathc = 0; - pglob->gl_pathv = NULL; - - hnd = FindFirstFileA(pattern, &find_data); - if (hnd == INVALID_HANDLE_VALUE) { - return (map_error(GetLastError())); - } - - path[MAX_PATH - 1] = 0; - strncpy(path, pattern, MAX_PATH); - if (path[MAX_PATH - 1] != 0) { - errno = ENAMETOOLONG; - goto fail; - } - - // strip filename from path. - size_t dir_len = strlen(path); - while (dir_len > 0 && path[dir_len - 1] != '/' && - path[dir_len - 1] != '\\') { - dir_len--; - } - - path[dir_len] = '\0'; - - isc_mem_create(&pglob->mctx); - pglob->reserved = isc_mem_get(pglob->mctx, sizeof(file_list_t)); - ISC_LIST_INIT(*(file_list_t *)pglob->reserved); - - size_t entries = 0; - - do { - size_t file_len = strlen(find_data.cFileName); - size_t full_path_len = dir_len + file_len; - - if (full_path_len > MAX_PATH) { - errno = ENAMETOOLONG; - goto fail; - } - - append_file(pglob->mctx, (file_list_t *)pglob->reserved, path, - find_data.cFileName, full_path_len); - - entries++; - } while (FindNextFileA(hnd, &find_data)); - - FindClose(hnd); - - pglob->gl_pathv = isc_mem_get(pglob->mctx, - (entries + 1) * sizeof(char *)); - pglob->gl_pathv[entries] = NULL; - pglob->gl_pathc = entries; - - file_list_t *fl = (file_list_t *)pglob->reserved; - - size_t e = 0; - file_path_t *fp; - for (fp = ISC_LIST_HEAD(*fl); fp != NULL; fp = ISC_LIST_NEXT(fp, link)) - { - pglob->gl_pathv[e++] = fp->path; - } - - qsort(pglob->gl_pathv, pglob->gl_pathc, sizeof(char *), path_cmp); - - return (0); - -fail: - ec = errno; - - FindClose(hnd); - - if (pglob->mctx) { - globfree(pglob); - } - - return ec; -} - -void -globfree(glob_t *pglob) { - REQUIRE(pglob != NULL); - REQUIRE(pglob->mctx != NULL); - - /* first free memory used by char ** gl_pathv */ - if (pglob->gl_pathv) { - isc_mem_put(pglob->mctx, pglob->gl_pathv, - (pglob->gl_pathc + 1) * sizeof(char *)); - pglob->gl_pathv = NULL; - } - - file_list_t *fl = (file_list_t *)pglob->reserved; - file_path_t *p, *next; - - /* next free each individual file path string + nodes in list */ - for (p = ISC_LIST_HEAD(*fl); p != NULL; p = next) { - next = ISC_LIST_NEXT(p, link); - isc_mem_put(pglob->mctx, p->path, strlen(p->path) + 1); - isc_mem_put(pglob->mctx, p, sizeof(file_path_t)); - } - - /* free linked list of files */ - isc_mem_put(pglob->mctx, pglob->reserved, sizeof(file_list_t)); - pglob->reserved = NULL; - pglob->gl_pathc = 0; - pglob->gl_pathv = NULL; - - isc_mem_destroy(&pglob->mctx); - pglob->mctx = NULL; -} - -#endif /* defined(_WIN32) */ diff --git a/lib/isc/hash.c b/lib/isc/hash.c index 9a75779528..6f3c701c6a 100644 --- a/lib/isc/hash.c +++ b/lib/isc/hash.c @@ -12,9 +12,6 @@ #include #include #include -#if defined(WIN32) || defined(WIN64) -#include -#endif /* if defined(WIN32) || defined(WIN64) */ #include "entropy_private.h" #include "isc/hash.h" /* IWYU pragma: keep */ diff --git a/lib/isc/unix/include/isc/align.h b/lib/isc/include/isc/align.h similarity index 100% rename from lib/isc/unix/include/isc/align.h rename to lib/isc/include/isc/align.h diff --git a/lib/isc/include/isc/attributes.h b/lib/isc/include/isc/attributes.h index ab7315ad91..330e7d753c 100644 --- a/lib/isc/include/isc/attributes.h +++ b/lib/isc/include/isc/attributes.h @@ -11,16 +11,8 @@ #pragma once -#ifdef _WIN32 -#define __attribute__(attribute) /* do nothing */ -#else -#define __declspec(modifier) /* do nothing */ -#endif - #if HAVE_FUNC_ATTRIBUTE_NORETURN #define ISC_NORETURN __attribute__((noreturn)) -#elif _WIN32 -#define ISC_NORETURN __declspec(noreturn) #else #define ISC_NORETURN #endif @@ -83,4 +75,4 @@ #define ISC_ATTR_DEALLOCATOR_IDX(deallocator, idx) #define ISC_ATTR_MALLOC_DEALLOCATOR(deallocator) #define ISC_ATTR_MALLOC_DEALLOCATOR_IDX(deallocator, idx) -#endif /* HAVE_FUNC_ATTRIBUTE_MALLOC */ \ No newline at end of file +#endif /* HAVE_FUNC_ATTRIBUTE_MALLOC */ diff --git a/lib/isc/include/isc/barrier.h b/lib/isc/include/isc/barrier.h index 48353c69a8..fd92334d0d 100644 --- a/lib/isc/include/isc/barrier.h +++ b/lib/isc/include/isc/barrier.h @@ -13,7 +13,7 @@ #include -#if __SANITIZE_THREAD__ && !defined(WIN32) +#if __SANITIZE_THREAD__ #include diff --git a/lib/isc/pthreads/include/isc/condition.h b/lib/isc/include/isc/condition.h similarity index 100% rename from lib/isc/pthreads/include/isc/condition.h rename to lib/isc/include/isc/condition.h diff --git a/lib/isc/unix/include/isc/dir.h b/lib/isc/include/isc/dir.h similarity index 100% rename from lib/isc/unix/include/isc/dir.h rename to lib/isc/include/isc/dir.h diff --git a/lib/isc/include/isc/endian.h b/lib/isc/include/isc/endian.h index dc770f6705..57122d85b8 100644 --- a/lib/isc/include/isc/endian.h +++ b/lib/isc/include/isc/endian.h @@ -30,30 +30,6 @@ #define le64toh(x) letoh64(x) #endif /* !be16toh */ -#elif defined(_WIN32) - -/* - * Windows is always little-endian and has its own byte-swapping routines, so - * use these. - */ - -#include - -#define htobe16(x) _byteswap_ushort(x) -#define htole16(x) (x) -#define be16toh(x) _byteswap_ushort(x) -#define le16toh(x) (x) - -#define htobe32(x) _byteswap_ulong(x) -#define htole32(x) (x) -#define be32toh(x) _byteswap_ulong(x) -#define le32toh(x) (x) - -#define htobe64(x) _byteswap_uint64(x) -#define htole64(x) (x) -#define be64toh(x) _byteswap_uint64(x) -#define le64toh(x) (x) - #elif defined __APPLE__ /* diff --git a/lib/isc/pthreads/include/isc/mutex.h b/lib/isc/include/isc/mutex.h similarity index 100% rename from lib/isc/pthreads/include/isc/mutex.h rename to lib/isc/include/isc/mutex.h diff --git a/lib/isc/unix/include/isc/net.h b/lib/isc/include/isc/net.h similarity index 100% rename from lib/isc/unix/include/isc/net.h rename to lib/isc/include/isc/net.h diff --git a/lib/isc/include/isc/netaddr.h b/lib/isc/include/isc/netaddr.h index d4d417e852..ba666fa7d6 100644 --- a/lib/isc/include/isc/netaddr.h +++ b/lib/isc/include/isc/netaddr.h @@ -21,10 +21,8 @@ #include #include -#ifndef _WIN32 #include #include -#endif /* ifndef _WIN32 */ ISC_LANG_BEGINDECLS @@ -33,9 +31,7 @@ struct isc_netaddr { union { struct in_addr in; struct in6_addr in6; -#ifndef _WIN32 - char un[sizeof(((struct sockaddr_un *)0)->sun_path)]; -#endif /* ifndef _WIN32 */ + char un[sizeof(((struct sockaddr_un *)0)->sun_path)]; } type; uint32_t zone; }; diff --git a/lib/isc/unix/include/isc/netdb.h b/lib/isc/include/isc/netdb.h similarity index 100% rename from lib/isc/unix/include/isc/netdb.h rename to lib/isc/include/isc/netdb.h diff --git a/lib/isc/unix/include/isc/offset.h b/lib/isc/include/isc/offset.h similarity index 100% rename from lib/isc/unix/include/isc/offset.h rename to lib/isc/include/isc/offset.h diff --git a/lib/isc/pthreads/include/isc/once.h b/lib/isc/include/isc/once.h similarity index 100% rename from lib/isc/pthreads/include/isc/once.h rename to lib/isc/include/isc/once.h diff --git a/lib/isc/include/isc/sockaddr.h b/lib/isc/include/isc/sockaddr.h index 148034c6e6..a072614094 100644 --- a/lib/isc/include/isc/sockaddr.h +++ b/lib/isc/include/isc/sockaddr.h @@ -19,9 +19,8 @@ #include #include #include -#ifndef _WIN32 + #include -#endif /* ifndef _WIN32 */ struct isc_sockaddr { union { @@ -29,9 +28,7 @@ struct isc_sockaddr { struct sockaddr_in sin; struct sockaddr_in6 sin6; struct sockaddr_storage ss; -#ifndef _WIN32 - struct sockaddr_un sunix; -#endif /* ifndef _WIN32 */ + struct sockaddr_un sunix; } type; unsigned int length; /* XXXRTH beginning? */ ISC_LINK(struct isc_sockaddr) link; diff --git a/lib/isc/unix/include/isc/stat.h b/lib/isc/include/isc/stat.h similarity index 100% rename from lib/isc/unix/include/isc/stat.h rename to lib/isc/include/isc/stat.h diff --git a/lib/isc/unix/include/isc/stdatomic.h b/lib/isc/include/isc/stdatomic.h similarity index 100% rename from lib/isc/unix/include/isc/stdatomic.h rename to lib/isc/include/isc/stdatomic.h diff --git a/lib/isc/unix/include/isc/stdtime.h b/lib/isc/include/isc/stdtime.h similarity index 100% rename from lib/isc/unix/include/isc/stdtime.h rename to lib/isc/include/isc/stdtime.h diff --git a/lib/isc/unix/include/isc/syslog.h b/lib/isc/include/isc/syslog.h similarity index 100% rename from lib/isc/unix/include/isc/syslog.h rename to lib/isc/include/isc/syslog.h diff --git a/lib/isc/pthreads/include/isc/thread.h b/lib/isc/include/isc/thread.h similarity index 100% rename from lib/isc/pthreads/include/isc/thread.h rename to lib/isc/include/isc/thread.h diff --git a/lib/isc/unix/include/isc/time.h b/lib/isc/include/isc/time.h similarity index 100% rename from lib/isc/unix/include/isc/time.h rename to lib/isc/include/isc/time.h diff --git a/lib/isc/include/isc/types.h b/lib/isc/include/isc/types.h index d05433a710..4581d0bc9d 100644 --- a/lib/isc/include/isc/types.h +++ b/lib/isc/include/isc/types.h @@ -82,13 +82,9 @@ typedef struct isc_socket isc_socket_t; /*%< Socket */ typedef struct isc_socketevent isc_socketevent_t; /*%< Socket Event */ typedef struct isc_socketmgr isc_socketmgr_t; /*%< Socket Manager */ typedef struct isc_stats isc_stats_t; /*%< Statistics */ -#if defined(_WIN32) && !defined(_WIN64) -typedef int_fast32_t isc_statscounter_t; /*%< Statistics Counter */ -#else /* if defined(_WIN32) && !defined(_WIN64) */ -typedef int_fast64_t isc_statscounter_t; -#endif /* if defined(_WIN32) && !defined(_WIN64) */ -typedef struct isc_symtab isc_symtab_t; /*%< Symbol Table */ -typedef struct isc_task isc_task_t; /*%< Task */ +typedef int_fast64_t isc_statscounter_t; +typedef struct isc_symtab isc_symtab_t; /*%< Symbol Table */ +typedef struct isc_task isc_task_t; /*%< Task */ typedef ISC_LIST(isc_task_t) isc_tasklist_t; /*%< Task List */ typedef struct isc_taskmgr isc_taskmgr_t; /*%< Task Manager */ typedef struct isc_textregion isc_textregion_t; /*%< Text Region */ diff --git a/lib/isc/include/isc/util.h b/lib/isc/include/isc/util.h index f0f7f85fa4..07e7af71ea 100644 --- a/lib/isc/include/isc/util.h +++ b/lib/isc/include/isc/util.h @@ -51,7 +51,7 @@ #if HAVE_FUNC_ATTRIBUTE_CONSTRUCTOR && HAVE_FUNC_ATTRIBUTE_DESTRUCTOR #define ISC_CONSTRUCTOR __attribute__((constructor)) #define ISC_DESTRUCTOR __attribute__((destructor)) -#elif WIN32 +#else #define ISC_CONSTRUCTOR #define ISC_DESTRUCTOR #endif diff --git a/lib/isc/unix/interfaceiter.c b/lib/isc/interfaceiter.c similarity index 100% rename from lib/isc/unix/interfaceiter.c rename to lib/isc/interfaceiter.c diff --git a/lib/isc/lib_p.h b/lib/isc/lib_p.h deleted file mode 100644 index 5c330bea3c..0000000000 --- a/lib/isc/lib_p.h +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#pragma once - -void -isc__initialize(void); - -void -isc__shutdown(void); diff --git a/lib/isc/log.c b/lib/isc/log.c index e9f587017c..9b225c7e80 100644 --- a/lib/isc/log.c +++ b/lib/isc/log.c @@ -1026,24 +1026,12 @@ greatest_version(isc_logfile_t *file, int versions, int *greatestp) { isc_dir_t dir; isc_result_t result; char sep = '/'; -#ifdef _WIN32 - char *bname2; -#endif /* ifdef _WIN32 */ /* * It is safe to DE_CONST the file.name because it was copied * with isc_mem_strdup(). */ bname = strrchr(file->name, sep); -#ifdef _WIN32 - bname2 = strrchr(file->name, '\\'); - if ((bname != NULL && bname2 != NULL && bname2 > bname) || - (bname == NULL && bname2 != NULL)) - { - bname = bname2; - sep = '\\'; - } -#endif /* ifdef _WIN32 */ if (bname != NULL) { *bname++ = '\0'; dirname = file->name; @@ -1166,23 +1154,11 @@ remove_old_tsversions(isc_logfile_t *file, int versions) { size_t bnamelen; isc_dir_t dir; char sep = '/'; -#ifdef _WIN32 - char *bname2; -#endif /* ifdef _WIN32 */ /* * It is safe to DE_CONST the file.name because it was copied * with isc_mem_strdup(). */ bname = strrchr(file->name, sep); -#ifdef _WIN32 - bname2 = strrchr(file->name, '\\'); - if ((bname != NULL && bname2 != NULL && bname2 > bname) || - (bname == NULL && bname2 != NULL)) - { - bname = bname2; - sep = '\\'; - } -#endif /* ifdef _WIN32 */ if (bname != NULL) { *bname++ = '\0'; dirname = file->name; diff --git a/lib/isc/unix/meminfo.c b/lib/isc/meminfo.c similarity index 100% rename from lib/isc/unix/meminfo.c rename to lib/isc/meminfo.c diff --git a/lib/isc/pthreads/mutex.c b/lib/isc/mutex.c similarity index 100% rename from lib/isc/pthreads/mutex.c rename to lib/isc/mutex.c diff --git a/lib/isc/unix/net.c b/lib/isc/net.c similarity index 99% rename from lib/isc/unix/net.c rename to lib/isc/net.c index 6cfffbd59c..da2dd320d6 100644 --- a/lib/isc/unix/net.c +++ b/lib/isc/net.c @@ -191,9 +191,7 @@ static void initialize_action(void) { ipv4_result = try_proto(PF_INET); ipv6_result = try_proto(PF_INET6); -#ifndef _WIN32 unix_result = try_proto(PF_UNIX); -#endif /* ifndef _WIN32 */ } static void diff --git a/lib/isc/netaddr.c b/lib/isc/netaddr.c index be4d745689..c20b56991e 100644 --- a/lib/isc/netaddr.c +++ b/lib/isc/netaddr.c @@ -49,13 +49,11 @@ isc_netaddr_equal(const isc_netaddr_t *a, const isc_netaddr_t *b) { return (false); } break; -#ifndef _WIN32 case AF_UNIX: if (strcmp(a->type.un, b->type.un) != 0) { return (false); } break; -#endif /* ifndef _WIN32 */ default: return (false); } @@ -142,7 +140,6 @@ isc_netaddr_totext(const isc_netaddr_t *netaddr, isc_buffer_t *target) { case AF_INET6: type = &netaddr->type.in6; break; -#ifndef _WIN32 case AF_UNIX: alen = strlen(netaddr->type.un); if (alen > isc_buffer_availablelength(target)) { @@ -152,7 +149,6 @@ isc_netaddr_totext(const isc_netaddr_t *netaddr, isc_buffer_t *target) { (const unsigned char *)(netaddr->type.un), alen); return (ISC_R_SUCCESS); -#endif /* ifndef _WIN32 */ default: return (ISC_R_FAILURE); } @@ -312,7 +308,6 @@ isc_netaddr_fromin6(isc_netaddr_t *netaddr, const struct in6_addr *ina6) { isc_result_t isc_netaddr_frompath(isc_netaddr_t *netaddr, const char *path) { -#ifndef _WIN32 if (strlen(path) > sizeof(netaddr->type.un) - 1) { return (ISC_R_NOSPACE); } @@ -322,11 +317,6 @@ isc_netaddr_frompath(isc_netaddr_t *netaddr, const char *path) { strlcpy(netaddr->type.un, path, sizeof(netaddr->type.un)); netaddr->zone = 0; return (ISC_R_SUCCESS); -#else /* ifndef _WIN32 */ - UNUSED(netaddr); - UNUSED(path); - return (ISC_R_NOTIMPLEMENTED); -#endif /* ifndef _WIN32 */ } void @@ -355,12 +345,10 @@ isc_netaddr_fromsockaddr(isc_netaddr_t *t, const isc_sockaddr_t *s) { memmove(&t->type.in6, &s->type.sin6.sin6_addr, 16); t->zone = s->type.sin6.sin6_scope_id; break; -#ifndef _WIN32 case AF_UNIX: memmove(t->type.un, s->type.sunix.sun_path, sizeof(t->type.un)); t->zone = 0; break; -#endif /* ifndef _WIN32 */ default: INSIST(0); ISC_UNREACHABLE(); diff --git a/lib/isc/netmgr/http.c b/lib/isc/netmgr/http.c index b52fef11b6..d8c9e576fe 100644 --- a/lib/isc/netmgr/http.c +++ b/lib/isc/netmgr/http.c @@ -2267,7 +2267,6 @@ server_send_connection_header(isc_nm_http_session_t *session) { */ static void http_transpost_tcp_nodelay(isc_nmhandle_t *transphandle) { -#ifndef _WIN32 isc_nmsocket_t *tcpsock = NULL; uv_os_fd_t tcp_fd = (uv_os_fd_t)-1; @@ -2280,7 +2279,6 @@ http_transpost_tcp_nodelay(isc_nmhandle_t *transphandle) { (void)uv_fileno((uv_handle_t *)&tcpsock->uv_handle.tcp, &tcp_fd); RUNTIME_CHECK(tcp_fd != (uv_os_fd_t)-1); (void)isc__nm_socket_tcp_nodelay((uv_os_sock_t)tcp_fd); -#endif } static isc_result_t diff --git a/lib/isc/netmgr/netmgr-int.h b/lib/isc/netmgr/netmgr-int.h index 9e5445664b..03cf316677 100644 --- a/lib/isc/netmgr/netmgr-int.h +++ b/lib/isc/netmgr/netmgr-int.h @@ -47,7 +47,6 @@ #define ISC_NETMGR_TLSBUF_SIZE 65536 -#if !defined(WIN32) /* * New versions of libuv support recvmmsg on unices. * Since recvbuf is only allocated per worker allocating a bigger one is not @@ -56,9 +55,6 @@ * will break if the original value changes. */ #define ISC_NETMGR_RECVBUF_SIZE (20 * 65536) -#else -#define ISC_NETMGR_RECVBUF_SIZE (65536) -#endif #define ISC_NETMGR_SENDBUF_SIZE (sizeof(uint16_t) + UINT16_MAX) @@ -94,8 +90,6 @@ isc__nm_dump_active(isc_nm_t *nm); #if defined(__linux__) #include #define gettid() (uint32_t) syscall(SYS_gettid) -#elif defined(_WIN32) -#define gettid() (uint32_t) GetCurrentThreadId() #else #define gettid() (uint32_t) pthread_self() #endif diff --git a/lib/isc/netmgr/netmgr.c b/lib/isc/netmgr/netmgr.c index bb55bf5ab8..594b238c9d 100644 --- a/lib/isc/netmgr/netmgr.c +++ b/lib/isc/netmgr/netmgr.c @@ -230,41 +230,6 @@ isc__nm_force_tid(int tid) { isc__nm_tid_v = tid; } -#ifdef WIN32 -static void -isc__nm_winsock_initialize(void) { - WORD wVersionRequested = MAKEWORD(2, 2); - WSADATA wsaData; - int result; - - result = WSAStartup(wVersionRequested, &wsaData); - if (result != 0) { - char strbuf[ISC_STRERRORSIZE]; - strerror_r(result, strbuf, sizeof(strbuf)); - UNEXPECTED_ERROR(__FILE__, __LINE__, - "WSAStartup() failed with error code %lu: %s", - result, strbuf); - } - - /* - * Confirm that the WinSock DLL supports version 2.2. Note that if the - * DLL supports versions greater than 2.2 in addition to 2.2, it will - * still return 2.2 in wVersion since that is the version we requested. - */ - if (LOBYTE(wsaData.wVersion) != 2 || HIBYTE(wsaData.wVersion) != 2) { - UNEXPECTED_ERROR(__FILE__, __LINE__, - "Unusable WinSock DLL version: %u.%u", - LOBYTE(wsaData.wVersion), - HIBYTE(wsaData.wVersion)); - } -} - -static void -isc__nm_winsock_destroy(void) { - WSACleanup(); -} -#endif /* WIN32 */ - static void isc__nm_threadpool_initialize(uint32_t workers) { char buf[11]; @@ -283,10 +248,6 @@ isc__netmgr_create(isc_mem_t *mctx, uint32_t workers, isc_nm_t **netmgrp) { REQUIRE(workers > 0); -#ifdef WIN32 - isc__nm_winsock_initialize(); -#endif /* WIN32 */ - isc__nm_threadpool_initialize(workers); mgr = isc_mem_get(mctx, sizeof(*mgr)); @@ -461,10 +422,6 @@ nm_destroy(isc_nm_t **mgr0) { isc_mem_put(mgr->mctx, mgr->workers, mgr->nworkers * sizeof(isc__networker_t)); isc_mem_putanddetach(&mgr->mctx, mgr, sizeof(*mgr)); - -#ifdef WIN32 - isc__nm_winsock_destroy(); -#endif /* WIN32 */ } static void @@ -2938,47 +2895,18 @@ isc__nm_decstats(isc_nm_t *mgr, isc_statscounter_t counterid) { isc_result_t isc__nm_socket(int domain, int type, int protocol, uv_os_sock_t *sockp) { -#ifdef WIN32 - SOCKET sock; - sock = socket(domain, type, protocol); - if (sock == INVALID_SOCKET) { - char strbuf[ISC_STRERRORSIZE]; - DWORD socket_errno = WSAGetLastError(); - switch (socket_errno) { - case WSAEMFILE: - case WSAENOBUFS: - return (ISC_R_NORESOURCES); - - case WSAEPROTONOSUPPORT: - case WSAEPFNOSUPPORT: - case WSAEAFNOSUPPORT: - return (ISC_R_FAMILYNOSUPPORT); - default: - strerror_r(socket_errno, strbuf, sizeof(strbuf)); - UNEXPECTED_ERROR( - __FILE__, __LINE__, - "socket() failed with error code %lu: %s", - socket_errno, strbuf); - return (ISC_R_UNEXPECTED); - } - } -#else int sock = socket(domain, type, protocol); if (sock < 0) { return (isc_errno_toresult(errno)); } -#endif + *sockp = (uv_os_sock_t)sock; return (ISC_R_SUCCESS); } void isc__nm_closesocket(uv_os_sock_t sock) { -#ifdef WIN32 - closesocket(sock); -#else close(sock); -#endif } #define setsockopt_on(socket, level, name) \ @@ -3169,11 +3097,7 @@ isc__nm_socket_dontfrag(uv_os_sock_t fd, sa_family_t sa_family) { return (ISC_R_NOTIMPLEMENTED); } -#if defined(_WIN32) -#define TIMEOUT_TYPE DWORD -#define TIMEOUT_DIV 1000 -#define TIMEOUT_OPTNAME TCP_MAXRT -#elif defined(TCP_CONNECTIONTIMEOUT) +#if defined(TCP_CONNECTIONTIMEOUT) #define TIMEOUT_TYPE int #define TIMEOUT_DIV 1000 #define TIMEOUT_OPTNAME TCP_CONNECTIONTIMEOUT diff --git a/lib/isc/netmgr/tcp.c b/lib/isc/netmgr/tcp.c index 03a57542e1..382a8360c9 100644 --- a/lib/isc/netmgr/tcp.c +++ b/lib/isc/netmgr/tcp.c @@ -397,7 +397,7 @@ start_tcp_child(isc_nm_t *mgr, isc_sockaddr_t *iface, isc_nmsocket_t *sock, csock->pquota = sock->pquota; isc_quota_cb_init(&csock->quotacb, quota_accept_cb, csock); -#if HAVE_SO_REUSEPORT_LB || defined(WIN32) +#if HAVE_SO_REUSEPORT_LB UNUSED(fd); csock->fd = isc__nm_tcp_lb_socket(iface->type.sa.sa_family); #else @@ -434,11 +434,7 @@ isc_nm_listentcp(isc_nm_t *mgr, isc_sockaddr_t *iface, isc__nmsocket_init(sock, mgr, isc_nm_tcplistener, iface); atomic_init(&sock->rchildren, 0); -#if defined(WIN32) - sock->nchildren = 1; -#else sock->nchildren = mgr->nworkers; -#endif children_size = sock->nchildren * sizeof(sock->children[0]); sock->children = isc_mem_get(mgr->mctx, children_size); memset(sock->children, 0, children_size); @@ -454,7 +450,7 @@ isc_nm_listentcp(isc_nm_t *mgr, isc_sockaddr_t *iface, sock->tid = 0; sock->fd = -1; -#if !HAVE_SO_REUSEPORT_LB && !defined(WIN32) +#if !HAVE_SO_REUSEPORT_LB fd = isc__nm_tcp_lb_socket(iface->type.sa.sa_family); #endif @@ -471,7 +467,7 @@ isc_nm_listentcp(isc_nm_t *mgr, isc_sockaddr_t *iface, start_tcp_child(mgr, iface, sock, fd, isc_nm_tid()); } -#if !HAVE_SO_REUSEPORT_LB && !defined(WIN32) +#if !HAVE_SO_REUSEPORT_LB isc__nm_closesocket(fd); #endif @@ -545,7 +541,7 @@ isc__nm_async_tcplisten(isc__networker_t *worker, isc__netievent_t *ev0) { flags = UV_TCP_IPV6ONLY; } -#if HAVE_SO_REUSEPORT_LB || defined(WIN32) +#if HAVE_SO_REUSEPORT_LB r = isc_uv_tcp_freebind(&sock->uv_handle.tcp, &sock->iface.type.sa, flags); if (r < 0) { diff --git a/lib/isc/netmgr/tcpdns.c b/lib/isc/netmgr/tcpdns.c index 24198b90f8..223c8d6303 100644 --- a/lib/isc/netmgr/tcpdns.c +++ b/lib/isc/netmgr/tcpdns.c @@ -374,7 +374,7 @@ start_tcpdns_child(isc_nm_t *mgr, isc_sockaddr_t *iface, isc_nmsocket_t *sock, csock->pquota = sock->pquota; isc_quota_cb_init(&csock->quotacb, quota_accept_cb, csock); -#if HAVE_SO_REUSEPORT_LB || defined(WIN32) +#if HAVE_SO_REUSEPORT_LB UNUSED(fd); csock->fd = isc__nm_tcpdns_lb_socket(iface->type.sa.sa_family); #else @@ -403,11 +403,7 @@ isc_nm_listentcpdns(isc_nm_t *mgr, isc_sockaddr_t *iface, isc__nmsocket_init(sock, mgr, isc_nm_tcpdnslistener, iface); atomic_init(&sock->rchildren, 0); -#if defined(WIN32) - sock->nchildren = 1; -#else sock->nchildren = mgr->nworkers; -#endif children_size = sock->nchildren * sizeof(sock->children[0]); sock->children = isc_mem_get(mgr->mctx, children_size); memset(sock->children, 0, children_size); @@ -424,7 +420,7 @@ isc_nm_listentcpdns(isc_nm_t *mgr, isc_sockaddr_t *iface, sock->tid = 0; sock->fd = -1; -#if !HAVE_SO_REUSEPORT_LB && !defined(WIN32) +#if !HAVE_SO_REUSEPORT_LB fd = isc__nm_tcpdns_lb_socket(iface->type.sa.sa_family); #endif @@ -441,7 +437,7 @@ isc_nm_listentcpdns(isc_nm_t *mgr, isc_sockaddr_t *iface, start_tcpdns_child(mgr, iface, sock, fd, isc_nm_tid()); } -#if !HAVE_SO_REUSEPORT_LB && !defined(WIN32) +#if !HAVE_SO_REUSEPORT_LB isc__nm_closesocket(fd); #endif @@ -514,7 +510,7 @@ isc__nm_async_tcpdnslisten(isc__networker_t *worker, isc__netievent_t *ev0) { flags = UV_TCP_IPV6ONLY; } -#if HAVE_SO_REUSEPORT_LB || defined(WIN32) +#if HAVE_SO_REUSEPORT_LB r = isc_uv_tcp_freebind(&sock->uv_handle.tcp, &sock->iface.type.sa, flags); if (r < 0) { diff --git a/lib/isc/netmgr/tlsdns.c b/lib/isc/netmgr/tlsdns.c index 84ef82b4b0..41bf6caef8 100644 --- a/lib/isc/netmgr/tlsdns.c +++ b/lib/isc/netmgr/tlsdns.c @@ -433,7 +433,7 @@ start_tlsdns_child(isc_nm_t *mgr, isc_sockaddr_t *iface, isc_nmsocket_t *sock, csock->pquota = sock->pquota; isc_quota_cb_init(&csock->quotacb, quota_accept_cb, csock); -#if HAVE_SO_REUSEPORT_LB || defined(WIN32) +#if HAVE_SO_REUSEPORT_LB UNUSED(fd); csock->fd = isc__nm_tlsdns_lb_socket(iface->type.sa.sa_family); #else @@ -471,11 +471,7 @@ isc_nm_listentlsdns(isc_nm_t *mgr, isc_sockaddr_t *iface, isc__nmsocket_init(sock, mgr, isc_nm_tlsdnslistener, iface); atomic_init(&sock->rchildren, 0); -#if defined(WIN32) - sock->nchildren = 1; -#else sock->nchildren = mgr->nworkers; -#endif children_size = sock->nchildren * sizeof(sock->children[0]); sock->children = isc_mem_get(mgr->mctx, children_size); memset(sock->children, 0, children_size); @@ -494,7 +490,7 @@ isc_nm_listentlsdns(isc_nm_t *mgr, isc_sockaddr_t *iface, sock->tid = 0; sock->fd = -1; -#if !HAVE_SO_REUSEPORT_LB && !defined(WIN32) +#if !HAVE_SO_REUSEPORT_LB fd = isc__nm_tlsdns_lb_socket(iface->type.sa.sa_family); #endif @@ -511,7 +507,7 @@ isc_nm_listentlsdns(isc_nm_t *mgr, isc_sockaddr_t *iface, start_tlsdns_child(mgr, iface, sock, fd, isc_nm_tid()); } -#if !HAVE_SO_REUSEPORT_LB && !defined(WIN32) +#if !HAVE_SO_REUSEPORT_LB isc__nm_closesocket(fd); #endif @@ -584,7 +580,7 @@ isc__nm_async_tlsdnslisten(isc__networker_t *worker, isc__netievent_t *ev0) { flags = UV_TCP_IPV6ONLY; } -#if HAVE_SO_REUSEPORT_LB || defined(WIN32) +#if HAVE_SO_REUSEPORT_LB r = isc_uv_tcp_freebind(&sock->uv_handle.tcp, &sock->iface.type.sa, flags); if (r < 0) { diff --git a/lib/isc/netmgr/udp.c b/lib/isc/netmgr/udp.c index 2259ebd74b..d9dbefca3d 100644 --- a/lib/isc/netmgr/udp.c +++ b/lib/isc/netmgr/udp.c @@ -95,7 +95,7 @@ start_udp_child(isc_nm_t *mgr, isc_sockaddr_t *iface, isc_nmsocket_t *sock, csock->extrahandlesize = sock->extrahandlesize; csock->tid = tid; -#if HAVE_SO_REUSEPORT_LB || defined(WIN32) +#if HAVE_SO_REUSEPORT_LB UNUSED(fd); csock->fd = isc__nm_udp_lb_socket(iface->type.sa.sa_family); #else @@ -133,12 +133,7 @@ isc_nm_listenudp(isc_nm_t *mgr, isc_sockaddr_t *iface, isc_nm_recv_cb_t cb, isc__nmsocket_init(sock, mgr, isc_nm_udplistener, iface); atomic_init(&sock->rchildren, 0); -#if defined(WIN32) - sock->nchildren = 1; -#else sock->nchildren = mgr->nworkers; -#endif - children_size = sock->nchildren * sizeof(sock->children[0]); sock->children = isc_mem_get(mgr->mctx, children_size); memset(sock->children, 0, children_size); @@ -151,7 +146,7 @@ isc_nm_listenudp(isc_nm_t *mgr, isc_sockaddr_t *iface, isc_nm_recv_cb_t cb, sock->tid = 0; sock->fd = -1; -#if !HAVE_SO_REUSEPORT_LB && !defined(WIN32) +#if !HAVE_SO_REUSEPORT_LB fd = isc__nm_udp_lb_socket(iface->type.sa.sa_family); #endif @@ -168,7 +163,7 @@ isc_nm_listenudp(isc_nm_t *mgr, isc_sockaddr_t *iface, isc_nm_recv_cb_t cb, start_udp_child(mgr, iface, sock, fd, isc_nm_tid()); } -#if !HAVE_SO_REUSEPORT_LB && !defined(WIN32) +#if !HAVE_SO_REUSEPORT_LB isc__nm_closesocket(fd); #endif @@ -244,7 +239,7 @@ isc__nm_async_udplisten(isc__networker_t *worker, isc__netievent_t *ev0) { uv_bind_flags |= UV_UDP_IPV6ONLY; } -#if HAVE_SO_REUSEPORT_LB || defined(WIN32) +#if HAVE_SO_REUSEPORT_LB r = isc_uv_udp_freebind(&sock->uv_handle.udp, &sock->parent->iface.type.sa, uv_bind_flags); if (r < 0) { @@ -471,17 +466,12 @@ isc__nm_udp_send(isc_nmhandle_t *handle, const isc_region_t *region, */ INSIST(sock->parent != NULL); -#if defined(WIN32) - /* On Windows, we have only a single listening listener */ - rsock = sock; -#else if (isc__nm_in_netthread()) { ntid = isc_nm_tid(); } else { ntid = sock->tid; } rsock = &sock->parent->children[ntid]; -#endif } send: diff --git a/lib/isc/netmgr/uv-compat.c b/lib/isc/netmgr/uv-compat.c index 00a6a6390b..7dc12e8f94 100644 --- a/lib/isc/netmgr/uv-compat.c +++ b/lib/isc/netmgr/uv-compat.c @@ -25,23 +25,15 @@ isc_uv_udp_connect(uv_udp_t *handle, const struct sockaddr *addr) { int addrlen = (addr->sa_family == AF_INET) ? sizeof(struct sockaddr_in) : sizeof(struct sockaddr_in6); -#ifdef WIN32 - err = connect(handle->socket, addr, addrlen); -#else /* WIN32 */ err = connect(handle->io_watcher.fd, addr, addrlen); -#endif /* WIN32 */ } while (err == -1 && errno == EINTR); if (err) { -#ifdef WIN32 - return (uv_translate_sys_error(err)); -#else /* WIN32 */ #if UV_VERSION_HEX >= UV_VERSION(1, 10, 0) return (uv_translate_sys_error(errno)); #else return (-errno); #endif /* UV_VERSION_HEX >= UV_VERSION(1, 10, 0) */ -#endif /* WIN32 */ } return (0); @@ -59,10 +51,6 @@ isc_uv_udp_freebind(uv_udp_t *handle, const struct sockaddr *addr, return (r); } -#if defined(WIN32) - REQUIRE(fd != INVALID_SOCKET); -#endif - r = uv_udp_bind(handle, addr, flags); if (r == UV_EADDRNOTAVAIL && isc__nm_socket_freebind(fd, addr->sa_family) == ISC_R_SUCCESS) diff --git a/lib/isc/unix/os.c b/lib/isc/os.c similarity index 100% rename from lib/isc/unix/os.c rename to lib/isc/os.c diff --git a/lib/isc/pk11.c b/lib/isc/pk11.c index b8eeb74daf..fba342b13c 100644 --- a/lib/isc/pk11.c +++ b/lib/isc/pk11.c @@ -114,11 +114,7 @@ static CK_C_INITIALIZE_ARGS pk11_init_args = { #define PK11_LIB_LOCATION "unknown_provider" #endif /* ifndef PK11_LIB_LOCATION */ -#ifndef WIN32 static const char *lib_name = PK11_LIB_LOCATION; -#else /* ifndef WIN32 */ -static const char *lib_name = PK11_LIB_LOCATION ".dll"; -#endif /* ifndef WIN32 */ void pk11_set_lib_name(const char *name) { diff --git a/lib/isc/unix/pk11_api.c b/lib/isc/pk11_api.c similarity index 100% rename from lib/isc/unix/pk11_api.c rename to lib/isc/pk11_api.c diff --git a/lib/isc/pthreads/include/.clang-format b/lib/isc/pthreads/include/.clang-format deleted file mode 120000 index e919bbad93..0000000000 --- a/lib/isc/pthreads/include/.clang-format +++ /dev/null @@ -1 +0,0 @@ -../../../../.clang-format.headers \ No newline at end of file diff --git a/lib/isc/unix/resource.c b/lib/isc/resource.c similarity index 100% rename from lib/isc/unix/resource.c rename to lib/isc/resource.c diff --git a/lib/isc/sockaddr.c b/lib/isc/sockaddr.c index dbd1c10d79..6541af72f2 100644 --- a/lib/isc/sockaddr.c +++ b/lib/isc/sockaddr.c @@ -13,9 +13,6 @@ #include #include -#if defined(WIN32) || defined(WIN64) -#include -#endif /* if defined(WIN32) || defined(WIN64) */ #include #include @@ -137,7 +134,6 @@ isc_sockaddr_totext(const isc_sockaddr_t *sockaddr, isc_buffer_t *target) { snprintf(pbuf, sizeof(pbuf), "%u", ntohs(sockaddr->type.sin6.sin6_port)); break; -#ifndef _WIN32 case AF_UNIX: plen = strlen(sockaddr->type.sunix.sun_path); if (plen >= isc_buffer_availablelength(target)) { @@ -157,7 +153,6 @@ isc_sockaddr_totext(const isc_sockaddr_t *sockaddr, isc_buffer_t *target) { avail.base[0] = '\0'; return (ISC_R_SUCCESS); -#endif /* ifndef _WIN32 */ default: return (ISC_R_FAILURE); } @@ -468,7 +463,6 @@ isc_sockaddr_isnetzero(const isc_sockaddr_t *sockaddr) { isc_result_t isc_sockaddr_frompath(isc_sockaddr_t *sockaddr, const char *path) { -#ifndef _WIN32 if (strlen(path) >= sizeof(sockaddr->type.sunix.sun_path)) { return (ISC_R_NOSPACE); } @@ -478,11 +472,6 @@ isc_sockaddr_frompath(isc_sockaddr_t *sockaddr, const char *path) { strlcpy(sockaddr->type.sunix.sun_path, path, sizeof(sockaddr->type.sunix.sun_path)); return (ISC_R_SUCCESS); -#else /* ifndef _WIN32 */ - UNUSED(sockaddr); - UNUSED(path); - return (ISC_R_NOTIMPLEMENTED); -#endif /* ifndef _WIN32 */ } isc_result_t @@ -496,11 +485,9 @@ isc_sockaddr_fromsockaddr(isc_sockaddr_t *isa, const struct sockaddr *sa) { case AF_INET6: length = sizeof(isa->type.sin6); break; -#ifndef _WIN32 case AF_UNIX: length = sizeof(isa->type.sunix); break; -#endif /* ifndef _WIN32 */ default: return (ISC_R_NOTIMPLEMENTED); } diff --git a/lib/isc/unix/socket.c b/lib/isc/socket.c similarity index 99% rename from lib/isc/unix/socket.c rename to lib/isc/socket.c index c196874483..b086a07d8a 100644 --- a/lib/isc/unix/socket.c +++ b/lib/isc/socket.c @@ -4168,7 +4168,6 @@ isc_socket_sendto2(isc_socket_t *sock, isc_region_t *region, isc_task_t *task, void isc_socket_cleanunix(const isc_sockaddr_t *sockaddr, bool active) { -#ifndef _WIN32 int s; struct stat sb; char strbuf[ISC_STRERRORSIZE]; @@ -4281,16 +4280,11 @@ isc_socket_cleanunix(const isc_sockaddr_t *sockaddr, bool active) { } } close(s); -#else /* ifndef _WIN32 */ - UNUSED(sockaddr); - UNUSED(active); -#endif /* ifndef _WIN32 */ } isc_result_t isc_socket_permunix(const isc_sockaddr_t *sockaddr, uint32_t perm, uint32_t owner, uint32_t group) { -#ifndef _WIN32 isc_result_t result = ISC_R_SUCCESS; char strbuf[ISC_STRERRORSIZE]; char path[sizeof(sockaddr->type.sunix.sun_path)]; @@ -4332,13 +4326,6 @@ isc_socket_permunix(const isc_sockaddr_t *sockaddr, uint32_t perm, result = ISC_R_FAILURE; } return (result); -#else /* ifndef _WIN32 */ - UNUSED(sockaddr); - UNUSED(perm); - UNUSED(owner); - UNUSED(group); - return (ISC_R_NOTIMPLEMENTED); -#endif /* ifndef _WIN32 */ } isc_result_t diff --git a/lib/isc/socket_p.h b/lib/isc/socket_p.h index 2ac133fd13..53c998976b 100644 --- a/lib/isc/socket_p.h +++ b/lib/isc/socket_p.h @@ -67,8 +67,6 @@ isc__socketmgr_destroy(isc_socketmgr_t **managerp); *\li All resources used by the manager have been freed. */ -#if !WIN32 - #include typedef struct isc_socketwait isc_socketwait_t; @@ -77,5 +75,3 @@ isc__socketmgr_waitevents(isc_socketmgr_t *, struct timeval *, isc_socketwait_t **); isc_result_t isc__socketmgr_dispatch(isc_socketmgr_t *, isc_socketwait_t *); - -#endif diff --git a/lib/isc/stats.c b/lib/isc/stats.c index 6084310a91..6df4af6952 100644 --- a/lib/isc/stats.c +++ b/lib/isc/stats.c @@ -27,11 +27,7 @@ #define ISC_STATS_MAGIC ISC_MAGIC('S', 't', 'a', 't') #define ISC_STATS_VALID(x) ISC_MAGIC_VALID(x, ISC_STATS_MAGIC) -#if defined(_WIN32) && !defined(_WIN64) -typedef atomic_int_fast32_t isc__atomic_statcounter_t; -#else /* if defined(_WIN32) && !defined(_WIN64) */ typedef atomic_int_fast64_t isc__atomic_statcounter_t; -#endif /* if defined(_WIN32) && !defined(_WIN64) */ struct isc_stats { unsigned int magic; diff --git a/lib/isc/unix/stdio.c b/lib/isc/stdio.c similarity index 100% rename from lib/isc/unix/stdio.c rename to lib/isc/stdio.c diff --git a/lib/isc/unix/stdtime.c b/lib/isc/stdtime.c similarity index 100% rename from lib/isc/unix/stdtime.c rename to lib/isc/stdtime.c diff --git a/lib/isc/string.c b/lib/isc/string.c index 0a47d0824f..08e507e918 100644 --- a/lib/isc/string.c +++ b/lib/isc/string.c @@ -109,9 +109,5 @@ strlcat(char *dst, const char *src, size_t size) { int isc_string_strerror_r(int errnum, char *buf, size_t buflen) { -#if defined(_WIN32) || defined(_WIN64) - return (strerror_s(buf, buflen, errnum)); -#else /* if defined(_WIN32) || defined(_WIN64) */ return (strerror_r(errnum, buf, buflen)); -#endif /* if defined(_WIN32) || defined(_WIN64) */ } diff --git a/lib/isc/unix/syslog.c b/lib/isc/syslog.c similarity index 100% rename from lib/isc/unix/syslog.c rename to lib/isc/syslog.c diff --git a/lib/isc/tests/task_test.c b/lib/isc/tests/task_test.c index e9c4ebe2f7..5786997147 100644 --- a/lib/isc/tests/task_test.c +++ b/lib/isc/tests/task_test.c @@ -518,11 +518,7 @@ basic(void **state) { &interval, task2, basic_tick, tock, &ti2); assert_int_equal(result, ISC_R_SUCCESS); -#ifndef WIN32 sleep(2); -#else /* ifndef WIN32 */ - Sleep(2000); -#endif /* ifndef WIN32 */ for (i = 0; testarray[i] != NULL; i++) { /* @@ -547,11 +543,7 @@ basic(void **state) { isc_task_detach(&task3); isc_task_detach(&task4); -#ifndef WIN32 sleep(10); -#else /* ifndef WIN32 */ - Sleep(10000); -#endif /* ifndef WIN32 */ isc_timer_detach(&ti1); isc_timer_detach(&ti2); } diff --git a/lib/isc/pthreads/thread.c b/lib/isc/thread.c similarity index 100% rename from lib/isc/pthreads/thread.c rename to lib/isc/thread.c diff --git a/lib/isc/unix/time.c b/lib/isc/time.c similarity index 100% rename from lib/isc/unix/time.c rename to lib/isc/time.c diff --git a/lib/isc/timer.c b/lib/isc/timer.c index a29d966726..eb8a17cfc0 100644 --- a/lib/isc/timer.c +++ b/lib/isc/timer.c @@ -598,10 +598,7 @@ dispatch(isc_timermgr_t *manager, isc_time_t *now) { } static isc_threadresult_t -#ifdef _WIN32 /* XXXDCL */ - WINAPI -#endif /* ifdef _WIN32 */ - run(void *uap) { +run(void *uap) { isc_timermgr_t *manager = uap; isc_time_t now; isc_result_t result; diff --git a/lib/isc/trampoline_p.h b/lib/isc/trampoline_p.h index a089a97139..12bc6ad0e7 100644 --- a/lib/isc/trampoline_p.h +++ b/lib/isc/trampoline_p.h @@ -43,7 +43,7 @@ isc_threadresult_t isc__trampoline_run(isc_threadarg_t arg); /*%< * Run the thread trampoline, this will get passed to the actual - * pthread_create() (or Windows equivalent), initialize the isc_tid_v. + * pthread_create(), initialize the isc_tid_v. * * Requires: *\li 'arg' is a valid isc_trampoline_t diff --git a/lib/isc/unix/include/.clang-format b/lib/isc/unix/include/.clang-format deleted file mode 120000 index e919bbad93..0000000000 --- a/lib/isc/unix/include/.clang-format +++ /dev/null @@ -1 +0,0 @@ -../../../../.clang-format.headers \ No newline at end of file diff --git a/lib/isc/win32/.dir-locals.el b/lib/isc/win32/.dir-locals.el deleted file mode 100644 index b16a1be121..0000000000 --- a/lib/isc/win32/.dir-locals.el +++ /dev/null @@ -1,35 +0,0 @@ -;;; Directory Local Variables -;;; For more information see (info "(emacs) Directory Variables") - -((c-mode . - ((eval . - (set (make-local-variable 'directory-of-current-dir-locals-file) - (file-name-directory (locate-dominating-file default-directory ".dir-locals.el")) - ) - ) - (eval . - (set (make-local-variable 'include-directories) - (list - (expand-file-name - (concat directory-of-current-dir-locals-file "../../../")) - (expand-file-name - (concat directory-of-current-dir-locals-file "include")) - (expand-file-name - (concat directory-of-current-dir-locals-file "../include")) - (expand-file-name - (concat directory-of-current-dir-locals-file "../")) - (expand-file-name - (concat directory-of-current-dir-locals-file "./")) - (expand-file-name - (concat directory-of-current-dir-locals-file "../../dns/include")) - (expand-file-name "/usr/local/opt/openssl@1.1/include") - (expand-file-name "/usr/local/opt/libxml2/include/libxml2") - (expand-file-name "/usr/local/include") - ) - ) - ) - - (eval setq flycheck-clang-include-path include-directories) - (eval setq flycheck-cpp-include-path include-directories) - ) - )) diff --git a/lib/isc/win32/DLLMain.c b/lib/isc/win32/DLLMain.c deleted file mode 100644 index 22a3e0512c..0000000000 --- a/lib/isc/win32/DLLMain.c +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#include -#include - -#include -#include -#include - -#include "lib_p.h" - -/* - * Called when we enter the DLL - */ -__declspec(dllexport) BOOL WINAPI - DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { - switch (fdwReason) { - /* - * The DLL is loading due to process initialization or a call to - * LoadLibrary. - */ - case DLL_PROCESS_ATTACH: - isc__initialize(); - break; - - /* - * The DLL is unloading from a process due to process - * termination or a call to FreeLibrary. - */ - case DLL_PROCESS_DETACH: - isc__shutdown(); - break; - - case DLL_THREAD_ATTACH: - case DLL_THREAD_DETACH: - break; - - default: - break; - } - return (TRUE); -} diff --git a/lib/isc/win32/condition.c b/lib/isc/win32/condition.c deleted file mode 100644 index 0859ff6fbb..0000000000 --- a/lib/isc/win32/condition.c +++ /dev/null @@ -1,254 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#define LSIGNAL 0 -#define LBROADCAST 1 - -void -isc_condition_init(isc_condition_t *cond) { - HANDLE h; - - REQUIRE(cond != NULL); - - cond->waiters = 0; - /* - * This handle is shared across all threads - */ - h = CreateEvent(NULL, FALSE, FALSE, NULL); - if (h == NULL) { - char strbuf[ISC_STRERRORSIZE]; - DWORD err = GetLastError(); - strerror_r(err, strbuf, sizeof(strbuf)); - isc_error_fatal(__FILE__, __LINE__, "CreateEvent failed: %s", - strbuf); - } - cond->events[LSIGNAL] = h; - - /* - * The threadlist will hold the actual events needed - * for the wait condition - */ - ISC_LIST_INIT(cond->threadlist); -} - -/* - * Add the thread to the threadlist along with the required events - */ -static isc_result_t -register_thread(unsigned long thrd, isc_condition_t *gblcond, - isc_condition_thread_t **localcond) { - HANDLE hc; - isc_condition_thread_t *newthread; - - REQUIRE(localcond != NULL && *localcond == NULL); - - newthread = malloc(sizeof(isc_condition_thread_t)); - if (newthread == NULL) { - return (ISC_R_NOMEMORY); - } - - /* - * Create the thread-specific handle - */ - hc = CreateEvent(NULL, FALSE, FALSE, NULL); - if (hc == NULL) { - free(newthread); - return (ISC_R_UNEXPECTED); - } - - /* - * Add the thread ID and handles to list of threads for broadcast - */ - newthread->handle[LSIGNAL] = gblcond->events[LSIGNAL]; - newthread->handle[LBROADCAST] = hc; - newthread->th = thrd; - - /* - * The thread is holding the manager lock so this is safe - */ - ISC_LINK_INIT(newthread, link); - ISC_LIST_APPEND(gblcond->threadlist, newthread, link); - *localcond = newthread; - return (ISC_R_SUCCESS); -} - -static isc_result_t -find_thread_condition(uintptr_t thrd, isc_condition_t *cond, - isc_condition_thread_t **threadcondp) { - isc_condition_thread_t *threadcond; - - REQUIRE(threadcondp != NULL && *threadcondp == NULL); - - /* - * Look for the thread ID. - */ - for (threadcond = ISC_LIST_HEAD(cond->threadlist); threadcond != NULL; - threadcond = ISC_LIST_NEXT(threadcond, link)) - { - if (threadcond->th == thrd) { - *threadcondp = threadcond; - return (ISC_R_SUCCESS); - } - } - - /* - * Not found, so add it. - */ - return (register_thread(thrd, cond, threadcondp)); -} - -isc_result_t -isc_condition_signal(isc_condition_t *cond) { - /* - * Unlike pthreads, the caller MUST hold the lock associated with - * the condition variable when calling us. - */ - REQUIRE(cond != NULL); - - if (!SetEvent(cond->events[LSIGNAL])) { - /* XXX */ - return (ISC_R_UNEXPECTED); - } - return (ISC_R_SUCCESS); -} - -isc_result_t -isc_condition_broadcast(isc_condition_t *cond) { - isc_condition_thread_t *threadcond; - bool failed = false; - - /* - * Unlike pthreads, the caller MUST hold the lock associated with - * the condition variable when calling us. - */ - REQUIRE(cond != NULL); - - /* - * Notify every thread registered for this - */ - for (threadcond = ISC_LIST_HEAD(cond->threadlist); threadcond != NULL; - threadcond = ISC_LIST_NEXT(threadcond, link)) - { - if (!SetEvent(threadcond->handle[LBROADCAST])) { - failed = true; - } - } - - if (failed) { - return (ISC_R_UNEXPECTED); - } - - return (ISC_R_SUCCESS); -} - -isc_result_t -isc_condition_destroy(isc_condition_t *cond) { - isc_condition_thread_t *next, *threadcond; - - REQUIRE(cond != NULL); - REQUIRE(cond->waiters == 0); - - (void)CloseHandle(cond->events[LSIGNAL]); - - /* - * Delete the threadlist - */ - threadcond = ISC_LIST_HEAD(cond->threadlist); - - while (threadcond != NULL) { - next = ISC_LIST_NEXT(threadcond, link); - DEQUEUE(cond->threadlist, threadcond, link); - (void)CloseHandle(threadcond->handle[LBROADCAST]); - free(threadcond); - threadcond = next; - } - - return (ISC_R_SUCCESS); -} - -/* - * This is always called when the mutex (lock) is held, but because - * we are waiting we need to release it and reacquire it as soon as the wait - * is over. This allows other threads to make use of the object guarded - * by the mutex but it should never try to delete it as long as the - * number of waiters > 0. Always reacquire the mutex regardless of the - * result of the wait. Note that EnterCriticalSection will wait to acquire - * the mutex. - */ -static isc_result_t -wait(isc_condition_t *cond, isc_mutex_t *mutex, DWORD milliseconds) { - DWORD result; - isc_result_t tresult; - isc_condition_thread_t *threadcond = NULL; - - /* - * Get the thread events needed for the wait - */ - tresult = find_thread_condition(isc_thread_self(), cond, &threadcond); - if (tresult != ISC_R_SUCCESS) { - return (tresult); - } - - cond->waiters++; - LeaveCriticalSection(mutex); - result = WaitForMultipleObjects(2, threadcond->handle, FALSE, - milliseconds); - EnterCriticalSection(mutex); - cond->waiters--; - if (result == WAIT_FAILED) { - /* XXX */ - return (ISC_R_UNEXPECTED); - } - if (result == WAIT_TIMEOUT) { - return (ISC_R_TIMEDOUT); - } - - return (ISC_R_SUCCESS); -} - -isc_result_t -isc_condition_wait(isc_condition_t *cond, isc_mutex_t *mutex) { - return (wait(cond, mutex, INFINITE)); -} - -isc_result_t -isc_condition_waituntil(isc_condition_t *cond, isc_mutex_t *mutex, - isc_time_t *t) { - DWORD milliseconds; - uint64_t microseconds; - isc_time_t now; - - if (isc_time_now(&now) != ISC_R_SUCCESS) { - /* XXX */ - return (ISC_R_UNEXPECTED); - } - - microseconds = isc_time_microdiff(t, &now); - if (microseconds > 0xFFFFFFFFi64 * 1000) { - milliseconds = 0xFFFFFFFF; - } else { - milliseconds = (DWORD)(microseconds / 1000); - } - - return (wait(cond, mutex, milliseconds)); -} diff --git a/lib/isc/win32/dir.c b/lib/isc/win32/dir.c deleted file mode 100644 index cbfc0dc98e..0000000000 --- a/lib/isc/win32/dir.c +++ /dev/null @@ -1,309 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include "errno2result.h" - -#define ISC_DIR_MAGIC ISC_MAGIC('D', 'I', 'R', '*') -#define VALID_DIR(dir) ISC_MAGIC_VALID(dir, ISC_DIR_MAGIC) - -static isc_result_t -start_directory(isc_dir_t *p); - -void -isc_dir_init(isc_dir_t *dir) { - REQUIRE(dir != NULL); - - dir->dirname[0] = '\0'; - - dir->entry.name[0] = '\0'; - dir->entry.length = 0; - memset(&(dir->entry.find_data), 0, sizeof(dir->entry.find_data)); - - dir->entry_filled = false; - dir->search_handle = INVALID_HANDLE_VALUE; - - dir->magic = ISC_DIR_MAGIC; -} - -/* - * Allocate workspace and open directory stream. If either one fails, - * NULL will be returned. - */ -isc_result_t -isc_dir_open(isc_dir_t *dir, const char *dirname) { - char *p; - isc_result_t result; - - REQUIRE(dirname != NULL); - REQUIRE(VALID_DIR(dir) && dir->search_handle == INVALID_HANDLE_VALUE); - - /* - * Copy directory name. Need to have enough space for the name, - * a possible path separator, the wildcard, and the final NUL. - */ - if (strlen(dirname) + 3 > sizeof(dir->dirname)) { - /* XXXDCL ? */ - return (ISC_R_NOSPACE); - } - strlcpy(dir->dirname, dirname, sizeof(dir->dirname)); - - /* - * Append path separator, if needed, and "*". - */ - p = dir->dirname + strlen(dir->dirname); - if (dir->dirname < p && *(p - 1) != '\\' && *(p - 1) != ':') { - *p++ = '\\'; - } - *p++ = '*'; - *p = '\0'; - - /* - * Open stream. - */ - result = start_directory(dir); - - return (result); -} - -/* - * Return previously retrieved file or get next one. Unix's dirent has - * separate open and read functions, but the Win32 and DOS interfaces open - * the dir stream and reads the first file in one operation. - */ -isc_result_t -isc_dir_read(isc_dir_t *dir) { - REQUIRE(VALID_DIR(dir) && dir->search_handle != INVALID_HANDLE_VALUE); - - if (dir->entry_filled) { - /* - * start_directory() already filled in the first entry. - */ - dir->entry_filled = false; - } else { - /* - * Fetch next file in directory. - */ - if (FindNextFile(dir->search_handle, &dir->entry.find_data) == - FALSE) { - /* - * Either the last file has been processed or - * an error has occurred. The former is not - * really an error, but the latter is. - */ - if (GetLastError() == ERROR_NO_MORE_FILES) { - return (ISC_R_NOMORE); - } else { - return (ISC_R_UNEXPECTED); - } - } - } - - /* - * Make sure that the space for the name is long enough. - */ - strlcpy(dir->entry.name, dir->entry.find_data.cFileName, - sizeof(dir->entry.name)); - dir->entry.length = strlen(dir->entry.name); - - return (ISC_R_SUCCESS); -} - -/* - * Close directory stream. - */ -void -isc_dir_close(isc_dir_t *dir) { - REQUIRE(VALID_DIR(dir) && dir->search_handle != INVALID_HANDLE_VALUE); - - FindClose(dir->search_handle); - dir->search_handle = INVALID_HANDLE_VALUE; -} - -/* - * Reposition directory stream at start. - */ -isc_result_t -isc_dir_reset(isc_dir_t *dir) { - isc_result_t result; - - REQUIRE(VALID_DIR(dir) && dir->search_handle != INVALID_HANDLE_VALUE); - REQUIRE(dir->dirname != NULL); - - /* - * NT cannot reposition the seek pointer to the beginning of the - * the directory stream, but rather the directory needs to be - * closed and reopened. The latter might fail. - */ - - isc_dir_close(dir); - - result = start_directory(dir); - - return (result); -} - -/* - * Initialize isc_dir_t structure with new directory. The function - * returns 0 on failure and nonzero on success. - * - * Note: - * - Be sure to close previous stream before opening new one - */ -static isc_result_t -start_directory(isc_dir_t *dir) { - REQUIRE(VALID_DIR(dir)); - REQUIRE(dir->search_handle == INVALID_HANDLE_VALUE); - - dir->entry_filled = false; - - /* - * Open stream and retrieve first file. - */ - dir->search_handle = FindFirstFile(dir->dirname, &dir->entry.find_data); - - if (dir->search_handle == INVALID_HANDLE_VALUE) { - /* - * Something went wrong but we don't know what. GetLastError() - * could give us more information about the error, but the - * MSDN documentation is frustratingly thin about what - * possible errors could have resulted. (Score one for - * the Unix manual pages.) So there is just this lame error - * instead of being able to differentiate ISC_R_NOTFOUND - * from ISC_R_UNEXPECTED. - */ - return (ISC_R_FAILURE); - } - - /* - * Make sure that the space for the name is long enough. - */ - INSIST(sizeof(dir->entry.name) > - strlen(dir->entry.find_data.cFileName)); - - /* - * Fill in the data for the first entry of the directory. - */ - strlcpy(dir->entry.name, dir->entry.find_data.cFileName, - sizeof(dir->entry.name)); - dir->entry.length = strlen(dir->entry.name); - - dir->entry_filled = true; - - return (ISC_R_SUCCESS); -} - -isc_result_t -isc_dir_chdir(const char *dirname) { - /* - * Change the current directory to 'dirname'. - */ - - REQUIRE(dirname != NULL); - - if (chdir(dirname) < 0) { - return (isc__errno2result(errno)); - } - - return (ISC_R_SUCCESS); -} - -isc_result_t -isc_dir_chroot(const char *dirname) { - return (ISC_R_NOTIMPLEMENTED); -} - -isc_result_t -isc_dir_createunique(char *templet) { - isc_result_t result; - char *x; - char *p; - int i; - int pid; - - REQUIRE(templet != NULL); - - /* - * mkdtemp is not portable, so this emulates it. - */ - - pid = getpid(); - - /* - * Replace trailing Xs with the process-id, zero-filled. - */ - for (x = templet + strlen(templet) - 1; *x == 'X' && x >= templet; - x--, pid /= 10) - *x = pid % 10 + '0'; - - x++; /* Set x to start of ex-Xs. */ - - do { - i = mkdir(templet); - if (i == 0) { - i = chmod(templet, 0700); - } - - if (i == 0 || errno != EEXIST) { - break; - } - - /* - * The BSD algorithm. - */ - p = x; - while (*p != '\0') { - if (isdigit((unsigned char)*p)) { - *p = 'a'; - } else if (*p != 'z') { - ++*p; - } else { - /* - * Reset character and move to next. - */ - *p++ = 'a'; - continue; - } - - break; - } - - if (*p == '\0') { - /* - * Tried all combinations. errno should already - * be EEXIST, but ensure it is anyway for - * isc__errno2result(). - */ - errno = EEXIST; - break; - } - } while (1); - - if (i == -1) { - result = isc__errno2result(errno); - } else { - result = ISC_R_SUCCESS; - } - - return (result); -} diff --git a/lib/isc/win32/errno.c b/lib/isc/win32/errno.c deleted file mode 100644 index 7940c14d14..0000000000 --- a/lib/isc/win32/errno.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/*! \file */ - -#include "errno2result.h" - -isc_result_t -isc_errno_toresult(int err) { - return (isc__errno2resultx(err, false, 0, 0)); -} diff --git a/lib/isc/win32/errno2result.c b/lib/isc/win32/errno2result.c deleted file mode 100644 index 6ad0b82c34..0000000000 --- a/lib/isc/win32/errno2result.c +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#include "errno2result.h" -#include -#include - -#include -#include -#include -#include - -/* - * Convert a POSIX errno value into an isc_result_t. The - * list of supported errno values is not complete; new users - * of this function should add any expected errors that are - * not already there. - */ -isc_result_t -isc__errno2resultx(int posixerrno, bool dolog, const char *file, int line) { - char strbuf[ISC_STRERRORSIZE]; - - switch (posixerrno) { - case ENOTDIR: - case WSAELOOP: - case WSAEINVAL: - case EINVAL: /* XXX sometimes this is not for files */ - case ENAMETOOLONG: - case WSAENAMETOOLONG: - case EBADF: - case WSAEBADF: - return (ISC_R_INVALIDFILE); - case ENOENT: - return (ISC_R_FILENOTFOUND); - case EACCES: - case WSAEACCES: - case EPERM: - return (ISC_R_NOPERM); - case EEXIST: - return (ISC_R_FILEEXISTS); - case EIO: - return (ISC_R_IOERROR); - case ENOMEM: - return (ISC_R_NOMEMORY); -#ifdef EOVERFLOW - case EOVERFLOW: - return (ISC_R_RANGE); -#endif /* ifdef EOVERFLOW */ - case ENFILE: - case EMFILE: - case WSAEMFILE: - return (ISC_R_TOOMANYOPENFILES); - case ENOSPC: - return (ISC_R_DISCFULL); - case ERROR_CANCELLED: - return (ISC_R_CANCELED); - case ERROR_CONNECTION_REFUSED: - case WSAECONNREFUSED: - return (ISC_R_CONNREFUSED); - case WSAENOTCONN: - case ERROR_CONNECTION_INVALID: - return (ISC_R_NOTCONNECTED); - case ERROR_HOST_UNREACHABLE: - case WSAEHOSTUNREACH: - return (ISC_R_HOSTUNREACH); - case ERROR_NETWORK_UNREACHABLE: - case WSAENETUNREACH: - return (ISC_R_NETUNREACH); - case ERROR_NO_NETWORK: - return (ISC_R_NETUNREACH); - case ERROR_PORT_UNREACHABLE: - return (ISC_R_HOSTUNREACH); - case ERROR_SEM_TIMEOUT: - return (ISC_R_TIMEDOUT); - case WSAECONNRESET: - case WSAENETRESET: - case WSAECONNABORTED: - case WSAEDISCON: - case ERROR_OPERATION_ABORTED: - case ERROR_CONNECTION_ABORTED: - case ERROR_REQUEST_ABORTED: - return (ISC_R_CONNECTIONRESET); - case WSAEADDRNOTAVAIL: - return (ISC_R_ADDRNOTAVAIL); - case ERROR_NETNAME_DELETED: - case WSAENETDOWN: - return (ISC_R_NETUNREACH); - case WSAEHOSTDOWN: - return (ISC_R_HOSTUNREACH); - case WSAENOBUFS: - return (ISC_R_NORESOURCES); - default: - if (dolog) { - strerror_r(posixerrno, strbuf, sizeof(strbuf)); - UNEXPECTED_ERROR(file, line, - "unable to convert errno " - "to isc_result: %d: %s", - posixerrno, strbuf); - } - /* - * XXXDCL would be nice if perhaps this function could - * return the system's error string, so the caller - * might have something more descriptive than "unexpected - * error" to log with. - */ - return (ISC_R_UNEXPECTED); - } -} diff --git a/lib/isc/win32/errno2result.h b/lib/isc/win32/errno2result.h deleted file mode 100644 index f44597b049..0000000000 --- a/lib/isc/win32/errno2result.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#ifndef UNIX_ERRNO2RESULT_H -#define UNIX_ERRNO2RESULT_H 1 - -/* XXXDCL this should be moved to lib/isc/include/isc/errno2result.h. */ - -#include /* Provides errno. */ -#include - -#include -#include - -ISC_LANG_BEGINDECLS - -#define isc__errno2result(posixerrno) \ - isc__errno2resultx(posixerrno, true, __FILE__, __LINE__) - -isc_result_t -isc__errno2resultx(int posixerrno, bool dolog, const char *file, int line); - -ISC_LANG_ENDDECLS - -#endif /* UNIX_ERRNO2RESULT_H */ diff --git a/lib/isc/win32/file.c b/lib/isc/win32/file.c deleted file mode 100644 index e1d3c89141..0000000000 --- a/lib/isc/win32/file.c +++ /dev/null @@ -1,998 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#undef rename -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "errno2result.h" - -static const char alphnum[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuv" - "wxyz0123456789"; - -/* - * Emulate UNIX mkstemp, which returns an open FD to the new file - * - */ -static int -gettemp(char *path, bool binary, int *doopen) { - char *start, *trv; - struct stat sbuf; - int flags = O_CREAT | O_EXCL | O_RDWR; - - if (binary) { - flags |= _O_BINARY; - } - - trv = strrchr(path, 'X'); - trv++; - /* extra X's get set to 0's */ - while (*--trv == 'X') { - uint32_t which = isc_random_uniform(sizeof(alphnum) - 1); - *trv = alphnum[which]; - } - /* - * check the target directory; if you have six X's and it - * doesn't exist this runs for a *very* long time. - */ - for (start = trv + 1;; --trv) { - if (trv <= path) { - break; - } - if (*trv == '\\') { - *trv = '\0'; - if (stat(path, &sbuf)) { - return (0); - } - if (!S_ISDIR(sbuf.st_mode)) { - errno = ENOTDIR; - return (0); - } - *trv = '\\'; - break; - } - } - - for (;;) { - if (doopen) { - if ((*doopen = open(path, flags, - _S_IREAD | _S_IWRITE)) >= 0) { - return (1); - } - if (errno != EEXIST) { - return (0); - } - } else if (stat(path, &sbuf)) { - return (errno == ENOENT ? 1 : 0); - } - - /* tricky little algorithm for backward compatibility */ - for (trv = start;;) { - if (!*trv) { - return (0); - } - if (*trv == 'z') { - *trv++ = 'a'; - } else { - if (isdigit((unsigned char)*trv)) { - *trv = 'a'; - } else { - ++*trv; - } - break; - } - } - } - /*NOTREACHED*/ -} - -static int -mkstemp(char *path, bool binary) { - int fd; - - return (gettemp(path, binary, &fd) ? fd : -1); -} - -/* - * XXXDCL As the API for accessing file statistics undoubtedly gets expanded, - * it might be good to provide a mechanism that allows for the results - * of a previous stat() to be used again without having to do another stat, - * such as perl's mechanism of using "_" in place of a file name to indicate - * that the results of the last stat should be used. But then you get into - * annoying MP issues. BTW, Win32 has stat(). - */ -static isc_result_t -file_stats(const char *file, struct stat *stats) { - isc_result_t result = ISC_R_SUCCESS; - - REQUIRE(file != NULL); - REQUIRE(stats != NULL); - - if (stat(file, stats) != 0) { - result = isc__errno2result(errno); - } - - return (result); -} - -static isc_result_t -fd_stats(int fd, struct stat *stats) { - isc_result_t result = ISC_R_SUCCESS; - - REQUIRE(stats != NULL); - - if (fstat(fd, stats) != 0) { - result = isc__errno2result(errno); - } - - return (result); -} - -isc_result_t -isc_file_getsizefd(int fd, off_t *size) { - isc_result_t result; - struct stat stats; - - REQUIRE(size != NULL); - - result = fd_stats(fd, &stats); - - if (result == ISC_R_SUCCESS) { - *size = stats.st_size; - } - return (result); -} - -isc_result_t -isc_file_mode(const char *file, mode_t *modep) { - isc_result_t result; - struct stat stats; - - REQUIRE(modep != NULL); - - result = file_stats(file, &stats); - if (result == ISC_R_SUCCESS) { - *modep = (stats.st_mode & 07777); - } - return (result); -} - -/* - * isc_file_safemovefile is needed to be defined here to ensure that - * any file with the new name is renamed to a backup name and then the - * rename is done. If all goes well then the backup can be deleted, - * otherwise it gets renamed back. - */ - -int -isc_file_safemovefile(const char *oldname, const char *newname) { - BOOL filestatus; - char buf[512]; - struct stat sbuf; - BOOL exists = FALSE; - int tmpfd; - - /* - * Make sure we have something to do - */ - if (stat(oldname, &sbuf) != 0) { - errno = ENOENT; - return (-1); - } - - /* - * Rename to a backup the new file if it still exists - */ - if (stat(newname, &sbuf) == 0) { - exists = TRUE; - strlcpy(buf, newname, sizeof(buf)); - strlcat(buf, ".XXXXX", sizeof(buf)); - tmpfd = mkstemp(buf, true); - if (tmpfd > 0) { - _close(tmpfd); - } - (void)DeleteFile(buf); - _chmod(newname, _S_IREAD | _S_IWRITE); - - filestatus = MoveFile(newname, buf); - } - /* Now rename the file to the new name - */ - _chmod(oldname, _S_IREAD | _S_IWRITE); - - filestatus = MoveFile(oldname, newname); - if (filestatus == 0) { - /* - * Try to rename the backup back to the original name - * if the backup got created - */ - if (exists == TRUE) { - filestatus = MoveFile(buf, newname); - if (filestatus == 0) { - errno = EACCES; - } - } - return (-1); - } - - /* - * Delete the backup file if it got created - */ - if (exists == TRUE) { - (void)DeleteFile(buf); - } - return (0); -} - -isc_result_t -isc_file_getmodtime(const char *file, isc_time_t *time) { - int fh; - - REQUIRE(file != NULL); - REQUIRE(time != NULL); - - if ((fh = open(file, _O_RDONLY | _O_BINARY)) < 0) { - return (isc__errno2result(errno)); - } - - if (!GetFileTime((HANDLE)_get_osfhandle(fh), NULL, NULL, - &time->absolute)) { - close(fh); - errno = EINVAL; - return (isc__errno2result(errno)); - } - close(fh); - return (ISC_R_SUCCESS); -} - -isc_result_t -isc_file_getsize(const char *file, off_t *size) { - isc_result_t result; - struct stat stats; - - REQUIRE(file != NULL); - REQUIRE(size != NULL); - - result = file_stats(file, &stats); - - if (result == ISC_R_SUCCESS) { - *size = stats.st_size; - } - - return (result); -} - -isc_result_t -isc_file_settime(const char *file, isc_time_t *time) { - int fh; - - REQUIRE(file != NULL && time != NULL); - - if ((fh = open(file, _O_RDWR | _O_BINARY)) < 0) { - return (isc__errno2result(errno)); - } - - /* - * Set the date via the filedate system call and return. Failing - * this call implies the new file times are not supported by the - * underlying file system. - */ - if (!SetFileTime((HANDLE)_get_osfhandle(fh), NULL, &time->absolute, - &time->absolute)) - { - close(fh); - errno = EINVAL; - return (isc__errno2result(errno)); - } - - close(fh); - return (ISC_R_SUCCESS); -} - -#undef TEMPLATE -#define TEMPLATE "XXXXXXXXXX.tmp" /* 14 characters. */ - -isc_result_t -isc_file_mktemplate(const char *path, char *buf, size_t buflen) { - return (isc_file_template(path, TEMPLATE, buf, buflen)); -} - -isc_result_t -isc_file_template(const char *path, const char *templet, char *buf, - size_t buflen) { - char *s; - - REQUIRE(templet != NULL); - REQUIRE(buf != NULL); - - if (path == NULL) { - path = ""; - } - - s = strrchr(templet, '\\'); - if (s != NULL) { - templet = s + 1; - } - - s = strrchr(path, '\\'); - - if (s != NULL) { - size_t prefixlen = s - path + 1; - if ((prefixlen + strlen(templet) + 1) > buflen) { - return (ISC_R_NOSPACE); - } - - /* Copy 'prefixlen' bytes and NUL terminate. */ - strlcpy(buf, path, ISC_MIN(prefixlen + 1, buflen)); - strlcat(buf, templet, buflen); - } else { - if ((strlen(templet) + 1) > buflen) { - return (ISC_R_NOSPACE); - } - - strlcpy(buf, templet, buflen); - } - - return (ISC_R_SUCCESS); -} - -isc_result_t -isc_file_renameunique(const char *file, char *templet) { - int fd; - isc_result_t result = ISC_R_SUCCESS; - - REQUIRE(file != NULL); - REQUIRE(templet != NULL); - - fd = mkstemp(templet, true); - if (fd == -1) { - result = isc__errno2result(errno); - } else { - close(fd); - } - - if (result == ISC_R_SUCCESS) { - int res; - res = isc_file_safemovefile(file, templet); - if (res != 0) { - result = isc__errno2result(errno); - (void)unlink(templet); - } - } - return (result); -} - -static isc_result_t -openuniquemode(char *templet, int mode, bool binary, FILE **fp) { - int fd; - FILE *f; - isc_result_t result = ISC_R_SUCCESS; - - REQUIRE(templet != NULL); - REQUIRE(fp != NULL && *fp == NULL); - - /* - * Win32 does not have mkstemp. Using emulation above. - */ - fd = mkstemp(templet, binary); - - if (fd == -1) { - result = isc__errno2result(errno); - } - if (result == ISC_R_SUCCESS) { -#if 1 - UNUSED(mode); -#else /* if 1 */ - (void)fchmod(fd, mode); -#endif /* if 1 */ - f = fdopen(fd, binary ? "wb+" : "w+"); - if (f == NULL) { - result = isc__errno2result(errno); - (void)remove(templet); - (void)close(fd); - } else { - *fp = f; - } - } - - return (result); -} - -isc_result_t -isc_file_openuniqueprivate(char *templet, FILE **fp) { - int mode = _S_IREAD | _S_IWRITE; - return (openuniquemode(templet, mode, false, fp)); -} - -isc_result_t -isc_file_openunique(char *templet, FILE **fp) { - int mode = _S_IREAD | _S_IWRITE; - return (openuniquemode(templet, mode, false, fp)); -} - -isc_result_t -isc_file_openuniquemode(char *templet, int mode, FILE **fp) { - return (openuniquemode(templet, mode, false, fp)); -} - -isc_result_t -isc_file_bopenuniqueprivate(char *templet, FILE **fp) { - int mode = _S_IREAD | _S_IWRITE; - return (openuniquemode(templet, mode, true, fp)); -} - -isc_result_t -isc_file_bopenunique(char *templet, FILE **fp) { - int mode = _S_IREAD | _S_IWRITE; - return (openuniquemode(templet, mode, true, fp)); -} - -isc_result_t -isc_file_bopenuniquemode(char *templet, int mode, FILE **fp) { - return (openuniquemode(templet, mode, true, fp)); -} - -isc_result_t -isc_file_remove(const char *filename) { - int r; - - REQUIRE(filename != NULL); - - r = unlink(filename); - if (r == 0) { - return (ISC_R_SUCCESS); - } else { - return (isc__errno2result(errno)); - } -} - -isc_result_t -isc_file_rename(const char *oldname, const char *newname) { - int r; - - REQUIRE(oldname != NULL); - REQUIRE(newname != NULL); - - r = isc_file_safemovefile(oldname, newname); - if (r == 0) { - return (ISC_R_SUCCESS); - } else { - return (isc__errno2result(errno)); - } -} - -bool -isc_file_exists(const char *pathname) { - struct stat stats; - - REQUIRE(pathname != NULL); - - return (file_stats(pathname, &stats) == ISC_R_SUCCESS); -} - -isc_result_t -isc_file_isplainfile(const char *filename) { - /* - * This function returns success if filename is a plain file. - */ - struct stat filestat; - memset(&filestat, 0, sizeof(struct stat)); - - if ((stat(filename, &filestat)) == -1) { - return (isc__errno2result(errno)); - } - - if (!S_ISREG(filestat.st_mode)) { - return (ISC_R_INVALIDFILE); - } - - return (ISC_R_SUCCESS); -} - -isc_result_t -isc_file_isplainfilefd(int fd) { - /* - * This function returns success if filename is a plain file. - */ - struct stat filestat; - memset(&filestat, 0, sizeof(struct stat)); - - if ((fstat(fd, &filestat)) == -1) { - return (isc__errno2result(errno)); - } - - if (!S_ISREG(filestat.st_mode)) { - return (ISC_R_INVALIDFILE); - } - - return (ISC_R_SUCCESS); -} - -isc_result_t -isc_file_isdirectory(const char *filename) { - /* - * This function returns success if filename is a directory. - */ - struct stat filestat; - memset(&filestat, 0, sizeof(struct stat)); - - if ((stat(filename, &filestat)) == -1) { - return (isc__errno2result(errno)); - } - - if (!S_ISDIR(filestat.st_mode)) { - return (ISC_R_INVALIDFILE); - } - - return (ISC_R_SUCCESS); -} - -bool -isc_file_isabsolute(const char *filename) { - REQUIRE(filename != NULL); - /* - * Look for c:\path\... style, c:/path/... or \\computer\shar\path... - * the UNC style file specs - */ - if ((filename[0] == '\\') && (filename[1] == '\\')) { - return (true); - } - if (isalpha(filename[0]) && filename[1] == ':' && filename[2] == '\\') { - return (true); - } - if (isalpha(filename[0]) && filename[1] == ':' && filename[2] == '/') { - return (true); - } - return (false); -} - -bool -isc_file_iscurrentdir(const char *filename) { - REQUIRE(filename != NULL); - return (filename[0] == '.' && filename[1] == '\0'); -} - -bool -isc_file_ischdiridempotent(const char *filename) { - REQUIRE(filename != NULL); - - if (isc_file_isabsolute(filename)) { - return (true); - } - if (filename[0] == '\\') { - return (true); - } - if (filename[0] == '/') { - return (true); - } - if (isc_file_iscurrentdir(filename)) { - return (true); - } - return (false); -} - -const char * -isc_file_basename(const char *filename) { - char *s; - - REQUIRE(filename != NULL); - - s = strrchr(filename, '\\'); - if (s == NULL) { - return (filename); - } - return (s + 1); -} - -isc_result_t -isc_file_progname(const char *filename, char *progname, size_t namelen) { - const char *s; - const char *p; - size_t len; - - REQUIRE(filename != NULL); - REQUIRE(progname != NULL); - - /* - * Strip the path from the name - */ - s = isc_file_basename(filename); - if (s == NULL) { - return (ISC_R_NOSPACE); - } - - /* - * Strip any and all suffixes - */ - p = strchr(s, '.'); - if (p == NULL) { - if (namelen <= strlen(s)) { - return (ISC_R_NOSPACE); - } - - strlcpy(progname, s, namelen); - return (ISC_R_SUCCESS); - } - - /* - * Copy the result to the buffer - */ - len = p - s; - if (len >= namelen) { - return (ISC_R_NOSPACE); - } - - /* Copy up to 'len' bytes and NUL terminate. */ - strlcpy(progname, s, ISC_MIN(len + 1, namelen)); - return (ISC_R_SUCCESS); -} - -isc_result_t -isc_file_absolutepath(const char *filename, char *path, size_t pathlen) { - char *ptrname; - DWORD retval; - - REQUIRE(filename != NULL); - REQUIRE(path != NULL); - - retval = GetFullPathName(filename, (DWORD)pathlen, path, &ptrname); - - /* Something went wrong in getting the path */ - if (retval == 0) { - return (ISC_R_NOTFOUND); - } - /* Caller needs to provide a larger buffer to contain the string */ - if (retval >= pathlen) { - return (ISC_R_NOSPACE); - } - return (ISC_R_SUCCESS); -} - -isc_result_t -isc_file_truncate(const char *filename, isc_offset_t size) { - int fh; - - REQUIRE(filename != NULL && size >= 0); - - if ((fh = open(filename, _O_RDWR | _O_BINARY)) < 0) { - return (isc__errno2result(errno)); - } - - if (_chsize(fh, size) != 0) { - close(fh); - return (isc__errno2result(errno)); - } - close(fh); - - return (ISC_R_SUCCESS); -} - -isc_result_t -isc_file_safecreate(const char *filename, FILE **fp) { - isc_result_t result; - int flags; - struct stat sb; - FILE *f; - int fd; - - REQUIRE(filename != NULL); - REQUIRE(fp != NULL && *fp == NULL); - - result = file_stats(filename, &sb); - if (result == ISC_R_SUCCESS) { - if ((sb.st_mode & S_IFREG) == 0) { - return (ISC_R_INVALIDFILE); - } - flags = O_WRONLY | O_TRUNC; - } else if (result == ISC_R_FILENOTFOUND) { - flags = O_WRONLY | O_CREAT | O_EXCL; - } else { - return (result); - } - - fd = open(filename, flags, S_IRUSR | S_IWUSR); - if (fd == -1) { - return (isc__errno2result(errno)); - } - - f = fdopen(fd, "w"); - if (f == NULL) { - result = isc__errno2result(errno); - close(fd); - return (result); - } - - *fp = f; - return (ISC_R_SUCCESS); -} - -isc_result_t -isc_file_splitpath(isc_mem_t *mctx, const char *path, char **dirname, - char const **basename) { - char *dir; - const char *file, *slash; - char *backslash; - - slash = strrchr(path, '/'); - - backslash = strrchr(path, '\\'); - if ((slash != NULL && backslash != NULL && backslash > slash) || - (slash == NULL && backslash != NULL)) - { - slash = backslash; - } - - if (slash == path) { - file = ++slash; - dir = isc_mem_strdup(mctx, "/"); - } else if (slash != NULL) { - file = ++slash; - dir = isc_mem_allocate(mctx, slash - path); - strlcpy(dir, path, slash - path); - } else { - file = path; - dir = isc_mem_strdup(mctx, "."); - } - - if (dir == NULL) { - return (ISC_R_NOMEMORY); - } - - if (*file == '\0') { - isc_mem_free(mctx, dir); - return (ISC_R_INVALIDFILE); - } - - *dirname = dir; - *basename = file; - - return (ISC_R_SUCCESS); -} - -void * -isc_file_mmap(void *addr, size_t len, int prot, int flags, int fd, - off_t offset) { - void *buf; - ssize_t ret; - off_t end; - - UNUSED(addr); - UNUSED(prot); - UNUSED(flags); - - end = lseek(fd, 0, SEEK_END); - lseek(fd, offset, SEEK_SET); - if (end - offset < (off_t)len) { - len = end - offset; - } - - buf = malloc(len); - if (buf == NULL) { - return (NULL); - } - - ret = read(fd, buf, (unsigned int)len); - if (ret != (ssize_t)len) { - free(buf); - buf = NULL; - } - - return (buf); -} - -int -isc_file_munmap(void *addr, size_t len) { - UNUSED(len); - free(addr); - return (0); -} - -#define DISALLOW "\\/:ABCDEFGHIJKLMNOPQRSTUVWXYZ" - -static isc_result_t -digest2hex(unsigned char *digest, unsigned int digestlen, char *hash, - size_t hashlen) { - unsigned int i; - int ret; - for (i = 0; i < digestlen; i++) { - size_t left = hashlen - i * 2; - ret = snprintf(hash + i * 2, left, "%02x", digest[i]); - if (ret < 0 || (size_t)ret >= left) { - return (ISC_R_NOSPACE); - } - } - return (ISC_R_SUCCESS); -} - -isc_result_t -isc_file_sanitize(const char *dir, const char *base, const char *ext, - char *path, size_t length) { - char buf[PATH_MAX]; - unsigned char digest[ISC_MAX_MD_SIZE]; - unsigned int digestlen; - char hash[ISC_MAX_MD_SIZE * 2 + 1]; - size_t l = 0; - isc_result_t err; - - REQUIRE(base != NULL); - REQUIRE(path != NULL); - - l = strlen(base) + 1; - - /* - * allow room for a full sha256 hash (64 chars - * plus null terminator) - */ - if (l < 65) { - l = 65; - } - - if (dir != NULL) { - l += strlen(dir) + 1; - } - if (ext != NULL) { - l += strlen(ext) + 1; - } - - if (l > length || l > PATH_MAX) { - return (ISC_R_NOSPACE); - } - - /* Check whether the full-length SHA256 hash filename exists */ - err = isc_md(ISC_MD_SHA256, (const unsigned char *)base, strlen(base), - digest, &digestlen); - if (err != ISC_R_SUCCESS) { - return (err); - } - - err = digest2hex(digest, digestlen, hash, sizeof(hash)); - if (err != ISC_R_SUCCESS) { - return (err); - } - - snprintf(buf, sizeof(buf), "%s%s%s%s%s", dir != NULL ? dir : "", - dir != NULL ? "/" : "", hash, ext != NULL ? "." : "", - ext != NULL ? ext : ""); - if (isc_file_exists(buf)) { - strlcpy(path, buf, length); - return (ISC_R_SUCCESS); - } - - /* Check for a truncated SHA256 hash filename */ - hash[16] = '\0'; - snprintf(buf, sizeof(buf), "%s%s%s%s%s", dir != NULL ? dir : "", - dir != NULL ? "/" : "", hash, ext != NULL ? "." : "", - ext != NULL ? ext : ""); - if (isc_file_exists(buf)) { - strlcpy(path, buf, length); - return (ISC_R_SUCCESS); - } - - /* - * If neither hash filename already exists, then we'll use - * the original base name if it has no disallowed characters, - * or the truncated hash name if it does. - */ - if (strpbrk(base, DISALLOW) != NULL) { - strlcpy(path, buf, length); - return (ISC_R_SUCCESS); - } - - snprintf(buf, sizeof(buf), "%s%s%s%s%s", dir != NULL ? dir : "", - dir != NULL ? "/" : "", base, ext != NULL ? "." : "", - ext != NULL ? ext : ""); - strlcpy(path, buf, length); - return (ISC_R_SUCCESS); -} - -/* - * Based on http://blog.aaronballman.com/2011/08/how-to-check-access-rights/ - */ -bool -isc_file_isdirwritable(const char *path) { - DWORD length = 0; - HANDLE hToken = NULL; - PSECURITY_DESCRIPTOR security = NULL; - bool answer = false; - - if (isc_file_isdirectory(path) != ISC_R_SUCCESS) { - return (answer); - } - - /* - * Figure out buffer size. GetFileSecurity() should not succeed. - */ - if (GetFileSecurity(path, - OWNER_SECURITY_INFORMATION | - GROUP_SECURITY_INFORMATION | - DACL_SECURITY_INFORMATION, - NULL, 0, &length)) - { - return (answer); - } - - if (GetLastError() != ERROR_INSUFFICIENT_BUFFER) { - return (answer); - } - - security = malloc(length); - if (security == NULL) { - return (answer); - } - - /* - * GetFileSecurity() should succeed. - */ - if (!GetFileSecurity(path, - OWNER_SECURITY_INFORMATION | - GROUP_SECURITY_INFORMATION | - DACL_SECURITY_INFORMATION, - security, length, &length)) - { - return (answer); - } - - if (OpenProcessToken(GetCurrentProcess(), - TOKEN_IMPERSONATE | TOKEN_QUERY | TOKEN_DUPLICATE | - STANDARD_RIGHTS_READ, - &hToken)) - { - HANDLE hImpersonatedToken = NULL; - - if (DuplicateToken(hToken, SecurityImpersonation, - &hImpersonatedToken)) { - GENERIC_MAPPING mapping; - PRIVILEGE_SET privileges = { 0 }; - DWORD grantedAccess = 0; - DWORD privilegesLength = sizeof(privileges); - BOOL result = FALSE; - DWORD genericAccessRights = GENERIC_WRITE; - - mapping.GenericRead = FILE_GENERIC_READ; - mapping.GenericWrite = FILE_GENERIC_WRITE; - mapping.GenericExecute = FILE_GENERIC_EXECUTE; - mapping.GenericAll = FILE_ALL_ACCESS; - - MapGenericMask(&genericAccessRights, &mapping); - if (AccessCheck(security, hImpersonatedToken, - genericAccessRights, &mapping, - &privileges, &privilegesLength, - &grantedAccess, &result)) - { - answer = result; - } - CloseHandle(hImpersonatedToken); - } - CloseHandle(hToken); - } - free(security); - return (answer); -} diff --git a/lib/isc/win32/fsaccess.c b/lib/isc/win32/fsaccess.c deleted file mode 100644 index 61f7be5e0c..0000000000 --- a/lib/isc/win32/fsaccess.c +++ /dev/null @@ -1,399 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/* - * Note that Win32 does not have the concept of files having access - * and ownership bits. The FAT File system only has a readonly flag - * for everyone and that's all. NTFS uses ACL's which is a totally - * different concept of controlling access. - * - * This code needs to be revisited to set up proper access control for - * NTFS file systems. Nothing can be done for FAT file systems. - */ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include "../fsaccess_common_p.h" -#include "errno2result.h" - -/* Store the user account name locally */ -static char username[255] = "\0"; -static DWORD namelen = 0; - -/* - * In order to set or retrieve access information, we need to obtain - * the File System type. These could be UNC-type shares. - */ - -BOOL -is_ntfs(const char *file) { - char drive[255]; - char FSType[20]; - char tmpbuf[256]; - char *machinename; - char *sharename; - char filename[1024]; - char *last; - - REQUIRE(filename != NULL); - - if (isc_file_absolutepath(file, filename, sizeof(filename)) != - ISC_R_SUCCESS) { - return (FALSE); - } - - /* - * Look for c:\path\... style, c:/path/... or \\computer\shar\path... - * the UNC style file specs - */ - if (isalpha(filename[0]) && filename[1] == ':' && - (filename[2] == '\\' || filename[2] == '/')) - { - /* Copy 'c:\' or 'c:/' and NUL terminate. */ - strlcpy(drive, filename, ISC_MIN(3 + 1, sizeof(drive))); - } else if ((filename[0] == '\\') && (filename[1] == '\\')) { - /* Find the machine and share name and rebuild the UNC */ - strlcpy(tmpbuf, filename, sizeof(tmpbuf)); - machinename = strtok_r(tmpbuf, "\\", &last); - sharename = strtok_r(NULL, "\\", &last); - strlcpy(drive, "\\\\", sizeof(drive)); - strlcat(drive, machinename, sizeof(drive)); - strlcat(drive, "\\", sizeof(drive)); - strlcat(drive, sharename, sizeof(drive)); - strlcat(drive, "\\", sizeof(drive)); - } else { /* Not determinable */ - return (FALSE); - } - - GetVolumeInformation(drive, NULL, 0, NULL, 0, NULL, FSType, - sizeof(FSType)); - if (strcmp(FSType, "NTFS") == 0) { - return (TRUE); - } else { - return (FALSE); - } -} - -/* - * If it's not NTFS, we assume that it is FAT and proceed - * with almost nothing to do. Only the write flag can be set or - * cleared. - */ -isc_result_t -FAT_fsaccess_set(const char *path, isc_fsaccess_t access) { - int mode; - isc_fsaccess_t bits; - - /* - * Done with checking bad bits. Set mode_t. - */ - mode = 0; - -#define SET_AND_CLEAR1(modebit) \ - if ((access & bits) != 0) { \ - mode |= modebit; \ - access &= ~bits; \ - } -#define SET_AND_CLEAR(user, group, other) \ - SET_AND_CLEAR1(user); \ - bits <<= STEP; \ - SET_AND_CLEAR1(group); \ - bits <<= STEP; \ - SET_AND_CLEAR1(other); - - bits = ISC_FSACCESS_READ | ISC_FSACCESS_LISTDIRECTORY; - - SET_AND_CLEAR(S_IRUSR, S_IRGRP, S_IROTH); - - bits = ISC_FSACCESS_WRITE | ISC_FSACCESS_CREATECHILD | - ISC_FSACCESS_DELETECHILD; - - SET_AND_CLEAR(S_IWUSR, S_IWGRP, S_IWOTH); - - INSIST(access == 0); - - if (_chmod(path, mode) < 0) { - return (isc__errno2result(errno)); - } - - return (ISC_R_SUCCESS); -} - -isc_result_t -NTFS_Access_Control(const char *filename, const char *user, int access, - bool isdir) { - SECURITY_DESCRIPTOR sd; - BYTE aclBuffer[1024]; - PACL pacl = (PACL)&aclBuffer; - BYTE sidBuffer[100]; - PSID psid = (PSID)&sidBuffer; - DWORD sidBufferSize = sizeof(sidBuffer); - BYTE adminSidBuffer[100]; - PSID padminsid = (PSID)&adminSidBuffer; - DWORD adminSidBufferSize = sizeof(adminSidBuffer); - BYTE otherSidBuffer[100]; - PSID pothersid = (PSID)&otherSidBuffer; - DWORD otherSidBufferSize = sizeof(otherSidBuffer); - char domainBuffer[100]; - DWORD domainBufferSize = sizeof(domainBuffer); - SID_NAME_USE snu; - DWORD NTFSbits; - int caccess; - - /* Initialize an ACL */ - if (!InitializeSecurityDescriptor(&sd, SECURITY_DESCRIPTOR_REVISION)) { - return (ISC_R_NOPERM); - } - if (!InitializeAcl(pacl, sizeof(aclBuffer), ACL_REVISION)) { - return (ISC_R_NOPERM); - } - if (!LookupAccountName(0, user, psid, &sidBufferSize, domainBuffer, - &domainBufferSize, &snu)) - { - return (ISC_R_NOPERM); - } - domainBufferSize = sizeof(domainBuffer); - if (!LookupAccountName(0, "Administrators", padminsid, - &adminSidBufferSize, domainBuffer, - &domainBufferSize, &snu)) - { - (void)GetLastError(); - return (ISC_R_NOPERM); - } - domainBufferSize = sizeof(domainBuffer); - if (!LookupAccountName(0, "Everyone", pothersid, &otherSidBufferSize, - domainBuffer, &domainBufferSize, &snu)) - { - (void)GetLastError(); - return (ISC_R_NOPERM); - } - - caccess = access; - /* Owner check */ - - NTFSbits = 0; - if ((caccess & ISC_FSACCESS_READ) != 0) { - NTFSbits |= FILE_GENERIC_READ; - } - if ((caccess & ISC_FSACCESS_WRITE) != 0) { - NTFSbits |= FILE_GENERIC_WRITE; - } - if ((caccess & ISC_FSACCESS_EXECUTE) != 0) { - NTFSbits |= FILE_GENERIC_EXECUTE; - } - - /* For directories check the directory-specific bits */ - if (isdir) { - if ((caccess & ISC_FSACCESS_CREATECHILD) != 0) { - NTFSbits |= FILE_ADD_SUBDIRECTORY | FILE_ADD_FILE; - } - if ((caccess & ISC_FSACCESS_DELETECHILD) != 0) { - NTFSbits |= FILE_DELETE_CHILD; - } - if ((caccess & ISC_FSACCESS_LISTDIRECTORY) != 0) { - NTFSbits |= FILE_LIST_DIRECTORY; - } - if ((caccess & ISC_FSACCESS_ACCESSCHILD) != 0) { - NTFSbits |= FILE_TRAVERSE; - } - } - - if (NTFSbits == - (FILE_GENERIC_READ | FILE_GENERIC_WRITE | FILE_GENERIC_EXECUTE)) { - NTFSbits |= FILE_ALL_ACCESS; - } - /* - * Owner and Administrator also get STANDARD_RIGHTS_ALL - * to ensure that they have full control - */ - - NTFSbits |= STANDARD_RIGHTS_ALL; - - /* Add the ACE to the ACL */ - if (!AddAccessAllowedAce(pacl, ACL_REVISION, NTFSbits, psid)) { - return (ISC_R_NOPERM); - } - if (!AddAccessAllowedAce(pacl, ACL_REVISION, NTFSbits, padminsid)) { - return (ISC_R_NOPERM); - } - - /* - * Group is ignored since we can be in multiple groups or no group - * and its meaning is not clear on Win32 - */ - - caccess = caccess >> STEP; - - /* - * Other check. We translate this to be the same as Everyone - */ - - caccess = caccess >> STEP; - - NTFSbits = 0; - if ((caccess & ISC_FSACCESS_READ) != 0) { - NTFSbits |= FILE_GENERIC_READ; - } - if ((caccess & ISC_FSACCESS_WRITE) != 0) { - NTFSbits |= FILE_GENERIC_WRITE; - } - if ((caccess & ISC_FSACCESS_EXECUTE) != 0) { - NTFSbits |= FILE_GENERIC_EXECUTE; - } - - /* For directories check the directory-specific bits */ - if (isdir == TRUE) { - if ((caccess & ISC_FSACCESS_CREATECHILD) != 0) { - NTFSbits |= FILE_ADD_SUBDIRECTORY | FILE_ADD_FILE; - } - if ((caccess & ISC_FSACCESS_DELETECHILD) != 0) { - NTFSbits |= FILE_DELETE_CHILD; - } - if ((caccess & ISC_FSACCESS_LISTDIRECTORY) != 0) { - NTFSbits |= FILE_LIST_DIRECTORY; - } - if ((caccess & ISC_FSACCESS_ACCESSCHILD) != 0) { - NTFSbits |= FILE_TRAVERSE; - } - } - /* Add the ACE to the ACL */ - if (!AddAccessAllowedAce(pacl, ACL_REVISION, NTFSbits, pothersid)) { - return (ISC_R_NOPERM); - } - - if (!SetSecurityDescriptorDacl(&sd, TRUE, pacl, FALSE)) { - return (ISC_R_NOPERM); - } - if (!SetFileSecurity(filename, DACL_SECURITY_INFORMATION, &sd)) { - return (ISC_R_NOPERM); - } - - return (ISC_R_SUCCESS); -} - -isc_result_t -NTFS_fsaccess_set(const char *path, isc_fsaccess_t access, bool isdir) { - /* - * For NTFS we first need to get the name of the account under - * which BIND is running - */ - if (namelen == 0) { - namelen = sizeof(username); - if (GetUserName(username, &namelen) == 0) { - return (ISC_R_FAILURE); - } - } - return (NTFS_Access_Control(path, username, access, isdir)); -} - -isc_result_t -isc_fsaccess_set(const char *path, isc_fsaccess_t access) { - struct stat statb; - bool is_dir = false; - isc_result_t result; - - if (stat(path, &statb) != 0) { - return (isc__errno2result(errno)); - } - - if ((statb.st_mode & S_IFDIR) != 0) { - is_dir = true; - } else if ((statb.st_mode & S_IFREG) == 0) { - return (ISC_R_INVALIDFILE); - } - - result = isc__fsaccess_check_bad_bits(access, is_dir); - if (result != ISC_R_SUCCESS) { - return (result); - } - - /* - * Determine if this is a FAT or NTFS disk and - * call the appropriate function to set the permissions - */ - if (is_ntfs(path)) { - return (NTFS_fsaccess_set(path, access, is_dir)); - } else { - return (FAT_fsaccess_set(path, access)); - } -} - -isc_result_t -isc_fsaccess_changeowner(const char *filename, const char *user) { - SECURITY_DESCRIPTOR psd; - BYTE sidBuffer[500]; - BYTE groupBuffer[500]; - PSID psid = (PSID)&sidBuffer; - DWORD sidBufferSize = sizeof(sidBuffer); - char domainBuffer[100]; - DWORD domainBufferSize = sizeof(domainBuffer); - SID_NAME_USE snu; - PSID pSidGroup = (PSID)&groupBuffer; - DWORD groupBufferSize = sizeof(groupBuffer); - - /* - * Determine if this is a FAT or NTFS disk and - * call the appropriate function to set the ownership - * FAT disks do not have ownership attributes so it's - * a noop. - */ - if (is_ntfs(filename) == FALSE) { - return (ISC_R_SUCCESS); - } - - if (!InitializeSecurityDescriptor(&psd, SECURITY_DESCRIPTOR_REVISION)) { - return (ISC_R_NOPERM); - } - - if (!LookupAccountName(0, user, psid, &sidBufferSize, domainBuffer, - &domainBufferSize, &snu)) - { - return (ISC_R_NOPERM); - } - - /* Make sure administrators can get to it */ - domainBufferSize = sizeof(domainBuffer); - if (!LookupAccountName(0, "Administrators", pSidGroup, &groupBufferSize, - domainBuffer, &domainBufferSize, &snu)) - { - return (ISC_R_NOPERM); - } - - if (!SetSecurityDescriptorOwner(&psd, psid, FALSE)) { - return (ISC_R_NOPERM); - } - - if (!SetSecurityDescriptorGroup(&psd, pSidGroup, FALSE)) { - return (ISC_R_NOPERM); - } - - if (!SetFileSecurity(filename, - OWNER_SECURITY_INFORMATION | - GROUP_SECURITY_INFORMATION, - &psd)) - { - return (ISC_R_NOPERM); - } - - return (ISC_R_SUCCESS); -} diff --git a/lib/isc/win32/include/.clang-format b/lib/isc/win32/include/.clang-format deleted file mode 120000 index e919bbad93..0000000000 --- a/lib/isc/win32/include/.clang-format +++ /dev/null @@ -1 +0,0 @@ -../../../../.clang-format.headers \ No newline at end of file diff --git a/lib/isc/win32/include/isc/align.h b/lib/isc/win32/include/isc/align.h deleted file mode 100644 index d845d365b1..0000000000 --- a/lib/isc/win32/include/isc/align.h +++ /dev/null @@ -1,13 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#pragma once -#define alignas(x) __declspec(align(x)) diff --git a/lib/isc/win32/include/isc/bind_registry.h b/lib/isc/win32/include/isc/bind_registry.h deleted file mode 100644 index e728b0ff41..0000000000 --- a/lib/isc/win32/include/isc/bind_registry.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#ifndef ISC_BINDREGISTRY_H -#define ISC_BINDREGISTRY_H - -/* - * BIND makes use of the following Registry keys in various places, especially - * during startup and installation - */ - -#define BIND_SUBKEY "Software\\ISC\\BIND" -#define BIND_SESSION "CurrentSession" -#define BIND_SESSION_SUBKEY "Software\\ISC\\BIND\\CurrentSession" -#define BIND_UNINSTALL_SUBKEY \ - "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\ISC BIND" - -#define EVENTLOG_APP_SUBKEY \ - "SYSTEM\\CurrentControlSet\\Services\\EventLog\\Application" -#define BIND_MESSAGE_SUBKEY \ - "SYSTEM\\CurrentControlSet\\Services\\EventLog\\Application\\named" -#define BIND_MESSAGE_NAME "named" - -#define BIND_SERVICE_SUBKEY "SYSTEM\\CurrentControlSet\\Services\\named" - -#define BIND_CONFIGFILE 0 -#define BIND_DEBUGLEVEL 1 -#define BIND_QUERYLOG 2 -#define BIND_FOREGROUND 3 -#define BIND_PORT 4 - -#endif /* ISC_BINDREGISTRY_H */ diff --git a/lib/isc/win32/include/isc/bindevt.h b/lib/isc/win32/include/isc/bindevt.h deleted file mode 100644 index 99d3fb8681..0000000000 --- a/lib/isc/win32/include/isc/bindevt.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#ifndef ISC_BINDEVT_H -#define ISC_BINDEVT_H 1 - -/* - * This is used for the event log for both logging the messages and - * later on by the event viewer when looking at the events - */ - -/* - * Values are 32 bit values laid out as follows: - * - * 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 - * 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 - * +---+-+-+-----------------------+-------------------------------+ - * |Sev|C|R| Facility | Code | - * +---+-+-+-----------------------+-------------------------------+ - * - * where - * - * Sev - is the severity code - * - * 00 - Success - * 01 - Informational - * 10 - Warning - * 11 - Error - * - * C - is the Customer code flag - * - * R - is a reserved bit - * - * Facility - is the facility code - * - * Code - is the facility's status code - * - * - * Define the facility codes - */ - -/* - * Define the severity codes - */ - -/* - * MessageId: BIND_ERR_MSG - * - * MessageText: - * - * %1 - */ -#define BIND_ERR_MSG ((DWORD)0xC0000001L) - -/* - * MessageId: BIND_WARN_MSG - * - * MessageText: - * - * %1 - */ -#define BIND_WARN_MSG ((DWORD)0x80000002L) - -/* - * MessageId: BIND_INFO_MSG - * - * MessageText: - * - * %1 - */ -#define BIND_INFO_MSG ((DWORD)0x40000003L) - -#endif /* ISC_BINDEVT_H */ diff --git a/lib/isc/win32/include/isc/condition.h b/lib/isc/win32/include/isc/condition.h deleted file mode 100644 index fc4e96c8f3..0000000000 --- a/lib/isc/win32/include/isc/condition.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#ifndef ISC_CONDITION_H -#define ISC_CONDITION_H 1 - -#include - -#include -#include -#include -#include - -typedef struct isc_condition_thread isc_condition_thread_t; - -struct isc_condition_thread { - uintptr_t th; - HANDLE handle[2]; - ISC_LINK(isc_condition_thread_t) link; -}; - -typedef struct isc_condition { - HANDLE events[2]; - unsigned int waiters; - ISC_LIST(isc_condition_thread_t) threadlist; -} isc_condition_t; - -ISC_LANG_BEGINDECLS - -void -isc_condition_init(isc_condition_t *); - -isc_result_t -isc_condition_wait(isc_condition_t *, isc_mutex_t *); - -isc_result_t -isc_condition_signal(isc_condition_t *); - -isc_result_t -isc_condition_broadcast(isc_condition_t *); - -isc_result_t -isc_condition_destroy(isc_condition_t *); - -isc_result_t -isc_condition_waituntil(isc_condition_t *, isc_mutex_t *, isc_time_t *); - -ISC_LANG_ENDDECLS - -#endif /* ISC_CONDITION_H */ diff --git a/lib/isc/win32/include/isc/dir.h b/lib/isc/win32/include/isc/dir.h deleted file mode 100644 index 2f2c775a9f..0000000000 --- a/lib/isc/win32/include/isc/dir.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#ifndef ISC_DIR_H -#define ISC_DIR_H 1 - -#include -#include -#include - -#include -#include -#include - -typedef struct { - char name[NAME_MAX]; - unsigned int length; - WIN32_FIND_DATA find_data; -} isc_direntry_t; - -typedef struct { - unsigned int magic; - char dirname[PATH_MAX]; - isc_direntry_t entry; - bool entry_filled; - HANDLE search_handle; -} isc_dir_t; - -ISC_LANG_BEGINDECLS - -void -isc_dir_init(isc_dir_t *dir); - -isc_result_t -isc_dir_open(isc_dir_t *dir, const char *dirname); - -isc_result_t -isc_dir_read(isc_dir_t *dir); - -isc_result_t -isc_dir_reset(isc_dir_t *dir); - -void -isc_dir_close(isc_dir_t *dir); - -isc_result_t -isc_dir_chdir(const char *dirname); - -isc_result_t -isc_dir_chroot(const char *dirname); - -isc_result_t -isc_dir_createunique(char *templet); -/* - * Use a templet (such as from isc_file_mktemplate()) to create a uniquely - * named, empty directory. The templet string is modified in place. - * If result == ISC_R_SUCCESS, it is the name of the directory that was - * created. - */ - -ISC_LANG_ENDDECLS - -#endif /* ISC_DIR_H */ diff --git a/lib/isc/win32/include/isc/ipv6.h b/lib/isc/win32/include/isc/ipv6.h deleted file mode 100644 index 46df6ed94d..0000000000 --- a/lib/isc/win32/include/isc/ipv6.h +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#ifndef ISC_IPV6_H -#define ISC_IPV6_H 1 - -/***** -***** Module Info -*****/ - -/* - * IPv6 definitions for systems which do not support IPv6. - * - * MP: - * No impact. - * - * Reliability: - * No anticipated impact. - * - * Resources: - * N/A. - * - * Security: - * No anticipated impact. - * - * Standards: - * RFC2553. - */ - -#if _MSC_VER < 1300 -#define in6_addr in_addr6 -#endif /* if _MSC_VER < 1300 */ - -#ifndef IN6ADDR_ANY_INIT -#define IN6ADDR_ANY_INIT \ - { \ - { \ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 \ - } \ - } -#endif /* ifndef IN6ADDR_ANY_INIT */ -#ifndef IN6ADDR_LOOPBACK_INIT -#define IN6ADDR_LOOPBACK_INIT \ - { \ - { \ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 \ - } \ - } -#endif /* ifndef IN6ADDR_LOOPBACK_INIT */ -#ifndef IN6ADDR_V4MAPPED_INIT -#define IN6ADDR_V4MAPPED_INIT \ - { \ - { \ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff, 0, 0, 0, 0 \ - } \ - } -#endif /* ifndef IN6ADDR_V4MAPPED_INIT */ - -LIBISC_EXTERNAL_DATA extern const struct in6_addr isc_in6addr_any; -LIBISC_EXTERNAL_DATA extern const struct in6_addr isc_in6addr_loopback; - -/* - * Unspecified - */ -#ifndef IN6_IS_ADDR_UNSPECIFIED -#define IN6_IS_ADDR_UNSPECIFIED(a) \ - (*((u_long *)((a)->s6_addr)) == 0 && \ - *((u_long *)((a)->s6_addr) + 1) == 0 && \ - *((u_long *)((a)->s6_addr) + 2) == 0 && \ - *((u_long *)((a)->s6_addr) + 3) == 0) -#endif /* ifndef IN6_IS_ADDR_UNSPECIFIED */ - -/* - * Loopback - */ -#ifndef IN6_IS_ADDR_LOOPBACK -#define IN6_IS_ADDR_LOOPBACK(a) \ - (*((u_long *)((a)->s6_addr)) == 0 && \ - *((u_long *)((a)->s6_addr) + 1) == 0 && \ - *((u_long *)((a)->s6_addr) + 2) == 0 && \ - *((u_long *)((a)->s6_addr) + 3) == htonl(1)) -#endif /* ifndef IN6_IS_ADDR_LOOPBACK */ - -/* - * IPv4 compatible - */ -#define IN6_IS_ADDR_V4COMPAT(a) \ - (*((u_long *)((a)->s6_addr)) == 0 && \ - *((u_long *)((a)->s6_addr) + 1) == 0 && \ - *((u_long *)((a)->s6_addr) + 2) == 0 && \ - *((u_long *)((a)->s6_addr) + 3) != 0 && \ - *((u_long *)((a)->s6_addr) + 3) != htonl(1)) - -/* - * Mapped - */ -#define IN6_IS_ADDR_V4MAPPED(a) \ - (*((u_long *)((a)->s6_addr)) == 0 && \ - *((u_long *)((a)->s6_addr) + 1) == 0 && \ - *((u_long *)((a)->s6_addr) + 2) == htonl(0x0000ffff)) - -/* - * Multicast - */ -#define IN6_IS_ADDR_MULTICAST(a) ((a)->s6_addr[0] == 0xffU) - -/* - * Unicast link / site local. - */ -#ifndef IN6_IS_ADDR_LINKLOCAL -#define IN6_IS_ADDR_LINKLOCAL(a) \ - (((a)->s6_addr[0] == 0xfe) && (((a)->s6_addr[1] & 0xc0) == 0x80)) -#endif /* ifndef IN6_IS_ADDR_LINKLOCAL */ - -#ifndef IN6_IS_ADDR_SITELOCAL -#define IN6_IS_ADDR_SITELOCAL(a) \ - (((a)->s6_addr[0] == 0xfe) && (((a)->s6_addr[1] & 0xc0) == 0xc0)) -#endif /* ifndef IN6_IS_ADDR_SITELOCAL */ - -#endif /* ISC_IPV6_H */ diff --git a/lib/isc/win32/include/isc/mutex.h b/lib/isc/win32/include/isc/mutex.h deleted file mode 100644 index 4be07689fa..0000000000 --- a/lib/isc/win32/include/isc/mutex.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#ifndef ISC_MUTEX_H -#define ISC_MUTEX_H 1 - -#include - -#include -#include - -typedef CRITICAL_SECTION isc_mutex_t; - -/* - * This definition is here since some versions of WINBASE.H - * omits it for some reason. - */ -#if (_WIN32_WINNT < 0x0400) -WINBASEAPI BOOL WINAPI -TryEnterCriticalSection(LPCRITICAL_SECTION lpCriticalSection); -#endif /* _WIN32_WINNT < 0x0400 */ - -#define isc_mutex_init(mp) InitializeCriticalSection((mp)) -#define isc_mutex_lock(mp) (EnterCriticalSection((mp)), ISC_R_SUCCESS) -#define isc_mutex_unlock(mp) (LeaveCriticalSection((mp)), ISC_R_SUCCESS) -#define isc_mutex_trylock(mp) \ - (TryEnterCriticalSection((mp)) ? ISC_R_SUCCESS : ISC_R_LOCKBUSY) -#define isc_mutex_destroy(mp) (DeleteCriticalSection((mp))) - -/* - * This is a placeholder for now since we are not keeping any mutex stats - */ -#define isc_mutex_stats(fp) \ - do { \ - } while (0) - -#endif /* ISC_MUTEX_H */ diff --git a/lib/isc/win32/include/isc/net.h b/lib/isc/win32/include/isc/net.h deleted file mode 100644 index 600130a6f5..0000000000 --- a/lib/isc/win32/include/isc/net.h +++ /dev/null @@ -1,398 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#ifndef ISC_NET_H -#define ISC_NET_H 1 - -/***** -***** Module Info -*****/ - -/* - * Basic Networking Types - * - * This module is responsible for defining the following basic networking - * types: - * - * struct in_addr - * struct in6_addr - * struct in6_pktinfo - * struct sockaddr - * struct sockaddr_in - * struct sockaddr_in6 - * in_port_t - * - * It ensures that the AF_ and PF_ macros are defined. - * - * It declares ntoh[sl]() and hton[sl](). - * - * It declares inet_ntop(), and inet_pton(). - * - * It ensures that INADDR_ANY, IN6ADDR_ANY_INIT, in6addr_any, and - * in6addr_loopback are available. - * - * It ensures that IN_MULTICAST() is available to check for multicast - * addresses. - * - * MP: - * No impact. - * - * Reliability: - * No anticipated impact. - * - * Resources: - * N/A. - * - * Security: - * No anticipated impact. - * - * Standards: - * BSD Socket API - * RFC2553 - */ - -/*** - *** Imports. - ***/ -#include - -#include - -/* - * Because of some sort of problem in the MS header files, this cannot - * be simple "#include ", because winsock2.h tries to include - * windows.h, which then generates an error out of mswsock.h. _You_ - * figure it out. - */ -#ifndef _WINSOCKAPI_ -#define _WINSOCKAPI_ /* Prevent inclusion of winsock.h in windows.h */ -#endif /* ifndef _WINSOCKAPI_ */ - -#include -#include - -#include -#include -#include - -#include - -/* - * This is here because named client, interfacemgr.c, etc. use the name as - * a variable - */ -#undef interface - -#ifndef INADDR_ANY -#define INADDR_ANY 0x00000000UL -#endif /* ifndef INADDR_ANY */ - -#ifndef INADDR_LOOPBACK -#define INADDR_LOOPBACK 0x7f000001UL -#endif /* ifndef INADDR_LOOPBACK */ - -#if _MSC_VER < 1300 -#define in6addr_any isc_in6addr_any -#define in6addr_loopback isc_in6addr_loopback -#endif /* if _MSC_VER < 1300 */ - -/* - * Ensure type in_port_t is defined. - */ -typedef uint16_t in_port_t; - -/* - * If this system does not have MSG_TRUNC (as returned from recvmsg()) - * ISC_PLATFORM_RECVOVERFLOW will be defined. This will enable the MSG_TRUNC - * faking code in socket.c. - */ -#ifndef MSG_TRUNC -#define ISC_PLATFORM_RECVOVERFLOW -#endif /* ifndef MSG_TRUNC */ - -#define ISC__IPADDR(x) ((uint32_t)htonl((uint32_t)(x))) - -#define ISC_IPADDR_ISMULTICAST(i) \ - (((uint32_t)(i)&ISC__IPADDR(0xf0000000)) == ISC__IPADDR(0xe0000000)) - -#define ISC_IPADDR_ISEXPERIMENTAL(i) \ - (((uint32_t)(i)&ISC__IPADDR(0xf0000000)) == ISC__IPADDR(0xf0000000)) - -/* - * Fix the FD_SET and FD_CLR Macros to properly cast - */ -#undef FD_CLR -#define FD_CLR(fd, set) \ - do { \ - u_int __i; \ - for (__i = 0; __i < ((fd_set FAR *)(set))->fd_count; __i++) { \ - if (((fd_set FAR *)(set))->fd_array[__i] == \ - (SOCKET)fd) { \ - while (__i < \ - ((fd_set FAR *)(set))->fd_count - 1) { \ - ((fd_set FAR *)(set))->fd_array[__i] = \ - ((fd_set FAR *)(set)) \ - ->fd_array[__i + 1]; \ - __i++; \ - } \ - ((fd_set FAR *)(set))->fd_count--; \ - break; \ - } \ - } \ - } while (0) - -#undef FD_SET -#define FD_SET(fd, set) \ - do { \ - u_int __i; \ - for (__i = 0; __i < ((fd_set FAR *)(set))->fd_count; __i++) { \ - if (((fd_set FAR *)(set))->fd_array[__i] == \ - (SOCKET)(fd)) { \ - break; \ - } \ - } \ - if (__i == ((fd_set FAR *)(set))->fd_count) { \ - if (((fd_set FAR *)(set))->fd_count < FD_SETSIZE) { \ - ((fd_set FAR *)(set))->fd_array[__i] = \ - (SOCKET)(fd); \ - ((fd_set FAR *)(set))->fd_count++; \ - } \ - } \ - } while (0) - -/* - * Windows Sockets errors redefined as regular Berkeley error constants. - * These are usually commented out in Windows NT to avoid conflicts with - * errno.h. Use the WSA constants instead. - */ - -#include - -#ifndef EWOULDBLOCK -#define EWOULDBLOCK WSAEWOULDBLOCK -#endif /* ifndef EWOULDBLOCK */ -#ifndef EINPROGRESS -#define EINPROGRESS WSAEINPROGRESS -#endif /* ifndef EINPROGRESS */ -#ifndef EALREADY -#define EALREADY WSAEALREADY -#endif /* ifndef EALREADY */ -#ifndef ENOTSOCK -#define ENOTSOCK WSAENOTSOCK -#endif /* ifndef ENOTSOCK */ -#ifndef EDESTADDRREQ -#define EDESTADDRREQ WSAEDESTADDRREQ -#endif /* ifndef EDESTADDRREQ */ -#ifndef EMSGSIZE -#define EMSGSIZE WSAEMSGSIZE -#endif /* ifndef EMSGSIZE */ -#ifndef EPROTOTYPE -#define EPROTOTYPE WSAEPROTOTYPE -#endif /* ifndef EPROTOTYPE */ -#ifndef ENOPROTOOPT -#define ENOPROTOOPT WSAENOPROTOOPT -#endif /* ifndef ENOPROTOOPT */ -#ifndef EPROTONOSUPPORT -#define EPROTONOSUPPORT WSAEPROTONOSUPPORT -#endif /* ifndef EPROTONOSUPPORT */ -#ifndef ESOCKTNOSUPPORT -#define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT -#endif /* ifndef ESOCKTNOSUPPORT */ -#ifndef EOPNOTSUPP -#define EOPNOTSUPP WSAEOPNOTSUPP -#endif /* ifndef EOPNOTSUPP */ -#ifndef EPFNOSUPPORT -#define EPFNOSUPPORT WSAEPFNOSUPPORT -#endif /* ifndef EPFNOSUPPORT */ -#ifndef EAFNOSUPPORT -#define EAFNOSUPPORT WSAEAFNOSUPPORT -#endif /* ifndef EAFNOSUPPORT */ -#ifndef EADDRINUSE -#define EADDRINUSE WSAEADDRINUSE -#endif /* ifndef EADDRINUSE */ -#ifndef EADDRNOTAVAIL -#define EADDRNOTAVAIL WSAEADDRNOTAVAIL -#endif /* ifndef EADDRNOTAVAIL */ -#ifndef ENETDOWN -#define ENETDOWN WSAENETDOWN -#endif /* ifndef ENETDOWN */ -#ifndef ENETUNREACH -#define ENETUNREACH WSAENETUNREACH -#endif /* ifndef ENETUNREACH */ -#ifndef ENETRESET -#define ENETRESET WSAENETRESET -#endif /* ifndef ENETRESET */ -#ifndef ECONNABORTED -#define ECONNABORTED WSAECONNABORTED -#endif /* ifndef ECONNABORTED */ -#ifndef ECONNRESET -#define ECONNRESET WSAECONNRESET -#endif /* ifndef ECONNRESET */ -#ifndef ENOBUFS -#define ENOBUFS WSAENOBUFS -#endif /* ifndef ENOBUFS */ -#ifndef EISCONN -#define EISCONN WSAEISCONN -#endif /* ifndef EISCONN */ -#ifndef ENOTCONN -#define ENOTCONN WSAENOTCONN -#endif /* ifndef ENOTCONN */ -#ifndef ESHUTDOWN -#define ESHUTDOWN WSAESHUTDOWN -#endif /* ifndef ESHUTDOWN */ -#ifndef ETOOMANYREFS -#define ETOOMANYREFS WSAETOOMANYREFS -#endif /* ifndef ETOOMANYREFS */ -#ifndef ETIMEDOUT -#define ETIMEDOUT WSAETIMEDOUT -#endif /* ifndef ETIMEDOUT */ -#ifndef ECONNREFUSED -#define ECONNREFUSED WSAECONNREFUSED -#endif /* ifndef ECONNREFUSED */ -#ifndef ELOOP -#define ELOOP WSAELOOP -#endif /* ifndef ELOOP */ -#ifndef EHOSTDOWN -#define EHOSTDOWN WSAEHOSTDOWN -#endif /* ifndef EHOSTDOWN */ -#ifndef EHOSTUNREACH -#define EHOSTUNREACH WSAEHOSTUNREACH -#endif /* ifndef EHOSTUNREACH */ -#ifndef EPROCLIM -#define EPROCLIM WSAEPROCLIM -#endif /* ifndef EPROCLIM */ -#ifndef EUSERS -#define EUSERS WSAEUSERS -#endif /* ifndef EUSERS */ -#ifndef EDQUOT -#define EDQUOT WSAEDQUOT -#endif /* ifndef EDQUOT */ -#ifndef ESTALE -#define ESTALE WSAESTALE -#endif /* ifndef ESTALE */ -#ifndef EREMOTE -#define EREMOTE WSAEREMOTE -#endif /* ifndef EREMOTE */ - -/*** - *** Functions. - ***/ - -ISC_LANG_BEGINDECLS - -isc_result_t -isc_net_probeipv4(void); -/* - * Check if the system's kernel supports IPv4. - * - * Returns: - * - * ISC_R_SUCCESS IPv4 is supported. - * ISC_R_NOTFOUND IPv4 is not supported. - * ISC_R_DISABLED IPv4 is disabled. - * ISC_R_UNEXPECTED - */ - -isc_result_t -isc_net_probeipv6(void); -/* - * Check if the system's kernel supports IPv6. - * - * Returns: - * - * ISC_R_SUCCESS IPv6 is supported. - * ISC_R_NOTFOUND IPv6 is not supported. - * ISC_R_DISABLED IPv6 is disabled. - * ISC_R_UNEXPECTED - */ - -isc_result_t -isc_net_probeunix(void); -/* - * Check if UNIX domain sockets are supported. - * - * Returns: - * - * ISC_R_SUCCESS - * ISC_R_NOTFOUND - */ - -#define ISC_NET_DSCPRECVV4 0x01 /* Can receive sent DSCP value IPv4 */ -#define ISC_NET_DSCPRECVV6 0x02 /* Can receive sent DSCP value IPv6 */ -#define ISC_NET_DSCPSETV4 0x04 /* Can set DSCP on socket IPv4 */ -#define ISC_NET_DSCPSETV6 0x08 /* Can set DSCP on socket IPv6 */ -#define ISC_NET_DSCPPKTV4 0x10 /* Can set DSCP on per packet IPv4 */ -#define ISC_NET_DSCPPKTV6 0x20 /* Can set DSCP on per packet IPv6 */ -#define ISC_NET_DSCPALL 0x3f /* All valid flags */ - -unsigned int -isc_net_probedscp(void); -/*%< - * Probe the level of DSCP support. - */ - -isc_result_t -isc_net_probe_ipv6only(void); -/* - * Check if the system's kernel supports the IPV6_V6ONLY socket option. - * - * Returns: - * - * ISC_R_SUCCESS the option is supported for both TCP and UDP. - * ISC_R_NOTFOUND IPv6 itself or the option is not supported. - * ISC_R_UNEXPECTED - */ - -isc_result_t -isc_net_probe_ipv6pktinfo(void); -/* - * Check if the system's kernel supports the IPV6_(RECV)PKTINFO socket option - * for UDP sockets. - * - * Returns: - * - * ISC_R_SUCCESS the option is supported. - * ISC_R_NOTFOUND IPv6 itself or the option is not supported. - * ISC_R_UNEXPECTED - */ - -void -isc_net_disableipv4(void); - -void -isc_net_disableipv6(void); - -void -isc_net_enableipv4(void); - -void -isc_net_enableipv6(void); - -isc_result_t -isc_net_getudpportrange(int af, in_port_t *low, in_port_t *high); -/*%< - * Returns system's default range of ephemeral UDP ports, if defined. - * If the range is not available or unknown, ISC_NET_PORTRANGELOW and - * ISC_NET_PORTRANGEHIGH will be returned. - * - * Requires: - * - *\li 'low' and 'high' must be non NULL. - * - * Returns: - * - *\li *low and *high will be the ports specifying the low and high ends of - * the range. - */ - -ISC_LANG_ENDDECLS - -#endif /* ISC_NET_H */ diff --git a/lib/isc/win32/include/isc/netdb.h b/lib/isc/win32/include/isc/netdb.h deleted file mode 100644 index 37d3836124..0000000000 --- a/lib/isc/win32/include/isc/netdb.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#ifndef ISC_NETDB_H -#define ISC_NETDB_H 1 - -/***** -***** Module Info -*****/ - -/* - * Portable netdb.h support. - * - * This module is responsible for defining the getby APIs. - * - * MP: - * No impact. - * - * Reliability: - * No anticipated impact. - * - * Resources: - * N/A. - * - * Security: - * No anticipated impact. - * - * Standards: - * BSD API - */ - -/*** - *** Imports. - ***/ - -#include - -#endif /* ISC_NETDB_H */ diff --git a/lib/isc/win32/include/isc/ntgroups.h b/lib/isc/win32/include/isc/ntgroups.h deleted file mode 100644 index 4abdeb1e06..0000000000 --- a/lib/isc/win32/include/isc/ntgroups.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#ifndef ISC_NTGROUPS_H -#define ISC_NTGROUPS_H 1 - -#include -#include - -ISC_LANG_BEGINDECLS - -isc_result_t -isc_ntsecurity_getaccountgroups(char *name, char **Groups, - unsigned int maxgroups, unsigned int *total); - -ISC_LANG_ENDDECLS - -#endif /* ISC_NTGROUPS_H */ diff --git a/lib/isc/win32/include/isc/ntpaths.h b/lib/isc/win32/include/isc/ntpaths.h deleted file mode 100644 index e1652ed2c6..0000000000 --- a/lib/isc/win32/include/isc/ntpaths.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/* - * Windows-specific path definitions - * These routines are used to set up and return system-specific path - * information about the files enumerated in NtPaths - */ - -#ifndef ISC_NTPATHS_H -#define ISC_NTPATHS_H - -#include - -/* - * Index of paths needed - */ -enum NtPaths { - NAMED_CONF_PATH, - RESOLV_CONF_PATH, - RNDC_CONF_PATH, - NAMED_PID_PATH, - NAMED_LOCK_PATH, - LOCAL_STATE_DIR, - SYS_CONF_DIR, - RNDC_KEY_PATH, - SESSION_KEY_PATH, - BIND_KEYS_PATH -}; - -/* - * Define macros to get the path of the config files - */ -#define NAMED_CONFFILE isc_ntpaths_get(NAMED_CONF_PATH) -#define RNDC_CONFFILE isc_ntpaths_get(RNDC_CONF_PATH) -#define RNDC_KEYFILE isc_ntpaths_get(RNDC_KEY_PATH) -#define SESSION_KEYFILE isc_ntpaths_get(SESSION_KEY_PATH) -#define RESOLV_CONF isc_ntpaths_get(RESOLV_CONF_PATH) - -/* - * Information about where the files are on disk - */ -#define NAMED_LOCALSTATEDIR "/dns/bin" -#define NAMED_SYSCONFDIR "/dns/etc" - -ISC_LANG_BEGINDECLS - -void -isc_ntpaths_init(void); - -char * -isc_ntpaths_get(int); - -ISC_LANG_ENDDECLS - -#endif /* ISC_NTPATHS_H */ diff --git a/lib/isc/win32/include/isc/offset.h b/lib/isc/win32/include/isc/offset.h deleted file mode 100644 index 77488263cc..0000000000 --- a/lib/isc/win32/include/isc/offset.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#ifndef ISC_OFFSET_H -#define ISC_OFFSET_H 1 - -/* - * File offsets are operating-system dependent. - */ -#include /* Required for CHAR_BIT. */ - -#include - -typedef _off_t isc_offset_t; - -#endif /* ISC_OFFSET_H */ diff --git a/lib/isc/win32/include/isc/once.h b/lib/isc/win32/include/isc/once.h deleted file mode 100644 index 4a4875a884..0000000000 --- a/lib/isc/win32/include/isc/once.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#ifndef ISC_ONCE_H -#define ISC_ONCE_H 1 - -#include -#include - -ISC_LANG_BEGINDECLS - -typedef struct { - int status; - int counter; -} isc_once_t; - -#define ISC_ONCE_INIT_NEEDED 0 -#define ISC_ONCE_INIT_DONE 1 - -#define ISC_ONCE_INIT \ - { \ - ISC_ONCE_INIT_NEEDED, 1 \ - } - -isc_result_t -isc_once_do(isc_once_t *controller, void (*function)(void)); - -ISC_LANG_ENDDECLS - -#endif /* ISC_ONCE_H */ diff --git a/lib/isc/win32/include/isc/platform.h.in b/lib/isc/win32/include/isc/platform.h.in deleted file mode 100644 index a8b645007c..0000000000 --- a/lib/isc/win32/include/isc/platform.h.in +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#pragma once - -/***** - ***** Platform-dependent defines. - *****/ - -/* - * Some compatibility cludges - */ - -/* We are on Windows */ -#define strtok_r strtok_s - -#define ISC_STRERRORSIZE 128 - -#ifndef strtoull -#define strtoull _strtoui64 -#endif - -#include -#if _MSC_VER < 1914 -typedef uint32_t socklen_t; -#endif - -#ifndef thread_local -#define thread_local __declspec(thread) -#endif /* thread_local */ - -/* - * Limits - */ - -#include -#ifndef NAME_MAX -#define NAME_MAX _MAX_FNAME -#endif - -#ifndef PATH_MAX -#define PATH_MAX _MAX_PATH -#endif - -/*** - *** Network. - ***/ - -#undef MSG_TRUNC - -typedef uint16_t sa_family_t; - -/* - * Set up a macro for importing and exporting from the DLL - */ - -#ifdef LIBISC_EXPORTS -#define LIBISC_EXTERNAL_DATA __declspec(dllexport) -#else -#define LIBISC_EXTERNAL_DATA __declspec(dllimport) -#endif - -#ifdef LIBDNS_EXPORTS -#define LIBDNS_EXTERNAL_DATA __declspec(dllexport) -#else -#define LIBDNS_EXTERNAL_DATA __declspec(dllimport) -#endif - -#ifdef LIBISCCC_EXPORTS -#define LIBISCCC_EXTERNAL_DATA __declspec(dllexport) -#else -#define LIBISCCC_EXTERNAL_DATA __declspec(dllimport) -#endif - -#ifdef LIBISCCFG_EXPORTS -#define LIBISCCFG_EXTERNAL_DATA __declspec(dllexport) -#else -#define LIBISCCFG_EXTERNAL_DATA __declspec(dllimport) -#endif - -#ifdef LIBNS_EXPORTS -#define LIBNS_EXTERNAL_DATA __declspec(dllexport) -#else -#define LIBNS_EXTERNAL_DATA __declspec(dllimport) -#endif - -#ifdef LIBBIND9_EXPORTS -#define LIBBIND9_EXTERNAL_DATA __declspec(dllexport) -#else -#define LIBBIND9_EXTERNAL_DATA __declspec(dllimport) -#endif - -#ifdef LIBTESTS_EXPORTS -#define LIBTESTS_EXTERNAL_DATA __declspec(dllexport) -#else -#define LIBTESTS_EXTERNAL_DATA __declspec(dllimport) -#endif diff --git a/lib/isc/win32/include/isc/stat.h b/lib/isc/win32/include/isc/stat.h deleted file mode 100644 index 05ff22d39a..0000000000 --- a/lib/isc/win32/include/isc/stat.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#ifndef ISC_STAT_H -#define ISC_STAT_H 1 - -#include - -/* - * Windows doesn't typedef this. - */ -typedef unsigned short mode_t; - -/* open() under unix allows setting of read/write permissions - * at the owner, group and other levels. These don't exist in NT - * We'll just map them all to the NT equivalent - */ - -#define S_IREAD _S_IREAD /* read permission, owner */ -#define S_IWRITE _S_IWRITE /* write permission, owner */ -#define S_IRUSR _S_IREAD /* Owner read permission */ -#define S_IWUSR _S_IWRITE /* Owner write permission */ -#define S_IRGRP _S_IREAD /* Group read permission */ -#define S_IWGRP _S_IWRITE /* Group write permission */ -#define S_IROTH _S_IREAD /* Other read permission */ -#define S_IWOTH _S_IWRITE /* Other write permission */ - -#ifndef S_IFMT -#define S_IFMT _S_IFMT -#endif /* ifndef S_IFMT */ -#ifndef S_IFDIR -#define S_IFDIR _S_IFDIR -#endif /* ifndef S_IFDIR */ -#ifndef S_IFCHR -#define S_IFCHR _S_IFCHR -#endif /* ifndef S_IFCHR */ -#ifndef S_IFREG -#define S_IFREG _S_IFREG -#endif /* ifndef S_IFREG */ - -#ifndef S_ISDIR -#define S_ISDIR(m) (((m)&S_IFMT) == S_IFDIR) -#endif /* ifndef S_ISDIR */ -#ifndef S_ISREG -#define S_ISREG(m) (((m)&S_IFMT) == S_IFREG) -#endif /* ifndef S_ISREG */ - -#endif /* ISC_STAT_H */ diff --git a/lib/isc/win32/include/isc/stdatomic.h b/lib/isc/win32/include/isc/stdatomic.h deleted file mode 100644 index b45049c5e7..0000000000 --- a/lib/isc/win32/include/isc/stdatomic.h +++ /dev/null @@ -1,601 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#pragma once - -#include -#include -#include -#include -#include -#include - -#pragma warning(disable : 4133) -#pragma warning(disable : 4090) - -#define InterlockedExchangeAdd8 _InterlockedExchangeAdd8 -#define InterlockedCompareExchange8 _InterlockedCompareExchange8 - -#pragma intrinsic(_InterlockedCompareExchange8, _InterlockedExchangeAdd8) - -#include - -#define ATOMIC_VAR_INIT(x) x - -#ifndef __ATOMIC_RELAXED -#define __ATOMIC_RELAXED 0 -#endif /* ifndef __ATOMIC_RELAXED */ -#ifndef __ATOMIC_CONSUME -#define __ATOMIC_CONSUME 1 -#endif /* ifndef __ATOMIC_CONSUME */ -#ifndef __ATOMIC_ACQUIRE -#define __ATOMIC_ACQUIRE 2 -#endif /* ifndef __ATOMIC_ACQUIRE */ -#ifndef __ATOMIC_RELEASE -#define __ATOMIC_RELEASE 3 -#endif /* ifndef __ATOMIC_RELEASE */ -#ifndef __ATOMIC_ACQ_REL -#define __ATOMIC_ACQ_REL 4 -#endif /* ifndef __ATOMIC_ACQ_REL */ -#ifndef __ATOMIC_SEQ_CST -#define __ATOMIC_SEQ_CST 5 -#endif /* ifndef __ATOMIC_SEQ_CST */ - -enum memory_order { - memory_order_relaxed = __ATOMIC_RELAXED, - memory_order_consume = __ATOMIC_CONSUME, - memory_order_acquire = __ATOMIC_ACQUIRE, - memory_order_release = __ATOMIC_RELEASE, - memory_order_acq_rel = __ATOMIC_ACQ_REL, - memory_order_seq_cst = __ATOMIC_SEQ_CST -}; - -typedef enum memory_order memory_order; - -/* - * If you add a type with different sizeof() length, - * you need to implement atomic__explicitNN macros. - */ - -typedef bool volatile atomic_bool; -typedef char volatile atomic_char; -typedef signed char volatile atomic_schar; -typedef unsigned char volatile atomic_uchar; -typedef short volatile atomic_short; -typedef unsigned short volatile atomic_ushort; -typedef int volatile atomic_int; -typedef unsigned int volatile atomic_uint; -typedef long volatile atomic_long; -typedef unsigned long volatile atomic_ulong; -typedef long long volatile atomic_llong; -typedef unsigned long long volatile atomic_ullong; -typedef char16_t volatile atomic_char16_t; -typedef char32_t volatile atomic_char32_t; -typedef wchar_t volatile atomic_wchar_t; -typedef int_least8_t volatile atomic_int_least8_t; -typedef uint_least8_t volatile atomic_uint_least8_t; -typedef int_least16_t volatile atomic_int_least16_t; -typedef uint_least16_t volatile atomic_uint_least16_t; -typedef int_least32_t volatile atomic_int_least32_t; -typedef uint_least32_t volatile atomic_uint_least32_t; -typedef int_least64_t volatile atomic_int_least64_t; -typedef uint_least64_t volatile atomic_uint_least64_t; -typedef int_fast8_t volatile atomic_int_fast8_t; -typedef uint_fast8_t volatile atomic_uint_fast8_t; -typedef int_fast16_t volatile atomic_int_fast16_t; -typedef uint_fast16_t volatile atomic_uint_fast16_t; -typedef int_fast32_t volatile atomic_int_fast32_t; -typedef uint_fast32_t volatile atomic_uint_fast32_t; -typedef int_fast64_t volatile atomic_int_fast64_t; -typedef uint_fast64_t volatile atomic_uint_fast64_t; -typedef intptr_t volatile atomic_intptr_t; -typedef uintptr_t volatile atomic_uintptr_t; -typedef size_t volatile atomic_size_t; -typedef ptrdiff_t volatile atomic_ptrdiff_t; -typedef intmax_t volatile atomic_intmax_t; -typedef uintmax_t volatile atomic_uintmax_t; - -#define atomic_init(obj, desired) (*(obj) = (desired)) - -#define atomic_store_explicit8(obj, desired, order) \ - (void)InterlockedExchange8((atomic_int_fast8_t *)obj, desired) - -#define atomic_store_explicit16(obj, desired, order) \ - (order == memory_order_relaxed \ - ? (void)InterlockedExchangeNoFence16((atomic_short *)obj, \ - desired) \ - : (order == memory_order_acquire \ - ? (void)InterlockedExchangeAcquire16( \ - (atomic_short *)obj, desired) \ - : (void)InterlockedExchange16((atomic_short *)obj, \ - desired))) - -#define atomic_store_explicit32(obj, desired, order) \ - (order == memory_order_relaxed \ - ? (void)InterlockedExchangeNoFence( \ - (atomic_int_fast32_t *)obj, desired) \ - : (order == memory_order_acquire \ - ? (void)InterlockedExchangeAcquire( \ - (atomic_int_fast32_t *)obj, desired) \ - : (void)InterlockedExchange( \ - (atomic_int_fast32_t *)obj, desired))) - -#ifdef _WIN64 -#define atomic_store_explicit64(obj, desired, order) \ - (order == memory_order_relaxed \ - ? (void)InterlockedExchangeNoFence64( \ - (atomic_int_fast64_t *)obj, desired) \ - : (order == memory_order_acquire \ - ? (void)InterlockedExchangeAcquire64( \ - (atomic_int_fast64_t *)obj, desired) \ - : (void)InterlockedExchange64( \ - (atomic_int_fast64_t *)obj, desired))) -#else /* ifdef _WIN64 */ -#define atomic_store_explicit64(obj, desired, order) \ - (void)InterlockedExchange64((atomic_int_fast64_t *)obj, desired) -#endif /* ifdef _WIN64 */ - -static inline void -atomic_store_abort(void) { - INSIST(0); - ISC_UNREACHABLE(); -} - -#define atomic_store_explicit(obj, desired, order) \ - (sizeof(*(obj)) == 8 \ - ? atomic_store_explicit64(obj, desired, order) \ - : (sizeof(*(obj)) == 4 \ - ? atomic_store_explicit32(obj, desired, order) \ - : (sizeof(*(obj)) == 2 \ - ? atomic_store_explicit16(obj, desired, \ - order) \ - : (sizeof(*(obj)) == 1 \ - ? atomic_store_explicit8( \ - obj, desired, \ - order) \ - : atomic_store_abort())))) - -#define atomic_store(obj, desired) \ - atomic_store_explicit(obj, desired, memory_order_seq_cst) - -#define atomic_load_explicit8(obj, order) \ - (int8_t) InterlockedOr8((atomic_int_fast8_t *)obj, 0) - -#define atomic_load_explicit16(obj, order) \ - (short)InterlockedOr16((atomic_short *)obj, 0) - -#define atomic_load_explicit32(obj, order) \ - (order == memory_order_relaxed \ - ? (int32_t)InterlockedOrNoFence((atomic_int_fast32_t *)obj, \ - 0) \ - : (order == memory_order_acquire \ - ? (int32_t)InterlockedOrAcquire( \ - (atomic_int_fast32_t *)obj, 0) \ - : (order == memory_order_release \ - ? (int32_t)InterlockedOrRelease( \ - (atomic_int_fast32_t *)obj, 0) \ - : (int32_t)InterlockedOr( \ - (atomic_int_fast32_t *)obj, \ - 0)))) - -#ifdef _WIN64 -#define atomic_load_explicit64(obj, order) \ - (order == memory_order_relaxed \ - ? InterlockedOr64NoFence((atomic_int_fast64_t *)obj, 0) \ - : (order == memory_order_acquire \ - ? InterlockedOr64Acquire( \ - (atomic_int_fast64_t *)obj, 0) \ - : (order == memory_order_release \ - ? InterlockedOr64Release( \ - (atomic_int_fast64_t *)obj, 0) \ - : InterlockedOr64( \ - (atomic_int_fast64_t *)obj, \ - 0)))) -#else /* ifdef _WIN64 */ -#define atomic_load_explicit64(obj, order) \ - InterlockedOr64((atomic_int_fast64_t *)obj, 0) -#endif /* ifdef _WIN64 */ - -static inline int8_t -atomic_load_abort(void) { - INSIST(0); - ISC_UNREACHABLE(); -} - -#define atomic_load_explicit(obj, order) \ - ((sizeof(*(obj)) == 8 \ - ? atomic_load_explicit64(obj, order) \ - : (sizeof(*(obj) == 4) \ - ? atomic_load_explicit32(obj, order) \ - : (sizeof(*(obj) == 2) \ - ? atomic_load_explicit16(obj, order) \ - : (sizeof(*(obj) == 1) \ - ? atomic_load_explicit8( \ - obj, order) \ - : atomic_load_abort())))) & \ - (sizeof(*(obj)) == 8 \ - ? 0xffffffffffffffffULL \ - : (sizeof(*(obj)) == 4 \ - ? 0xffffffffULL \ - : (sizeof(*(obj)) == 2 \ - ? 0xffffULL \ - : (sizeof(*(obj)) == 1 \ - ? 0xffULL \ - : atomic_load_abort()))))) - -#define atomic_load(obj) atomic_load_explicit(obj, memory_order_seq_cst) - -#define atomic_fetch_add_explicit8(obj, arg, order) \ - InterlockedExchangeAdd8((atomic_int_fast8_t *)obj, arg) - -#define atomic_fetch_add_explicit16(obj, arg, order) \ - InterlockedExchangeAdd16((atomic_short *)obj, arg) - -#define atomic_fetch_add_explicit32(obj, arg, order) \ - (order == memory_order_relaxed \ - ? InterlockedExchangeAddNoFence((atomic_int_fast32_t *)obj, \ - arg) \ - : (order == memory_order_acquire \ - ? InterlockedExchangeAddAcquire( \ - (atomic_int_fast32_t *)obj, arg) \ - : (order == memory_order_release \ - ? InterlockedExchangeAddRelease( \ - (atomic_int_fast32_t *)obj, \ - arg) \ - : InterlockedExchangeAdd( \ - (atomic_int_fast32_t *)obj, \ - arg)))) - -#ifdef _WIN64 -#define atomic_fetch_add_explicit64(obj, arg, order) \ - (order == memory_order_relaxed \ - ? InterlockedExchangeAddNoFence64((atomic_int_fast64_t *)obj, \ - arg) \ - : (order == memory_order_acquire \ - ? InterlockedExchangeAddAcquire64( \ - (atomic_int_fast64_t *)obj, arg) \ - : (order == memory_order_release \ - ? InterlockedExchangeAddRelease64( \ - (atomic_int_fast64_t *)obj, \ - arg) \ - : InterlockedExchangeAdd64( \ - (atomic_int_fast64_t *)obj, \ - arg)))) -#else /* ifdef _WIN64 */ -#define atomic_fetch_add_explicit64(obj, arg, order) \ - InterlockedExchangeAdd64((atomic_int_fast64_t *)obj, arg) -#endif /* ifdef _WIN64 */ - -static inline int8_t -atomic_add_abort(void) { - INSIST(0); - ISC_UNREACHABLE(); -} - -#define atomic_fetch_add_explicit(obj, arg, order) \ - (sizeof(*(obj)) == 8 \ - ? atomic_fetch_add_explicit64(obj, arg, order) \ - : (sizeof(*(obj)) == 4 \ - ? atomic_fetch_add_explicit32(obj, arg, order) \ - : (sizeof(*(obj)) == 2 \ - ? atomic_fetch_add_explicit16(obj, arg, \ - order) \ - : (sizeof(*(obj)) == 1 \ - ? atomic_fetch_add_explicit8( \ - obj, arg, order) \ - : atomic_add_abort())))) - -#define atomic_fetch_add(obj, arg) \ - atomic_fetch_add_explicit(obj, arg, memory_order_seq_cst) - -#define atomic_fetch_sub_explicit(obj, arg, order) \ - atomic_fetch_add_explicit(obj, -arg, order) - -#define atomic_fetch_sub(obj, arg) \ - atomic_fetch_sub_explicit(obj, arg, memory_order_seq_cst) - -#define atomic_fetch_and_explicit8(obj, arg, order) \ - InterlockedAnd8((atomic_int_fast8_t *)obj, arg) - -#define atomic_fetch_and_explicit16(obj, arg, order) \ - InterlockedAnd16((atomic_short *)obj, arg) - -#define atomic_fetch_and_explicit32(obj, arg, order) \ - (order == memory_order_relaxed \ - ? InterlockedAndNoFence((atomic_int_fast32_t *)obj, arg) \ - : (order == memory_order_acquire \ - ? InterlockedAndAcquire( \ - (atomic_int_fast32_t *)obj, arg) \ - : (order == memory_order_release \ - ? InterlockedAndRelease( \ - (atomic_int_fast32_t *)obj, \ - arg) \ - : InterlockedAnd( \ - (atomic_int_fast32_t *)obj, \ - arg)))) - -#ifdef _WIN64 -#define atomic_fetch_and_explicit64(obj, arg, order) \ - (order == memory_order_relaxed \ - ? InterlockedAnd64NoFence((atomic_int_fast64_t *)obj, arg) \ - : (order == memory_order_acquire \ - ? InterlockedAnd64Acquire( \ - (atomic_int_fast64_t *)obj, arg) \ - : (order == memory_order_release \ - ? InterlockedAnd64Release( \ - (atomic_int_fast64_t *)obj, \ - arg) \ - : InterlockedAnd64( \ - (atomic_int_fast64_t *)obj, \ - arg)))) -#else /* ifdef _WIN64 */ -#define atomic_fetch_and_explicit64(obj, arg, order) \ - InterlockedAnd64((atomic_int_fast64_t *)obj, arg) -#endif /* ifdef _WIN64 */ - -static inline int8_t -atomic_and_abort(void) { - INSIST(0); - ISC_UNREACHABLE(); -} - -#define atomic_fetch_and_explicit(obj, arg, order) \ - (sizeof(*(obj)) == 8 \ - ? atomic_fetch_and_explicit64(obj, arg, order) \ - : (sizeof(*(obj)) == 4 \ - ? atomic_fetch_and_explicit32(obj, arg, order) \ - : (sizeof(*(obj)) == 2 \ - ? atomic_fetch_and_explicit16(obj, arg, \ - order) \ - : (sizeof(*(obj)) == 1 \ - ? atomic_fetch_and_explicit8( \ - obj, arg, order) \ - : atomic_and_abort())))) - -#define atomic_fetch_and(obj, arg) \ - atomic_fetch_and_explicit(obj, arg, memory_order_seq_cst) - -#define atomic_fetch_or_explicit8(obj, arg, order) \ - InterlockedOr8((atomic_int_fast8_t *)obj, arg) - -#define atomic_fetch_or_explicit16(obj, arg, order) \ - InterlockedOr16((atomic_short *)obj, arg) - -#define atomic_fetch_or_explicit32(obj, arg, order) \ - (order == memory_order_relaxed \ - ? InterlockedOrNoFence((atomic_int_fast32_t *)obj, arg) \ - : (order == memory_order_acquire \ - ? InterlockedOrAcquire((atomic_int_fast32_t *)obj, \ - arg) \ - : (order == memory_order_release \ - ? InterlockedOrRelease( \ - (atomic_int_fast32_t *)obj, \ - arg) \ - : InterlockedOr( \ - (atomic_int_fast32_t *)obj, \ - arg)))) - -#ifdef _WIN64 -#define atomic_fetch_or_explicit64(obj, arg, order) \ - (order == memory_order_relaxed \ - ? InterlockedOr64NoFence((atomic_int_fast64_t *)obj, arg) \ - : (order == memory_order_acquire \ - ? InterlockedOr64Acquire( \ - (atomic_int_fast64_t *)obj, arg) \ - : (order == memory_order_release \ - ? InterlockedOr64Release( \ - (atomic_int_fast64_t *)obj, \ - arg) \ - : InterlockedOr64( \ - (atomic_int_fast64_t *)obj, \ - arg)))) -#else /* ifdef _WIN64 */ -#define atomic_fetch_or_explicit64(obj, arg, order) \ - InterlockedOr64((atomic_int_fast64_t *)obj, arg) -#endif /* ifdef _WIN64 */ - -static inline int8_t -atomic_or_abort(void) { - INSIST(0); - ISC_UNREACHABLE(); -} - -#define atomic_fetch_or_explicit(obj, arg, order) \ - (sizeof(*(obj)) == 8 \ - ? atomic_fetch_or_explicit64(obj, arg, order) \ - : (sizeof(*(obj)) == 4 \ - ? atomic_fetch_or_explicit32(obj, arg, order) \ - : (sizeof(*(obj)) == 2 \ - ? atomic_fetch_or_explicit16(obj, arg, \ - order) \ - : (sizeof(*(obj)) == 1 \ - ? atomic_fetch_or_explicit8( \ - obj, arg, order) \ - : atomic_or_abort())))) - -#define atomic_fetch_or(obj, arg) \ - atomic_fetch_or_explicit(obj, arg, memory_order_seq_cst) - -static inline bool -atomic_compare_exchange_strong_explicit8(atomic_int_fast8_t *obj, - int8_t *expected, int8_t desired, - memory_order succ, memory_order fail) { - bool __r; - int8_t __v; - - UNUSED(succ); - UNUSED(fail); - - __v = InterlockedCompareExchange8((atomic_int_fast8_t *)obj, desired, - *expected); - __r = (*(expected) == __v); - if (!__r) { - *(expected) = __v; - } - return (__r); -} - -static inline bool -atomic_compare_exchange_strong_explicit16(atomic_short *obj, short *expected, - short desired, memory_order succ, - memory_order fail) { - bool __r; - short __v; - - UNUSED(succ); - UNUSED(fail); - - __v = InterlockedCompareExchange16((atomic_short *)obj, desired, - *expected); - __r = (*(expected) == __v); - if (!__r) { - *(expected) = __v; - } - return (__r); -} - -static inline bool -atomic_compare_exchange_strong_explicit32(atomic_int_fast32_t *obj, - int32_t *expected, int32_t desired, - memory_order succ, - memory_order fail) { - bool __r; - int32_t __v; - - UNUSED(succ); - UNUSED(fail); - - switch (succ) { - case memory_order_relaxed: - __v = InterlockedCompareExchangeNoFence( - (atomic_int_fast32_t *)obj, desired, *expected); - break; - case memory_order_acquire: - __v = InterlockedCompareExchangeAcquire( - (atomic_int_fast32_t *)obj, desired, *expected); - break; - case memory_order_release: - __v = InterlockedCompareExchangeRelease( - (atomic_int_fast32_t *)obj, desired, *expected); - break; - default: - __v = InterlockedCompareExchange((atomic_int_fast32_t *)obj, - desired, *expected); - break; - } - __r = (*(expected) == __v); - if (!__r) { - *(expected) = __v; - } - return (__r); -} - -static inline bool -atomic_compare_exchange_strong_explicit64(atomic_int_fast64_t *obj, - int64_t *expected, int64_t desired, - memory_order succ, - memory_order fail) { - bool __r; - int64_t __v; - - UNUSED(succ); - UNUSED(fail); - -#ifdef _WIN64 - switch (succ) { - case memory_order_relaxed: - __v = InterlockedCompareExchangeNoFence64( - (atomic_int_fast64_t *)obj, desired, *expected); - break; - case memory_order_acquire: - __v = InterlockedCompareExchangeAcquire64( - (atomic_int_fast64_t *)obj, desired, *expected); - break; - case memory_order_release: - __v = InterlockedCompareExchangeRelease64( - (atomic_int_fast64_t *)obj, desired, *expected); - break; - default: - __v = InterlockedCompareExchange64((atomic_int_fast64_t *)obj, - desired, *expected); - break; - } -#else /* ifdef _WIN64 */ - __v = InterlockedCompareExchange64((atomic_int_fast64_t *)obj, desired, - *expected); -#endif /* ifdef _WIN64 */ - __r = (*(expected) == __v); - if (!__r) { - *(expected) = __v; - } - return (__r); -} - -static inline bool -atomic_compare_exchange_abort(void) { - INSIST(0); - ISC_UNREACHABLE(); -} - -#define atomic_compare_exchange_strong_explicit(obj, expected, desired, succ, \ - fail) \ - (sizeof(*(obj)) == 8 \ - ? atomic_compare_exchange_strong_explicit64( \ - obj, expected, desired, succ, fail) \ - : (sizeof(*(obj)) == 4 \ - ? atomic_compare_exchange_strong_explicit32( \ - obj, expected, desired, succ, fail) \ - : (sizeof(*(obj)) == 2 \ - ? atomic_compare_exchange_strong_explicit16( \ - obj, expected, desired, succ, \ - fail) \ - : (sizeof(*(obj)) == 1 \ - ? atomic_compare_exchange_strong_explicit8( \ - obj, expected, \ - desired, succ, \ - fail) \ - : atomic_compare_exchange_abort())))) - -#define atomic_compare_exchange_strong(obj, expected, desired) \ - atomic_compare_exchange_strong_explicit(obj, expected, desired, \ - memory_order_seq_cst, \ - memory_order_seq_cst) - -#define atomic_compare_exchange_weak_explicit(obj, expected, desired, succ, \ - fail) \ - atomic_compare_exchange_strong_explicit(obj, expected, desired, succ, \ - fail) - -#define atomic_compare_exchange_weak(obj, expected, desired) \ - atomic_compare_exchange_weak_explicit(obj, expected, desired, \ - memory_order_seq_cst, \ - memory_order_seq_cst) - -static inline bool -atomic_exchange_abort(void) { - INSIST(0); - ISC_UNREACHABLE(); -} - -#define atomic_exchange_explicit(obj, desired, order) \ - (sizeof(*(obj)) == 8 \ - ? InterlockedExchange64(obj, desired) \ - : (sizeof(*(obj)) == 4 \ - ? InterlockedExchange(obj, desired) \ - : (sizeof(*(obj)) == 2 \ - ? InterlockedExchange16(obj, desired) \ - : (sizeof(*(obj)) == 1 \ - ? InterlockedExchange8( \ - obj, desired) \ - : atomic_exchange_abort())))) - -#define atomic_exchange(obj, desired) \ - atomic_exchange_explicit(obj, desired, memory_order_seq_cst) diff --git a/lib/isc/win32/include/isc/stdtime.h b/lib/isc/win32/include/isc/stdtime.h deleted file mode 100644 index b5875c484e..0000000000 --- a/lib/isc/win32/include/isc/stdtime.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#ifndef ISC_STDTIME_H -#define ISC_STDTIME_H 1 - -#include -#include - -#include - -/* - * It's public information that 'isc_stdtime_t' is an unsigned integral type. - * Applications that want maximum portability should not assume anything - * about its size. - */ -typedef uint32_t isc_stdtime_t; - -ISC_LANG_BEGINDECLS - -void -isc_stdtime_get(isc_stdtime_t *t); -/* - * Set 't' to the number of seconds since 00:00:00 UTC, January 1, 1970. - * - * Requires: - * - * 't' is a valid pointer. - */ - -void -isc_stdtime_tostring(isc_stdtime_t t, char *out, size_t outlen); -/* - * Convert 't' into a null-terminated string of the form - * "Wed Jun 30 21:49:08 1993". Store the string in the 'out' - * buffer. - * - * Requires: - * - * 't' is a valid time. - * 'out' is a valid pointer. - * 'outlen' is at least 26. - */ - -#define isc_stdtime_convert32(t, t32p) (*(t32p) = t) -/* - * Convert the standard time to its 32-bit version. - */ - -ISC_LANG_ENDDECLS - -#endif /* ISC_STDTIME_H */ diff --git a/lib/isc/win32/include/isc/syslog.h b/lib/isc/win32/include/isc/syslog.h deleted file mode 100644 index 2839148d8c..0000000000 --- a/lib/isc/win32/include/isc/syslog.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#ifndef ISC_SYSLOG_H -#define ISC_SYSLOG_H 1 - -#include -#include - -ISC_LANG_BEGINDECLS - -isc_result_t -isc_syslog_facilityfromstring(const char *str, int *facilityp); -/* - * Convert 'str' to the appropriate syslog facility constant. - * - * Requires: - * - * 'str' is not NULL - * 'facilityp' is not NULL - * - * Returns: - * ISC_R_SUCCESS - * ISC_R_NOTFOUND - */ - -ISC_LANG_ENDDECLS - -#endif /* ISC_SYSLOG_H */ diff --git a/lib/isc/win32/include/isc/thread.h b/lib/isc/win32/include/isc/thread.h deleted file mode 100644 index 1927bda4de..0000000000 --- a/lib/isc/win32/include/isc/thread.h +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#ifndef ISC_THREAD_H -#define ISC_THREAD_H 1 - -#include -#include - -#include -#include - -extern thread_local size_t isc_tid_v; - -/* - * Inlines to help with wait return checking - */ - -/* check handle for NULL and INVALID_HANDLE */ -inline BOOL -IsValidHandle(HANDLE hHandle) { - return ((hHandle != NULL) && (hHandle != INVALID_HANDLE_VALUE)); -} - -/* validate wait return codes... */ -inline BOOL -WaitSucceeded(DWORD dwWaitResult, DWORD dwHandleCount) { - return ((dwWaitResult >= WAIT_OBJECT_0) && - (dwWaitResult < WAIT_OBJECT_0 + dwHandleCount)); -} - -inline BOOL -WaitAbandoned(DWORD dwWaitResult, DWORD dwHandleCount) { - return ((dwWaitResult >= WAIT_ABANDONED_0) && - (dwWaitResult < WAIT_ABANDONED_0 + dwHandleCount)); -} - -inline BOOL -WaitTimeout(DWORD dwWaitResult) { - return (dwWaitResult == WAIT_TIMEOUT); -} - -inline BOOL -WaitFailed(DWORD dwWaitResult) { - return (dwWaitResult == WAIT_FAILED); -} - -/* compute object indices for waits... */ -inline DWORD -WaitSucceededIndex(DWORD dwWaitResult) { - return (dwWaitResult - WAIT_OBJECT_0); -} - -inline DWORD -WaitAbandonedIndex(DWORD dwWaitResult) { - return (dwWaitResult - WAIT_ABANDONED_0); -} - -typedef HANDLE isc_thread_t; -typedef DWORD isc_threadresult_t; -typedef void * isc_threadarg_t; -typedef isc_threadresult_t(WINAPI *isc_threadfunc_t)(isc_threadarg_t); - -#define isc_thread_self (uintptr_t) GetCurrentThreadId - -ISC_LANG_BEGINDECLS - -void -isc_thread_create(isc_threadfunc_t, isc_threadarg_t, isc_thread_t *); - -void -isc_thread_join(isc_thread_t, isc_threadresult_t *); - -void -isc_thread_setconcurrency(unsigned int level); - -void -isc_thread_setname(isc_thread_t, const char *); - -isc_result_t -isc_thread_setaffinity(int cpu); - -#define isc_thread_yield() Sleep(0) - -#define thread_local __declspec(thread) - -ISC_LANG_ENDDECLS - -#endif /* ISC_THREAD_H */ diff --git a/lib/isc/win32/include/isc/time.h b/lib/isc/win32/include/isc/time.h deleted file mode 100644 index 8637c71253..0000000000 --- a/lib/isc/win32/include/isc/time.h +++ /dev/null @@ -1,466 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#ifndef ISC_TIME_H -#define ISC_TIME_H 1 - -#include -#include -#include -#include -#include - -#include -#include - -/*** - *** POSIX Shims - ***/ - -struct tm * -gmtime_r(const time_t *clock, struct tm *result); - -struct tm * -localtime_r(const time_t *clock, struct tm *result); - -int -nanosleep(const struct timespec *req, struct timespec *rem); - -typedef uint32_t useconds_t; - -int -usleep(useconds_t usec); - -/*** - *** Intervals - ***/ - -/* - * The contents of this structure are private, and MUST NOT be accessed - * directly by callers. - * - * The contents are exposed only to allow callers to avoid dynamic allocation. - */ -struct isc_interval { - int64_t interval; -}; - -LIBISC_EXTERNAL_DATA extern const isc_interval_t *const isc_interval_zero; - -/* - * ISC_FORMATHTTPTIMESTAMP_SIZE needs to be 30 in C locale and potentially - * more for other locales to handle longer national abbreviations when - * expanding strftime's %a and %b. - */ -#define ISC_FORMATHTTPTIMESTAMP_SIZE 50 - -ISC_LANG_BEGINDECLS - -void -isc_interval_set(isc_interval_t *i, unsigned int seconds, - unsigned int nanoseconds); -/* - * Set 'i' to a value representing an interval of 'seconds' seconds and - * 'nanoseconds' nanoseconds, suitable for use in isc_time_add() and - * isc_time_subtract(). - * - * Requires: - * - * 't' is a valid pointer. - * nanoseconds < 1000000000. - */ - -bool -isc_interval_iszero(const isc_interval_t *i); -/* - * Returns true iff. 'i' is the zero interval. - * - * Requires: - * - * 'i' is a valid pointer. - */ - -/*** - *** Absolute Times - ***/ - -/* - * The contents of this structure are private, and MUST NOT be accessed - * directly by callers. - * - * The contents are exposed only to allow callers to avoid dynamic allocation. - */ - -struct isc_time { - FILETIME absolute; -}; - -LIBISC_EXTERNAL_DATA extern const isc_time_t *const isc_time_epoch; - -void -isc_time_set(isc_time_t *t, unsigned int seconds, unsigned int nanoseconds); -/*%< - * Set 't' to a value which represents the given number of seconds and - * nanoseconds since 00:00:00 January 1, 1970, UTC. - * - * Requires: - *\li 't' is a valid pointer. - *\li nanoseconds < 1000000000. - */ - -void -isc_time_settoepoch(isc_time_t *t); -/* - * Set 't' to the time of the epoch. - * - * Notes: - * The date of the epoch is platform-dependent. - * - * Requires: - * - * 't' is a valid pointer. - */ - -bool -isc_time_isepoch(const isc_time_t *t); -/* - * Returns true iff. 't' is the epoch ("time zero"). - * - * Requires: - * - * 't' is a valid pointer. - */ - -isc_result_t -isc_time_now(isc_time_t *t); -/* - * Set 't' to the current absolute time. - * - * Requires: - * - * 't' is a valid pointer. - * - * Returns: - * - * Success - * Unexpected error - * Getting the time from the system failed. - * Out of range - * The time from the system is too large to be represented - * in the current definition of isc_time_t. - */ - -isc_result_t -isc_time_now_hires(isc_time_t *t); -/*%< - * Set 't' to the current absolute time. Uses higher resolution clocks - * recommended when microsecond accuracy is required. - * - * Requires: - * - *\li 't' is a valid pointer. - * - * Returns: - * - *\li Success - *\li Unexpected error - * Getting the time from the system failed. - *\li Out of range - * The time from the system is too large to be represented - * in the current definition of isc_time_t. - */ - -isc_result_t -isc_time_nowplusinterval(isc_time_t *t, const isc_interval_t *i); -/* - * Set *t to the current absolute time + i. - * - * Note: - * This call is equivalent to: - * - * isc_time_now(t); - * isc_time_add(t, i, t); - * - * Requires: - * - * 't' and 'i' are valid pointers. - * - * Returns: - * - * Success - * Unexpected error - * Getting the time from the system failed. - * Out of range - * The interval added to the time from the system is too large to - * be represented in the current definition of isc_time_t. - */ - -int -isc_time_compare(const isc_time_t *t1, const isc_time_t *t2); -/* - * Compare the times referenced by 't1' and 't2' - * - * Requires: - * - * 't1' and 't2' are valid pointers. - * - * Returns: - * - * -1 t1 < t2 (comparing times, not pointers) - * 0 t1 = t2 - * 1 t1 > t2 - */ - -isc_result_t -isc_time_add(const isc_time_t *t, const isc_interval_t *i, isc_time_t *result); -/* - * Add 'i' to 't', storing the result in 'result'. - * - * Requires: - * - * 't', 'i', and 'result' are valid pointers. - * - * Returns: - * Success - * Out of range - * The interval added to the time is too large to - * be represented in the current definition of isc_time_t. - */ - -isc_result_t -isc_time_subtract(const isc_time_t *t, const isc_interval_t *i, - isc_time_t *result); -/* - * Subtract 'i' from 't', storing the result in 'result'. - * - * Requires: - * - * 't', 'i', and 'result' are valid pointers. - * - * Returns: - * Success - * Out of range - * The interval is larger than the time since the epoch. - */ - -uint64_t -isc_time_microdiff(const isc_time_t *t1, const isc_time_t *t2); -/* - * Find the difference in milliseconds between time t1 and time t2. - * t2 is the subtrahend of t1; ie, difference = t1 - t2. - * - * Requires: - * - * 't1' and 't2' are valid pointers. - * - * Returns: - * The difference of t1 - t2, or 0 if t1 <= t2. - */ - -isc_result_t -isc_time_parsehttptimestamp(char *input, isc_time_t *t); -/*%< - * Parse the time in 'input' into the isc_time_t pointed to by 't', - * expecting a format like "Mon, 30 Aug 2000 04:06:47 GMT" - * - * Requires: - *\li 'buf' and 't' are not NULL. - */ - -uint32_t -isc_time_nanoseconds(const isc_time_t *t); -/* - * Return the number of nanoseconds stored in a time structure. - * - * Notes: - * This is the number of nanoseconds in excess of the number - * of seconds since the epoch; it will always be less than one - * full second. - * - * Requires: - * 't' is a valid pointer. - * - * Ensures: - * The returned value is less than 1*10^9. - */ - -void -isc_time_formattimestamp(const isc_time_t *t, char *buf, unsigned int len); -/* - * Format the time 't' into the buffer 'buf' of length 'len', - * using a format like "30-Aug-2000 04:06:47.997" and the local time zone. - * If the text does not fit in the buffer, the result is indeterminate, - * but is always guaranteed to be null terminated. - * - * Requires: - * 'len' > 0 - * 'buf' points to an array of at least len chars - * - */ - -void -isc_time_formathttptimestamp(const isc_time_t *t, char *buf, unsigned int len); -/* - * Format the time 't' into the buffer 'buf' of length 'len', - * using a format like "Mon, 30 Aug 2000 04:06:47 GMT" - * If the text does not fit in the buffer, the result is indeterminate, - * but is always guaranteed to be null terminated. - * - * Requires: - * 'len' > 0 - * 'buf' points to an array of at least len chars - * - */ - -isc_result_t -isc_time_parsehttptimestamp(char *input, isc_time_t *t); -/*%< - * Parse the time in 'input' into the isc_time_t pointed to by 't', - * expecting a format like "Mon, 30 Aug 2000 04:06:47 GMT" - * - * Requires: - *\li 'buf' and 't' are not NULL. - */ - -void -isc_time_formatISO8601L(const isc_time_t *t, char *buf, unsigned int len); -/*%< - * Format the time 't' into the buffer 'buf' of length 'len', - * using the ISO8601 format: "yyyy-mm-ddThh:mm:ss" - * If the text does not fit in the buffer, the result is indeterminate, - * but is always guaranteed to be null terminated. - * - * Requires: - *\li 'len' > 0 - *\li 'buf' points to an array of at least len chars - * - */ - -void -isc_time_formatISO8601Lms(const isc_time_t *t, char *buf, unsigned int len); -/*%< - * Format the time 't' into the buffer 'buf' of length 'len', - * using the ISO8601 format: "yyyy-mm-ddThh:mm:ss.sss" - * If the text does not fit in the buffer, the result is indeterminate, - * but is always guaranteed to be null terminated. - * - * Requires: - *\li 'len' > 0 - *\li 'buf' points to an array of at least len chars - * - */ - -void -isc_time_formatISO8601Lus(const isc_time_t *t, char *buf, unsigned int len); -/*%< - * Format the time 't' into the buffer 'buf' of length 'len', - * using the ISO8601 format: "yyyy-mm-ddThh:mm:ss.ssssss" - * If the text does not fit in the buffer, the result is indeterminate, - * but is always guaranteed to be null terminated. - * - * Requires: - *\li 'len' > 0 - *\li 'buf' points to an array of at least len chars - * - */ - -void -isc_time_formatISO8601(const isc_time_t *t, char *buf, unsigned int len); -/*%< - * Format the time 't' into the buffer 'buf' of length 'len', - * using the ISO8601 format: "yyyy-mm-ddThh:mm:ssZ" - * If the text does not fit in the buffer, the result is indeterminate, - * but is always guaranteed to be null terminated. - * - * Requires: - *\li 'len' > 0 - *\li 'buf' points to an array of at least len chars - * - */ - -void -isc_time_formatISO8601ms(const isc_time_t *t, char *buf, unsigned int len); -/*%< - * Format the time 't' into the buffer 'buf' of length 'len', - * using the ISO8601 format: "yyyy-mm-ddThh:mm:ss.sssZ" - * If the text does not fit in the buffer, the result is indeterminate, - * but is always guaranteed to be null terminated. - * - * Requires: - *\li 'len' > 0 - *\li 'buf' points to an array of at least len chars - * - */ - -void -isc_time_formatISO8601us(const isc_time_t *t, char *buf, unsigned int len); -/*%< - * Format the time 't' into the buffer 'buf' of length 'len', - * using the ISO8601 format: "yyyy-mm-ddThh:mm:ss.ssssssZ" - * If the text does not fit in the buffer, the result is indeterminate, - * but is always guaranteed to be null terminated. - * - * Requires: - *\li 'len' > 0 - *\li 'buf' points to an array of at least len chars - * - */ - -void -isc_time_formatshorttimestamp(const isc_time_t *t, char *buf, unsigned int len); -/*%< - * Format the time 't' into the buffer 'buf' of length 'len', - * using the format "yyyymmddhhmmsssss" useful for file timestamping. - * If the text does not fit in the buffer, the result is indeterminate, - * but is always guaranteed to be null terminated. - * - * Requires: - *\li 'len' > 0 - *\li 'buf' points to an array of at least len chars - * - */ - -uint32_t -isc_time_seconds(const isc_time_t *t); -/*%< - * Return the number of seconds since the epoch stored in a time structure. - * - * Requires: - * - *\li 't' is a valid pointer. - */ - -isc_result_t -isc_time_secondsastimet(const isc_time_t *t, time_t *secondsp); -/*%< - * Ensure the number of seconds in an isc_time_t is representable by a time_t. - * - * Notes: - *\li The number of seconds stored in an isc_time_t might be larger - * than the number of seconds a time_t is able to handle. Since - * time_t is mostly opaque according to the ANSI/ISO standard - * (essentially, all you can be sure of is that it is an arithmetic type, - * not even necessarily integral), it can be tricky to ensure that - * the isc_time_t is in the range a time_t can handle. Use this - * function in place of isc_time_seconds() any time you need to set a - * time_t from an isc_time_t. - * - * Requires: - *\li 't' is a valid pointer. - * - * Returns: - *\li Success - *\li Out of range - */ - -ISC_LANG_ENDDECLS - -#endif /* ISC_TIME_H */ diff --git a/lib/isc/win32/include/isc/win32os.h b/lib/isc/win32/include/isc/win32os.h deleted file mode 100644 index 3a97ddc9dd..0000000000 --- a/lib/isc/win32/include/isc/win32os.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#ifndef ISC_WIN32OS_H -#define ISC_WIN32OS_H 1 - -#include - -ISC_LANG_BEGINDECLS - -/* - * Return the number of CPUs available on the system, or 1 if this cannot - * be determined. - */ - -int -isc_win32os_versioncheck(unsigned int major, unsigned int minor, - unsigned int updatemajor, unsigned int updateminor); - -/* - * Checks the current version of the operating system with the - * supplied version information. - * Returns: - * -1 if less than the version information supplied - * 0 if equal to all of the version information supplied - * +1 if greater than the version information supplied - */ - -ISC_LANG_ENDDECLS - -#endif /* ISC_WIN32OS_H */ diff --git a/lib/isc/win32/interfaceiter.c b/lib/isc/win32/interfaceiter.c deleted file mode 100644 index f11ebd710d..0000000000 --- a/lib/isc/win32/interfaceiter.c +++ /dev/null @@ -1,547 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/* - * Note that this code will need to be revisited to support IPv6 Interfaces. - * For now we just iterate through IPv4 interfaces. - */ -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -void -InitSockets(void); - -/* Common utility functions */ - -/* - * Extract the network address part from a "struct sockaddr". - * - * The address family is given explicitly - * instead of using src->sa_family, because the latter does not work - * for copying a network mask obtained by SIOCGIFNETMASK (it does - * not have a valid address family). - */ - -#define IFITER_MAGIC 0x49464954U /* IFIT. */ -#define VALID_IFITER(t) ((t) != NULL && (t)->magic == IFITER_MAGIC) - -struct isc_interfaceiter { - unsigned int magic; /* Magic number. */ - isc_mem_t *mctx; - SOCKET socket; - INTERFACE_INFO IFData; /* Current Interface Info. */ - int numIF; /* Current Interface count. */ - int v4IF; /* Number of IPv4 Interfaces */ - INTERFACE_INFO *buf4; /* Buffer for WSAIoctl data. */ - unsigned int buf4size; /* Bytes allocated. */ - INTERFACE_INFO *pos4; /* Current offset in IF List */ - SOCKET_ADDRESS_LIST *buf6; /* Buffer for WSAIoctl data. */ - unsigned int buf6size; /* Bytes allocated. */ - unsigned int pos6; /* Which entry to process. */ - bool v6loop; /* See IPv6 loop address. */ - bool pos6zero; /* Done pos6 == 0. */ - isc_interface_t current; /* Current interface data. */ - isc_result_t result; /* Last result code. */ -}; - -/* - * Size of buffer for SIO_GET_INTERFACE_LIST, in number of interfaces. - * We assume no sane system will have more than than 1K of IP addresses on - * all of its adapters. - */ -#define IFCONF_SIZE_INITIAL 16 -#define IFCONF_SIZE_INCREMENT 64 -#define IFCONF_SIZE_MAX 1040 - -static void -get_addr(unsigned int family, isc_netaddr_t *dst, struct sockaddr *src) { - dst->family = family; - switch (family) { - case AF_INET: - memmove(&dst->type.in, &((struct sockaddr_in *)src)->sin_addr, - sizeof(struct in_addr)); - break; - case AF_INET6: - memmove(&dst->type.in6, - &((struct sockaddr_in6 *)src)->sin6_addr, - sizeof(struct in6_addr)); - dst->zone = ((struct sockaddr_in6 *)src)->sin6_scope_id; - break; - default: - INSIST(0); - ISC_UNREACHABLE(); - } -} - -isc_result_t -isc_interfaceiter_create(isc_mem_t *mctx, isc_interfaceiter_t **iterp) { - char strbuf[ISC_STRERRORSIZE]; - isc_interfaceiter_t *iter; - isc_result_t result; - int error; - unsigned long bytesReturned = 0; - - REQUIRE(mctx != NULL); - REQUIRE(iterp != NULL); - REQUIRE(*iterp == NULL); - - iter = isc_mem_get(mctx, sizeof(*iter)); - - InitSockets(); - - iter->mctx = mctx; - iter->buf4 = NULL; - iter->buf6 = NULL; - iter->pos4 = NULL; - iter->pos6 = 0; - iter->v6loop = true; - iter->pos6zero = true; - iter->buf6size = 0; - iter->buf4size = 0; - iter->result = ISC_R_FAILURE; - iter->numIF = 0; - iter->v4IF = 0; - - /* - * Create an unbound datagram socket to do the - * SIO_GET_INTERFACE_LIST WSAIoctl on. - */ - iter->socket = socket(AF_INET, SOCK_DGRAM, 0); - if (iter->socket == INVALID_SOCKET) { - error = WSAGetLastError(); - if (error == WSAEAFNOSUPPORT) { - goto inet6_only; - } - strerror_r(error, strbuf, sizeof(strbuf)); - UNEXPECTED_ERROR(__FILE__, __LINE__, - "making interface scan socket: %s", strbuf); - result = ISC_R_UNEXPECTED; - goto socket_failure; - } - - /* - * Get the interface configuration, allocating more memory if - * necessary. - */ - iter->buf4size = IFCONF_SIZE_INITIAL * sizeof(INTERFACE_INFO); - - for (;;) { - iter->buf4 = isc_mem_get(mctx, iter->buf4size); - - if (WSAIoctl(iter->socket, SIO_GET_INTERFACE_LIST, 0, 0, - iter->buf4, iter->buf4size, &bytesReturned, 0, - 0) == SOCKET_ERROR) - { - error = WSAGetLastError(); - if (error != WSAEFAULT && error != WSAENOBUFS) { - errno = error; - strerror_r(error, strbuf, sizeof(strbuf)); - UNEXPECTED_ERROR(__FILE__, __LINE__, - "get interface configuration: " - "%s", - strbuf); - result = ISC_R_UNEXPECTED; - goto ioctl_failure; - } - /* - * EINVAL. Retry with a bigger buffer. - */ - } else { - /* - * The WSAIoctl succeeded. - * If the number of the returned bytes is the same - * as the buffer size, we will grow it just in - * case and retry. - */ - if (bytesReturned > 0 && - (bytesReturned < iter->buf4size)) { - break; - } - } - if (iter->buf4size >= IFCONF_SIZE_MAX * sizeof(INTERFACE_INFO)) - { - UNEXPECTED_ERROR(__FILE__, __LINE__, - "get interface configuration: " - "maximum buffer size exceeded"); - result = ISC_R_UNEXPECTED; - goto ioctl_failure; - } - isc_mem_put(mctx, iter->buf4, iter->buf4size); - - iter->buf4size += IFCONF_SIZE_INCREMENT * - sizeof(INTERFACE_INFO); - } - - /* - * A newly created iterator has an undefined position - * until isc_interfaceiter_first() is called. - */ - iter->v4IF = bytesReturned / sizeof(INTERFACE_INFO); - - /* We don't need the socket any more, so close it */ - closesocket(iter->socket); - -inet6_only: - /* - * Create an unbound datagram socket to do the - * SIO_ADDRESS_LIST_QUERY WSAIoctl on. - */ - iter->socket = socket(AF_INET6, SOCK_DGRAM, 0); - if (iter->socket == INVALID_SOCKET) { - error = WSAGetLastError(); - if (error == WSAEAFNOSUPPORT) { - goto inet_only; - } - strerror_r(error, strbuf, sizeof(strbuf)); - UNEXPECTED_ERROR(__FILE__, __LINE__, - "making interface scan socket: %s", strbuf); - result = ISC_R_UNEXPECTED; - goto ioctl_failure; - } - - /* - * Get the interface configuration, allocating more memory if - * necessary. - */ - iter->buf6size = sizeof(SOCKET_ADDRESS_LIST) + - IFCONF_SIZE_INITIAL * sizeof(SOCKET_ADDRESS); - - for (;;) { - iter->buf6 = isc_mem_get(mctx, iter->buf6size); - - if (WSAIoctl(iter->socket, SIO_ADDRESS_LIST_QUERY, 0, 0, - iter->buf6, iter->buf6size, &bytesReturned, 0, - 0) == SOCKET_ERROR) - { - error = WSAGetLastError(); - if (error != WSAEFAULT && error != WSAENOBUFS) { - errno = error; - strerror_r(error, strbuf, sizeof(strbuf)); - UNEXPECTED_ERROR(__FILE__, __LINE__, - "sio address list query: %s", - strbuf); - result = ISC_R_UNEXPECTED; - goto ioctl6_failure; - } - /* - * EINVAL. Retry with a bigger buffer. - */ - } else { - break; - } - - if (iter->buf6size >= IFCONF_SIZE_MAX * sizeof(SOCKET_ADDRESS)) - { - UNEXPECTED_ERROR(__FILE__, __LINE__, - "get interface configuration: " - "maximum buffer size exceeded"); - result = ISC_R_UNEXPECTED; - goto ioctl6_failure; - } - isc_mem_put(mctx, iter->buf6, iter->buf6size); - - iter->buf6size += IFCONF_SIZE_INCREMENT * - sizeof(SOCKET_ADDRESS); - } - - closesocket(iter->socket); - -inet_only: - iter->magic = IFITER_MAGIC; - *iterp = iter; - return (ISC_R_SUCCESS); - -ioctl6_failure: - isc_mem_put(mctx, iter->buf6, iter->buf6size); - -ioctl_failure: - if (iter->buf4 != NULL) { - isc_mem_put(mctx, iter->buf4, iter->buf4size); - } - if (iter->socket != INVALID_SOCKET) { - (void)closesocket(iter->socket); - } - -socket_failure: - isc_mem_put(mctx, iter, sizeof(*iter)); - return (result); -} - -/* - * Get information about the current interface to iter->current. - * If successful, return ISC_R_SUCCESS. - * If the interface has an unsupported address family, or if - * some operation on it fails, return ISC_R_IGNORE to make - * the higher-level iterator code ignore it. - */ - -static isc_result_t -internal_current(isc_interfaceiter_t *iter) { - BOOL ifNamed = FALSE; - unsigned long flags; - - REQUIRE(VALID_IFITER(iter)); - REQUIRE(iter->numIF >= 0); - - memset(&iter->current, 0, sizeof(iter->current)); - iter->current.af = AF_INET; - - get_addr(AF_INET, &iter->current.address, - (struct sockaddr *)&(iter->IFData.iiAddress)); - - /* - * Get interface flags. - */ - - iter->current.flags = 0; - flags = iter->IFData.iiFlags; - - if ((flags & IFF_UP) != 0) { - iter->current.flags |= INTERFACE_F_UP; - } - - if ((flags & IFF_POINTTOPOINT) != 0) { - iter->current.flags |= INTERFACE_F_POINTTOPOINT; - snprintf(iter->current.name, sizeof(iter->current.name), - "PPP Interface %d", iter->numIF); - ifNamed = TRUE; - } - - if ((flags & IFF_LOOPBACK) != 0) { - iter->current.flags |= INTERFACE_F_LOOPBACK; - snprintf(iter->current.name, sizeof(iter->current.name), - "Loopback Interface %d", iter->numIF); - ifNamed = TRUE; - } - - /* - * If the interface is point-to-point, get the destination address. - */ - if ((iter->current.flags & INTERFACE_F_POINTTOPOINT) != 0) { - get_addr(AF_INET, &iter->current.dstaddress, - (struct sockaddr *)&(iter->IFData.iiBroadcastAddress)); - } - - if (ifNamed == FALSE) { - snprintf(iter->current.name, sizeof(iter->current.name), - "TCP/IP Interface %d", iter->numIF); - } - - /* - * Get the network mask. - */ - get_addr(AF_INET, &iter->current.netmask, - (struct sockaddr *)&(iter->IFData.iiNetmask)); - - return (ISC_R_SUCCESS); -} - -static isc_result_t -internal_current6(isc_interfaceiter_t *iter) { - SOCKET fd; - int i; - - REQUIRE(VALID_IFITER(iter)); - REQUIRE(iter->buf6 != NULL); - - memset(&iter->current, 0, sizeof(iter->current)); - iter->current.af = AF_INET6; - - if (!iter->pos6zero) { - if (iter->pos6 == 0U) { - iter->pos6zero = true; - } - get_addr(AF_INET6, &iter->current.address, - iter->buf6->Address[iter->pos6].lpSockaddr); - - /* - * Set interface flags. - */ - - iter->current.flags = INTERFACE_F_UP; - - snprintf(iter->current.name, sizeof(iter->current.name), - "TCP/IPv6 Interface %u", iter->pos6 + 1); - - for (i = 0; i < 16; i++) - iter->current.netmask.type.in6.s6_addr[i] = 0xff; - iter->current.netmask.family = AF_INET6; - if (IN6_IS_ADDR_LOOPBACK(&iter->current.address.type.in6)) { - iter->v6loop = true; - } - } else { - /* - * See if we can bind to the ::1 and if so return ::1. - */ - struct sockaddr_in6 sin6; - - iter->v6loop = true; /* So we don't loop forever. */ - - fd = socket(AF_INET6, SOCK_DGRAM, 0); - if (fd == INVALID_SOCKET) { - return (ISC_R_IGNORE); - } - memset(&sin6, 0, sizeof(sin6)); - sin6.sin6_family = AF_INET6; - sin6.sin6_addr.s6_addr[15] = 1; - if (bind(fd, (struct sockaddr *)&sin6, sizeof(sin6)) < 0) { - closesocket(fd); - return (ISC_R_IGNORE); - } - closesocket(fd); - - iter->current.flags = INTERFACE_F_UP | INTERFACE_F_LOOPBACK; - snprintf(iter->current.name, sizeof(iter->current.name), - "TCP/IPv6 Loopback Interface"); - for (i = 0; i < 16; i++) { - if (i != 15) { - iter->current.address.type.in6.s6_addr[i] = 0; - } else { - iter->current.address.type.in6.s6_addr[i] = 1; - } - iter->current.netmask.type.in6.s6_addr[i] = 0xff; - } - iter->current.address.family = AF_INET6; - iter->current.netmask.family = AF_INET6; - } - return (ISC_R_SUCCESS); -} - -/* - * Step the iterator to the next interface. Unlike - * isc_interfaceiter_next(), this may leave the iterator - * positioned on an interface that will ultimately - * be ignored. Return ISC_R_NOMORE if there are no more - * interfaces, otherwise ISC_R_SUCCESS. - */ -static isc_result_t -internal_next(isc_interfaceiter_t *iter) { - if (iter->numIF >= iter->v4IF) { - return (ISC_R_NOMORE); - } - - /* - * The first one needs to be set up to point to the last - * Element of the array. Go to the end and back up - * Microsoft's implementation is peculiar for returning - * the list in reverse order - */ - - if (iter->numIF == 0) { - iter->pos4 = (INTERFACE_INFO *)(iter->buf4 + (iter->v4IF)); - } - - iter->pos4--; - if (&(iter->pos4) < &(iter->buf4)) { - return (ISC_R_NOMORE); - } - - memset(&(iter->IFData), 0, sizeof(INTERFACE_INFO)); - memmove(&(iter->IFData), iter->pos4, sizeof(INTERFACE_INFO)); - iter->numIF++; - - return (ISC_R_SUCCESS); -} - -static isc_result_t -internal_next6(isc_interfaceiter_t *iter) { - if (iter->pos6 == 0U && iter->v6loop) { - return (ISC_R_NOMORE); - } - if (iter->pos6 != 0U) { - iter->pos6--; - } - return (ISC_R_SUCCESS); -} - -isc_result_t -isc_interfaceiter_current(isc_interfaceiter_t *iter, isc_interface_t *ifdata) { - REQUIRE(iter->result == ISC_R_SUCCESS); - memmove(ifdata, &iter->current, sizeof(*ifdata)); - return (ISC_R_SUCCESS); -} - -isc_result_t -isc_interfaceiter_first(isc_interfaceiter_t *iter) { - REQUIRE(VALID_IFITER(iter)); - - if (iter->buf6 != NULL) { - iter->pos6 = iter->buf6->iAddressCount; - iter->v6loop = false; - iter->pos6zero = (iter->pos6 == 0U); - } - iter->result = ISC_R_SUCCESS; - return (isc_interfaceiter_next(iter)); -} - -isc_result_t -isc_interfaceiter_next(isc_interfaceiter_t *iter) { - isc_result_t result; - - REQUIRE(VALID_IFITER(iter)); - REQUIRE(iter->result == ISC_R_SUCCESS); - - for (;;) { - result = internal_next(iter); - if (result == ISC_R_NOMORE) { - result = internal_next6(iter); - if (result != ISC_R_SUCCESS) { - break; - } - result = internal_current6(iter); - if (result == ISC_R_IGNORE) { - continue; - } - break; - } else if (result != ISC_R_SUCCESS) { - break; - } - result = internal_current(iter); - if (result != ISC_R_IGNORE) { - break; - } - } - iter->result = result; - return (result); -} - -void -isc_interfaceiter_destroy(isc_interfaceiter_t **iterp) { - isc_interfaceiter_t *iter; - REQUIRE(iterp != NULL); - iter = *iterp; - *iterp = NULL; - REQUIRE(VALID_IFITER(iter)); - - if (iter->buf4 != NULL) { - isc_mem_put(iter->mctx, iter->buf4, iter->buf4size); - } - if (iter->buf6 != NULL) { - isc_mem_put(iter->mctx, iter->buf6, iter->buf6size); - } - - iter->magic = 0; - isc_mem_put(iter->mctx, iter, sizeof(*iter)); -} diff --git a/lib/isc/win32/ipv6.c b/lib/isc/win32/ipv6.c deleted file mode 100644 index ad93c122e0..0000000000 --- a/lib/isc/win32/ipv6.c +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#include -#include - -LIBISC_EXTERNAL_DATA const struct in6_addr isc_in6addr_loopback = - IN6ADDR_LOOPBACK_INIT; diff --git a/lib/isc/win32/libgen.h b/lib/isc/win32/libgen.h deleted file mode 100644 index 227fd18778..0000000000 --- a/lib/isc/win32/libgen.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#ifndef LIBGEN_H -#define LIBGEN_H 1 - -char * -basename(const char *); -char * -dirname(const char *); - -#endif /* ifndef LIBGEN_H */ diff --git a/lib/isc/win32/libisc.def.exclude b/lib/isc/win32/libisc.def.exclude deleted file mode 100644 index d2fe4eccbb..0000000000 --- a/lib/isc/win32/libisc.def.exclude +++ /dev/null @@ -1,42 +0,0 @@ -; These symbols are not needed by the WIN32 build, but build-tarballs -; will complain if they aren't present here. -isc_socket_accept -isc_socket_attach -isc_socket_bind -isc_socket_cancel -isc_socket_cleanunix -isc_socket_close -isc_socket_connect -isc_socket_create -isc_socket_detach -isc_socket_dscp -isc_socket_dup -isc_socket_fdwatchcreate -isc_socket_fdwatchpoke -isc_socket_filter -isc_socket_getpeername -isc_socket_getsockname -isc_socket_gettype -isc_socket_ipv6only -isc_socket_listen -isc_socket_open -isc_socket_permunix -isc_socket_recv -isc_socket_recv2 -isc_socket_recvv -isc_socket_register -isc_socket_send -isc_socket_sendto -isc_socket_sendto2 -isc_socket_sendtov -isc_socket_sendtov2 -isc_socket_sendv -isc_socketmgr_create -isc_socketmgr_create2 -isc_socketmgr_destroy -isc_socketmgr_setstats -isc_print_fprintf -isc_print_printf -isc_print_snprintf -isc_print_sprintf -isc_print_vsnprintf diff --git a/lib/isc/win32/libisc.def.in b/lib/isc/win32/libisc.def.in deleted file mode 100644 index 743d2cf6b8..0000000000 --- a/lib/isc/win32/libisc.def.in +++ /dev/null @@ -1,806 +0,0 @@ -LIBRARY libisc - -; Exported Functions -EXPORTS - -NTReportError -closelog -@IF PKCS11 -getpassphrase -@END PKCS11 -isc_app_block -isc_app_ctxfinish -isc_app_ctxonrun -isc_app_ctxrun -isc_app_ctxshutdown -isc_app_ctxstart -isc_app_ctxsuspend -isc_app_finish -isc_app_onrun -isc_app_reload -isc_app_run -isc_app_shutdown -isc_app_start -isc_app_unblock -isc_appctx_create -isc_appctx_destroy -isc_astack_destroy -isc_astack_new -isc_astack_pop -isc_astack_trypush -isc__buffer_activeregion -isc__buffer_add -isc__buffer_availableregion -isc__buffer_back -isc__buffer_clear -isc__buffer_consumedregion -isc__buffer_first -isc__buffer_forward -isc__buffer_init -isc__buffer_initnull -isc__buffer_invalidate -isc__buffer_putmem -isc__buffer_putstr -isc__buffer_putuint16 -isc__buffer_putuint24 -isc__buffer_putuint32 -isc__buffer_putuint48 -isc__buffer_putuint8 -isc__buffer_region -isc__buffer_remainingregion -isc__buffer_setactive -isc__buffer_subtract -isc__buffer_usedregion -isc__mem_allocate -isc__mem_free -isc__mem_get -isc__mem_printactive -isc__mem_put -isc__mem_putanddetach -isc__mem_reallocate -isc__mem_strdup -isc__mempool_get -isc__mempool_put -isc__md_md5 -isc__md_sha1 -isc__md_sha224 -isc__md_sha256 -isc__md_sha384 -isc__md_sha512 -isc_socket_accept -isc_socket_attach -isc_socket_bind -isc_socket_cancel -isc_socket_cleanunix -isc_socket_close -isc_socket_connect -isc_socket_create -isc_socket_detach -isc_socket_dscp -isc_socket_dup -isc_socket_filter -isc_socket_getfd -isc_socket_getname -isc_socket_getpeername -isc_socket_getsockname -isc_socket_gettag -isc_socket_gettype -isc_socket_hasreuseport -isc_socket_ipv6only -isc_socket_listen -isc_socket_open -isc_socket_permunix -isc_socket_recv -isc_socket_recv2 -isc_socket_send -isc_socket_sendto -isc_socket_sendto2 -isc_socket_setname -isc_socketmgr_getmaxsockets -isc_socketmgr_setreserved -isc_socketmgr_setstats -isc_task_getname -isc_task_getnetmgr -isc_task_gettag -isc_task_ready -isc_task_run -isc_task_unsendrange -isc_taskmgr_attach -isc_taskmgr_detach -isc_aes128_crypt -isc_aes192_crypt -isc_aes256_crypt -isc_app_block -isc_app_ctxfinish -isc_app_ctxonrun -isc_app_ctxrun -isc_app_ctxshutdown -isc_app_ctxstart -isc_app_ctxsuspend -isc_app_finish -isc_app_isrunning -isc_app_onrun -isc_app_reload -isc_app_run -isc_app_shutdown -isc_app_start -isc_app_unblock -isc_appctx_create -isc_appctx_destroy -isc_assertion_failed -isc_assertion_setcallback -isc_assertion_typetotext -isc_backtrace -isc_backtrace_symbols -isc_backtrace_symbols_fd -isc_base32_decoderegion -isc_base32_decodestring -isc_base32_tobuffer -isc_base32_totext -isc_base32hex_decoderegion -isc_base32hex_decodestring -isc_base32hex_tobuffer -isc_base32hex_totext -isc_base32hexnp_decoderegion -isc_base32hexnp_decodestring -isc_base32hexnp_tobuffer -isc_base32hexnp_totext -isc_base64_decodestring -isc_base64_tobuffer -isc_base64_totext -isc_buffer_allocate -isc_buffer_compact -isc_buffer_copyregion -isc_buffer_dup -isc_buffer_free -isc_buffer_getuint16 -isc_buffer_getuint32 -isc_buffer_getuint48 -isc_buffer_getuint8 -isc_buffer_printf -isc_buffer_putdecint -isc_buffer_reinit -isc_buffer_reserve -isc_buffer_setautorealloc -isc_commandline_parse -isc_commandline_strtoargv -isc_condition_broadcast -isc_condition_destroy -isc_condition_init -isc_condition_signal -isc_condition_wait -isc_condition_waituntil -isc_counter_attach -isc_counter_create -isc_counter_detach -isc_counter_increment -isc_counter_setlimit -isc_counter_used -isc_crc64_final -isc_crc64_init -isc_crc64_update -isc_dir_chdir -isc_dir_chroot -isc_dir_close -isc_dir_createunique -isc_dir_init -isc_dir_open -isc_dir_read -isc_dir_reset -isc_entropy_get -isc_errno_toresult -isc_error_fatal -isc_error_runtimecheck -isc_error_setfatal -isc_error_setunexpected -isc_error_unexpected -isc_event_allocate -isc_event_constallocate -isc_event_free -isc_file_absolutepath -isc_file_basename -isc_file_bopenunique -isc_file_bopenuniquemode -isc_file_bopenuniqueprivate -isc_file_exists -isc_file_getmodtime -isc_file_getsize -isc_file_getsizefd -isc_file_isabsolute -isc_file_ischdiridempotent -isc_file_iscurrentdir -isc_file_isdirectory -isc_file_isdirwritable -isc_file_isplainfile -isc_file_isplainfilefd -isc_file_mktemplate -isc_file_mmap -isc_file_mode -isc_file_munmap -isc_file_openunique -isc_file_openuniquemode -isc_file_openuniqueprivate -isc_file_progname -isc_file_remove -isc_file_rename -isc_file_renameunique -isc_file_safecreate -isc_file_safemovefile -isc_file_sanitize -isc_file_settime -isc_file_splitpath -isc_file_template -isc_file_truncate -isc_fsaccess_add -isc_fsaccess_changeowner -isc_fsaccess_remove -isc_fsaccess_set -isc_glob -isc_globfree -isc_hash32 -isc_hash64 -isc_hash_get_initializer -isc_hash_set_initializer -isc_heap_create -isc_heap_decreased -isc_heap_delete -isc_heap_destroy -isc_heap_foreach -isc_heap_element -isc_heap_increased -isc_heap_insert -isc_hex_decodestring -isc_hex_tobuffer -isc_hex_totext -isc_hp_clear -isc_hp_clear_one -isc_hp_destroy -isc_hp_init -isc_hp_protect -isc_hp_protect_ptr -isc_hp_protect_release -isc_hp_new -isc_hp_retire -isc_hmac -isc_hmac_new -isc_hmac_free -isc_hmac_init -isc_hmac_reset -isc_hmac_update -isc_hmac_final -isc_hmac_get_md_type -isc_hmac_get_size -isc_hmac_get_block_size -isc_hp_new -isc_hp_destroy -isc_hp_clear -isc_hp_protect -isc_hp_protect_ptr -isc_hp_protect_release -isc_hp_retire -isc_ht_add -isc_ht_count -isc_ht_delete -isc_ht_destroy -isc_ht_find -isc_ht_init -isc_ht_iter_create -isc_ht_iter_current -isc_ht_iter_currentkey -isc_ht_iter_delcurrent_next -isc_ht_iter_destroy -isc_ht_iter_first -isc_ht_iter_next -isc_httpd_setfinishhook -isc_httpdmgr_addurl -isc_httpdmgr_create -isc_httpdmgr_shutdown -isc_interfaceiter_create -isc_interfaceiter_current -isc_interfaceiter_destroy -isc_interfaceiter_first -isc_interfaceiter_next -isc_interval_iszero -isc_interval_set -isc_iterated_hash -isc_lex_close -isc_lex_create -isc_lex_destroy -isc_lex_getcomments -isc_lex_getlasttokentext -isc_lex_getmastertoken -isc_lex_getoctaltoken -isc_lex_getsourceline -isc_lex_getsourcename -isc_lex_getspecials -isc_lex_gettoken -isc_lex_isfile -isc_lex_openbuffer -isc_lex_openfile -isc_lex_openstream -isc_lex_setcomments -isc_lex_setsourceline -isc_lex_setsourcename -isc_lex_setspecials -isc_lex_ungettoken -isc_lib_register -isc_log_categorybyname -isc_log_closefilelogs -isc_log_create -isc_log_createchannel -isc_log_destroy -isc_log_getdebuglevel -isc_log_getduplicateinterval -isc_log_gettag -isc_log_modulebyname -isc_log_opensyslog -isc_log_registercategories -isc_log_registermodules -isc_log_setcontext -isc_log_setdebuglevel -isc_log_setduplicateinterval -isc_log_setforcelog -isc_log_settag -isc_log_usechannel -isc_log_vwrite -isc_log_vwrite1 -isc_log_wouldlog -isc_log_write -isc_log_write1 -isc_logconfig_create -isc_logconfig_destroy -isc_logconfig_use -isc_logfile_roll -isc_managers_create -isc_managers_destroy -isc_md_new -isc_md_init -isc_md_reset -isc_md_update -isc_md_final -isc_md_free -isc_md_get_md_type -isc_md_get_size -isc_md_get_block_size -isc_md_type_get_size -isc_md_type_get_block_size -isc_md -isc__mem_checkdestroyed -isc__mem_initialize -isc__mem_shutdown -isc_mem_attach -isc_mem_checkdestroyed -isc_mem_create -isc_mem_destroy -isc_mem_detach -isc_mem_getname -isc_mem_inuse -isc_mem_isovermem -isc_mem_malloced -isc_mem_maxinuse -isc_mem_maxmalloced -isc_mem_references -@IF NOTYET -isc_mem_renderjson -@END NOTYET -@IF LIBXML2 -isc_mem_renderxml -@END LIBXML2 -isc_mem_setdestroycheck -isc_mem_setname -isc_mem_setwater -isc_mem_stats -isc_mem_total -isc_mem_waterack -isc_meminfo_totalphys -isc_mempool_associatelock -isc_mempool_create -isc_mempool_destroy -isc_mempool_getallocated -isc_mempool_getfillcount -isc_mempool_getfreecount -isc_mempool_getfreemax -isc_mempool_getmaxalloc -isc_mempool_setfillcount -isc_mempool_setfreemax -isc_mempool_setmaxalloc -isc_mempool_setname -isc_mutexblock_destroy -isc_mutexblock_init -isc_net_disableipv4 -isc_net_disableipv6 -isc_net_enableipv4 -isc_net_enableipv6 -isc_net_getudpportrange -isc_net_probe_ipv6only -isc_net_probe_ipv6pktinfo -isc_net_probedscp -isc_net_probeipv4 -isc_net_probeipv6 -isc_net_probeunix -isc_netaddr_any -isc_netaddr_any6 -isc_netaddr_eqprefix -isc_netaddr_equal -isc_netaddr_format -isc_netaddr_fromin -isc_netaddr_fromin6 -isc_netaddr_frompath -isc_netaddr_fromsockaddr -isc_netaddr_fromv4mapped -isc_netaddr_getzone -isc_netaddr_isexperimental -isc_netaddr_islinklocal -isc_netaddr_isloopback -isc_netaddr_ismulticast -isc_netaddr_isnetzero -isc_netaddr_issitelocal -isc_netaddr_masktoprefixlen -isc_netaddr_prefixok -isc_netaddr_setzone -isc_netaddr_totext -isc_netaddr_unspec -isc_netscope_pton -isc__nm_force_tid -isc__nmhandle_attach -isc__nmhandle_detach -isc_nmhandle_cleartimeout -isc_nmhandle_getdata -isc_nmhandle_getextra -isc_nmhandle_is_stream -isc_nmhandle_netmgr -isc_nmhandle_localaddr -isc_nmhandle_peeraddr -isc_nmhandle_setdata -isc_nmhandle_settimeout -isc_nm_cancelread -isc_nm_detach -isc_nm_http_endpoint -isc_nm_httpconnect -isc_nm_listenhttp -isc_nm_listentcpdns -isc_nm_listentls -isc_nm_listentlsdns -isc_nm_listentcp -isc_nm_listenudp -isc_nm_maxudp -isc_nm_pauseread -isc_nm_read -isc_nm_resumeread -isc_nm_send -isc_nm_setstats -isc_nm_stoplistening -isc_nm_tcpconnect -isc_nm_tcpdnsconnect -isc_nm_gettimeouts -isc_nm_setnetbuffers -isc_nm_settimeouts -isc_nm_task_enqueue -isc_nm_tcpdns_keepalive -isc_nm_tcpdns_sequential -isc_nm_tid -isc_nm_tlsdnsconnect -isc_nm_udpconnect -isc_nm_work_offload -isc_nmsocket_close -isc__nm_acquire_interlocked -isc__nm_drop_interlocked -isc__nm_acquire_interlocked_force -isc_nonce_buf -isc_ntpaths_get -isc_ntpaths_init -isc_once_do -isc_os_ncpus -isc_parse_uint16 -isc_parse_uint32 -isc_parse_uint8 -isc_pool_count -isc_pool_create -isc_pool_destroy -isc_pool_expand -isc_pool_get -isc_portset_add -isc_portset_addrange -isc_portset_create -isc_portset_destroy -isc_portset_isset -isc_portset_nports -isc_portset_remove -isc_portset_removerange -isc_queue_enqueue -isc_queue_dequeue -isc_queue_destroy -isc_queue_new -isc_quota_attach -isc_quota_attach_cb -isc_quota_cb_init -isc_quota_destroy -isc_quota_detach -isc_quota_getmax -isc_quota_getsoft -isc_quota_getused -isc_quota_init -isc_quota_max -isc_quota_soft -isc_radix_create -isc_radix_destroy -isc_radix_insert -isc_radix_process -isc_radix_remove -isc_radix_search -isc_random8 -isc_random16 -isc_random32 -isc_random_buf -isc_random_uniform -isc_ratelimiter_attach -isc_ratelimiter_create -isc_ratelimiter_dequeue -isc_ratelimiter_detach -isc_ratelimiter_enqueue -isc_ratelimiter_release -isc_ratelimiter_setinterval -isc_ratelimiter_setpertic -isc_ratelimiter_setpushpop -isc_ratelimiter_shutdown -isc_ratelimiter_stall -isc_regex_validate -isc_region_compare -isc_resource_getcurlimit -isc_resource_getlimit -isc_resource_setlimit -isc_result_register -isc_result_registerids -isc_result_toid -isc_result_totext -isc_rwlock_destroy -isc_rwlock_downgrade -isc_rwlock_init -isc_rwlock_lock -isc_rwlock_trylock -isc_rwlock_tryupgrade -isc_rwlock_unlock -isc_safe_memequal -isc_safe_memwipe -isc_serial_eq -isc_serial_ge -isc_serial_gt -isc_serial_le -isc_serial_lt -isc_serial_ne -isc_halfsiphash24 -isc_siphash24 -isc_sockaddr_any -isc_sockaddr_any6 -isc_sockaddr_anyofpf -isc_sockaddr_compare -isc_sockaddr_eqaddr -isc_sockaddr_eqaddrprefix -isc_sockaddr_equal -isc_sockaddr_format -isc_sockaddr_fromin -isc_sockaddr_fromin6 -isc_sockaddr_fromnetaddr -isc_sockaddr_frompath -isc_sockaddr_fromsockaddr -isc_sockaddr_getport -isc_sockaddr_hash -isc_sockaddr_isexperimental -isc_sockaddr_islinklocal -isc_sockaddr_ismulticast -isc_sockaddr_isnetzero -isc_sockaddr_issitelocal -isc_sockaddr_pf -isc_sockaddr_setport -isc_sockaddr_totext -isc_sockaddr_v6fromin -isc_socket_socketevent -isc_socketmgr_maxudp -@IF NOTYET -isc_socketmgr_renderjson -@END NOTYET -@IF LIBXML2 -isc_socketmgr_renderxml -@END LIBXML2 -isc_stats_attach -isc_stats_create -isc_stats_decrement -isc_stats_detach -isc_stats_dump -isc_stats_get_counter -isc_stats_increment -isc_stats_ncounters -isc_stats_set -isc_stats_update_if_greater -isc_stdio_close -isc_stdio_flush -isc_stdio_open -isc_stdio_read -isc_stdio_seek -isc_stdio_sync -isc_stdio_tell -isc_stdio_write -isc_stdtime_get -isc_stdtime_tostring -isc_string_strerror_r -isc_symtab_count -isc_symtab_create -isc_symtab_define -isc_symtab_destroy -isc_symtab_lookup -isc_symtab_undefine -isc_syslog_facilityfromstring -isc_task_attach -isc_task_beginexclusive -isc_task_create -isc_task_create_bound -isc_task_destroy -isc_task_detach -isc_task_endexclusive -isc_task_exiting -isc_task_getprivilege -isc_task_onshutdown -isc_task_privileged -isc_task_purge -isc_task_purgeevent -isc_task_purgerange -isc_task_send -isc_task_sendanddetach -isc_task_sendto -isc_task_sendtoanddetach -isc_task_setname -isc_task_setprivilege -isc_task_shutdown -isc_task_unsend -isc_taskmgr_excltask -isc_taskmgr_mode -@IF NOTYET -isc_taskmgr_renderjson -@END NOTYET -@IF LIBXML2 -isc_taskmgr_renderxml -@END LIBXML2 -isc_taskmgr_setexcltask -isc_taskmgr_setmode -isc_taskpool_create -isc_taskpool_destroy -isc_taskpool_expand -isc_taskpool_gettask -isc_taskpool_size -isc_thread_create -isc_thread_join -isc_thread_setaffinity -isc_thread_setconcurrency -isc_thread_setname -gmtime_r -localtime_r -nanosleep -usleep -isc_time_add -isc_time_compare -isc_time_formatISO8601 -isc_time_formatISO8601L -isc_time_formatISO8601Lms -isc_time_formatISO8601Lus -isc_time_formatISO8601ms -isc_time_formatISO8601us -isc_time_formathttptimestamp -isc_time_formatshorttimestamp -isc_time_formattimestamp -isc_time_isepoch -isc_time_microdiff -isc_time_nanoseconds -isc_time_now -isc_time_now_hires -isc_time_nowplusinterval -isc_time_parsehttptimestamp -isc_time_secondsastimet -isc_time_seconds -isc_time_set -isc_time_settoepoch -isc_time_subtract -isc_timer_attach -isc_timer_create -isc_timer_detach -isc_timer_gettype -isc_timer_reset -isc_timer_touch -isc_timermgr_poke -isc_tls_get_http2_alpn -isc_tls_create -isc_tls_free -isc_tlsctx_createclient -isc_tlsctx_createserver -isc_tlsctx_free -isc_tlsctx_enable_http2client_alpn -isc_tlsctx_enable_http2server_alpn -isc_tm_timegm -isc_tm_strptime -isc__trampoline_initialize -isc__trampoline_shutdown -isc__trampoline_get -isc__trampoline_run -isc_url_parse -isc_utf8_bom -isc_utf8_valid -isc_win32os_versioncheck -openlog -@IF PKCS11 -pk11_attribute_bytype -pk11_attribute_first -pk11_attribute_next -pk11_dump_tokens -pk11_error_fatalcheck -pk11_finalize -pk11_get_best_token -pk11_get_lib_name -pk11_get_load_error_message -pk11_get_session -pk11_initialize -pk11_mem_get -pk11_mem_put -pk11_numbits -pk11_parse_uri -pk11_result_register -pk11_result_totext -pk11_return_session -pk11_set_lib_name -pkcs_C_CloseSession -pkcs_C_CreateObject -pkcs_C_DeriveKey -pkcs_C_DestroyObject -pkcs_C_DigestFinal -pkcs_C_DigestInit -pkcs_C_DigestUpdate -pkcs_C_Encrypt -pkcs_C_EncryptInit -pkcs_C_Finalize -pkcs_C_FindObjects -pkcs_C_FindObjectsFinal -pkcs_C_FindObjectsInit -pkcs_C_GenerateKey -pkcs_C_GenerateKeyPair -pkcs_C_GenerateRandom -pkcs_C_GetAttributeValue -pkcs_C_GetMechanismInfo -pkcs_C_GetSlotList -pkcs_C_GetTokenInfo -pkcs_C_Initialize -pkcs_C_Login -pkcs_C_Logout -pkcs_C_OpenSession -pkcs_C_SeedRandom -pkcs_C_SetAttributeValue -pkcs_C_Sign -pkcs_C_SignFinal -pkcs_C_SignInit -pkcs_C_SignUpdate -pkcs_C_Verify -pkcs_C_VerifyFinal -pkcs_C_VerifyInit -pkcs_C_VerifyUpdate -@END PKCS11 -strlcat -strlcpy -syslog - -@IF NOLONGER -; Exported Data - -EXPORTS - -isc_bind9 DATA -isc_commandline_argument DATA -isc_commandline_errprint DATA -isc_commandline_index DATA -isc_commandline_option DATA -isc_commandline_progname DATA -isc_commandline_reset DATA -isc_dscp_check_value DATA -isc_hashctx DATA -isc_mem_debugging DATA -isc_tid_v DATA -@IF PKCS11 -pk11_verbose_init DATA -@END PKCS11 -@END NOLONGER diff --git a/lib/isc/win32/libisc.vcxproj.filters.in b/lib/isc/win32/libisc.vcxproj.filters.in deleted file mode 100644 index ce7b6e7edd..0000000000 --- a/lib/isc/win32/libisc.vcxproj.filters.in +++ /dev/null @@ -1,650 +0,0 @@ - - - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {289562c2-1bdd-4582-b6bd-3f598ee23cbd} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {d03c3e6a-e78e-4a01-bd77-64c839b1adfe} - h;hpp;hxx;hm;inl;inc;xsd - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Win32 Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - -@IF PKCS11 - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Library Header Files - - - Pkcs11 Header Files - -@END PKCS11 - - Win32 Header Files - - - Win32 Header Files - - - Win32 Header Files - - - Win32 Header Files - - - Win32 Header Files - - - Win32 Header Files - - - Win32 Header Files - - - Win32 Header Files - - - Win32 Header Files - - - Win32 Header Files - - - Win32 Header Files - - - Win32 Header Files - - - Win32 Header Files - - - Win32 Header Files - - - Win32 Header Files - - - Win32 Header Files - - - Win32 Header Files - - - Win32 Header Files - - - Win32 Header Files - - - Win32 Header Files - - - Win32 Header Files - - - Win32 Header Files - - - Win32 Header Files - - - Win32 Header Files - - - Win32 Header Files - - - Win32 Header Files - - - Win32 Header Files - - - Win32 Header Files - - - Library Header Files - - - Library Header Files - - - - - Win32 Source Files - - - Win32 Source Files - - - Win32 Source Files - - - Win32 Source Files - - - Win32 Source Files - - - Win32 Source Files - - - Win32 Source Files - - - Win32 Source Files - - - Win32 Source Files - - - Win32 Source Files - - - Win32 Source Files - - - Win32 Source Files - - - Win32 Source Files - - - Win32 Source Files - - - Win32 Source Files - - - Win32 Source Files - - - Win32 Source Files - - - Win32 Source Files - - - Win32 Source Files - - - Win32 Source Files - - - Win32 Source Files - - - Win32 Source Files - -@IF PKCS11 - - Win32 Source Files - -@END PKCS11 - - Win32 Source Files - - - Win32 Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - - - Library Source Files - -@IF PKCS11 - - Library Source Files - - - Library Source Files - -@END PKCS11 - - diff --git a/lib/isc/win32/libisc.vcxproj.in b/lib/isc/win32/libisc.vcxproj.in deleted file mode 100644 index 6f73664314..0000000000 --- a/lib/isc/win32/libisc.vcxproj.in +++ /dev/null @@ -1,494 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {3840E563-D180-4761-AA9C-E6155F02EAFF} - Win32Proj - libisc - @WINDOWS_TARGET_PLATFORM_VERSION@ - - - - DynamicLibrary - true - MultiByte - @PLATFORM_TOOLSET@ - - - DynamicLibrary - false - true - MultiByte - @PLATFORM_TOOLSET@ - - - - - - - - - - - - - true - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - - - false - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - - - - - - Level4 - false - Disabled -@IF PKCS11 - BIND9;@PK11_LIB_LOCATION@WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBISC_EXPORTS;%(PreprocessorDefinitions);%(PreprocessorDefinitions) - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@@LIBUV_INC@@NGHTTP2_INC@@OPENSSL_INC@@ZLIB_INC@include;..\include;..\;win32;..\..\isccfg\include;..\..\dns\win32\include;..\..\dns\include;%(AdditionalIncludeDirectories) -@ELSE PKCS11 - BIND9;WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBISC_EXPORTS;%(PreprocessorDefinitions);%(PreprocessorDefinitions) - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@@LIBUV_INC@@NGHTTP2_INC@@OPENSSL_INC@@ZLIB_INC@include;..\include;..\;win32;..\..\isccfg\include;%(AdditionalIncludeDirectories) -@END PKCS11 - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - true - CompileAsC - - - Console - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@@LIBUV_LIB@@NGHTTP2_LIB@@LIBXML2_LIB@@ZLIB_LIB@ws2_32.lib;Dbghelp.lib;%(AdditionalDependencies) - $(ProjectName).def - .\$(Configuration)\$(ProjectName).lib - - - cd ..\..\..\win32utils - -if NOT Exist ..\Build mkdir ..\Build -if NOT Exist ..\Build\Debug mkdir ..\Build\Debug - -echo Copying documentation. - -copy ..\*.md ..\Build\Debug -copy ..\CHANGES* ..\Build\Debug -copy ..\COPYRIGHT ..\Build\Debug -copy ..\LICENSE ..\Build\Debug - -echo Copying COPYRIGHT notice. - -copy ..\COPYRIGHT ..\Build\Debug - -echo Copying the OpenSSL DLL and LICENSE. - -copy @OPENSSL_DLLCRYPTO@ ..\Build\Debug\ -copy @OPENSSL_DLLSSL@ ..\Build\Debug\ -copy @OPENSSL_PATH@\LICENSE ..\Build\Debug\OpenSSL-LICENSE - -echo Copying libuv DLL. -copy @LIBUV_DLL@ ..\Build\Debug\ - -@IF LIBXML2 -echo Copying the libxml DLL. - -copy @LIBXML2_DLL@ ..\Build\Debug\ -@END LIBXML2 - -echo Copying nghttp2 DLL. -copy @NGHTTP2_DLL@ ..\Build\Debug\ - -@IF GSSAPI -echo Copying the GSSAPI and KRB5 DLLs. - -copy @GSSAPI_DLL@ ..\Build\Debug\ -copy @KRB5_DLL@ ..\Build\Debug\ -copy @COMERR_DLL@ ..\Build\Debug\ -copy @K5SPRT_DLL@ ..\Build\Debug\ -copy @WSHELP_DLL@ ..\Build\Debug\ -@END GSSAPI - -@IF IDNKIT -echo Copying the IDN kit DLL. - -copy @IDN_DLL@ ..\Build\Debug\ -copy @ICONV_DLL@ ..\Build\Debug\ -@END IDNKIT - -@IF ZLIB -echo Copying the zlib DLL. - -copy @ZLIB_DLL@ ..\Build\Debug\ -@END ZLIB - -echo Copying Visual C x86 Redistributable Installer. - -copy /Y @VCREDIST_PATH@ ..\Build\Debug\ - -echo Copying install files (flags and file list). - -copy InstallFlags ..\Build\Debug\ -copy InstallFiles ..\Build\Debug\ - - - - - - - Level1 - true - - - MaxSpeed - true - @INTRINSIC@ -@IF PKCS11 - BIND9;@PK11_LIB_LOCATION@WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBISC_EXPORTS;%(PreprocessorDefinitions);%(PreprocessorDefinitions) - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@@LIBUV_INC@@NGHTTP2_INC@@OPENSSL_INC@@ZLIB_INC@include;..\include;..\;win32;..\..\isccfg\include;..\..\dns\win32\include;..\..\dns\include;%(AdditionalIncludeDirectories) -@ELSE PKCS11 - BIND9;WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBISC_EXPORTS;%(PreprocessorDefinitions);%(PreprocessorDefinitions) - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@@LIBUV_INC@@NGHTTP2_INC@@OPENSSL_INC@@ZLIB_INC@include;..\include;..\;win32;..\..\isccfg\include;%(AdditionalIncludeDirectories) -@END PKCS11 - OnlyExplicitInline - false - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - CompileAsC - - - Console - false - true - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@@LIBUV_LIB@@NGHTTP2_LIB@@LIBXML2_LIB@@ZLIB_LIB@ws2_32.lib;%(AdditionalDependencies) - $(ProjectName).def - .\$(Configuration)\$(ProjectName).lib - Default - - - cd ..\..\..\win32utils - -if NOT Exist ..\Build mkdir ..\Build -if NOT Exist ..\Build\Release mkdir ..\Build\Release - -echo Copying documentation. - -copy ..\*.md ..\Build\Release -copy ..\CHANGES* ..\Build\Release -copy ..\COPYRIGHT ..\Build\Release -copy ..\LICENSE ..\Build\Release - -echo Copying the OpenSSL DLL and LICENSE. - -copy @OPENSSL_DLLCRYPTO@ ..\Build\Release\ -copy @OPENSSL_DLLSSL@ ..\Build\Release\ -copy @OPENSSL_PATH@\LICENSE ..\Build\Release\OpenSSL-LICENSE - -echo Copying libuv DLL. -copy @LIBUV_DLL@ ..\Build\Release\ - -echo Copying nghttp2 DLL. -copy @NGHTTP2_DLL@ ..\Build\Release\ - -@IF LIBXML2 -echo Copying the libxml DLL. - -copy @LIBXML2_DLL@ ..\Build\Release\ -@END LIBXML2 - -@IF GSSAPI -echo Copying the GSSAPI and KRB5 DLLs. - -copy @GSSAPI_DLL@ ..\Build\Release\ -copy @KRB5_DLL@ ..\Build\Release\ -copy @COMERR_DLL@ ..\Build\Release\ -copy @K5SPRT_DLL@ ..\Build\Release\ -copy @WSHELP_DLL@ ..\Build\Release\ -@END GSSAPI - -@IF IDNKIT -echo Copying the IDN kit DLL. - -copy @IDN_DLL@ ..\Build\Release\ -copy @ICONV_DLL@ ..\Build\Release\ -@END IDNKIT - -@IF ZLIB -echo Copying the zlib DLL. - -copy @ZLIB_DLL@ ..\Build\Release\ -@END ZLIB - -echo Copying Visual C x86 Redistributable Installer. - -copy /Y @VCREDIST_PATH@ ..\Build\Release\ - -echo Copying install files (flags and file list). - -copy InstallFlags ..\Build\Release\ -copy InstallFiles ..\Build\Release\ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@IF PKCS11 - - - - - -@END PKCS11 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@IF PKCS11 - - -@END PKCS11 - - - - - - - - - - - - - - - - - - - - - - -@IF PKCS11 - -@END PKCS11 - - - - - diff --git a/lib/isc/win32/libisc.vcxproj.user b/lib/isc/win32/libisc.vcxproj.user deleted file mode 100644 index ace9a86acb..0000000000 --- a/lib/isc/win32/libisc.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/lib/isc/win32/meminfo.c b/lib/isc/win32/meminfo.c deleted file mode 100644 index 3f3f8530d0..0000000000 --- a/lib/isc/win32/meminfo.c +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#include -#include - -#include - -uint64_t -isc_meminfo_totalphys(void) { - MEMORYSTATUSEX statex; - - statex.dwLength = sizeof(statex); - GlobalMemoryStatusEx(&statex); - return ((uint64_t)statex.ullTotalPhys); -} diff --git a/lib/isc/win32/net.c b/lib/isc/win32/net.c deleted file mode 100644 index 36ab363867..0000000000 --- a/lib/isc/win32/net.c +++ /dev/null @@ -1,296 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#include -#include - -#include -#include -#include -#include -#include -#include - -/*% - * Definitions about UDP port range specification. This is a total mess of - * portability variants: some use sysctl (but the sysctl names vary), some use - * system-specific interfaces, some have the same interface for IPv4 and IPv6, - * some separate them, etc... - */ - -/*% - * The last resort defaults: use all non well known port space - */ -#ifndef ISC_NET_PORTRANGELOW -#define ISC_NET_PORTRANGELOW 32768 -#endif /* ISC_NET_PORTRANGELOW */ -#ifndef ISC_NET_PORTRANGEHIGH -#define ISC_NET_PORTRANGEHIGH 65535 -#endif /* ISC_NET_PORTRANGEHIGH */ - -static isc_once_t once = ISC_ONCE_INIT; -static isc_once_t once_ipv6only = ISC_ONCE_INIT; -static isc_once_t once_ipv6pktinfo = ISC_ONCE_INIT; -static isc_result_t ipv4_result = ISC_R_NOTFOUND; -static isc_result_t ipv6_result = ISC_R_NOTFOUND; -static isc_result_t ipv6only_result = ISC_R_NOTFOUND; -static isc_result_t ipv6pktinfo_result = ISC_R_NOTFOUND; - -void -InitSockets(void); - -static isc_result_t -try_proto(int domain) { - SOCKET s; - char strbuf[ISC_STRERRORSIZE]; - int errval; - - s = socket(domain, SOCK_STREAM, IPPROTO_TCP); - if (s == INVALID_SOCKET) { - errval = WSAGetLastError(); - switch (errval) { - case WSAEAFNOSUPPORT: - case WSAEPROTONOSUPPORT: - case WSAEINVAL: - return (ISC_R_NOTFOUND); - default: - strerror_r(errval, strbuf, sizeof(strbuf)); - UNEXPECTED_ERROR(__FILE__, __LINE__, - "socket() failed: %s", strbuf); - return (ISC_R_UNEXPECTED); - } - } - - closesocket(s); - - return (ISC_R_SUCCESS); -} - -static void -initialize_action(void) { - InitSockets(); - ipv4_result = try_proto(PF_INET); - ipv6_result = try_proto(PF_INET6); -} - -static void -initialize(void) { - RUNTIME_CHECK(isc_once_do(&once, initialize_action) == ISC_R_SUCCESS); -} - -isc_result_t -isc_net_probeipv4(void) { - initialize(); - return (ipv4_result); -} - -isc_result_t -isc_net_probeipv6(void) { - initialize(); - return (ipv6_result); -} - -isc_result_t -isc_net_probeunix(void) { - return (ISC_R_NOTFOUND); -} - -static void -try_ipv6only(void) { -#ifdef IPV6_V6ONLY - SOCKET s; - int on; - char strbuf[ISC_STRERRORSIZE]; -#endif /* ifdef IPV6_V6ONLY */ - isc_result_t result; - - result = isc_net_probeipv6(); - if (result != ISC_R_SUCCESS) { - ipv6only_result = result; - return; - } - -#ifndef IPV6_V6ONLY - ipv6only_result = ISC_R_NOTFOUND; - return; -#else /* ifndef IPV6_V6ONLY */ - /* check for TCP sockets */ - s = socket(PF_INET6, SOCK_STREAM, 0); - if (s == INVALID_SOCKET) { - strerror_r(errno, strbuf, sizeof(strbuf)); - UNEXPECTED_ERROR(__FILE__, __LINE__, "socket() failed: %s", - strbuf); - ipv6only_result = ISC_R_UNEXPECTED; - return; - } - - on = 1; - if (setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY, (const char *)&on, - sizeof(on)) < 0) { - ipv6only_result = ISC_R_NOTFOUND; - goto close; - } - - closesocket(s); - - /* check for UDP sockets */ - s = socket(PF_INET6, SOCK_DGRAM, 0); - if (s == INVALID_SOCKET) { - strerror_r(errno, strbuf, sizeof(strbuf)); - UNEXPECTED_ERROR(__FILE__, __LINE__, "socket() failed: %s", - strbuf); - ipv6only_result = ISC_R_UNEXPECTED; - return; - } - - on = 1; - if (setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY, (const char *)&on, - sizeof(on)) < 0) { - ipv6only_result = ISC_R_NOTFOUND; - goto close; - } - - ipv6only_result = ISC_R_SUCCESS; - -close: - closesocket(s); - return; -#endif /* IPV6_V6ONLY */ -} - -static void -initialize_ipv6only(void) { - RUNTIME_CHECK(isc_once_do(&once_ipv6only, try_ipv6only) == - ISC_R_SUCCESS); -} - -#ifdef __notyet__ -/* - * XXXMPA requires win32/socket.c to be updated to support - * WSASendMsg and WSARecvMsg which are themselves Winsock - * and compiler version dependent. - */ -static void -try_ipv6pktinfo(void) { - SOCKET s; - int on; - char strbuf[ISC_STRERRORSIZE]; - isc_result_t result; - int optname; - - result = isc_net_probeipv6(); - if (result != ISC_R_SUCCESS) { - ipv6pktinfo_result = result; - return; - } - - /* we only use this for UDP sockets */ - s = socket(PF_INET6, SOCK_DGRAM, IPPROTO_UDP); - if (s == INVALID_SOCKET) { - strerror_r(errno, strbuf, sizeof(strbuf)); - UNEXPECTED_ERROR(__FILE__, __LINE__, "socket() failed: %s", - strbuf); - ipv6pktinfo_result = ISC_R_UNEXPECTED; - return; - } - -#ifdef IPV6_RECVPKTINFO - optname = IPV6_RECVPKTINFO; -#else /* ifdef IPV6_RECVPKTINFO */ - optname = IPV6_PKTINFO; -#endif /* ifdef IPV6_RECVPKTINFO */ - on = 1; - if (setsockopt(s, IPPROTO_IPV6, optname, (const char *)&on, - sizeof(on)) < 0) { - ipv6pktinfo_result = ISC_R_NOTFOUND; - goto close; - } - - ipv6pktinfo_result = ISC_R_SUCCESS; - -close: - closesocket(s); - return; -} - -static void -initialize_ipv6pktinfo(void) { - RUNTIME_CHECK(isc_once_do(&once_ipv6pktinfo, try_ipv6pktinfo) == - ISC_R_SUCCESS); -} -#endif /* __notyet__ */ - -isc_result_t -isc_net_probe_ipv6only(void) { - initialize_ipv6only(); - return (ipv6only_result); -} - -isc_result_t -isc_net_probe_ipv6pktinfo(void) { -#ifdef __notyet__ - initialize_ipv6pktinfo(); -#endif /* __notyet__ */ - return (ipv6pktinfo_result); -} - -isc_result_t -isc_net_getudpportrange(int af, in_port_t *low, in_port_t *high) { - int result = ISC_R_FAILURE; - - REQUIRE(low != NULL && high != NULL); - - UNUSED(af); - - if (result != ISC_R_SUCCESS) { - *low = ISC_NET_PORTRANGELOW; - *high = ISC_NET_PORTRANGEHIGH; - } - - return (ISC_R_SUCCESS); /* we currently never fail in this function */ -} - -void -isc_net_disableipv4(void) { - initialize(); - if (ipv4_result == ISC_R_SUCCESS) { - ipv4_result = ISC_R_DISABLED; - } -} - -void -isc_net_disableipv6(void) { - initialize(); - if (ipv6_result == ISC_R_SUCCESS) { - ipv6_result = ISC_R_DISABLED; - } -} - -void -isc_net_enableipv4(void) { - initialize(); - if (ipv4_result == ISC_R_DISABLED) { - ipv4_result = ISC_R_SUCCESS; - } -} - -void -isc_net_enableipv6(void) { - initialize(); - if (ipv6_result == ISC_R_DISABLED) { - ipv6_result = ISC_R_SUCCESS; - } -} - -unsigned int -isc_net_probedscp(void) { - return (0); -} diff --git a/lib/isc/win32/netdb.h b/lib/isc/win32/netdb.h deleted file mode 100644 index 3f6997539e..0000000000 --- a/lib/isc/win32/netdb.h +++ /dev/null @@ -1,180 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#ifndef NETDB_H -#define NETDB_H 1 - -#include -#include - -/* - * Define if does not declare struct addrinfo. - */ - -#if _MSC_VER < 1600 -struct addrinfo { - int ai_flags; /* AI_PASSIVE, AI_CANONNAME */ - int ai_family; /* PF_xxx */ - int ai_socktype; /* SOCK_xxx */ - int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and - * IPv6 */ - size_t ai_addrlen; /* Length of ai_addr */ - char *ai_canonname; /* Canonical name for hostname */ - struct sockaddr *ai_addr; /* Binary address */ - struct addrinfo *ai_next; /* Next structure in linked list */ -}; -#endif /* if _MSC_VER < 1600 */ - -/* - * Undefine all \#defines we are interested in as may or may not have - * defined them. - */ - -/* - * Error return codes from gethostbyname() and gethostbyaddr() - * (left in extern int h_errno). - */ - -#undef NETDB_INTERNAL -#undef NETDB_SUCCESS -#undef HOST_NOT_FOUND -#undef TRY_AGAIN -#undef NO_RECOVERY -#undef NO_DATA -#undef NO_ADDRESS - -#define NETDB_INTERNAL -1 /* see errno */ -#define NETDB_SUCCESS 0 /* no problem */ -#define HOST_NOT_FOUND 1 /* Authoritative Answer Host not found */ -#define TRY_AGAIN 2 /* Non-Authoritative Host not found, or SERVERFAIL */ -#define NO_RECOVERY 3 /* Non recoverable errors, FORMERR, REFUSED, NOTIMP */ -#define NO_DATA 4 /* Valid name, no data record of requested type */ -#define NO_ADDRESS NO_DATA /* no address, look for MX record */ - -/* - * Error return codes from getaddrinfo() - */ - -#undef EAI_ADDRFAMILY -#undef EAI_AGAIN -#undef EAI_BADFLAGS -#undef EAI_FAIL -#undef EAI_FAMILY -#undef EAI_MEMORY -#undef EAI_NODATA -#undef EAI_NONAME -#undef EAI_SERVICE -#undef EAI_SOCKTYPE -#undef EAI_SYSTEM -#undef EAI_BADHINTS -#undef EAI_PROTOCOL -#undef EAI_MAX - -#define EAI_ADDRFAMILY 1 /* address family for hostname not supported */ -#define EAI_AGAIN 2 /* temporary failure in name resolution */ -#define EAI_BADFLAGS 3 /* invalid value for ai_flags */ -#define EAI_FAIL 4 /* non-recoverable failure in name resolution */ -#define EAI_FAMILY 5 /* ai_family not supported */ -#define EAI_MEMORY 6 /* memory allocation failure */ -#define EAI_NODATA 7 /* no address associated with hostname */ -#define EAI_NONAME 8 /* hostname nor servname provided, or not known */ -#define EAI_SERVICE 9 /* servname not supported for ai_socktype */ -#define EAI_SOCKTYPE 10 /* ai_socktype not supported */ -#define EAI_SYSTEM 11 /* system error returned in errno */ -#define EAI_BADHINTS 12 -#define EAI_PROTOCOL 13 -#define EAI_MAX 14 - -/* - * Flag values for getaddrinfo() - */ -#undef AI_PASSIVE -#undef AI_CANONNAME -#undef AI_NUMERICHOST - -#define AI_PASSIVE 0x00000001 -#define AI_CANONNAME 0x00000002 -#define AI_NUMERICHOST 0x00000004 - -/* - * Flag values for getipnodebyname() - */ -#undef AI_V4MAPPED -#undef AI_ALL -#undef AI_ADDRCONFIG -#undef AI_DEFAULT - -#define AI_V4MAPPED 0x00000008 -#define AI_ALL 0x00000010 -#define AI_ADDRCONFIG 0x00000020 -#define AI_DEFAULT (AI_V4MAPPED | AI_ADDRCONFIG) - -/* - * Constants for getnameinfo() - */ -#undef NI_MAXHOST -#undef NI_MAXSERV - -#define NI_MAXHOST 1025 -#define NI_MAXSERV 32 - -/* - * Flag values for getnameinfo() - */ -#undef NI_NOFQDN -#undef NI_NUMERICHOST -#undef NI_NAMEREQD -#undef NI_NUMERICSERV -#undef NI_DGRAM -#undef NI_NUMERICSCOPE - -#define NI_NOFQDN 0x00000001 -#define NI_NUMERICHOST 0x00000002 -#define NI_NAMEREQD 0x00000004 -#define NI_NUMERICSERV 0x00000008 -#define NI_DGRAM 0x00000010 -#define NI_NUMERICSCOPE 0x00000020 /*2553bis-00*/ - -/* - * Structures for getrrsetbyname() - */ -struct rdatainfo { - unsigned int rdi_length; - unsigned char *rdi_data; -}; - -struct rrsetinfo { - unsigned int rri_flags; - int rri_rdclass; - int rri_rdtype; - unsigned int rri_ttl; - unsigned int rri_nrdatas; - unsigned int rri_nsigs; - char *rri_name; - struct rdatainfo *rri_rdatas; - struct rdatainfo *rri_sigs; -}; - -/* - * Flags for getrrsetbyname() - */ -#define RRSET_VALIDATED 0x00000001 -/* Set was dnssec validated */ - -/* - * Return codes for getrrsetbyname() - */ -#define ERRSET_SUCCESS 0 -#define ERRSET_NOMEMORY 1 -#define ERRSET_FAIL 2 -#define ERRSET_INVAL 3 - -#endif /* NETDB_H */ diff --git a/lib/isc/win32/ntgroups.c b/lib/isc/win32/ntgroups.c deleted file mode 100644 index 7b605849f6..0000000000 --- a/lib/isc/win32/ntgroups.c +++ /dev/null @@ -1,211 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/* - * The NT Groups have two groups that are not well documented and are - * not normally seen: None and Everyone. A user account belongs to - * any number of groups, but if it is not a member of any group then - * it is a member of the None Group. The None group is not listed - * anywhere. You cannot remove an account from the none group except - * by making it a member of some other group, The second group is the - * Everyone group. All accounts, no matter how many groups that they - * belong to, also belong to the Everyone group. You cannot remove an - * account from the Everyone group. - */ - -#ifndef UNICODE -#define UNICODE -#endif /* UNICODE */ - -/* - * Silence warnings. - */ -#define _CRT_SECURE_NO_DEPRECATE 1 - -/* clang-format off */ -#include -#include -#include -/* clang-format on */ - -#include -#include - -#define MAX_NAME_LENGTH 256 - -#define CHECK(op) \ - do { \ - result = (op); \ - if (result != ISC_R_SUCCESS) { \ - goto cleanup; \ - } \ - } while (0) - -isc_result_t -isc_ntsecurity_getaccountgroups(char *username, char **GroupList, - unsigned int maxgroups, - unsigned int *totalGroups) { - LPGROUP_USERS_INFO_0 pTmpBuf; - LPLOCALGROUP_USERS_INFO_0 pTmpLBuf; - DWORD i; - LPLOCALGROUP_USERS_INFO_0 pBuf = NULL; - LPGROUP_USERS_INFO_0 pgrpBuf = NULL; - DWORD dwLevel = 0; - DWORD dwFlags = LG_INCLUDE_INDIRECT; - DWORD dwPrefMaxLen = MAX_PREFERRED_LENGTH; - DWORD dwEntriesRead = 0; - DWORD dwTotalEntries = 0; - NET_API_STATUS nStatus; - size_t retlen; - wchar_t user[MAX_NAME_LENGTH]; - isc_result_t result; - - *totalGroups = 0; - - retlen = mbstowcs(user, username, MAX_NAME_LENGTH); - if (retlen == (size_t)(-1)) { - return (ISC_R_FAILURE); - } - - /* - * Call the NetUserGetLocalGroups function - * specifying information level 0. - * - * The LG_INCLUDE_INDIRECT flag specifies that the - * function should also return the names of the local - * groups in which the user is indirectly a member. - */ - nStatus = NetUserGetLocalGroups(NULL, user, dwLevel, dwFlags, - (LPBYTE *)&pBuf, dwPrefMaxLen, - &dwEntriesRead, &dwTotalEntries); - /* - * See if the call succeeds, - */ - if (nStatus != NERR_Success) { - if (nStatus == ERROR_ACCESS_DENIED) { - return (ISC_R_NOPERM); - } - if (nStatus == ERROR_MORE_DATA) { - return (ISC_R_NOSPACE); - } - if (nStatus == NERR_UserNotFound) { - dwEntriesRead = 0; - } - } - - if (pBuf != NULL) { - pTmpLBuf = pBuf; - /* - * Loop through the entries - */ - for (i = 0; (i < dwEntriesRead && *totalGroups < maxgroups); - i++) { - assert(pTmpLBuf != NULL); - if (pTmpLBuf == NULL) { - break; - } - retlen = wcslen(pTmpLBuf->lgrui0_name); - GroupList[*totalGroups] = (char *)malloc(retlen + 1); - if (GroupList[*totalGroups] == NULL) { - CHECK(ISC_R_NOMEMORY); - } - - retlen = wcstombs(GroupList[*totalGroups], - pTmpLBuf->lgrui0_name, retlen); - if (retlen == (size_t)(-1)) { - free(GroupList[*totalGroups]); - CHECK(ISC_R_FAILURE); - } - GroupList[*totalGroups][retlen] = '\0'; - if (strcmp(GroupList[*totalGroups], "None") == 0) { - free(GroupList[*totalGroups]); - } else { - (*totalGroups)++; - } - pTmpLBuf++; - } - } - /* Free the allocated memory. */ - /* cppcheck-suppress duplicateCondition */ - if (pBuf != NULL) { - NetApiBufferFree(pBuf); - } - - /* - * Call the NetUserGetGroups function, specifying level 0. - */ - nStatus = NetUserGetGroups(NULL, user, dwLevel, (LPBYTE *)&pgrpBuf, - dwPrefMaxLen, &dwEntriesRead, - &dwTotalEntries); - /* - * See if the call succeeds, - */ - if (nStatus != NERR_Success) { - if (nStatus == ERROR_ACCESS_DENIED) { - return (ISC_R_NOPERM); - } - if (nStatus == ERROR_MORE_DATA) { - return (ISC_R_NOSPACE); - } - if (nStatus == NERR_UserNotFound) { - dwEntriesRead = 0; - } - } - - if (pgrpBuf != NULL) { - pTmpBuf = pgrpBuf; - /* - * Loop through the entries - */ - for (i = 0; (i < dwEntriesRead && *totalGroups < maxgroups); - i++) { - assert(pTmpBuf != NULL); - - if (pTmpBuf == NULL) { - break; - } - retlen = wcslen(pTmpBuf->grui0_name); - GroupList[*totalGroups] = (char *)malloc(retlen + 1); - if (GroupList[*totalGroups] == NULL) { - CHECK(ISC_R_NOMEMORY); - } - - retlen = wcstombs(GroupList[*totalGroups], - pTmpBuf->grui0_name, retlen); - if (retlen == (size_t)(-1)) { - free(GroupList[*totalGroups]); - CHECK(ISC_R_FAILURE); - } - GroupList[*totalGroups][retlen] = '\0'; - if (strcmp(GroupList[*totalGroups], "None") == 0) { - free(GroupList[*totalGroups]); - } else { - (*totalGroups)++; - } - pTmpBuf++; - } - } - /* - * Free the allocated memory. - */ - /* cppcheck-suppress duplicateCondition */ - if (pgrpBuf != NULL) { - NetApiBufferFree(pgrpBuf); - } - - return (ISC_R_SUCCESS); - -cleanup: - while (--(*totalGroups) > 0) { - free(GroupList[*totalGroups]); - } - return (result); -} diff --git a/lib/isc/win32/ntpaths.c b/lib/isc/win32/ntpaths.c deleted file mode 100644 index a68d59f160..0000000000 --- a/lib/isc/win32/ntpaths.c +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/* - * This module fetches the required path information that is specific - * to NT systems which can have its configuration and system files - * almost anywhere. It can be used to override whatever the application - * had previously assigned to the pointer. Basic information about the - * file locations are stored in the registry. - */ - -#include -#include -#include - -/* - * Module Variables - */ - -static char systemDir[MAX_PATH]; -static char namedBase[MAX_PATH]; -static char ns_confFile[MAX_PATH]; -static char rndc_confFile[MAX_PATH]; -static char ns_defaultpidfile[MAX_PATH]; -static char ns_lockfile[MAX_PATH]; -static char local_state_dir[MAX_PATH]; -static char sys_conf_dir[MAX_PATH]; -static char rndc_keyFile[MAX_PATH]; -static char session_keyFile[MAX_PATH]; -static char resolv_confFile[MAX_PATH]; -static char bind_keysFile[MAX_PATH]; - -static DWORD baseLen = MAX_PATH; -static BOOL Initialized = FALSE; - -void -isc_ntpaths_init(void) { - HKEY hKey; - BOOL keyFound = TRUE; - - memset(namedBase, 0, sizeof(namedBase)); - if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, BIND_SUBKEY, 0, KEY_READ, &hKey) != - ERROR_SUCCESS) - { - keyFound = FALSE; - } - - if (keyFound == TRUE) { - /* Get the named directory */ - if (RegQueryValueEx(hKey, "InstallDir", NULL, NULL, - (LPBYTE)namedBase, - &baseLen) != ERROR_SUCCESS) - { - keyFound = FALSE; - } - RegCloseKey(hKey); - } - - GetSystemDirectory(systemDir, MAX_PATH); - - if (keyFound == FALSE) { - /* Use the System Directory as a default */ - strlcpy(namedBase, systemDir, sizeof(namedBase)); - } - - strlcpy(ns_confFile, namedBase, sizeof(ns_confFile)); - strlcat(ns_confFile, "\\etc\\named.conf", sizeof(ns_confFile)); - - strlcpy(rndc_keyFile, namedBase, sizeof(rndc_keyFile)); - strlcat(rndc_keyFile, "\\etc\\rndc.key", sizeof(rndc_keyFile)); - - strlcpy(session_keyFile, namedBase, sizeof(session_keyFile)); - strlcat(session_keyFile, "\\etc\\session.key", sizeof(session_keyFile)); - - strlcpy(rndc_confFile, namedBase, sizeof(rndc_confFile)); - strlcat(rndc_confFile, "\\etc\\rndc.conf", sizeof(rndc_confFile)); - - strlcpy(ns_defaultpidfile, namedBase, sizeof(ns_defaultpidfile)); - strlcat(ns_defaultpidfile, "\\etc\\named.pid", - sizeof(ns_defaultpidfile)); - - strlcpy(ns_lockfile, namedBase, sizeof(ns_lockfile)); - strlcat(ns_lockfile, "\\etc\\named.lock", sizeof(ns_lockfile)); - - strlcpy(local_state_dir, namedBase, sizeof(local_state_dir)); - strlcat(local_state_dir, "\\bin", sizeof(local_state_dir)); - - strlcpy(sys_conf_dir, namedBase, sizeof(sys_conf_dir)); - strlcat(sys_conf_dir, "\\etc", sizeof(sys_conf_dir)); - - /* Added to avoid an assert on NULL value */ - strlcpy(resolv_confFile, namedBase, sizeof(resolv_confFile)); - strlcat(resolv_confFile, "\\etc\\resolv.conf", sizeof(resolv_confFile)); - - strlcpy(bind_keysFile, namedBase, sizeof(bind_keysFile)); - strlcat(bind_keysFile, "\\etc\\bind.keys", sizeof(bind_keysFile)); - - Initialized = TRUE; -} - -char * -isc_ntpaths_get(int ind) { - if (!Initialized) { - isc_ntpaths_init(); - } - - switch (ind) { - case NAMED_CONF_PATH: - return (ns_confFile); - break; - case RESOLV_CONF_PATH: - return (resolv_confFile); - break; - case RNDC_CONF_PATH: - return (rndc_confFile); - break; - case NAMED_PID_PATH: - return (ns_defaultpidfile); - break; - case NAMED_LOCK_PATH: - return (ns_lockfile); - break; - case LOCAL_STATE_DIR: - return (local_state_dir); - break; - case SYS_CONF_DIR: - return (sys_conf_dir); - break; - case RNDC_KEY_PATH: - return (rndc_keyFile); - break; - case SESSION_KEY_PATH: - return (session_keyFile); - break; - case BIND_KEYS_PATH: - return (bind_keysFile); - break; - default: - return (NULL); - } -} diff --git a/lib/isc/win32/once.c b/lib/isc/win32/once.c deleted file mode 100644 index 6e7f410204..0000000000 --- a/lib/isc/win32/once.c +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#include - -#include -#include -#include - -isc_result_t -isc_once_do(isc_once_t *controller, void (*function)(void)) { - REQUIRE(controller != NULL && function != NULL); - - if (controller->status == ISC_ONCE_INIT_NEEDED) { - if (InterlockedDecrement(&controller->counter) == 0) { - if (controller->status == ISC_ONCE_INIT_NEEDED) { - function(); - controller->status = ISC_ONCE_INIT_DONE; - } - } else { - while (controller->status == ISC_ONCE_INIT_NEEDED) { - /* - * Sleep(0) indicates that this thread - * should be suspended to allow other - * waiting threads to execute. - */ - Sleep(0); - } - } - } - - return (ISC_R_SUCCESS); -} diff --git a/lib/isc/win32/os.c b/lib/isc/win32/os.c deleted file mode 100644 index e865fa69b3..0000000000 --- a/lib/isc/win32/os.c +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#include - -#include - -static BOOL bInit = FALSE; -static SYSTEM_INFO SystemInfo; - -static void -initialize_action(void) { - if (bInit) { - return; - } - - GetSystemInfo(&SystemInfo); - bInit = TRUE; -} - -unsigned int -isc_os_ncpus(void) { - long ncpus; - initialize_action(); - ncpus = SystemInfo.dwNumberOfProcessors; - if (ncpus <= 0) { - ncpus = 1; - } - - return ((unsigned int)ncpus); -} diff --git a/lib/isc/win32/pk11_api.c b/lib/isc/win32/pk11_api.c deleted file mode 100644 index ff44905e6d..0000000000 --- a/lib/isc/win32/pk11_api.c +++ /dev/null @@ -1,704 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/*! \file */ - -/* missing code for WIN32 */ - -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -char * -getpass(const char *prompt) { - static char buf[128]; - HANDLE h; - DWORD cc, mode; - int cnt; - - h = GetStdHandle(STD_INPUT_HANDLE); - fprintf(stderr, "%s", prompt); - fflush(stderr); - fflush(stdout); - FlushConsoleInputBuffer(h); - GetConsoleMode(h, &mode); - SetConsoleMode(h, ENABLE_PROCESSED_INPUT); - - for (cnt = 0; cnt < sizeof(buf) - 1; cnt++) { - ReadFile(h, buf + cnt, 1, &cc, NULL); - if (buf[cnt] == '\r') { - break; - } - fputc('*', stdout); - fflush(stderr); - fflush(stdout); - } - - SetConsoleMode(h, mode); - buf[cnt] = '\0'; - fprintf(stderr, "\n"); - return (buf); -} - -/* load PKCS11 DLL */ - -static HINSTANCE hPK11 = NULL; -static char loaderrmsg[1024]; - -CK_RV -pkcs_C_Initialize(CK_VOID_PTR pReserved) { - CK_C_Initialize sym; - const char *lib_name = pk11_get_lib_name(); - - if (hPK11 != NULL) { - return (CKR_LIBRARY_ALREADY_INITIALIZED); - } - - if (lib_name == NULL) { - return (CKR_LIBRARY_FAILED_TO_LOAD); - } - /* Visual Studio conversion issue... */ - if (*lib_name == ' ') { - lib_name++; - } - - hPK11 = LoadLibraryA(lib_name); - - if (hPK11 == NULL) { - const DWORD err = GetLastError(); - snprintf(loaderrmsg, sizeof(loaderrmsg), - "LoadLibraryA(\"%s\") failed with 0x%X\n", lib_name, - err); - return (CKR_LIBRARY_FAILED_TO_LOAD); - } - sym = (CK_C_Initialize)GetProcAddress(hPK11, "C_Initialize"); - if (sym == NULL) { - return (CKR_SYMBOL_RESOLUTION_FAILED); - } - return ((*sym)(pReserved)); -} - -char * -pk11_get_load_error_message(void) { - return (loaderrmsg); -} - -CK_RV -pkcs_C_Finalize(CK_VOID_PTR pReserved) { - CK_C_Finalize sym; - CK_RV rv; - - if (hPK11 == NULL) { - return (CKR_LIBRARY_FAILED_TO_LOAD); - } - sym = (CK_C_Finalize)GetProcAddress(hPK11, "C_Finalize"); - if (sym == NULL) { - return (CKR_SYMBOL_RESOLUTION_FAILED); - } - rv = (*sym)(pReserved); - if ((rv == CKR_OK) && (FreeLibrary(hPK11) == 0)) { - return (CKR_LIBRARY_FAILED_TO_LOAD); - } - hPK11 = NULL; - return (rv); -} - -CK_RV -pkcs_C_GetSlotList(CK_BBOOL tokenPresent, CK_SLOT_ID_PTR pSlotList, - CK_ULONG_PTR pulCount) { - static CK_C_GetSlotList sym = NULL; - - if (hPK11 == NULL) { - return (CKR_LIBRARY_FAILED_TO_LOAD); - } - if (sym == NULL) { - sym = (CK_C_GetSlotList)GetProcAddress(hPK11, "C_GetSlotList"); - } - if (sym == NULL) { - return (CKR_SYMBOL_RESOLUTION_FAILED); - } - return ((*sym)(tokenPresent, pSlotList, pulCount)); -} - -CK_RV -pkcs_C_GetTokenInfo(CK_SLOT_ID slotID, CK_TOKEN_INFO_PTR pInfo) { - static CK_C_GetTokenInfo sym = NULL; - - if (hPK11 == NULL) { - return (CKR_LIBRARY_FAILED_TO_LOAD); - } - if (sym == NULL) { - sym = (CK_C_GetTokenInfo)GetProcAddress(hPK11, "C_" - "GetTokenInfo"); - } - if (sym == NULL) { - return (CKR_SYMBOL_RESOLUTION_FAILED); - } - return ((*sym)(slotID, pInfo)); -} - -CK_RV -pkcs_C_GetMechanismInfo(CK_SLOT_ID slotID, CK_MECHANISM_TYPE type, - CK_MECHANISM_INFO_PTR pInfo) { - static CK_C_GetMechanismInfo sym = NULL; - - if (hPK11 == NULL) { - return (CKR_LIBRARY_FAILED_TO_LOAD); - } - if (sym == NULL) { - sym = (CK_C_GetMechanismInfo)GetProcAddress(hPK11, "C_" - "GetMechanis" - "mInfo"); - } - if (sym == NULL) { - return (CKR_SYMBOL_RESOLUTION_FAILED); - } - return ((*sym)(slotID, type, pInfo)); -} - -CK_RV -pkcs_C_OpenSession(CK_SLOT_ID slotID, CK_FLAGS flags, CK_VOID_PTR pApplication, - CK_RV (*Notify)(CK_SESSION_HANDLE hSession, - CK_NOTIFICATION event, - CK_VOID_PTR pApplication), - CK_SESSION_HANDLE_PTR phSession) { - static CK_C_OpenSession sym = NULL; - - if (hPK11 == NULL) { - hPK11 = LoadLibraryA(pk11_get_lib_name()); - } - if (hPK11 == NULL) { - const DWORD err = GetLastError(); - snprintf(loaderrmsg, sizeof(loaderrmsg), - "LoadLibraryA(\"%s\") failed with 0x%X\n", - pk11_get_lib_name(), err); - return (CKR_LIBRARY_FAILED_TO_LOAD); - } - if (sym == NULL) { - sym = (CK_C_OpenSession)GetProcAddress(hPK11, "C_OpenSession"); - } - if (sym == NULL) { - return (CKR_SYMBOL_RESOLUTION_FAILED); - } - return ((*sym)(slotID, flags, pApplication, Notify, phSession)); -} - -CK_RV -pkcs_C_CloseSession(CK_SESSION_HANDLE hSession) { - static CK_C_CloseSession sym = NULL; - - if (hPK11 == NULL) { - return (CKR_LIBRARY_FAILED_TO_LOAD); - } - if (sym == NULL) { - sym = (CK_C_CloseSession)GetProcAddress(hPK11, "C_" - "CloseSession"); - } - if (sym == NULL) { - return (CKR_SYMBOL_RESOLUTION_FAILED); - } - return ((*sym)(hSession)); -} - -CK_RV -pkcs_C_Login(CK_SESSION_HANDLE hSession, CK_USER_TYPE userType, - CK_CHAR_PTR pPin, CK_ULONG usPinLen) { - static CK_C_Login sym = NULL; - - if (hPK11 == NULL) { - return (CKR_LIBRARY_FAILED_TO_LOAD); - } - if (sym == NULL) { - sym = (CK_C_Login)GetProcAddress(hPK11, "C_Login"); - } - if (sym == NULL) { - return (CKR_SYMBOL_RESOLUTION_FAILED); - } - return ((*sym)(hSession, userType, pPin, usPinLen)); -} - -CK_RV -pkcs_C_Logout(CK_SESSION_HANDLE hSession) { - static CK_C_Logout sym = NULL; - - if (hPK11 == NULL) { - return (CKR_LIBRARY_FAILED_TO_LOAD); - } - if (sym == NULL) { - sym = (CK_C_Logout)GetProcAddress(hPK11, "C_Logout"); - } - if (sym == NULL) { - return (CKR_SYMBOL_RESOLUTION_FAILED); - } - return ((*sym)(hSession)); -} - -CK_RV -pkcs_C_CreateObject(CK_SESSION_HANDLE hSession, CK_ATTRIBUTE_PTR pTemplate, - CK_ULONG usCount, CK_OBJECT_HANDLE_PTR phObject) { - static CK_C_CreateObject sym = NULL; - - if (hPK11 == NULL) { - return (CKR_LIBRARY_FAILED_TO_LOAD); - } - if (sym == NULL) { - sym = (CK_C_CreateObject)GetProcAddress(hPK11, "C_" - "CreateObject"); - } - if (sym == NULL) { - return (CKR_SYMBOL_RESOLUTION_FAILED); - } - return ((*sym)(hSession, pTemplate, usCount, phObject)); -} - -CK_RV -pkcs_C_DestroyObject(CK_SESSION_HANDLE hSession, CK_OBJECT_HANDLE hObject) { - static CK_C_DestroyObject sym = NULL; - - if (hPK11 == NULL) { - return (CKR_LIBRARY_FAILED_TO_LOAD); - } - if (sym == NULL) { - sym = (CK_C_DestroyObject)GetProcAddress(hPK11, "C_" - "DestroyObjec" - "t"); - } - if (sym == NULL) { - return (CKR_SYMBOL_RESOLUTION_FAILED); - } - return ((*sym)(hSession, hObject)); -} - -CK_RV -pkcs_C_GetAttributeValue(CK_SESSION_HANDLE hSession, CK_OBJECT_HANDLE hObject, - CK_ATTRIBUTE_PTR pTemplate, CK_ULONG usCount) { - static CK_C_GetAttributeValue sym = NULL; - - if (hPK11 == NULL) { - return (CKR_LIBRARY_FAILED_TO_LOAD); - } - if (sym == NULL) { - sym = (CK_C_GetAttributeValue)GetProcAddress(hPK11, "C_" - "GetAttribu" - "teValue"); - } - if (sym == NULL) { - return (CKR_SYMBOL_RESOLUTION_FAILED); - } - return ((*sym)(hSession, hObject, pTemplate, usCount)); -} - -CK_RV -pkcs_C_SetAttributeValue(CK_SESSION_HANDLE hSession, CK_OBJECT_HANDLE hObject, - CK_ATTRIBUTE_PTR pTemplate, CK_ULONG usCount) { - static CK_C_SetAttributeValue sym = NULL; - - if (hPK11 == NULL) { - return (CKR_LIBRARY_FAILED_TO_LOAD); - } - if (sym == NULL) { - sym = (CK_C_SetAttributeValue)GetProcAddress(hPK11, "C_" - "SetAttribu" - "teValue"); - } - if (sym == NULL) { - return (CKR_SYMBOL_RESOLUTION_FAILED); - } - return ((*sym)(hSession, hObject, pTemplate, usCount)); -} - -CK_RV -pkcs_C_FindObjectsInit(CK_SESSION_HANDLE hSession, CK_ATTRIBUTE_PTR pTemplate, - CK_ULONG usCount) { - static CK_C_FindObjectsInit sym = NULL; - - if (hPK11 == NULL) { - return (CKR_LIBRARY_FAILED_TO_LOAD); - } - if (sym == NULL) { - sym = (CK_C_FindObjectsInit)GetProcAddress(hPK11, "C_" - "FindObjectsI" - "nit"); - } - if (sym == NULL) { - return (CKR_SYMBOL_RESOLUTION_FAILED); - } - return ((*sym)(hSession, pTemplate, usCount)); -} - -CK_RV -pkcs_C_FindObjects(CK_SESSION_HANDLE hSession, CK_OBJECT_HANDLE_PTR phObject, - CK_ULONG usMaxObjectCount, CK_ULONG_PTR pusObjectCount) { - static CK_C_FindObjects sym = NULL; - - if (hPK11 == NULL) { - return (CKR_LIBRARY_FAILED_TO_LOAD); - } - if (sym == NULL) { - sym = (CK_C_FindObjects)GetProcAddress(hPK11, "C_FindObjects"); - } - if (sym == NULL) { - return (CKR_SYMBOL_RESOLUTION_FAILED); - } - return ((*sym)(hSession, phObject, usMaxObjectCount, pusObjectCount)); -} - -CK_RV -pkcs_C_FindObjectsFinal(CK_SESSION_HANDLE hSession) { - static CK_C_FindObjectsFinal sym = NULL; - - if (hPK11 == NULL) { - return (CKR_LIBRARY_FAILED_TO_LOAD); - } - if (sym == NULL) { - sym = (CK_C_FindObjectsFinal)GetProcAddress(hPK11, "C_" - "FindObjects" - "Final"); - } - if (sym == NULL) { - return (CKR_SYMBOL_RESOLUTION_FAILED); - } - return ((*sym)(hSession)); -} - -CK_RV -pkcs_C_EncryptInit(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism, - CK_OBJECT_HANDLE hKey) { - static CK_C_EncryptInit sym = NULL; - - if (hPK11 == NULL) { - return (CKR_LIBRARY_FAILED_TO_LOAD); - } - if (sym == NULL) { - sym = (CK_C_EncryptInit)GetProcAddress(hPK11, "C_EncryptInit"); - } - if (sym == NULL) { - return (CKR_SYMBOL_RESOLUTION_FAILED); - } - return ((*sym)(hSession, pMechanism, hKey)); -} - -CK_RV -pkcs_C_Encrypt(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pData, - CK_ULONG ulDataLen, CK_BYTE_PTR pEncryptedData, - CK_ULONG_PTR pulEncryptedDataLen) { - static CK_C_Encrypt sym = NULL; - - if (hPK11 == NULL) { - return (CKR_LIBRARY_FAILED_TO_LOAD); - } - if (sym == NULL) { - sym = (CK_C_Encrypt)GetProcAddress(hPK11, "C_Encrypt"); - } - if (sym == NULL) { - return (CKR_SYMBOL_RESOLUTION_FAILED); - } - return ((*sym)(hSession, pData, ulDataLen, pEncryptedData, - pulEncryptedDataLen)); -} - -CK_RV -pkcs_C_DigestInit(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism) { - static CK_C_DigestInit sym = NULL; - - if (hPK11 == NULL) { - return (CKR_LIBRARY_FAILED_TO_LOAD); - } - if (sym == NULL) { - sym = (CK_C_DigestInit)GetProcAddress(hPK11, "C_DigestInit"); - } - if (sym == NULL) { - return (CKR_SYMBOL_RESOLUTION_FAILED); - } - return ((*sym)(hSession, pMechanism)); -} - -CK_RV -pkcs_C_DigestUpdate(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pPart, - CK_ULONG ulPartLen) { - static CK_C_DigestUpdate sym = NULL; - - if (hPK11 == NULL) { - return (CKR_LIBRARY_FAILED_TO_LOAD); - } - if (sym == NULL) { - sym = (CK_C_DigestUpdate)GetProcAddress(hPK11, "C_" - "DigestUpdate"); - } - if (sym == NULL) { - return (CKR_SYMBOL_RESOLUTION_FAILED); - } - return ((*sym)(hSession, pPart, ulPartLen)); -} - -CK_RV -pkcs_C_DigestFinal(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pDigest, - CK_ULONG_PTR pulDigestLen) { - static CK_C_DigestFinal sym = NULL; - - if (hPK11 == NULL) { - return (CKR_LIBRARY_FAILED_TO_LOAD); - } - if (sym == NULL) { - sym = (CK_C_DigestFinal)GetProcAddress(hPK11, "C_DigestFinal"); - } - if (sym == NULL) { - return (CKR_SYMBOL_RESOLUTION_FAILED); - } - return ((*sym)(hSession, pDigest, pulDigestLen)); -} - -CK_RV -pkcs_C_SignInit(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism, - CK_OBJECT_HANDLE hKey) { - static CK_C_SignInit sym = NULL; - - if (hPK11 == NULL) { - return (CKR_LIBRARY_FAILED_TO_LOAD); - } - if (sym == NULL) { - sym = (CK_C_SignInit)GetProcAddress(hPK11, "C_SignInit"); - } - if (sym == NULL) { - return (CKR_SYMBOL_RESOLUTION_FAILED); - } - return ((*sym)(hSession, pMechanism, hKey)); -} - -CK_RV -pkcs_C_Sign(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pData, CK_ULONG ulDataLen, - CK_BYTE_PTR pSignature, CK_ULONG_PTR pulSignatureLen) { - static CK_C_Sign sym = NULL; - - if (hPK11 == NULL) { - return (CKR_LIBRARY_FAILED_TO_LOAD); - } - if (sym == NULL) { - sym = (CK_C_Sign)GetProcAddress(hPK11, "C_Sign"); - } - if (sym == NULL) { - return (CKR_SYMBOL_RESOLUTION_FAILED); - } - return ((*sym)(hSession, pData, ulDataLen, pSignature, - pulSignatureLen)); -} - -CK_RV -pkcs_C_SignUpdate(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pPart, - CK_ULONG ulPartLen) { - static CK_C_SignUpdate sym = NULL; - - if (hPK11 == NULL) { - return (CKR_LIBRARY_FAILED_TO_LOAD); - } - if (sym == NULL) { - sym = (CK_C_SignUpdate)GetProcAddress(hPK11, "C_SignUpdate"); - } - if (sym == NULL) { - return (CKR_SYMBOL_RESOLUTION_FAILED); - } - return ((*sym)(hSession, pPart, ulPartLen)); -} - -CK_RV -pkcs_C_SignFinal(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pSignature, - CK_ULONG_PTR pulSignatureLen) { - static CK_C_SignFinal sym = NULL; - - if (hPK11 == NULL) { - return (CKR_LIBRARY_FAILED_TO_LOAD); - } - if (sym == NULL) { - sym = (CK_C_SignFinal)GetProcAddress(hPK11, "C_SignFinal"); - } - if (sym == NULL) { - return (CKR_SYMBOL_RESOLUTION_FAILED); - } - return ((*sym)(hSession, pSignature, pulSignatureLen)); -} - -CK_RV -pkcs_C_VerifyInit(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism, - CK_OBJECT_HANDLE hKey) { - static CK_C_VerifyInit sym = NULL; - - if (hPK11 == NULL) { - return (CKR_LIBRARY_FAILED_TO_LOAD); - } - if (sym == NULL) { - sym = (CK_C_VerifyInit)GetProcAddress(hPK11, "C_VerifyInit"); - } - if (sym == NULL) { - return (CKR_SYMBOL_RESOLUTION_FAILED); - } - return ((*sym)(hSession, pMechanism, hKey)); -} - -CK_RV -pkcs_C_Verify(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pData, CK_ULONG ulDataLen, - CK_BYTE_PTR pSignature, CK_ULONG ulSignatureLen) { - static CK_C_Verify sym = NULL; - - if (hPK11 == NULL) { - return (CKR_LIBRARY_FAILED_TO_LOAD); - } - if (sym == NULL) { - sym = (CK_C_Verify)GetProcAddress(hPK11, "C_Verify"); - } - if (sym == NULL) { - return (CKR_SYMBOL_RESOLUTION_FAILED); - } - return ((*sym)(hSession, pData, ulDataLen, pSignature, ulSignatureLen)); -} - -CK_RV -pkcs_C_VerifyUpdate(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pPart, - CK_ULONG ulPartLen) { - static CK_C_VerifyUpdate sym = NULL; - - if (hPK11 == NULL) { - return (CKR_LIBRARY_FAILED_TO_LOAD); - } - if (sym == NULL) { - sym = (CK_C_VerifyUpdate)GetProcAddress(hPK11, "C_" - "VerifyUpdate"); - } - if (sym == NULL) { - return (CKR_SYMBOL_RESOLUTION_FAILED); - } - return ((*sym)(hSession, pPart, ulPartLen)); -} - -CK_RV -pkcs_C_VerifyFinal(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pSignature, - CK_ULONG ulSignatureLen) { - static CK_C_VerifyFinal sym = NULL; - - if (hPK11 == NULL) { - return (CKR_LIBRARY_FAILED_TO_LOAD); - } - if (sym == NULL) { - sym = (CK_C_VerifyFinal)GetProcAddress(hPK11, "C_VerifyFinal"); - } - if (sym == NULL) { - return (CKR_SYMBOL_RESOLUTION_FAILED); - } - return ((*sym)(hSession, pSignature, ulSignatureLen)); -} - -CK_RV -pkcs_C_GenerateKey(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism, - CK_ATTRIBUTE_PTR pTemplate, CK_ULONG ulCount, - CK_OBJECT_HANDLE_PTR phKey) { - static CK_C_GenerateKey sym = NULL; - - if (hPK11 == NULL) { - return (CKR_LIBRARY_FAILED_TO_LOAD); - } - if (sym == NULL) { - sym = (CK_C_GenerateKey)GetProcAddress(hPK11, "C_GenerateKey"); - } - if (sym == NULL) { - return (CKR_SYMBOL_RESOLUTION_FAILED); - } - return ((*sym)(hSession, pMechanism, pTemplate, ulCount, phKey)); -} - -CK_RV -pkcs_C_GenerateKeyPair(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism, - CK_ATTRIBUTE_PTR pPublicKeyTemplate, - CK_ULONG usPublicKeyAttributeCount, - CK_ATTRIBUTE_PTR pPrivateKeyTemplate, - CK_ULONG usPrivateKeyAttributeCount, - CK_OBJECT_HANDLE_PTR phPrivateKey, - CK_OBJECT_HANDLE_PTR phPublicKey) { - static CK_C_GenerateKeyPair sym = NULL; - - if (hPK11 == NULL) { - return (CKR_LIBRARY_FAILED_TO_LOAD); - } - if (sym == NULL) { - sym = (CK_C_GenerateKeyPair)GetProcAddress(hPK11, "C_" - "GenerateKeyP" - "air"); - } - if (sym == NULL) { - return (CKR_SYMBOL_RESOLUTION_FAILED); - } - return ((*sym)(hSession, pMechanism, pPublicKeyTemplate, - usPublicKeyAttributeCount, pPrivateKeyTemplate, - usPrivateKeyAttributeCount, phPrivateKey, phPublicKey)); -} - -CK_RV -pkcs_C_DeriveKey(CK_SESSION_HANDLE hSession, CK_MECHANISM_PTR pMechanism, - CK_OBJECT_HANDLE hBaseKey, CK_ATTRIBUTE_PTR pTemplate, - CK_ULONG ulAttributeCount, CK_OBJECT_HANDLE_PTR phKey) { - static CK_C_DeriveKey sym = NULL; - - if (hPK11 == NULL) { - return (CKR_LIBRARY_FAILED_TO_LOAD); - } - if (sym == NULL) { - sym = (CK_C_DeriveKey)GetProcAddress(hPK11, "C_DeriveKey"); - } - if (sym == NULL) { - return (CKR_SYMBOL_RESOLUTION_FAILED); - } - return ((*sym)(hSession, pMechanism, hBaseKey, pTemplate, - ulAttributeCount, phKey)); -} - -CK_RV -pkcs_C_SeedRandom(CK_SESSION_HANDLE hSession, CK_BYTE_PTR pSeed, - CK_ULONG ulSeedLen) { - static CK_C_SeedRandom sym = NULL; - - if (hPK11 == NULL) { - return (CKR_LIBRARY_FAILED_TO_LOAD); - } - if (sym == NULL) { - sym = (CK_C_SeedRandom)GetProcAddress(hPK11, "C_SeedRandom"); - } - if (sym == NULL) { - return (CKR_SYMBOL_RESOLUTION_FAILED); - } - return ((*sym)(hSession, pSeed, ulSeedLen)); -} - -CK_RV -pkcs_C_GenerateRandom(CK_SESSION_HANDLE hSession, CK_BYTE_PTR RandomData, - CK_ULONG ulRandomLen) { - static CK_C_GenerateRandom sym = NULL; - - if (hPK11 == NULL) { - return (CKR_LIBRARY_FAILED_TO_LOAD); - } - if (sym == NULL) { - sym = (CK_C_GenerateRandom)GetProcAddress(hPK11, "C_" - "GenerateRando" - "m"); - } - if (sym == NULL) { - return (CKR_SYMBOL_RESOLUTION_FAILED); - } - return ((*sym)(hSession, RandomData, ulRandomLen)); -} diff --git a/lib/isc/win32/resource.c b/lib/isc/win32/resource.c deleted file mode 100644 index 8da2b48d92..0000000000 --- a/lib/isc/win32/resource.c +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#include - -#include -#include -#include -#include - -#include "errno2result.h" - -/* - * Windows limits the maximum number of open files to 2048 - */ - -#define WIN32_MAX_OPEN_FILES 2048 - -isc_result_t -isc_resource_setlimit(isc_resource_t resource, isc_resourcevalue_t value) { - isc_resourcevalue_t rlim_value; - int wresult; - - if (resource != isc_resource_openfiles) { - return (ISC_R_NOTIMPLEMENTED); - } - - if (value == ISC_RESOURCE_UNLIMITED) { - rlim_value = WIN32_MAX_OPEN_FILES; - } else { - rlim_value = min(value, WIN32_MAX_OPEN_FILES); - } - - wresult = _setmaxstdio((int)rlim_value); - - if (wresult > 0) { - return (ISC_R_SUCCESS); - } else { - return (isc__errno2result(errno)); - } -} - -isc_result_t -isc_resource_getlimit(isc_resource_t resource, isc_resourcevalue_t *value) { - if (resource != isc_resource_openfiles) { - return (ISC_R_NOTIMPLEMENTED); - } - - *value = WIN32_MAX_OPEN_FILES; - return (ISC_R_SUCCESS); -} - -isc_result_t -isc_resource_getcurlimit(isc_resource_t resource, isc_resourcevalue_t *value) { - return (isc_resource_getlimit(resource, value)); -} diff --git a/lib/isc/win32/socket.c b/lib/isc/win32/socket.c deleted file mode 100644 index 3fecf3ee40..0000000000 --- a/lib/isc/win32/socket.c +++ /dev/null @@ -1,3951 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/* This code uses functions which are only available on Server 2003 and - * higher, and Windows XP and higher. - * - * This code is by nature multithreaded and takes advantage of various - * features to pass on information through the completion port for - * when I/O is completed. All sends, receives, accepts, and connects are - * completed through the completion port. - * - * The number of Completion Port Worker threads used is the total number - * of CPU's + 1. This increases the likelihood that a Worker Thread is - * available for processing a completed request. - * - * XXXPDM 5 August, 2002 - */ - -#define MAKE_EXTERNAL 1 - -#include - -#ifndef _WINSOCKAPI_ -#define _WINSOCKAPI_ /* Prevent inclusion of winsock.h in windows.h */ -#endif /* ifndef _WINSOCKAPI_ */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* clang-format off */ -/* U Can't Touch This */ -#include -/* clang-format on */ - -#ifdef HAVE_JSON_C -#include -#endif /* HAVE_JSON_C */ - -#ifdef HAVE_LIBXML2 -#include -#define ISC_XMLCHAR (const xmlChar *) -#endif /* HAVE_LIBXML2 */ - -#include "errno2result.h" -#include "socket_p.h" - -/* - * Set by the -T dscp option on the command line. If set to a value - * other than -1, we check to make sure DSCP values match it, and - * assert if not. - */ -LIBISC_EXTERNAL_DATA int isc_dscp_check_value = -1; - -/* - * How in the world can Microsoft exist with APIs like this? - * We can't actually call this directly, because it turns out - * no library exports this function. Instead, we need to - * issue a runtime call to get the address. - */ -LPFN_CONNECTEX ISCConnectEx; -LPFN_ACCEPTEX ISCAcceptEx; -LPFN_GETACCEPTEXSOCKADDRS ISCGetAcceptExSockaddrs; - -/* - * Run expensive internal consistency checks. - */ -#ifdef ISC_SOCKET_CONSISTENCY_CHECKS -#define CONSISTENT(sock) consistent(sock) -#else /* ifdef ISC_SOCKET_CONSISTENCY_CHECKS */ -#define CONSISTENT(sock) \ - do { \ - } while (0) -#endif /* ifdef ISC_SOCKET_CONSISTENCY_CHECKS */ -static void -consistent(isc_socket_t *sock); - -/* - * Define this macro to control the behavior of connection - * resets on UDP sockets. See Microsoft KnowledgeBase Article Q263823 - * for details. - * NOTE: This requires that Windows 2000 systems install Service Pack 2 - * or later. - */ -#ifndef SIO_UDP_CONNRESET -#define SIO_UDP_CONNRESET _WSAIOW(IOC_VENDOR, 12) -#endif /* ifndef SIO_UDP_CONNRESET */ - -/* - * Define what the possible "soft" errors can be. These are non-fatal returns - * of various network related functions, like recv() and so on. - */ -#define SOFT_ERROR(e) \ - ((e) == WSAEINTR || (e) == WSAEWOULDBLOCK || (e) == EWOULDBLOCK || \ - (e) == EINTR || (e) == EAGAIN || (e) == 0) - -/* - * Pending errors are not really errors and should be - * kept separate - */ -#define PENDING_ERROR(e) ((e) == WSA_IO_PENDING || (e) == 0) - -#define DOIO_SUCCESS 0 /* i/o ok, event sent */ -#define DOIO_SOFT 1 /* i/o ok, soft error, no event sent */ -#define DOIO_HARD 2 /* i/o error, event sent */ -#define DOIO_EOF 3 /* EOF, no event sent */ -#define DOIO_PENDING 4 /* status when i/o is in process */ -#define DOIO_NEEDMORE \ - 5 /* IO was processed, but we need more due to minimum \ - */ - -#define DLVL(x) ISC_LOGCATEGORY_GENERAL, ISC_LOGMODULE_SOCKET, ISC_LOG_DEBUG(x) - -/* - * DLVL(90) -- Function entry/exit and other tracing. - * DLVL(70) -- Socket "correctness" -- including returning of events, etc. - * DLVL(60) -- Socket data send/receive - * DLVL(50) -- Event tracing, including receiving/sending completion events. - * DLVL(20) -- Socket creation/destruction. - */ -#define TRACE_LEVEL 90 -#define CORRECTNESS_LEVEL 70 -#define IOEVENT_LEVEL 60 -#define EVENT_LEVEL 50 -#define CREATION_LEVEL 20 - -#define TRACE DLVL(TRACE_LEVEL) -#define CORRECTNESS DLVL(CORRECTNESS_LEVEL) -#define IOEVENT DLVL(IOEVENT_LEVEL) -#define EVENT DLVL(EVENT_LEVEL) -#define CREATION DLVL(CREATION_LEVEL) - -typedef isc_event_t intev_t; - -/* - * Socket State - */ -enum { - SOCK_INITIALIZED, /* Socket Initialized */ - SOCK_OPEN, /* Socket opened but nothing yet to do */ - SOCK_DATA, /* Socket sending or receiving data */ - SOCK_LISTEN, /* TCP Socket listening for connects */ - SOCK_ACCEPT, /* TCP socket is waiting to accept */ - SOCK_CONNECT, /* TCP Socket connecting */ - SOCK_CLOSED, /* Socket has been closed */ -}; - -#define SOCKET_MAGIC ISC_MAGIC('I', 'O', 'i', 'o') -#define VALID_SOCKET(t) ISC_MAGIC_VALID(t, SOCKET_MAGIC) - -/* - * IPv6 control information. If the socket is an IPv6 socket we want - * to collect the destination address and interface so the client can - * set them on outgoing packets. - */ -#ifndef USE_CMSG -#define USE_CMSG 1 -#endif /* ifndef USE_CMSG */ - -/* - * We really don't want to try and use these control messages. Win32 - * doesn't have this mechanism before XP. - */ -#undef USE_CMSG - -/* - * Message header for recvmsg and sendmsg calls. - * Used value-result for recvmsg, value only for sendmsg. - */ -struct msghdr { - SOCKADDR_STORAGE to_addr; /* UDP send/recv address */ - int to_addr_len; /* length of the address */ - WSABUF *msg_iov; /* scatter/gather array */ - u_int msg_iovlen; /* # elements in msg_iov */ - void *msg_control; /* ancillary data, see below */ - u_int msg_controllen; /* ancillary data buffer len */ - u_int msg_totallen; /* total length of this message */ -} msghdr; - -/* - * The size to raise the receive buffer to. - */ -#define RCVBUFSIZE (32 * 1024) - -/* - * The number of times a send operation is repeated if the result - * is WSAEINTR. - */ -#define NRETRIES 10 - -struct isc_socket { - /* Not locked. */ - unsigned int magic; - isc_socketmgr_t *manager; - isc_mutex_t lock; - isc_sockettype_t type; - - /* Pointers to scatter/gather buffers */ - WSABUF iov[ISC_SOCKET_MAXSCATTERGATHER]; - - /* Locked by socket lock. */ - ISC_LINK(isc_socket_t) link; - isc_refcount_t references; /* EXTERNAL references */ - SOCKET fd; /* file handle */ - int pf; /* protocol family */ - char name[16]; - void *tag; - - /* - * Each recv() call uses this buffer. It is a per-socket receive - * buffer that allows us to decouple the system recv() from the - * recv_list done events. This means the items on the recv_list - * can be removed without having to cancel pending system recv() - * calls. It also allows us to read-ahead in some cases. - */ - struct { - SOCKADDR_STORAGE from_addr; /* UDP send/recv address */ - int from_addr_len; /* length of the address */ - char *base; /* the base of the buffer */ - char *consume_position; /* where to start - * copying data from - * next */ - unsigned int len; /* the actual size of this buffer */ - unsigned int remaining; /* the number of bytes - * remaining */ - } recvbuf; - - ISC_LIST(isc_socketevent_t) send_list; - ISC_LIST(isc_socketevent_t) recv_list; - ISC_LIST(isc_socket_newconnev_t) accept_list; - ISC_LIST(isc_socket_connev_t) connect_list; - - isc_sockaddr_t address; /* remote address */ - - unsigned int listener : 1, /* listener socket */ - connected : 1, pending_connect : 1, /* connect - * pending */ - bound : 1, /* bound to local addr */ - dupped : 1; /* created by isc_socket_dup() */ - unsigned int pending_iocp; /* Should equal the counters below. - * Debug. */ - unsigned int pending_recv; /* Number of outstanding recv() calls. - * */ - unsigned int pending_send; /* Number of outstanding send() calls. - * */ - unsigned int pending_accept; /* Number of outstanding accept() - * calls. */ - unsigned int state; /* Socket state. Debugging and consistency - * checking. - */ - int state_lineno; /* line which last touched state */ -}; - -#define _set_state(sock, _state) \ - do { \ - (sock)->state = (_state); \ - (sock)->state_lineno = __LINE__; \ - } while (0) - -/* - * I/O Completion ports Info structures - */ - -static HANDLE hHeapHandle = NULL; -typedef struct IoCompletionInfo { - OVERLAPPED overlapped; - isc_socketevent_t *dev; /* send()/recv() done event */ - isc_socket_connev_t *cdev; /* connect() done event */ - isc_socket_newconnev_t *adev; /* accept() done event */ - void *acceptbuffer; - DWORD received_bytes; - int request_type; - struct msghdr messagehdr; - void *buf; - unsigned int buflen; -} IoCompletionInfo; - -/* - * Define a maximum number of I/O Completion Port worker threads - * to handle the load on the Completion Port. The actual number - * used is the number of CPU's + 1. - */ -#define MAX_IOCPTHREADS 20 - -#define SOCKET_MANAGER_MAGIC ISC_MAGIC('I', 'O', 'm', 'g') -#define VALID_MANAGER(m) ISC_MAGIC_VALID(m, SOCKET_MANAGER_MAGIC) - -struct isc_socketmgr { - /* Not locked. */ - unsigned int magic; - isc_mem_t *mctx; - isc_mutex_t lock; - isc_stats_t *stats; - - /* Locked by manager lock. */ - ISC_LIST(isc_socket_t) socklist; - bool bShutdown; - isc_condition_t shutdown_ok; - HANDLE hIoCompletionPort; - int maxIOCPThreads; - HANDLE hIOCPThreads[MAX_IOCPTHREADS]; - size_t maxudp; - - /* - * Debugging. - * Modified by InterlockedIncrement() and InterlockedDecrement() - */ - LONG totalSockets; - LONG iocp_total; -}; - -enum { SOCKET_RECV, SOCKET_SEND, SOCKET_ACCEPT, SOCKET_CONNECT }; - -/* - * send() and recv() iovec counts - */ -#define MAXSCATTERGATHER_SEND (ISC_SOCKET_MAXSCATTERGATHER) -#define MAXSCATTERGATHER_RECV (ISC_SOCKET_MAXSCATTERGATHER) - -static isc_result_t -socket_create(isc_socketmgr_t *manager0, int pf, isc_sockettype_t type, - isc_socket_t **socketp, isc_socket_t *dup_socket); -static isc_threadresult_t WINAPI -SocketIoThread(LPVOID ThreadContext); -static void -maybe_free_socket(isc_socket_t **, int); -static void -free_socket(isc_socket_t **, int); -static bool -senddone_is_active(isc_socket_t *sock, isc_socketevent_t *dev); -static bool -acceptdone_is_active(isc_socket_t *sock, isc_socket_newconnev_t *dev); -static bool -connectdone_is_active(isc_socket_t *sock, isc_socket_connev_t *dev); -static void -send_recvdone_event(isc_socket_t *sock, isc_socketevent_t **dev); -static void -send_senddone_event(isc_socket_t *sock, isc_socketevent_t **dev); -static void -send_acceptdone_event(isc_socket_t *sock, isc_socket_newconnev_t **adev); -static void -send_connectdone_event(isc_socket_t *sock, isc_socket_connev_t **cdev); -static void -send_recvdone_abort(isc_socket_t *sock, isc_result_t result); -static void -send_connectdone_abort(isc_socket_t *sock, isc_result_t result); -static void -queue_receive_event(isc_socket_t *sock, isc_task_t *task, - isc_socketevent_t *dev); -static void -queue_receive_request(isc_socket_t *sock); - -/* - * This is used to dump the contents of the sock structure - * You should make sure that the sock is locked before - * dumping it. Since the code uses simple printf() statements - * it should only be used interactively. - */ -void -sock_dump(isc_socket_t *sock) { - isc_socketevent_t *ldev; - isc_socket_newconnev_t *ndev; - isc_socket_connev_t *cdev; - -#if 0 - isc_sockaddr_t addr; - char socktext[ISC_SOCKADDR_FORMATSIZE]; - isc_result_t result; - - result = isc_socket_getpeername(sock,&addr); - if (result == ISC_R_SUCCESS) { - isc_sockaddr_format(&addr,socktext,sizeof(socktext)); - printf("Remote Socket: %s\n",socktext); - } - result = isc_socket_getsockname(sock,&addr); - if (result == ISC_R_SUCCESS) { - isc_sockaddr_format(&addr,socktext,sizeof(socktext)); - printf("This Socket: %s\n",socktext); - } -#endif /* if 0 */ - - printf("\n\t\tSock Dump\n"); - printf("\t\tfd: %Iu\n", sock->fd); - printf("\t\treferences: %" PRIuFAST32 "\n", - isc_refcount_current(&sock->references)); - printf("\t\tpending_accept: %u\n", sock->pending_accept); - printf("\t\tconnecting: %u\n", sock->pending_connect); - printf("\t\tconnected: %u\n", sock->connected); - printf("\t\tbound: %u\n", sock->bound); - printf("\t\tpending_iocp: %u\n", sock->pending_iocp); - printf("\t\tsocket type: %d\n", sock->type); - - printf("\n\t\tSock Recv List\n"); - ldev = ISC_LIST_HEAD(sock->recv_list); - while (ldev != NULL) { - printf("\t\tdev: %p\n", ldev); - ldev = ISC_LIST_NEXT(ldev, ev_link); - } - - printf("\n\t\tSock Send List\n"); - ldev = ISC_LIST_HEAD(sock->send_list); - while (ldev != NULL) { - printf("\t\tdev: %p\n", ldev); - ldev = ISC_LIST_NEXT(ldev, ev_link); - } - - printf("\n\t\tSock Accept List\n"); - ndev = ISC_LIST_HEAD(sock->accept_list); - while (ndev != NULL) { - printf("\t\tdev: %p\n", ldev); - ndev = ISC_LIST_NEXT(ndev, ev_link); - } - - printf("\n\t\tSock Connect List\n"); - cdev = ISC_LIST_HEAD(sock->connect_list); - while (cdev != NULL) { - printf("\t\tdev: %p\n", cdev); - cdev = ISC_LIST_NEXT(cdev, ev_link); - } -} - -static void -socket_log(int lineno, isc_socket_t *sock, const isc_sockaddr_t *address, - isc_logcategory_t *category, isc_logmodule_t *module, int level, - const char *fmt, ...) ISC_FORMAT_PRINTF(10, 11); - -/* This function will add an entry to the I/O completion port - * that will signal the I/O thread to exit (gracefully) - */ -static void -signal_iocompletionport_exit(isc_socketmgr_t *manager) { - int i; - int errval; - char strbuf[ISC_STRERRORSIZE]; - - REQUIRE(VALID_MANAGER(manager)); - for (i = 0; i < manager->maxIOCPThreads; i++) { - if (!PostQueuedCompletionStatus(manager->hIoCompletionPort, 0, - 0, 0)) { - errval = GetLastError(); - strerror_r(errval, strbuf, sizeof(strbuf)); - FATAL_ERROR(__FILE__, __LINE__, - "Can't request service thread to exit: %s", - strbuf); - } - } -} - -/* - * Create the worker threads for the I/O Completion Port - */ -void -iocompletionport_createthreads(int total_threads, isc_socketmgr_t *manager) { - int errval; - char strbuf[ISC_STRERRORSIZE]; - int i; - - INSIST(total_threads > 0); - REQUIRE(VALID_MANAGER(manager)); - /* - * We need at least one - */ - for (i = 0; i < total_threads; i++) { - isc_thread_create(SocketIoThread, manager, - &manager->hIOCPThreads[i]); - } -} - -/* - * Create/initialise the I/O completion port - */ -void -iocompletionport_init(isc_socketmgr_t *manager) { - int errval; - char strbuf[ISC_STRERRORSIZE]; - - REQUIRE(VALID_MANAGER(manager)); - /* - * Create a private heap to handle the socket overlapped structure - * The minimum number of structures is 10, there is no maximum - */ - hHeapHandle = HeapCreate(0, 10 * sizeof(IoCompletionInfo), 0); - if (hHeapHandle == NULL) { - errval = GetLastError(); - strerror_r(errval, strbuf, sizeof(strbuf)); - FATAL_ERROR(__FILE__, __LINE__, - "HeapCreate() failed during initialization: %s", - strbuf); - } - - /* Now Create the Completion Port */ - manager->hIoCompletionPort = CreateIoCompletionPort( - INVALID_HANDLE_VALUE, NULL, 0, manager->maxIOCPThreads); - if (manager->hIoCompletionPort == NULL) { - errval = GetLastError(); - strerror_r(errval, strbuf, sizeof(strbuf)); - FATAL_ERROR(__FILE__, __LINE__, - "CreateIoCompletionPort() failed during " - "initialization: %s", - strbuf); - } - - /* - * Worker threads for servicing the I/O - */ - iocompletionport_createthreads(manager->maxIOCPThreads, manager); -} - -/* - * Associate a socket with an IO Completion Port. This allows us to queue - * events for it and have our worker pool of threads process them. - */ -void -iocompletionport_update(isc_socket_t *sock) { - HANDLE hiocp; - char strbuf[ISC_STRERRORSIZE]; - - REQUIRE(VALID_SOCKET(sock)); - - hiocp = CreateIoCompletionPort((HANDLE)sock->fd, - sock->manager->hIoCompletionPort, - (ULONG_PTR)sock, 0); - - if (hiocp == NULL) { - DWORD errval = GetLastError(); - strerror_r(errval, strbuf, sizeof(strbuf)); - isc_log_write(isc_lctx, ISC_LOGCATEGORY_GENERAL, - ISC_LOGMODULE_SOCKET, ISC_LOG_ERROR, - "iocompletionport_update: failed to open io " - "completion port: %s", - strbuf); - - /* XXXMLG temporary hack to make failures detected. - * This function should return errors to the caller, not - * exit here. - */ - FATAL_ERROR(__FILE__, __LINE__, - "CreateIoCompletionPort() failed during " - "initialization: %s", - strbuf); - } - - InterlockedIncrement(&sock->manager->iocp_total); -} - -/* - * Routine to cleanup and then close the socket. - * Only close the socket here if it is NOT associated - * with an event, otherwise the WSAWaitForMultipleEvents - * may fail due to the fact that the Wait should not - * be running while closing an event or a socket. - * The socket is locked before calling this function - */ -void -socket_close(isc_socket_t *sock) { - REQUIRE(sock != NULL); - - if (sock->fd != INVALID_SOCKET) { - closesocket(sock->fd); - sock->fd = INVALID_SOCKET; - _set_state(sock, SOCK_CLOSED); - InterlockedDecrement(&sock->manager->totalSockets); - } -} - -static isc_once_t initialise_once = ISC_ONCE_INIT; -static bool initialised = false; - -static void -initialise(void) { - WORD wVersionRequested; - WSADATA wsaData; - int err; - SOCKET sock; - GUID GUIDConnectEx = WSAID_CONNECTEX; - GUID GUIDAcceptEx = WSAID_ACCEPTEX; - GUID GUIDGetAcceptExSockaddrs = WSAID_GETACCEPTEXSOCKADDRS; - DWORD dwBytes; - - /* Need Winsock 2.2 or better */ - wVersionRequested = MAKEWORD(2, 2); - - err = WSAStartup(wVersionRequested, &wsaData); - if (err != 0) { - char strbuf[ISC_STRERRORSIZE]; - strerror_r(err, strbuf, sizeof(strbuf)); - FATAL_ERROR(__FILE__, __LINE__, "WSAStartup() failed: %s", - strbuf); - } - /* - * The following APIs do not exist as functions in a library, but - * we must ask winsock for them. They are "extensions" -- but why - * they cannot be actual functions is beyond me. So, ask winsock - * for the pointers to the functions we need. - */ - sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); - INSIST(sock != INVALID_SOCKET); - err = WSAIoctl(sock, SIO_GET_EXTENSION_FUNCTION_POINTER, &GUIDConnectEx, - sizeof(GUIDConnectEx), &ISCConnectEx, - sizeof(ISCConnectEx), &dwBytes, NULL, NULL); - INSIST(err == 0); - - err = WSAIoctl(sock, SIO_GET_EXTENSION_FUNCTION_POINTER, &GUIDAcceptEx, - sizeof(GUIDAcceptEx), &ISCAcceptEx, sizeof(ISCAcceptEx), - &dwBytes, NULL, NULL); - INSIST(err == 0); - - err = WSAIoctl(sock, SIO_GET_EXTENSION_FUNCTION_POINTER, - &GUIDGetAcceptExSockaddrs, - sizeof(GUIDGetAcceptExSockaddrs), - &ISCGetAcceptExSockaddrs, - sizeof(ISCGetAcceptExSockaddrs), &dwBytes, NULL, NULL); - INSIST(err == 0); - - closesocket(sock); - - initialised = true; -} - -/* - * Initialize socket services - */ -void -InitSockets(void) { - RUNTIME_CHECK(isc_once_do(&initialise_once, initialise) == - ISC_R_SUCCESS); - if (!initialised) { - exit(1); - } -} - -int -internal_sendmsg(isc_socket_t *sock, IoCompletionInfo *lpo, - struct msghdr *messagehdr, int flags, int *Error) { - int Result; - DWORD BytesSent; - DWORD Flags = flags; - int total_sent; - - *Error = 0; - Result = WSASendTo(sock->fd, messagehdr->msg_iov, - messagehdr->msg_iovlen, &BytesSent, Flags, - (SOCKADDR *)&messagehdr->to_addr, - messagehdr->to_addr_len, (LPWSAOVERLAPPED)lpo, NULL); - - total_sent = (int)BytesSent; - - /* Check for errors.*/ - if (Result == SOCKET_ERROR) { - *Error = WSAGetLastError(); - - switch (*Error) { - case WSA_IO_INCOMPLETE: - case WSA_WAIT_IO_COMPLETION: - case WSA_IO_PENDING: - case NO_ERROR: /* Strange, but okay */ - sock->pending_iocp++; - sock->pending_send++; - break; - - default: - return (-1); - break; - } - } else { - sock->pending_iocp++; - sock->pending_send++; - } - - if (lpo != NULL) { - return (0); - } else { - return (total_sent); - } -} - -static void -queue_receive_request(isc_socket_t *sock) { - DWORD Flags = 0; - DWORD NumBytes = 0; - int Result; - int Error; - int need_retry; - WSABUF iov[1]; - IoCompletionInfo *lpo = NULL; - isc_result_t isc_result; - -retry: - need_retry = false; - - /* - * If we already have a receive pending, do nothing. - */ - if (sock->pending_recv > 0) { - if (lpo != NULL) { - HeapFree(hHeapHandle, 0, lpo); - } - return; - } - - /* - * If no one is waiting, do nothing. - */ - if (ISC_LIST_EMPTY(sock->recv_list)) { - if (lpo != NULL) { - HeapFree(hHeapHandle, 0, lpo); - } - return; - } - - INSIST(sock->recvbuf.remaining == 0); - INSIST(sock->fd != INVALID_SOCKET); - - iov[0].len = sock->recvbuf.len; - iov[0].buf = sock->recvbuf.base; - - if (lpo == NULL) { - lpo = (IoCompletionInfo *)HeapAlloc(hHeapHandle, - HEAP_ZERO_MEMORY, - sizeof(IoCompletionInfo)); - RUNTIME_CHECK(lpo != NULL); - } else { - ZeroMemory(lpo, sizeof(IoCompletionInfo)); - } - lpo->request_type = SOCKET_RECV; - - sock->recvbuf.from_addr_len = sizeof(sock->recvbuf.from_addr); - - Error = 0; - Result = WSARecvFrom((SOCKET)sock->fd, iov, 1, &NumBytes, &Flags, - (SOCKADDR *)&sock->recvbuf.from_addr, - &sock->recvbuf.from_addr_len, (LPWSAOVERLAPPED)lpo, - NULL); - - /* Check for errors. */ - if (Result == SOCKET_ERROR) { - Error = WSAGetLastError(); - - switch (Error) { - case WSA_IO_PENDING: - sock->pending_iocp++; - sock->pending_recv++; - break; - - /* direct error: no completion event */ - case ERROR_HOST_UNREACHABLE: - case WSAENETRESET: - case WSAECONNRESET: - if (!sock->connected) { - /* soft error */ - need_retry = true; - break; - } - /* FALLTHROUGH */ - - default: - isc_result = isc__errno2result(Error); - if (isc_result == ISC_R_UNEXPECTED) { - UNEXPECTED_ERROR(__FILE__, __LINE__, - "WSARecvFrom: Windows error " - "code: %d, isc result %d", - Error, isc_result); - } - send_recvdone_abort(sock, isc_result); - HeapFree(hHeapHandle, 0, lpo); - lpo = NULL; - break; - } - } else { - /* - * The recv() finished immediately, but we will still get - * a completion event. Rather than duplicate code, let - * that thread handle sending the data along its way. - */ - sock->pending_iocp++; - sock->pending_recv++; - } - - socket_log(__LINE__, sock, NULL, IOEVENT, - "queue_io_request: fd %d result %d error %d", sock->fd, - Result, Error); - - CONSISTENT(sock); - - if (need_retry) { - goto retry; - } -} - -static void -manager_log(isc_socketmgr_t *sockmgr, isc_logcategory_t *category, - isc_logmodule_t *module, int level, const char *fmt, ...) { - char msgbuf[2048]; - va_list ap; - - if (!isc_log_wouldlog(isc_lctx, level)) { - return; - } - - va_start(ap, fmt); - vsnprintf(msgbuf, sizeof(msgbuf), fmt, ap); - va_end(ap); - - isc_log_write(isc_lctx, category, module, level, "sockmgr %p: %s", - sockmgr, msgbuf); -} - -static void -socket_log(int lineno, isc_socket_t *sock, const isc_sockaddr_t *address, - isc_logcategory_t *category, isc_logmodule_t *module, int level, - const char *fmt, ...) { - char msgbuf[2048]; - char peerbuf[256]; - va_list ap; - - if (!isc_log_wouldlog(isc_lctx, level)) { - return; - } - - va_start(ap, fmt); - vsnprintf(msgbuf, sizeof(msgbuf), fmt, ap); - va_end(ap); - - if (address == NULL) { - isc_log_write(isc_lctx, category, module, level, - "socket %p line %d: %s", sock, lineno, msgbuf); - } else { - isc_sockaddr_format(address, peerbuf, sizeof(peerbuf)); - isc_log_write(isc_lctx, category, module, level, - "socket %p line %d %s: %s", sock, lineno, peerbuf, - msgbuf); - } -} - -/* - * Make an fd SOCKET non-blocking. - */ -static isc_result_t -make_nonblock(SOCKET fd) { - int ret; - unsigned long flags = 1; - char strbuf[ISC_STRERRORSIZE]; - - /* Set the socket to non-blocking */ - ret = ioctlsocket(fd, FIONBIO, &flags); - - if (ret == -1) { - strerror_r(errno, strbuf, sizeof(strbuf)); - UNEXPECTED_ERROR(__FILE__, __LINE__, - "ioctlsocket(%d, FIOBIO, %d): %s", fd, flags, - strbuf); - - return (ISC_R_UNEXPECTED); - } - - return (ISC_R_SUCCESS); -} - -/* - * Windows 2000 systems incorrectly cause UDP sockets using WSARecvFrom - * to not work correctly, returning a WSACONNRESET error when a WSASendTo - * fails with an "ICMP port unreachable" response and preventing the - * socket from using the WSARecvFrom in subsequent operations. - * The function below fixes this, but requires that Windows 2000 - * Service Pack 2 or later be installed on the system. NT 4.0 - * systems are not affected by this and work correctly. - * See Microsoft Knowledge Base Article Q263823 for details of this. - */ -isc_result_t -connection_reset_fix(SOCKET fd) { - DWORD dwBytesReturned = 0; - BOOL bNewBehavior = FALSE; - DWORD status; - - if (isc_win32os_versioncheck(5, 0, 0, 0) < 0) { - return (ISC_R_SUCCESS); /* NT 4.0 has no problem */ - } - /* disable bad behavior using IOCTL: SIO_UDP_CONNRESET */ - status = WSAIoctl(fd, SIO_UDP_CONNRESET, &bNewBehavior, - sizeof(bNewBehavior), NULL, 0, &dwBytesReturned, NULL, - NULL); - if (status != SOCKET_ERROR) { - return (ISC_R_SUCCESS); - } else { - UNEXPECTED_ERROR(__FILE__, __LINE__, - "WSAIoctl(SIO_UDP_CONNRESET, oldBehaviour) " - "failed"); - return (ISC_R_UNEXPECTED); - } -} - -/* - * Construct an iov array and attach it to the msghdr passed in. This is - * the SEND constructor, which will use the used region of the buffer - * (if using a buffer list) or will use the internal region (if a single - * buffer I/O is requested). - * - * Nothing can be NULL, and the done event must list at least one buffer - * on the buffer linked list for this function to be meaningful. - */ -static void -build_msghdr_send(isc_socket_t *sock, isc_socketevent_t *dev, - struct msghdr *msg, char *cmsg, WSABUF *iov, - IoCompletionInfo *lpo) { - unsigned int iovcount; - size_t write_count; - - memset(msg, 0, sizeof(*msg)); - - memmove(&msg->to_addr, &dev->address.type, dev->address.length); - msg->to_addr_len = dev->address.length; - - write_count = 0; - iovcount = 0; - - /* - * Single buffer I/O? Skip what we've done so far in this region. - */ - write_count = dev->region.length - dev->n; - lpo->buf = HeapAlloc(hHeapHandle, HEAP_ZERO_MEMORY, write_count); - RUNTIME_CHECK(lpo->buf != NULL); - - socket_log(__LINE__, sock, NULL, TRACE, "alloc_buffer %p %d", lpo->buf, - write_count); - - memmove(lpo->buf, (dev->region.base + dev->n), write_count); - lpo->buflen = (unsigned int)write_count; - iov[0].buf = lpo->buf; - iov[0].len = (u_long)write_count; - iovcount = 1; - - msg->msg_iov = iov; - msg->msg_iovlen = iovcount; - msg->msg_totallen = (u_int)write_count; -} - -static void -set_dev_address(const isc_sockaddr_t *address, isc_socket_t *sock, - isc_socketevent_t *dev) { - if (sock->type == isc_sockettype_udp) { - if (address != NULL) { - dev->address = *address; - } else { - dev->address = sock->address; - } - } else if (sock->type == isc_sockettype_tcp) { - INSIST(address == NULL); - dev->address = sock->address; - } -} - -static void -destroy_socketevent(isc_event_t *event) { - isc_socketevent_t *ev = (isc_socketevent_t *)event; - - (ev->destroy)(event); -} - -static isc_socketevent_t * -allocate_socketevent(isc_mem_t *mctx, isc_socket_t *sock, - isc_eventtype_t eventtype, isc_taskaction_t action, - void *arg) { - isc_socketevent_t *ev; - - ev = (isc_socketevent_t *)isc_event_allocate(mctx, sock, eventtype, - action, arg, sizeof(*ev)); - - ev->result = ISC_R_IOERROR; /* XXXMLG temporary change to detect failure - */ - /* to set */ - ISC_LINK_INIT(ev, ev_link); - ev->region.base = NULL; - ev->n = 0; - ev->offset = 0; - ev->attributes = 0; - ev->destroy = ev->ev_destroy; - ev->ev_destroy = destroy_socketevent; - ev->dscp = 0; - - return (ev); -} - -#if defined(ISC_SOCKET_DEBUG) -static void -dump_msg(struct msghdr *msg, isc_socket_t *sock) { - unsigned int i; - - printf("MSGHDR %p, Socket #: %Iu\n", msg, sock->fd); - printf("\tname %p, namelen %d\n", msg->msg_name, msg->msg_namelen); - printf("\tiov %p, iovlen %d\n", msg->msg_iov, msg->msg_iovlen); - for (i = 0; i < (unsigned int)msg->msg_iovlen; i++) - printf("\t\t%u\tbase %p, len %u\n", i, msg->msg_iov[i].buf, - msg->msg_iov[i].len); -} -#endif /* if defined(ISC_SOCKET_DEBUG) */ - -/* - * map the error code - */ -int -map_socket_error(isc_socket_t *sock, int windows_errno, int *isc_errno, - char *errorstring, size_t bufsize) { - int doreturn; - switch (windows_errno) { - case WSAECONNREFUSED: - *isc_errno = ISC_R_CONNREFUSED; - if (sock->connected) { - doreturn = DOIO_HARD; - } else { - doreturn = DOIO_SOFT; - } - break; - case WSAENETUNREACH: - case ERROR_NETWORK_UNREACHABLE: - *isc_errno = ISC_R_NETUNREACH; - if (sock->connected) { - doreturn = DOIO_HARD; - } else { - doreturn = DOIO_SOFT; - } - break; - case ERROR_PORT_UNREACHABLE: - case ERROR_HOST_UNREACHABLE: - case WSAEHOSTUNREACH: - *isc_errno = ISC_R_HOSTUNREACH; - if (sock->connected) { - doreturn = DOIO_HARD; - } else { - doreturn = DOIO_SOFT; - } - break; - case WSAENETDOWN: - *isc_errno = ISC_R_NETDOWN; - if (sock->connected) { - doreturn = DOIO_HARD; - } else { - doreturn = DOIO_SOFT; - } - break; - case WSAEHOSTDOWN: - *isc_errno = ISC_R_HOSTDOWN; - if (sock->connected) { - doreturn = DOIO_HARD; - } else { - doreturn = DOIO_SOFT; - } - break; - case WSAEACCES: - *isc_errno = ISC_R_NOPERM; - if (sock->connected) { - doreturn = DOIO_HARD; - } else { - doreturn = DOIO_SOFT; - } - break; - case WSAECONNRESET: - case WSAENETRESET: - case WSAECONNABORTED: - case WSAEDISCON: - *isc_errno = ISC_R_CONNECTIONRESET; - if (sock->connected) { - doreturn = DOIO_HARD; - } else { - doreturn = DOIO_SOFT; - } - break; - case WSAENOTCONN: - *isc_errno = ISC_R_NOTCONNECTED; - if (sock->connected) { - doreturn = DOIO_HARD; - } else { - doreturn = DOIO_SOFT; - } - break; - case ERROR_OPERATION_ABORTED: - case ERROR_CONNECTION_ABORTED: - case ERROR_REQUEST_ABORTED: - *isc_errno = ISC_R_CONNECTIONRESET; - doreturn = DOIO_HARD; - break; - case WSAENOBUFS: - *isc_errno = ISC_R_NORESOURCES; - doreturn = DOIO_HARD; - break; - case WSAEAFNOSUPPORT: - *isc_errno = ISC_R_FAMILYNOSUPPORT; - doreturn = DOIO_HARD; - break; - case WSAEADDRNOTAVAIL: - *isc_errno = ISC_R_ADDRNOTAVAIL; - doreturn = DOIO_HARD; - break; - case WSAEDESTADDRREQ: - *isc_errno = ISC_R_BADADDRESSFORM; - doreturn = DOIO_HARD; - break; - case ERROR_NETNAME_DELETED: - *isc_errno = ISC_R_NETDOWN; - doreturn = DOIO_HARD; - break; - default: - *isc_errno = ISC_R_IOERROR; - doreturn = DOIO_HARD; - break; - } - if (doreturn == DOIO_HARD) { - strerror_r(windows_errno, errorstring, bufsize); - } - return (doreturn); -} - -static void -fill_recv(isc_socket_t *sock, isc_socketevent_t *dev) { - int copylen; - - INSIST(dev->n < dev->minimum); - INSIST(sock->recvbuf.remaining > 0); - INSIST(sock->pending_recv == 0); - - if (sock->type == isc_sockettype_udp) { - dev->address.length = sock->recvbuf.from_addr_len; - memmove(&dev->address.type, &sock->recvbuf.from_addr, - sock->recvbuf.from_addr_len); - if (isc_sockaddr_getport(&dev->address) == 0) { - if (isc_log_wouldlog(isc_lctx, IOEVENT_LEVEL)) { - socket_log(__LINE__, sock, &dev->address, - IOEVENT, - "dropping source port zero packet"); - } - sock->recvbuf.remaining = 0; - return; - } - /* - * Simulate a firewall blocking UDP responses bigger than - * 'maxudp' bytes. - */ - if (sock->manager->maxudp != 0 && - sock->recvbuf.remaining > sock->manager->maxudp) - { - sock->recvbuf.remaining = 0; - return; - } - } else if (sock->type == isc_sockettype_tcp) { - dev->address = sock->address; - } - - copylen = min(dev->region.length - dev->n, sock->recvbuf.remaining); - memmove(dev->region.base + dev->n, sock->recvbuf.consume_position, - copylen); - sock->recvbuf.consume_position += copylen; - sock->recvbuf.remaining -= copylen; - dev->n += copylen; - - /* - * UDP receives are all-consuming. That is, if we have 4k worth of - * data in our receive buffer, and the caller only gave us - * 1k of space, we will toss the remaining 3k of data. TCP - * will keep the extra data around and use it for later requests. - */ - if (sock->type == isc_sockettype_udp) { - sock->recvbuf.remaining = 0; - } -} - -/* - * Copy out as much data from the internal buffer to done events. - * As each done event is filled, send it along its way. - */ -static void -completeio_recv(isc_socket_t *sock) { - isc_socketevent_t *dev; - - /* - * If we are in the process of filling our buffer, we cannot - * touch it yet, so don't. - */ - if (sock->pending_recv > 0) { - return; - } - - while (sock->recvbuf.remaining > 0 && !ISC_LIST_EMPTY(sock->recv_list)) - { - dev = ISC_LIST_HEAD(sock->recv_list); - - /* - * See if we have sufficient data in our receive buffer - * to handle this. If we do, copy out the data. - */ - fill_recv(sock, dev); - - /* - * Did we satisfy it? - */ - if (dev->n >= dev->minimum) { - dev->result = ISC_R_SUCCESS; - send_recvdone_event(sock, &dev); - } - } -} - -/* - * Returns: - * DOIO_SUCCESS The operation succeeded. dev->result contains - * ISC_R_SUCCESS. - * - * DOIO_HARD A hard or unexpected I/O error was encountered. - * dev->result contains the appropriate error. - * - * DOIO_SOFT A soft I/O error was encountered. No senddone - * event was sent. The operation should be retried. - * - * No other return values are possible. - */ -static int -completeio_send(isc_socket_t *sock, isc_socketevent_t *dev, - struct msghdr *messagehdr, int cc, int send_errno) { - char strbuf[ISC_STRERRORSIZE]; - - if (send_errno != 0) { - if (SOFT_ERROR(send_errno)) { - return (DOIO_SOFT); - } - - return (map_socket_error(sock, send_errno, &dev->result, strbuf, - sizeof(strbuf))); - } - - /* - * If we write less than we expected, update counters, poke. - */ - dev->n += cc; - if (cc != messagehdr->msg_totallen) { - return (DOIO_SOFT); - } - - /* - * Exactly what we wanted to write. We're done with this - * entry. Post its completion event. - */ - dev->result = ISC_R_SUCCESS; - return (DOIO_SUCCESS); -} - -static int -startio_send(isc_socket_t *sock, isc_socketevent_t *dev, int *nbytes, - int *send_errno) { - char *cmsg = NULL; - char strbuf[ISC_STRERRORSIZE]; - IoCompletionInfo *lpo; - int status; - struct msghdr *mh; - - /* - * Simulate a firewall blocking UDP responses bigger than - * 'maxudp' bytes. - */ - if (sock->type == isc_sockettype_udp && sock->manager->maxudp != 0 && - dev->region.length - dev->n > sock->manager->maxudp) - { - *nbytes = dev->region.length - dev->n; - return (DOIO_SUCCESS); - } - - lpo = (IoCompletionInfo *)HeapAlloc(hHeapHandle, HEAP_ZERO_MEMORY, - sizeof(IoCompletionInfo)); - RUNTIME_CHECK(lpo != NULL); - lpo->request_type = SOCKET_SEND; - lpo->dev = dev; - mh = &lpo->messagehdr; - memset(mh, 0, sizeof(struct msghdr)); - - build_msghdr_send(sock, dev, mh, cmsg, sock->iov, lpo); - - *nbytes = internal_sendmsg(sock, lpo, mh, 0, send_errno); - - if (*nbytes <= 0) { - /* - * I/O has been initiated - * completion will be through the completion port - */ - if (PENDING_ERROR(*send_errno)) { - status = DOIO_PENDING; - goto done; - } - - if (SOFT_ERROR(*send_errno)) { - status = DOIO_SOFT; - goto done; - } - - /* - * If we got this far then something is wrong - */ - if (isc_log_wouldlog(isc_lctx, IOEVENT_LEVEL)) { - strerror_r(*send_errno, strbuf, sizeof(strbuf)); - socket_log(__LINE__, sock, NULL, IOEVENT, - "startio_send: internal_sendmsg(%d) %d " - "bytes, err %d/%s", - sock->fd, *nbytes, *send_errno, strbuf); - } - status = DOIO_HARD; - goto done; - } - dev->result = ISC_R_SUCCESS; - status = DOIO_SOFT; -done: - _set_state(sock, SOCK_DATA); - return (status); -} - -static void -use_min_mtu(isc_socket_t *sock) { -#ifdef IPV6_USE_MIN_MTU - /* use minimum MTU */ - if (sock->pf == AF_INET6) { - int on = 1; - (void)setsockopt(sock->fd, IPPROTO_IPV6, IPV6_USE_MIN_MTU, - (void *)&on, sizeof(on)); - } -#else /* ifdef IPV6_USE_MIN_MTU */ - UNUSED(sock); -#endif /* ifdef IPV6_USE_MIN_MTU */ -} - -static isc_result_t -allocate_socket(isc_socketmgr_t *manager, isc_sockettype_t type, - isc_socket_t **socketp) { - isc_socket_t *sock; - - sock = isc_mem_get(manager->mctx, sizeof(*sock)); - - sock->magic = 0; - isc_refcount_init(&sock->references, 0); - - sock->manager = manager; - sock->type = type; - sock->fd = INVALID_SOCKET; - - ISC_LINK_INIT(sock, link); - - /* - * Set up list of readers and writers to be initially empty. - */ - ISC_LIST_INIT(sock->recv_list); - ISC_LIST_INIT(sock->send_list); - ISC_LIST_INIT(sock->accept_list); - ISC_LIST_INIT(sock->connect_list); - sock->pending_accept = 0; - sock->pending_recv = 0; - sock->pending_send = 0; - sock->pending_iocp = 0; - sock->listener = 0; - sock->connected = 0; - sock->pending_connect = 0; - sock->bound = 0; - sock->dupped = 0; - memset(sock->name, 0, sizeof(sock->name)); /* zero the name field */ - _set_state(sock, SOCK_INITIALIZED); - - sock->recvbuf.len = 65536; - sock->recvbuf.consume_position = sock->recvbuf.base; - sock->recvbuf.remaining = 0; - sock->recvbuf.base = isc_mem_get(manager->mctx, - sock->recvbuf.len); /* max buffer */ - /* size */ - - /* - * Initialize the lock. - */ - isc_mutex_init(&sock->lock); - - socket_log(__LINE__, sock, NULL, EVENT, "allocated"); - - sock->magic = SOCKET_MAGIC; - *socketp = sock; - - return (ISC_R_SUCCESS); -} - -/* - * Verify that the socket state is consistent. - */ -static void -consistent(isc_socket_t *sock) { - isc_socketevent_t *dev; - isc_socket_newconnev_t *nev; - unsigned int count; - char *crash_reason; - bool crash = false; - - REQUIRE(sock->pending_iocp == sock->pending_recv + sock->pending_send + - sock->pending_accept + - sock->pending_connect); - - dev = ISC_LIST_HEAD(sock->send_list); - count = 0; - while (dev != NULL) { - count++; - dev = ISC_LIST_NEXT(dev, ev_link); - } - if (count > sock->pending_send) { - crash = true; - crash_reason = "send_list > sock->pending_send"; - } - - nev = ISC_LIST_HEAD(sock->accept_list); - count = 0; - while (nev != NULL) { - count++; - nev = ISC_LIST_NEXT(nev, ev_link); - } - if (count > sock->pending_accept) { - crash = true; - crash_reason = "accept_list > sock->pending_accept"; - } - - if (crash) { - socket_log(__LINE__, sock, NULL, CREATION, - "SOCKET INCONSISTENT: %s", crash_reason); - sock_dump(sock); - INSIST(!crash); - } -} - -/* - * Maybe free the socket. - * - * This function will verify that the socket is no longer in use in any way, - * either internally or externally. This is the only place where this - * check is to be made; if some bit of code believes that IT is done with - * the socket (e.g., some reference counter reaches zero), it should call - * this function. - * - * When calling this function, the socket must be locked, and the manager - * must be unlocked. - * - * When this function returns, *socketp will be NULL. No tricks to try - * to hold on to this pointer are allowed. - */ -static void -maybe_free_socket(isc_socket_t **socketp, int lineno) { - isc_socket_t *sock = *socketp; - *socketp = NULL; - - INSIST(VALID_SOCKET(sock)); - CONSISTENT(sock); - - if (sock->pending_iocp > 0 || sock->pending_recv > 0 || - sock->pending_send > 0 || sock->pending_accept > 0 || - isc_refcount_current(&sock->references) > 0 || - sock->pending_connect == 1 || !ISC_LIST_EMPTY(sock->recv_list) || - !ISC_LIST_EMPTY(sock->send_list) || - !ISC_LIST_EMPTY(sock->accept_list) || - !ISC_LIST_EMPTY(sock->connect_list) || sock->fd != INVALID_SOCKET) - { - UNLOCK(&sock->lock); - return; - } - UNLOCK(&sock->lock); - - free_socket(&sock, lineno); -} - -void -free_socket(isc_socket_t **sockp, int lineno) { - isc_socketmgr_t *manager; - isc_socket_t *sock = *sockp; - *sockp = NULL; - - /* - * Seems we can free the socket after all. - */ - manager = sock->manager; - socket_log(__LINE__, sock, NULL, CREATION, - "freeing socket line %d fd %d lock %p semaphore %p", lineno, - sock->fd, &sock->lock, sock->lock.LockSemaphore); - - sock->magic = 0; - isc_mutex_destroy(&sock->lock); - - if (sock->recvbuf.base != NULL) { - isc_mem_put(manager->mctx, sock->recvbuf.base, - sock->recvbuf.len); - } - - LOCK(&manager->lock); - if (ISC_LINK_LINKED(sock, link)) { - ISC_LIST_UNLINK(manager->socklist, sock, link); - } - isc_mem_put(manager->mctx, sock, sizeof(*sock)); - - if (ISC_LIST_EMPTY(manager->socklist)) { - SIGNAL(&manager->shutdown_ok); - } - UNLOCK(&manager->lock); -} - -/* - * Create a new 'type' socket managed by 'manager'. Events - * will be posted to 'task' and when dispatched 'action' will be - * called with 'arg' as the arg value. The new socket is returned - * in 'socketp'. - */ -static isc_result_t -socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type, - isc_socket_t **socketp, isc_socket_t *dup_socket) { - isc_socket_t *sock = NULL; - isc_result_t result; -#if defined(USE_CMSG) - int on = 1; -#endif /* if defined(USE_CMSG) */ -#if defined(SO_RCVBUF) - socklen_t optlen; - int size; -#endif /* if defined(SO_RCVBUF) */ - int socket_errno; - char strbuf[ISC_STRERRORSIZE]; - - REQUIRE(VALID_MANAGER(manager)); - REQUIRE(socketp != NULL && *socketp == NULL); - -#ifndef SOCK_RAW - if (type == isc_sockettype_raw) { - return (ISC_R_NOTIMPLEMENTED); - } -#endif /* ifndef SOCK_RAW */ - - result = allocate_socket(manager, type, &sock); - if (result != ISC_R_SUCCESS) { - return (result); - } - - sock->pf = pf; - switch (type) { - case isc_sockettype_udp: - sock->fd = socket(pf, SOCK_DGRAM, IPPROTO_UDP); - if (sock->fd != INVALID_SOCKET) { - result = connection_reset_fix(sock->fd); - if (result != ISC_R_SUCCESS) { - socket_log(__LINE__, sock, NULL, EVENT, - "closed %d %d %" PRIuFAST32 " " - "con_reset_fix_failed", - sock->pending_recv, - sock->pending_send, - isc_refcount_current( - &sock->references)); - closesocket(sock->fd); - _set_state(sock, SOCK_CLOSED); - sock->fd = INVALID_SOCKET; - free_socket(&sock, __LINE__); - return (result); - } - } - break; - case isc_sockettype_tcp: - sock->fd = socket(pf, SOCK_STREAM, IPPROTO_TCP); - break; -#ifdef SOCK_RAW - case isc_sockettype_raw: - sock->fd = socket(pf, SOCK_RAW, 0); -#ifdef PF_ROUTE - if (pf == PF_ROUTE) { - sock->bound = 1; - } -#endif /* ifdef PF_ROUTE */ - break; -#endif /* ifdef SOCK_RAW */ - } - - if (sock->fd == INVALID_SOCKET) { - socket_errno = WSAGetLastError(); - free_socket(&sock, __LINE__); - - switch (socket_errno) { - case WSAEMFILE: - case WSAENOBUFS: - return (ISC_R_NORESOURCES); - - case WSAEPROTONOSUPPORT: - case WSAEPFNOSUPPORT: - case WSAEAFNOSUPPORT: - return (ISC_R_FAMILYNOSUPPORT); - - default: - strerror_r(socket_errno, strbuf, sizeof(strbuf)); - UNEXPECTED_ERROR(__FILE__, __LINE__, - "socket() failed: %s", strbuf); - return (ISC_R_UNEXPECTED); - } - } - - result = make_nonblock(sock->fd); - if (result != ISC_R_SUCCESS) { - socket_log(__LINE__, sock, NULL, EVENT, - "closed %d %d %" PRIuFAST32 " make_nonblock_failed", - sock->pending_recv, sock->pending_send, - isc_refcount_current(&sock->references)); - closesocket(sock->fd); - sock->fd = INVALID_SOCKET; - free_socket(&sock, __LINE__); - return (result); - } - - /* - * Use minimum mtu if possible. - */ - use_min_mtu(sock); - -#if defined(USE_CMSG) || defined(SO_RCVBUF) - if (type == isc_sockettype_udp) { -#if defined(USE_CMSG) -#ifdef IPV6_RECVPKTINFO - /* 2292bis */ - if ((pf == AF_INET6) && - (setsockopt(sock->fd, IPPROTO_IPV6, IPV6_RECVPKTINFO, - (char *)&on, sizeof(on)) < 0)) - { - strerror_r(WSAGetLastError(), strbuf, sizeof(strbuf)); - UNEXPECTED_ERROR(__FILE__, __LINE__, - "setsockopt(%d, IPV6_RECVPKTINFO) " - "failed: %s", - sock->fd, strbuf); - } -#else /* ifdef IPV6_RECVPKTINFO */ - /* 2292 */ - if ((pf == AF_INET6) && - (setsockopt(sock->fd, IPPROTO_IPV6, IPV6_PKTINFO, - (char *)&on, sizeof(on)) < 0)) - { - strerror_r(WSAGetLastError(), strbuf, sizeof(strbuf)); - UNEXPECTED_ERROR(__FILE__, __LINE__, - "setsockopt(%d, IPV6_PKTINFO) %s: %s", - sock->fd, strbuf); - } -#endif /* IPV6_RECVPKTINFO */ -#endif /* defined(USE_CMSG) */ - -#if defined(SO_RCVBUF) - optlen = sizeof(size); - if (getsockopt(sock->fd, SOL_SOCKET, SO_RCVBUF, (char *)&size, - &optlen) >= 0 && - size < RCVBUFSIZE) - { - size = RCVBUFSIZE; - (void)setsockopt(sock->fd, SOL_SOCKET, SO_RCVBUF, - (char *)&size, sizeof(size)); - } -#endif /* if defined(SO_RCVBUF) */ - } -#endif /* defined(USE_CMSG) || defined(SO_RCVBUF) */ - - _set_state(sock, SOCK_OPEN); - isc_refcount_init(&sock->references, 1); - *socketp = sock; - - iocompletionport_update(sock); - - if (dup_socket) { -#ifndef ISC_ALLOW_MAPPED - isc_socket_ipv6only(sock, true); -#endif /* ifndef ISC_ALLOW_MAPPED */ - - if (dup_socket->bound) { - isc_sockaddr_t local; - - result = isc_socket_getsockname(dup_socket, &local); - if (result != ISC_R_SUCCESS) { - isc_socket_close(sock); - return (result); - } - result = isc_socket_bind(sock, &local, - ISC_SOCKET_REUSEADDRESS); - if (result != ISC_R_SUCCESS) { - isc_socket_close(sock); - return (result); - } - } - sock->dupped = 1; - } - - /* - * Note we don't have to lock the socket like we normally would because - * there are no external references to it yet. - */ - LOCK(&manager->lock); - ISC_LIST_APPEND(manager->socklist, sock, link); - InterlockedIncrement(&manager->totalSockets); - UNLOCK(&manager->lock); - - socket_log(__LINE__, sock, NULL, CREATION, "created %u type %u", - sock->fd, type); - - return (ISC_R_SUCCESS); -} - -isc_result_t -isc_socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type, - isc_socket_t **socketp) { - return (socket_create(manager, pf, type, socketp, NULL)); -} - -isc_result_t -isc_socket_dup(isc_socket_t *sock, isc_socket_t **socketp) { - REQUIRE(VALID_SOCKET(sock)); - REQUIRE(socketp != NULL && *socketp == NULL); - - return (socket_create(sock->manager, sock->pf, sock->type, socketp, - sock)); -} - -isc_result_t -isc_socket_open(isc_socket_t *sock) { - REQUIRE(VALID_SOCKET(sock)); - - return (ISC_R_NOTIMPLEMENTED); -} - -/* - * Attach to a socket. Caller must explicitly detach when it is done. - */ -void -isc_socket_attach(isc_socket_t *sock, isc_socket_t **socketp) { - REQUIRE(VALID_SOCKET(sock)); - REQUIRE(socketp != NULL && *socketp == NULL); - - LOCK(&sock->lock); - CONSISTENT(sock); - UNLOCK(&sock->lock); - - isc_refcount_increment0(&sock->references); - - *socketp = sock; -} - -/* - * Dereference a socket. If this is the last reference to it, clean things - * up by destroying the socket. - */ -void -isc_socket_detach(isc_socket_t **socketp) { - isc_socket_t *sock; - uint32_t references; - - REQUIRE(socketp != NULL); - sock = *socketp; - *socketp = NULL; - REQUIRE(VALID_SOCKET(sock)); - - LOCK(&sock->lock); - CONSISTENT(sock); - - references = isc_refcount_decrement(&sock->references); - - socket_log(__LINE__, sock, NULL, EVENT, - "detach_socket %d %d %" PRIuFAST32, sock->pending_recv, - sock->pending_send, isc_refcount_current(&sock->references)); - - if (references == 1 && sock->fd != INVALID_SOCKET) { - closesocket(sock->fd); - sock->fd = INVALID_SOCKET; - _set_state(sock, SOCK_CLOSED); - } - - maybe_free_socket(&sock, __LINE__); /* Also unlocks the socket lock */ -} - -isc_result_t -isc_socket_close(isc_socket_t *sock) { - REQUIRE(VALID_SOCKET(sock)); - - return (ISC_R_NOTIMPLEMENTED); -} - -/* - * Dequeue an item off the given socket's read queue, set the result code - * in the done event to the one provided, and send it to the task it was - * destined for. - * - * If the event to be sent is on a list, remove it before sending. If - * asked to, send and detach from the task as well. - * - * Caller must have the socket locked if the event is attached to the socket. - */ -static void -send_recvdone_event(isc_socket_t *sock, isc_socketevent_t **dev) { - isc_task_t *task; - - task = (*dev)->ev_sender; - (*dev)->ev_sender = sock; - - if (ISC_LINK_LINKED(*dev, ev_link)) { - ISC_LIST_DEQUEUE(sock->recv_list, *dev, ev_link); - } - - if (((*dev)->attributes & ISC_SOCKEVENTATTR_ATTACHED) != 0) { - isc_task_sendanddetach(&task, (isc_event_t **)dev); - } else { - isc_task_send(task, (isc_event_t **)dev); - } - - CONSISTENT(sock); -} - -/* - * See comments for send_recvdone_event() above. - */ -static void -send_senddone_event(isc_socket_t *sock, isc_socketevent_t **dev) { - isc_task_t *task; - - INSIST(dev != NULL && *dev != NULL); - - task = (*dev)->ev_sender; - (*dev)->ev_sender = sock; - - if (ISC_LINK_LINKED(*dev, ev_link)) { - ISC_LIST_DEQUEUE(sock->send_list, *dev, ev_link); - } - - if (((*dev)->attributes & ISC_SOCKEVENTATTR_ATTACHED) != 0) { - isc_task_sendanddetach(&task, (isc_event_t **)dev); - } else { - isc_task_send(task, (isc_event_t **)dev); - } - - CONSISTENT(sock); -} - -/* - * See comments for send_recvdone_event() above. - */ -static void -send_acceptdone_event(isc_socket_t *sock, isc_socket_newconnev_t **adev) { - isc_task_t *task; - - INSIST(adev != NULL && *adev != NULL); - - task = (*adev)->ev_sender; - (*adev)->ev_sender = sock; - - if (ISC_LINK_LINKED(*adev, ev_link)) { - ISC_LIST_DEQUEUE(sock->accept_list, *adev, ev_link); - } - - isc_task_sendanddetach(&task, (isc_event_t **)adev); - - CONSISTENT(sock); -} - -/* - * See comments for send_recvdone_event() above. - */ -static void -send_connectdone_event(isc_socket_t *sock, isc_socket_connev_t **cdev) { - isc_task_t *task; - - INSIST(cdev != NULL && *cdev != NULL); - - task = (*cdev)->ev_sender; - (*cdev)->ev_sender = sock; - - if (ISC_LINK_LINKED(*cdev, ev_link)) { - ISC_LIST_DEQUEUE(sock->connect_list, *cdev, ev_link); - } - - isc_task_sendanddetach(&task, (isc_event_t **)cdev); - - CONSISTENT(sock); -} - -/* - * On entry to this function, the event delivered is the internal - * readable event, and the first item on the accept_list should be - * the done event we want to send. If the list is empty, this is a no-op, - * so just close the new connection, unlock, and return. - * - * Note the socket is locked before entering here - */ -static void -internal_accept(isc_socket_t *sock, IoCompletionInfo *lpo, int accept_errno) { - isc_socket_newconnev_t *adev; - isc_result_t result = ISC_R_SUCCESS; - isc_socket_t *nsock; - struct sockaddr *localaddr; - int localaddr_len = sizeof(*localaddr); - struct sockaddr *remoteaddr; - int remoteaddr_len = sizeof(*remoteaddr); - - INSIST(VALID_SOCKET(sock)); - LOCK(&sock->lock); - CONSISTENT(sock); - - socket_log(__LINE__, sock, NULL, TRACE, "internal_accept called"); - - INSIST(sock->listener); - - INSIST(sock->pending_iocp > 0); - sock->pending_iocp--; - INSIST(sock->pending_accept > 0); - sock->pending_accept--; - - adev = lpo->adev; - - /* - * If the event is no longer in the list we can just return. - */ - if (!acceptdone_is_active(sock, adev)) { - goto done; - } - - nsock = adev->newsocket; - - /* - * Pull off the done event. - */ - ISC_LIST_UNLINK(sock->accept_list, adev, ev_link); - - /* - * Extract the addresses from the socket, copy them into the structure, - * and return the new socket. - */ - ISCGetAcceptExSockaddrs( - lpo->acceptbuffer, 0, sizeof(SOCKADDR_STORAGE) + 16, - sizeof(SOCKADDR_STORAGE) + 16, (LPSOCKADDR *)&localaddr, - &localaddr_len, (LPSOCKADDR *)&remoteaddr, &remoteaddr_len); - memmove(&adev->address.type, remoteaddr, remoteaddr_len); - adev->address.length = remoteaddr_len; - nsock->address = adev->address; - nsock->pf = adev->address.type.sa.sa_family; - - socket_log(__LINE__, nsock, &nsock->address, TRACE, - "internal_accept parent %p", sock); - - result = make_nonblock(adev->newsocket->fd); - INSIST(result == ISC_R_SUCCESS); - - /* - * Use minimum mtu if possible. - */ - use_min_mtu(adev->newsocket); - - INSIST(setsockopt(nsock->fd, SOL_SOCKET, SO_UPDATE_ACCEPT_CONTEXT, - (char *)&sock->fd, sizeof(sock->fd)) == 0); - - /* - * Hook it up into the manager. - */ - nsock->bound = 1; - nsock->connected = 1; - _set_state(nsock, SOCK_OPEN); - - LOCK(&nsock->manager->lock); - ISC_LIST_APPEND(nsock->manager->socklist, nsock, link); - InterlockedIncrement(&nsock->manager->totalSockets); - UNLOCK(&nsock->manager->lock); - - socket_log(__LINE__, sock, &nsock->address, CREATION, - "accepted_connection new_socket %p fd %d", nsock, nsock->fd); - - adev->result = result; - send_acceptdone_event(sock, &adev); - -done: - CONSISTENT(sock); - UNLOCK(&sock->lock); - - HeapFree(hHeapHandle, 0, lpo->acceptbuffer); - lpo->acceptbuffer = NULL; -} - -/* - * Called when a socket with a pending connect() finishes. - * Note that the socket is locked before entering. - */ -static void -internal_connect(isc_socket_t *sock, IoCompletionInfo *lpo, int connect_errno) { - isc_socket_connev_t *cdev; - isc_result_t result; - char strbuf[ISC_STRERRORSIZE]; - - INSIST(VALID_SOCKET(sock)); - - LOCK(&sock->lock); - - INSIST(sock->pending_iocp > 0); - sock->pending_iocp--; - INSIST(sock->pending_connect == 1); - sock->pending_connect = 0; - - /* - * If the event is no longer in the list we can just close and return. - */ - cdev = lpo->cdev; - if (!connectdone_is_active(sock, cdev)) { - sock->pending_connect = 0; - if (sock->fd != INVALID_SOCKET) { - closesocket(sock->fd); - sock->fd = INVALID_SOCKET; - _set_state(sock, SOCK_CLOSED); - } - CONSISTENT(sock); - UNLOCK(&sock->lock); - return; - } - - /* - * Check possible Windows network event error status here. - */ - if (connect_errno != 0) { - /* - * If the error is SOFT, just try again on this - * fd and pretend nothing strange happened. - */ - if (SOFT_ERROR(connect_errno) || - connect_errno == WSAEINPROGRESS) { - sock->pending_connect = 1; - CONSISTENT(sock); - UNLOCK(&sock->lock); - return; - } - - /* - * Translate other errors into ISC_R_* flavors. - */ - switch (connect_errno) { -#define ERROR_MATCH(a, b) \ - case a: \ - result = b; \ - break; - ERROR_MATCH(WSAEACCES, ISC_R_NOPERM); - ERROR_MATCH(WSAEADDRNOTAVAIL, ISC_R_ADDRNOTAVAIL); - ERROR_MATCH(WSAEAFNOSUPPORT, ISC_R_ADDRNOTAVAIL); - ERROR_MATCH(WSAECONNREFUSED, ISC_R_CONNREFUSED); - ERROR_MATCH(WSAEHOSTUNREACH, ISC_R_HOSTUNREACH); - ERROR_MATCH(WSAEHOSTDOWN, ISC_R_HOSTDOWN); - ERROR_MATCH(WSAENETUNREACH, ISC_R_NETUNREACH); - ERROR_MATCH(WSAENETDOWN, ISC_R_NETDOWN); - ERROR_MATCH(WSAENOBUFS, ISC_R_NORESOURCES); - ERROR_MATCH(WSAECONNRESET, ISC_R_CONNECTIONRESET); - ERROR_MATCH(WSAECONNABORTED, ISC_R_CONNECTIONRESET); - ERROR_MATCH(WSAETIMEDOUT, ISC_R_TIMEDOUT); -#undef ERROR_MATCH - default: - result = ISC_R_UNEXPECTED; - strerror_r(connect_errno, strbuf, sizeof(strbuf)); - UNEXPECTED_ERROR(__FILE__, __LINE__, - "internal_connect: connect() %s", - strbuf); - } - } else { - INSIST(setsockopt(sock->fd, SOL_SOCKET, - SO_UPDATE_CONNECT_CONTEXT, NULL, 0) == 0); - result = ISC_R_SUCCESS; - sock->connected = 1; - socket_log(__LINE__, sock, &sock->address, IOEVENT, - "internal_connect: success"); - } - - do { - cdev->result = result; - send_connectdone_event(sock, &cdev); - cdev = ISC_LIST_HEAD(sock->connect_list); - } while (cdev != NULL); - - UNLOCK(&sock->lock); -} - -/* - * Loop through the socket, returning ISC_R_EOF for each done event pending. - */ -static void -send_recvdone_abort(isc_socket_t *sock, isc_result_t result) { - isc_socketevent_t *dev; - - while (!ISC_LIST_EMPTY(sock->recv_list)) { - dev = ISC_LIST_HEAD(sock->recv_list); - dev->result = result; - send_recvdone_event(sock, &dev); - } -} - -/* - * Loop through the socket, returning result for each done event pending. - */ -static void -send_connectdone_abort(isc_socket_t *sock, isc_result_t result) { - isc_socket_connev_t *dev; - - while (!ISC_LIST_EMPTY(sock->connect_list)) { - dev = ISC_LIST_HEAD(sock->connect_list); - dev->result = result; - send_connectdone_event(sock, &dev); - } -} - -/* - * Take the data we received in our private buffer, and if any recv() calls on - * our list are satisfied, send the corresponding done event. - * - * If we need more data (there are still items on the recv_list after we consume - * all our data) then arrange for another system recv() call to fill our - * buffers. - */ -static void -internal_recv(isc_socket_t *sock, int nbytes) { - INSIST(VALID_SOCKET(sock)); - - LOCK(&sock->lock); - CONSISTENT(sock); - - socket_log(__LINE__, sock, NULL, IOEVENT, - "internal_recv: %d bytes received", nbytes); - - /* - * If we got here, the I/O operation succeeded. However, we might - * still have removed this event from our notification list (or never - * placed it on it due to immediate completion.) - * Handle the reference counting here, and handle the cancellation - * event just after. - */ - INSIST(sock->pending_iocp > 0); - sock->pending_iocp--; - INSIST(sock->pending_recv > 0); - sock->pending_recv--; - - /* - * The only way we could have gotten here is that our I/O has - * successfully completed. Update our pointers, and move on. - * The only odd case here is that we might not have received - * enough data on a TCP stream to satisfy the minimum requirements. - * If this is the case, we will re-issue the recv() call for what - * we need. - * - * We do check for a recv() of 0 bytes on a TCP stream. This - * means the remote end has closed. - */ - if (nbytes == 0 && sock->type == isc_sockettype_tcp) { - send_recvdone_abort(sock, ISC_R_EOF); - maybe_free_socket(&sock, __LINE__); - return; - } - sock->recvbuf.remaining = nbytes; - sock->recvbuf.consume_position = sock->recvbuf.base; - completeio_recv(sock); - - /* - * If there are more receivers waiting for data, queue another receive - * here. - */ - queue_receive_request(sock); - - /* - * Unlock and/or destroy if we are the last thing this socket has left - * to do. - */ - maybe_free_socket(&sock, __LINE__); -} - -static void -internal_send(isc_socket_t *sock, isc_socketevent_t *dev, - struct msghdr *messagehdr, int nbytes, int send_errno, - IoCompletionInfo *lpo) { - /* - * Find out what socket this is and lock it. - */ - INSIST(VALID_SOCKET(sock)); - - LOCK(&sock->lock); - CONSISTENT(sock); - - socket_log(__LINE__, sock, NULL, IOEVENT, - "internal_send: task got socket event %p", dev); - - if (lpo->buf != NULL) { - socket_log(__LINE__, sock, NULL, TRACE, "free_buffer %p", - lpo->buf); - - HeapFree(hHeapHandle, 0, lpo->buf); - lpo->buf = NULL; - lpo->buflen = 0; - } - - INSIST(sock->pending_iocp > 0); - sock->pending_iocp--; - INSIST(sock->pending_send > 0); - sock->pending_send--; - - /* If the event is no longer in the list we can just return */ - if (!senddone_is_active(sock, dev)) { - goto done; - } - - /* - * Set the error code and send things on its way. - */ - switch (completeio_send(sock, dev, messagehdr, nbytes, send_errno)) { - case DOIO_SOFT: - break; - case DOIO_HARD: - case DOIO_SUCCESS: - send_senddone_event(sock, &dev); - break; - } - -done: - maybe_free_socket(&sock, __LINE__); -} - -/* - * These return if the done event passed in is on the list. - * Using these ensures we will not double-send an event. - */ -static bool -senddone_is_active(isc_socket_t *sock, isc_socketevent_t *dev) { - isc_socketevent_t *ldev; - - ldev = ISC_LIST_HEAD(sock->send_list); - while (ldev != NULL && ldev != dev) { - ldev = ISC_LIST_NEXT(ldev, ev_link); - } - - return (ldev == NULL ? false : true); -} - -static bool -acceptdone_is_active(isc_socket_t *sock, isc_socket_newconnev_t *dev) { - isc_socket_newconnev_t *ldev; - - ldev = ISC_LIST_HEAD(sock->accept_list); - while (ldev != NULL && ldev != dev) { - ldev = ISC_LIST_NEXT(ldev, ev_link); - } - - return (ldev == NULL ? false : true); -} - -static bool -connectdone_is_active(isc_socket_t *sock, isc_socket_connev_t *dev) { - isc_socket_connev_t *cdev; - - cdev = ISC_LIST_HEAD(sock->connect_list); - while (cdev != NULL && cdev != dev) { - cdev = ISC_LIST_NEXT(cdev, ev_link); - } - - return (cdev == NULL ? false : true); -} - -/* */ -/* The Windows network stack seems to have two very distinct paths depending */ -/* on what is installed. Specifically, if something is looking at network */ -/* connections (like an anti-virus or anti-malware application, such as */ -/* McAfee products) Windows may return additional error conditions which */ -/* were not previously returned. */ -/* */ -/* One specific one is when a TCP SYN scan is used. In this situation, */ -/* Windows responds with the SYN-ACK, but the scanner never responds with */ -/* the 3rd packet, the ACK. Windows considers this a partially open connection. - */ -/* Most Unix networking stacks, and Windows without McAfee installed, will */ -/* not return this to the caller. However, with this product installed, */ -/* Windows returns this as a failed status on the Accept() call. Here, we */ -/* will just re-issue the ISCAcceptEx() call as if nothing had happened. */ -/* */ -/* This code should only be called when the listening socket has received */ -/* such an error. Additionally, the "parent" socket must be locked. */ -/* Additionally, the lpo argument is re-used here, and must not be freed */ -/* by the caller. */ -/* */ -static isc_result_t -restart_accept(isc_socket_t *parent, IoCompletionInfo *lpo) { - isc_socket_t *nsock = lpo->adev->newsocket; - SOCKET new_fd; - - /* - * AcceptEx() requires we pass in a socket. Note that we carefully - * do not close the previous socket in case of an error message returned - * by our new socket() call. If we return an error here, our caller - * will clean up. - */ - new_fd = socket(parent->pf, SOCK_STREAM, IPPROTO_TCP); - if (nsock->fd == INVALID_SOCKET) { - return (ISC_R_FAILURE); /* parent will ask windows for error */ - /* message */ - } - closesocket(nsock->fd); - nsock->fd = new_fd; - - memset(&lpo->overlapped, 0, sizeof(lpo->overlapped)); - - ISCAcceptEx(parent->fd, nsock->fd, /* Accepted Socket */ - lpo->acceptbuffer, /* Buffer for initial Recv */ - 0, /* Length of Buffer */ - sizeof(SOCKADDR_STORAGE) + 16, /* Local address length + 16 - */ - sizeof(SOCKADDR_STORAGE) + 16, /* Remote address length + 16 - */ - (LPDWORD)&lpo->received_bytes, /* Bytes Recved */ - (LPOVERLAPPED)lpo /* Overlapped structure */ - ); - - InterlockedDecrement(&nsock->manager->iocp_total); - iocompletionport_update(nsock); - - return (ISC_R_SUCCESS); -} - -/* - * This is the I/O Completion Port Worker Function. It loops forever - * waiting for I/O to complete and then forwards them for further - * processing. There are a number of these in separate threads. - */ -static isc_threadresult_t WINAPI -SocketIoThread(LPVOID ThreadContext) { - isc_socketmgr_t *manager = ThreadContext; - DWORD nbytes; - IoCompletionInfo *lpo = NULL; - isc_socket_t *sock = NULL; - int request; - struct msghdr *messagehdr = NULL; - int errval; - char strbuf[ISC_STRERRORSIZE]; - int errstatus; - - REQUIRE(VALID_MANAGER(manager)); - - /* - * Set the thread priority high enough so I/O will - * preempt normal recv packet processing, but not - * higher than the timer sync thread. - */ - if (!SetThreadPriority(GetCurrentThread(), - THREAD_PRIORITY_ABOVE_NORMAL)) { - errval = GetLastError(); - strerror_r(errval, strbuf, sizeof(strbuf)); - FATAL_ERROR(__FILE__, __LINE__, "Can't set thread priority: %s", - strbuf); - } - - /* - * Loop forever waiting on I/O Completions and then processing them - */ - while (TRUE) { - BOOL bSuccess; - - wait_again: - bSuccess = GetQueuedCompletionStatus( - manager->hIoCompletionPort, &nbytes, (PULONG_PTR)&sock, - (LPWSAOVERLAPPED *)&lpo, INFINITE); - if (lpo == NULL) { /* Received request to exit */ - break; - } - - REQUIRE(VALID_SOCKET(sock)); - - request = lpo->request_type; - - if (!bSuccess) { - errstatus = GetLastError(); - } else { - errstatus = 0; - } - if (!bSuccess && errstatus != ERROR_MORE_DATA) { - isc_result_t isc_result; - - /* - * Did the I/O operation complete? - */ - isc_result = isc__errno2result(errstatus); - - LOCK(&sock->lock); - CONSISTENT(sock); - switch (request) { - case SOCKET_RECV: - INSIST(sock->pending_iocp > 0); - sock->pending_iocp--; - INSIST(sock->pending_recv > 0); - sock->pending_recv--; - if (!sock->connected && - ((errstatus == ERROR_HOST_UNREACHABLE) || - (errstatus == WSAENETRESET) || - (errstatus == WSAECONNRESET))) - { - /* ignore soft errors */ - queue_receive_request(sock); - break; - } - send_recvdone_abort(sock, isc_result); - if (isc_result == ISC_R_UNEXPECTED) { - UNEXPECTED_ERROR(__FILE__, __LINE__, - "SOCKET_RECV: Windows " - "error code: %d, " - "returning ISC error " - "%d", - errstatus, isc_result); - } - break; - - case SOCKET_SEND: - INSIST(sock->pending_iocp > 0); - sock->pending_iocp--; - INSIST(sock->pending_send > 0); - sock->pending_send--; - if (senddone_is_active(sock, lpo->dev)) { - lpo->dev->result = isc_result; - socket_log(__LINE__, sock, NULL, EVENT, - "canceled_send"); - send_senddone_event(sock, &lpo->dev); - } - break; - - case SOCKET_ACCEPT: - INSIST(sock->pending_iocp > 0); - INSIST(sock->pending_accept > 0); - - socket_log(__LINE__, sock, NULL, EVENT, - "Accept: errstatus=%d isc_result=%d", - errstatus, isc_result); - - if (acceptdone_is_active(sock, lpo->adev)) { - if (restart_accept(sock, lpo) == - ISC_R_SUCCESS) { - UNLOCK(&sock->lock); - goto wait_again; - } else { - errstatus = GetLastError(); - isc_result = isc__errno2result( - errstatus); - socket_log(__LINE__, sock, NULL, - EVENT, - "restart_accept() " - "failed: " - "errstatus=%d " - "isc_result=%d", - errstatus, - isc_result); - } - } - - sock->pending_iocp--; - sock->pending_accept--; - if (acceptdone_is_active(sock, lpo->adev)) { - closesocket(lpo->adev->newsocket->fd); - lpo->adev->newsocket->fd = - INVALID_SOCKET; - isc_refcount_decrementz( - &lpo->adev->newsocket - ->references); - free_socket(&lpo->adev->newsocket, - __LINE__); - lpo->adev->result = isc_result; - socket_log(__LINE__, sock, NULL, EVENT, - "canceled_accept"); - send_acceptdone_event(sock, &lpo->adev); - } - break; - - case SOCKET_CONNECT: - INSIST(sock->pending_iocp > 0); - sock->pending_iocp--; - INSIST(sock->pending_connect == 1); - sock->pending_connect = 0; - if (connectdone_is_active(sock, lpo->cdev)) { - socket_log(__LINE__, sock, NULL, EVENT, - "canceled_connect"); - send_connectdone_abort(sock, - isc_result); - } - break; - } - maybe_free_socket(&sock, __LINE__); - - if (lpo != NULL) { - HeapFree(hHeapHandle, 0, lpo); - } - continue; - } - - messagehdr = &lpo->messagehdr; - - switch (request) { - case SOCKET_RECV: - internal_recv(sock, nbytes); - break; - case SOCKET_SEND: - internal_send(sock, lpo->dev, messagehdr, nbytes, - errstatus, lpo); - break; - case SOCKET_ACCEPT: - internal_accept(sock, lpo, errstatus); - break; - case SOCKET_CONNECT: - internal_connect(sock, lpo, errstatus); - break; - } - - if (lpo != NULL) { - HeapFree(hHeapHandle, 0, lpo); - } - } - - /* - * Exit Completion Port Thread - */ - manager_log(manager, TRACE, "SocketIoThread exiting"); - return ((isc_threadresult_t)0); -} - -/* - * Create a new socket manager. - */ -isc_result_t -isc__socketmgr_create(isc_mem_t *mctx, isc_socketmgr_t **managerp, - unsigned int maxsocks, int nthreads) { - isc_socketmgr_t *manager; - - REQUIRE(managerp != NULL && *managerp == NULL); - - if (maxsocks != 0) { - return (ISC_R_NOTIMPLEMENTED); - } - - manager = isc_mem_get(mctx, sizeof(*manager)); - - InitSockets(); - - manager->magic = SOCKET_MANAGER_MAGIC; - manager->mctx = NULL; - manager->stats = NULL; - ISC_LIST_INIT(manager->socklist); - isc_mutex_init(&manager->lock); - isc_condition_init(&manager->shutdown_ok); - - isc_mem_attach(mctx, &manager->mctx); - if (nthreads == 0) { - nthreads = isc_os_ncpus() + 1; - } - manager->maxIOCPThreads = min(nthreads, MAX_IOCPTHREADS); - - iocompletionport_init(manager); /* Create the Completion Ports */ - - manager->bShutdown = false; - manager->totalSockets = 0; - manager->iocp_total = 0; - manager->maxudp = 0; - - *managerp = manager; - - return (ISC_R_SUCCESS); -} - -isc_result_t -isc_socketmgr_getmaxsockets(isc_socketmgr_t *manager, unsigned int *nsockp) { - REQUIRE(VALID_MANAGER(manager)); - REQUIRE(nsockp != NULL); - - return (ISC_R_NOTIMPLEMENTED); -} - -void -isc_socketmgr_setstats(isc_socketmgr_t *manager, isc_stats_t *stats) { - REQUIRE(VALID_MANAGER(manager)); - REQUIRE(ISC_LIST_EMPTY(manager->socklist)); - REQUIRE(manager->stats == NULL); - REQUIRE(isc_stats_ncounters(stats) == isc_sockstatscounter_max); - - isc_stats_attach(stats, &manager->stats); -} - -void -isc__socketmgr_destroy(isc_socketmgr_t **managerp) { - isc_socketmgr_t *manager; - - /* - * Destroy a socket manager. - */ - - REQUIRE(managerp != NULL); - manager = *managerp; - *managerp = NULL; - REQUIRE(VALID_MANAGER(manager)); - - LOCK(&manager->lock); - - /* - * Wait for all sockets to be destroyed. - */ - while (!ISC_LIST_EMPTY(manager->socklist)) { - manager_log(manager, CREATION, "sockets exist"); - WAIT(&manager->shutdown_ok, &manager->lock); - } - - UNLOCK(&manager->lock); - - /* - * Here, we need to had some wait code for the completion port - * thread. - */ - signal_iocompletionport_exit(manager); - manager->bShutdown = true; - - /* - * Wait for threads to exit. - */ - for (int i = 0; i < manager->maxIOCPThreads; i++) { - isc_thread_join((isc_thread_t)manager->hIOCPThreads[i], NULL); - } - /* - * Clean up. - */ - - CloseHandle(manager->hIoCompletionPort); - - (void)isc_condition_destroy(&manager->shutdown_ok); - - isc_mutex_destroy(&manager->lock); - if (manager->stats != NULL) { - isc_stats_detach(&manager->stats); - } - manager->magic = 0; - isc_mem_putanddetach(&manager->mctx, manager, sizeof(*manager)); -} - -static void -queue_receive_event(isc_socket_t *sock, isc_task_t *task, - isc_socketevent_t *dev) { - isc_task_t *ntask = NULL; - - isc_task_attach(task, &ntask); - dev->attributes |= ISC_SOCKEVENTATTR_ATTACHED; - - /* - * Enqueue the request. - */ - INSIST(!ISC_LINK_LINKED(dev, ev_link)); - ISC_LIST_ENQUEUE(sock->recv_list, dev, ev_link); - - socket_log(__LINE__, sock, NULL, EVENT, - "queue_receive_event: event %p -> task %p", dev, ntask); -} - -/* - * Check the pending receive queue, and if we have data pending, give it to this - * caller. If we have none, queue an I/O request. If this caller is not the - * first on the list, then we will just queue this event and return. - * - * Caller must have the socket locked. - */ -static isc_result_t -socket_recv(isc_socket_t *sock, isc_socketevent_t *dev, isc_task_t *task, - unsigned int flags) { - isc_result_t result = ISC_R_SUCCESS; - - dev->ev_sender = task; - - if (sock->fd == INVALID_SOCKET) { - return (ISC_R_EOF); - } - - /* - * Queue our event on the list of things to do. Call our function to - * attempt to fill buffers as much as possible, and return done events. - * We are going to lie about our handling of the ISC_SOCKFLAG_IMMEDIATE - * here and tell our caller that we could not satisfy it immediately. - */ - queue_receive_event(sock, task, dev); - if ((flags & ISC_SOCKFLAG_IMMEDIATE) != 0) { - result = ISC_R_INPROGRESS; - } - - completeio_recv(sock); - - /* - * If there are more receivers waiting for data, queue another receive - * here. If the - */ - queue_receive_request(sock); - - return (result); -} - -isc_result_t -isc_socket_recv(isc_socket_t *sock, isc_region_t *region, unsigned int minimum, - isc_task_t *task, isc_taskaction_t action, void *arg) { - isc_socketevent_t *dev; - isc_socketmgr_t *manager; - isc_result_t ret; - - REQUIRE(VALID_SOCKET(sock)); - LOCK(&sock->lock); - CONSISTENT(sock); - - /* - * make sure that the socket's not closed - */ - if (sock->fd == INVALID_SOCKET) { - UNLOCK(&sock->lock); - return (ISC_R_CONNREFUSED); - } - REQUIRE(action != NULL); - - manager = sock->manager; - REQUIRE(VALID_MANAGER(manager)); - - INSIST(sock->bound); - - dev = allocate_socketevent(manager->mctx, sock, ISC_SOCKEVENT_RECVDONE, - action, arg); - if (dev == NULL) { - UNLOCK(&sock->lock); - return (ISC_R_NOMEMORY); - } - - ret = isc_socket_recv2(sock, region, minimum, task, dev, 0); - UNLOCK(&sock->lock); - return (ret); -} - -isc_result_t -isc_socket_recv2(isc_socket_t *sock, isc_region_t *region, unsigned int minimum, - isc_task_t *task, isc_socketevent_t *event, - unsigned int flags) { - isc_result_t ret; - - REQUIRE(VALID_SOCKET(sock)); - LOCK(&sock->lock); - CONSISTENT(sock); - - event->result = ISC_R_UNEXPECTED; - event->ev_sender = sock; - /* - * make sure that the socket's not closed - */ - if (sock->fd == INVALID_SOCKET) { - UNLOCK(&sock->lock); - return (ISC_R_CONNREFUSED); - } - - event->region = *region; - event->n = 0; - event->offset = 0; - event->attributes = 0; - - /* - * UDP sockets are always partial read. - */ - if (sock->type == isc_sockettype_udp) { - event->minimum = 1; - } else { - if (minimum == 0) { - event->minimum = region->length; - } else { - event->minimum = minimum; - } - } - - ret = socket_recv(sock, event, task, flags); - UNLOCK(&sock->lock); - return (ret); -} - -/* - * Caller must have the socket locked. - */ -static isc_result_t -socket_send(isc_socket_t *sock, isc_socketevent_t *dev, isc_task_t *task, - const isc_sockaddr_t *address, struct in6_pktinfo *pktinfo, - unsigned int flags) { - int io_state; - int send_errno = 0; - int cc = 0; - isc_task_t *ntask = NULL; - isc_result_t result = ISC_R_SUCCESS; - - dev->ev_sender = task; - - set_dev_address(address, sock, dev); - if (pktinfo != NULL) { - socket_log(__LINE__, sock, NULL, TRACE, - "pktinfo structure provided, ifindex %u (set to 0)", - pktinfo->ipi6_ifindex); - - dev->attributes |= ISC_SOCKEVENTATTR_PKTINFO; - dev->pktinfo = *pktinfo; - /* - * Set the pktinfo index to 0 here, to let the kernel decide - * what interface it should send on. - */ - dev->pktinfo.ipi6_ifindex = 0; - } - - io_state = startio_send(sock, dev, &cc, &send_errno); - switch (io_state) { - case DOIO_PENDING: /* I/O started. Enqueue completion event. */ - case DOIO_SOFT: - /* - * We couldn't send all or part of the request right now, so - * queue it unless ISC_SOCKFLAG_NORETRY is set. - */ - if ((flags & ISC_SOCKFLAG_NORETRY) == 0 || - io_state == DOIO_PENDING) { - isc_task_attach(task, &ntask); - dev->attributes |= ISC_SOCKEVENTATTR_ATTACHED; - - /* - * Enqueue the request. - */ - INSIST(!ISC_LINK_LINKED(dev, ev_link)); - ISC_LIST_ENQUEUE(sock->send_list, dev, ev_link); - - socket_log(__LINE__, sock, NULL, EVENT, - "socket_send: event %p -> task %p", dev, - ntask); - - if ((flags & ISC_SOCKFLAG_IMMEDIATE) != 0) { - result = ISC_R_INPROGRESS; - } - break; - } - - case DOIO_SUCCESS: - break; - } - - return (result); -} - -isc_result_t -isc_socket_send(isc_socket_t *sock, isc_region_t *region, isc_task_t *task, - isc_taskaction_t action, void *arg) { - /* - * REQUIRE() checking is performed in isc_socket_sendto(). - */ - return (isc_socket_sendto(sock, region, task, action, arg, NULL, NULL)); -} - -isc_result_t -isc_socket_sendto(isc_socket_t *sock, isc_region_t *region, isc_task_t *task, - isc_taskaction_t action, void *arg, - const isc_sockaddr_t *address, struct in6_pktinfo *pktinfo) { - isc_socketevent_t *dev; - isc_socketmgr_t *manager; - isc_result_t ret; - - REQUIRE(VALID_SOCKET(sock)); - - LOCK(&sock->lock); - CONSISTENT(sock); - - /* - * make sure that the socket's not closed - */ - if (sock->fd == INVALID_SOCKET) { - UNLOCK(&sock->lock); - return (ISC_R_CONNREFUSED); - } - REQUIRE(region != NULL); - REQUIRE(task != NULL); - REQUIRE(action != NULL); - - manager = sock->manager; - REQUIRE(VALID_MANAGER(manager)); - - INSIST(sock->bound); - - dev = allocate_socketevent(manager->mctx, sock, ISC_SOCKEVENT_SENDDONE, - action, arg); - if (dev == NULL) { - UNLOCK(&sock->lock); - return (ISC_R_NOMEMORY); - } - dev->region = *region; - - ret = socket_send(sock, dev, task, address, pktinfo, 0); - UNLOCK(&sock->lock); - return (ret); -} - -isc_result_t -isc_socket_sendto2(isc_socket_t *sock, isc_region_t *region, isc_task_t *task, - const isc_sockaddr_t *address, struct in6_pktinfo *pktinfo, - isc_socketevent_t *event, unsigned int flags) { - isc_result_t ret; - - REQUIRE(VALID_SOCKET(sock)); - LOCK(&sock->lock); - CONSISTENT(sock); - - REQUIRE((flags & ~(ISC_SOCKFLAG_IMMEDIATE | ISC_SOCKFLAG_NORETRY)) == - 0); - if ((flags & ISC_SOCKFLAG_NORETRY) != 0) { - REQUIRE(sock->type == isc_sockettype_udp); - } - event->ev_sender = sock; - event->result = ISC_R_UNEXPECTED; - /* - * make sure that the socket's not closed - */ - if (sock->fd == INVALID_SOCKET) { - UNLOCK(&sock->lock); - return (ISC_R_CONNREFUSED); - } - event->region = *region; - event->n = 0; - event->offset = 0; - event->attributes = 0; - - ret = socket_send(sock, event, task, address, pktinfo, flags); - UNLOCK(&sock->lock); - return (ret); -} - -isc_result_t -isc_socket_bind(isc_socket_t *sock, const isc_sockaddr_t *sockaddr, - isc_socket_options_t options) { - int bind_errno; - char strbuf[ISC_STRERRORSIZE]; - int on = 1; - - REQUIRE(VALID_SOCKET(sock)); - LOCK(&sock->lock); - CONSISTENT(sock); - - /* - * make sure that the socket's not closed - */ - if (sock->fd == INVALID_SOCKET) { - UNLOCK(&sock->lock); - return (ISC_R_CONNREFUSED); - } - - INSIST(!sock->bound); - INSIST(!sock->dupped); - - if (sock->pf != sockaddr->type.sa.sa_family) { - UNLOCK(&sock->lock); - return (ISC_R_FAMILYMISMATCH); - } - /* - * Only set SO_REUSEADDR when we want a specific port. - */ - if ((options & ISC_SOCKET_REUSEADDRESS) != 0 && - isc_sockaddr_getport(sockaddr) != (in_port_t)0 && - setsockopt(sock->fd, SOL_SOCKET, SO_REUSEADDR, (char *)&on, - sizeof(on)) < 0) - { - UNEXPECTED_ERROR(__FILE__, __LINE__, "setsockopt(%d) failed", - sock->fd); - /* Press on... */ - } - if (bind(sock->fd, &sockaddr->type.sa, sockaddr->length) < 0) { - bind_errno = WSAGetLastError(); - UNLOCK(&sock->lock); - switch (bind_errno) { - case WSAEACCES: - return (ISC_R_NOPERM); - case WSAEADDRNOTAVAIL: - return (ISC_R_ADDRNOTAVAIL); - case WSAEADDRINUSE: - return (ISC_R_ADDRINUSE); - case WSAEINVAL: - return (ISC_R_BOUND); - default: - strerror_r(bind_errno, strbuf, sizeof(strbuf)); - UNEXPECTED_ERROR(__FILE__, __LINE__, "bind: %s", - strbuf); - return (ISC_R_UNEXPECTED); - } - } - - socket_log(__LINE__, sock, sockaddr, TRACE, "bound"); - sock->bound = 1; - - UNLOCK(&sock->lock); - return (ISC_R_SUCCESS); -} - -isc_result_t -isc_socket_filter(isc_socket_t *sock, const char *filter) { - UNUSED(sock); - UNUSED(filter); - - REQUIRE(VALID_SOCKET(sock)); - return (ISC_R_NOTIMPLEMENTED); -} - -/* - * Set up to listen on a given socket. We do this by creating an internal - * event that will be dispatched when the socket has read activity. The - * watcher will send the internal event to the task when there is a new - * connection. - * - * Unlike in read, we don't preallocate a done event here. Every time there - * is a new connection we'll have to allocate a new one anyway, so we might - * as well keep things simple rather than having to track them. - */ -isc_result_t -isc_socket_listen(isc_socket_t *sock, unsigned int backlog) { - char strbuf[ISC_STRERRORSIZE]; -#if defined(ENABLE_TCP_FASTOPEN) && defined(TCP_FASTOPEN) - char on = 1; -#endif /* if defined(ENABLE_TCP_FASTOPEN) && defined(TCP_FASTOPEN) */ - - REQUIRE(VALID_SOCKET(sock)); - - LOCK(&sock->lock); - CONSISTENT(sock); - - /* - * make sure that the socket's not closed - */ - if (sock->fd == INVALID_SOCKET) { - UNLOCK(&sock->lock); - return (ISC_R_CONNREFUSED); - } - - REQUIRE(!sock->listener); - REQUIRE(sock->bound); - REQUIRE(sock->type == isc_sockettype_tcp); - - if (backlog == 0) { - backlog = SOMAXCONN; - } - - if (listen(sock->fd, (int)backlog) < 0) { - UNLOCK(&sock->lock); - strerror_r(WSAGetLastError(), strbuf, sizeof(strbuf)); - - UNEXPECTED_ERROR(__FILE__, __LINE__, "listen: %s", strbuf); - - return (ISC_R_UNEXPECTED); - } - -#if defined(ENABLE_TCP_FASTOPEN) && defined(TCP_FASTOPEN) - if (setsockopt(sock->fd, IPPROTO_TCP, TCP_FASTOPEN, &on, sizeof(on)) < - 0) { - strerror_r(errno, strbuf, sizeof(strbuf)); - UNEXPECTED_ERROR(__FILE__, __LINE__, - "setsockopt(%d, TCP_FASTOPEN) failed with %s", - sock->fd, strbuf); - /* TCP_FASTOPEN is experimental so ignore failures */ - } -#endif /* if defined(ENABLE_TCP_FASTOPEN) && defined(TCP_FASTOPEN) */ - - socket_log(__LINE__, sock, NULL, TRACE, "listening"); - sock->listener = 1; - _set_state(sock, SOCK_LISTEN); - - UNLOCK(&sock->lock); - return (ISC_R_SUCCESS); -} - -/* - * This should try to do aggressive accept() XXXMLG - */ -isc_result_t -isc_socket_accept(isc_socket_t *sock, isc_task_t *task, isc_taskaction_t action, - void *arg) { - isc_socket_newconnev_t *adev; - isc_socketmgr_t *manager; - isc_task_t *ntask = NULL; - isc_socket_t *nsock; - isc_result_t result; - IoCompletionInfo *lpo; - - REQUIRE(VALID_SOCKET(sock)); - - manager = sock->manager; - REQUIRE(VALID_MANAGER(manager)); - - LOCK(&sock->lock); - CONSISTENT(sock); - - /* - * make sure that the socket's not closed - */ - if (sock->fd == INVALID_SOCKET) { - UNLOCK(&sock->lock); - return (ISC_R_CONNREFUSED); - } - - REQUIRE(sock->listener); - - /* - * Sender field is overloaded here with the task we will be sending - * this event to. Just before the actual event is delivered the - * actual ev_sender will be touched up to be the socket. - */ - adev = (isc_socket_newconnev_t *)isc_event_allocate( - manager->mctx, task, ISC_SOCKEVENT_NEWCONN, action, arg, - sizeof(*adev)); - ISC_LINK_INIT(adev, ev_link); - - result = allocate_socket(manager, sock->type, &nsock); - if (result != ISC_R_SUCCESS) { - isc_event_free((isc_event_t **)&adev); - UNLOCK(&sock->lock); - return (result); - } - - /* - * AcceptEx() requires we pass in a socket. - */ - nsock->fd = socket(sock->pf, SOCK_STREAM, IPPROTO_TCP); - if (nsock->fd == INVALID_SOCKET) { - free_socket(&nsock, __LINE__); - isc_event_free((isc_event_t **)&adev); - UNLOCK(&sock->lock); - return (ISC_R_FAILURE); /* XXXMLG need real error message */ - } - - /* - * Attach to socket and to task. - */ - isc_task_attach(task, &ntask); - if (isc_task_exiting(ntask)) { - free_socket(&nsock, __LINE__); - isc_task_detach(&ntask); - isc_event_free(ISC_EVENT_PTR(&adev)); - UNLOCK(&sock->lock); - return (ISC_R_SHUTTINGDOWN); - } - isc_refcount_increment0(&nsock->references); - - adev->ev_sender = ntask; - adev->newsocket = nsock; - _set_state(nsock, SOCK_ACCEPT); - - /* - * Queue io completion for an accept(). - */ - lpo = (IoCompletionInfo *)HeapAlloc(hHeapHandle, HEAP_ZERO_MEMORY, - sizeof(IoCompletionInfo)); - RUNTIME_CHECK(lpo != NULL); - lpo->acceptbuffer = - (void *)HeapAlloc(hHeapHandle, HEAP_ZERO_MEMORY, - (sizeof(SOCKADDR_STORAGE) + 16) * 2); - RUNTIME_CHECK(lpo->acceptbuffer != NULL); - - lpo->adev = adev; - lpo->request_type = SOCKET_ACCEPT; - - ISCAcceptEx(sock->fd, nsock->fd, /* Accepted Socket */ - lpo->acceptbuffer, /* Buffer for initial Recv */ - 0, /* Length of Buffer */ - sizeof(SOCKADDR_STORAGE) + 16, /* Local address length + 16 - */ - sizeof(SOCKADDR_STORAGE) + 16, /* Remote address length + 16 - */ - (LPDWORD)&lpo->received_bytes, /* Bytes Recved */ - (LPOVERLAPPED)lpo /* Overlapped structure */ - ); - iocompletionport_update(nsock); - - socket_log(__LINE__, sock, NULL, TRACE, "accepting for nsock %p fd %d", - nsock, nsock->fd); - - /* - * Enqueue the event - */ - ISC_LIST_ENQUEUE(sock->accept_list, adev, ev_link); - sock->pending_accept++; - sock->pending_iocp++; - - UNLOCK(&sock->lock); - return (ISC_R_SUCCESS); -} - -isc_result_t -isc_socket_connect(isc_socket_t *sock, const isc_sockaddr_t *addr, - isc_task_t *task, isc_taskaction_t action, void *arg) { - char strbuf[ISC_STRERRORSIZE]; - isc_socket_connev_t *cdev; - isc_task_t *ntask = NULL; - isc_socketmgr_t *manager; - IoCompletionInfo *lpo; - int bind_errno; - - REQUIRE(VALID_SOCKET(sock)); - REQUIRE(addr != NULL); - REQUIRE(task != NULL); - REQUIRE(action != NULL); - - manager = sock->manager; - REQUIRE(VALID_MANAGER(manager)); - REQUIRE(addr != NULL); - - if (isc_sockaddr_ismulticast(addr)) { - return (ISC_R_MULTICAST); - } - - LOCK(&sock->lock); - CONSISTENT(sock); - - /* - * make sure that the socket's not closed - */ - if (sock->fd == INVALID_SOCKET) { - UNLOCK(&sock->lock); - return (ISC_R_CONNREFUSED); - } - - /* - * Windows sockets won't connect unless the socket is bound. - */ - if (!sock->bound) { - isc_sockaddr_t any; - - isc_sockaddr_anyofpf(&any, isc_sockaddr_pf(addr)); - if (bind(sock->fd, &any.type.sa, any.length) < 0) { - bind_errno = WSAGetLastError(); - UNLOCK(&sock->lock); - switch (bind_errno) { - case WSAEACCES: - return (ISC_R_NOPERM); - case WSAEADDRNOTAVAIL: - return (ISC_R_ADDRNOTAVAIL); - case WSAEADDRINUSE: - return (ISC_R_ADDRINUSE); - case WSAEINVAL: - return (ISC_R_BOUND); - default: - strerror_r(bind_errno, strbuf, sizeof(strbuf)); - UNEXPECTED_ERROR(__FILE__, __LINE__, "bind: %s", - strbuf); - return (ISC_R_UNEXPECTED); - } - } - sock->bound = 1; - } - - cdev = (isc_socket_connev_t *)isc_event_allocate( - manager->mctx, sock, ISC_SOCKEVENT_CONNECT, action, arg, - sizeof(*cdev)); - ISC_LINK_INIT(cdev, ev_link); - - if (sock->connected) { - INSIST(isc_sockaddr_equal(&sock->address, addr)); - cdev->result = ISC_R_SUCCESS; - isc_task_send(task, ISC_EVENT_PTR(&cdev)); - - UNLOCK(&sock->lock); - return (ISC_R_SUCCESS); - } - - if ((sock->type == isc_sockettype_tcp) && !sock->pending_connect) { - /* - * Queue io completion for an accept(). - */ - lpo = (IoCompletionInfo *)HeapAlloc(hHeapHandle, - HEAP_ZERO_MEMORY, - sizeof(IoCompletionInfo)); - lpo->cdev = cdev; - lpo->request_type = SOCKET_CONNECT; - - sock->address = *addr; - ISCConnectEx(sock->fd, &addr->type.sa, addr->length, NULL, 0, - NULL, (LPOVERLAPPED)lpo); - - /* - * Attach to task. - */ - isc_task_attach(task, &ntask); - cdev->ev_sender = ntask; - - sock->pending_connect = 1; - _set_state(sock, SOCK_CONNECT); - - /* - * Enqueue the request. - */ - INSIST(!ISC_LINK_LINKED(cdev, ev_link)); - ISC_LIST_ENQUEUE(sock->connect_list, cdev, ev_link); - sock->pending_iocp++; - } else if (sock->type == isc_sockettype_tcp) { - INSIST(sock->pending_connect); - INSIST(isc_sockaddr_equal(&sock->address, addr)); - isc_task_attach(task, &ntask); - cdev->ev_sender = ntask; - INSIST(!ISC_LINK_LINKED(cdev, ev_link)); - ISC_LIST_ENQUEUE(sock->connect_list, cdev, ev_link); - } else { - REQUIRE(!sock->pending_connect); - WSAConnect(sock->fd, &addr->type.sa, addr->length, NULL, NULL, - NULL, NULL); - cdev->result = ISC_R_SUCCESS; - isc_task_send(task, (isc_event_t **)&cdev); - } - CONSISTENT(sock); - UNLOCK(&sock->lock); - - return (ISC_R_SUCCESS); -} - -isc_result_t -isc_socket_getpeername(isc_socket_t *sock, isc_sockaddr_t *addressp) { - isc_result_t result; - - REQUIRE(VALID_SOCKET(sock)); - REQUIRE(addressp != NULL); - - LOCK(&sock->lock); - CONSISTENT(sock); - - /* - * make sure that the socket's not closed - */ - if (sock->fd == INVALID_SOCKET) { - UNLOCK(&sock->lock); - return (ISC_R_CONNREFUSED); - } - - if (sock->connected) { - *addressp = sock->address; - result = ISC_R_SUCCESS; - } else { - result = ISC_R_NOTCONNECTED; - } - - UNLOCK(&sock->lock); - - return (result); -} - -isc_result_t -isc_socket_getsockname(isc_socket_t *sock, isc_sockaddr_t *addressp) { - socklen_t len; - isc_result_t result; - char strbuf[ISC_STRERRORSIZE]; - - REQUIRE(VALID_SOCKET(sock)); - REQUIRE(addressp != NULL); - - LOCK(&sock->lock); - CONSISTENT(sock); - - /* - * make sure that the socket's not closed - */ - if (sock->fd == INVALID_SOCKET) { - UNLOCK(&sock->lock); - return (ISC_R_CONNREFUSED); - } - - if (!sock->bound) { - result = ISC_R_NOTBOUND; - goto out; - } - - result = ISC_R_SUCCESS; - - len = sizeof(addressp->type); - if (getsockname(sock->fd, &addressp->type.sa, (void *)&len) < 0) { - strerror_r(WSAGetLastError(), strbuf, sizeof(strbuf)); - UNEXPECTED_ERROR(__FILE__, __LINE__, "getsockname: %s", strbuf); - result = ISC_R_UNEXPECTED; - goto out; - } - addressp->length = (unsigned int)len; - -out: - UNLOCK(&sock->lock); - - return (result); -} - -/* - * Run through the list of events on this socket, and cancel the ones - * queued for task "task" of type "how". "how" is a bitmask. - */ -void -isc_socket_cancel(isc_socket_t *sock, isc_task_t *task, unsigned int how) { - REQUIRE(VALID_SOCKET(sock)); - - /* - * Quick exit if there is nothing to do. Don't even bother locking - * in this case. - */ - if (how == 0) { - return; - } - - LOCK(&sock->lock); - CONSISTENT(sock); - - /* - * make sure that the socket's not closed - */ - if (sock->fd == INVALID_SOCKET) { - UNLOCK(&sock->lock); - return; - } - - /* - * All of these do the same thing, more or less. - * Each will: - * o If the internal event is marked as "posted" try to - * remove it from the task's queue. If this fails, mark it - * as canceled instead, and let the task clean it up later. - * o For each I/O request for that task of that type, post - * its done event with status of "ISC_R_CANCELED". - * o Reset any state needed. - */ - - if ((how & ISC_SOCKCANCEL_RECV) != 0) { - isc_socketevent_t *dev; - isc_socketevent_t *next; - isc_task_t *current_task; - - dev = ISC_LIST_HEAD(sock->recv_list); - while (dev != NULL) { - current_task = dev->ev_sender; - next = ISC_LIST_NEXT(dev, ev_link); - if ((task == NULL) || (task == current_task)) { - dev->result = ISC_R_CANCELED; - send_recvdone_event(sock, &dev); - } - dev = next; - } - } - how &= ~ISC_SOCKCANCEL_RECV; - - if ((how & ISC_SOCKCANCEL_SEND) != 0) { - isc_socketevent_t *dev; - isc_socketevent_t *next; - isc_task_t *current_task; - - dev = ISC_LIST_HEAD(sock->send_list); - - while (dev != NULL) { - current_task = dev->ev_sender; - next = ISC_LIST_NEXT(dev, ev_link); - if ((task == NULL) || (task == current_task)) { - dev->result = ISC_R_CANCELED; - send_senddone_event(sock, &dev); - } - dev = next; - } - } - how &= ~ISC_SOCKCANCEL_SEND; - - if (((how & ISC_SOCKCANCEL_ACCEPT) != 0) && - !ISC_LIST_EMPTY(sock->accept_list)) { - isc_socket_newconnev_t *dev; - isc_socket_newconnev_t *next; - isc_task_t *current_task; - - dev = ISC_LIST_HEAD(sock->accept_list); - while (dev != NULL) { - current_task = dev->ev_sender; - next = ISC_LIST_NEXT(dev, ev_link); - - if ((task == NULL) || (task == current_task)) { - isc_refcount_decrementz( - &dev->newsocket->references); - closesocket(dev->newsocket->fd); - dev->newsocket->fd = INVALID_SOCKET; - free_socket(&dev->newsocket, __LINE__); - - dev->result = ISC_R_CANCELED; - send_acceptdone_event(sock, &dev); - } - - dev = next; - } - } - how &= ~ISC_SOCKCANCEL_ACCEPT; - - if (((how & ISC_SOCKCANCEL_CONNECT) != 0) && - !ISC_LIST_EMPTY(sock->connect_list)) - { - isc_socket_connev_t *dev; - isc_socket_connev_t *next; - isc_task_t *current_task; - - INSIST(sock->pending_connect); - - dev = ISC_LIST_HEAD(sock->connect_list); - - while (dev != NULL) { - current_task = dev->ev_sender; - next = ISC_LIST_NEXT(dev, ev_link); - if ((task == NULL) || (task == current_task)) { - dev->result = ISC_R_CANCELED; - send_connectdone_event(sock, &dev); - } - dev = next; - } - closesocket(sock->fd); - sock->fd = INVALID_SOCKET; - _set_state(sock, SOCK_CLOSED); - } - how &= ~ISC_SOCKCANCEL_CONNECT; - UNUSED(how); - - maybe_free_socket(&sock, __LINE__); -} - -isc_sockettype_t -isc_socket_gettype(isc_socket_t *sock) { - isc_sockettype_t type; - - REQUIRE(VALID_SOCKET(sock)); - - LOCK(&sock->lock); - - /* - * make sure that the socket's not closed - */ - if (sock->fd == INVALID_SOCKET) { - UNLOCK(&sock->lock); - return (ISC_R_CONNREFUSED); - } - - type = sock->type; - UNLOCK(&sock->lock); - return (type); -} - -void -isc_socket_ipv6only(isc_socket_t *sock, bool yes) { -#if defined(IPV6_V6ONLY) - int onoff = yes ? 1 : 0; -#else /* if defined(IPV6_V6ONLY) */ - UNUSED(yes); -#endif /* if defined(IPV6_V6ONLY) */ - - REQUIRE(VALID_SOCKET(sock)); - -#ifdef IPV6_V6ONLY - if (sock->pf == AF_INET6) { - (void)setsockopt(sock->fd, IPPROTO_IPV6, IPV6_V6ONLY, - (char *)&onoff, sizeof(onoff)); - } -#endif /* ifdef IPV6_V6ONLY */ -} - -void -isc_socket_dscp(isc_socket_t *sock, isc_dscp_t dscp) { -#if !defined(IP_TOS) && !defined(IPV6_TCLASS) - UNUSED(dscp); -#else /* if !defined(IP_TOS) && !defined(IPV6_TCLASS) */ - if (dscp < 0) { - return; - } - - dscp <<= 2; - dscp &= 0xff; -#endif /* if !defined(IP_TOS) && !defined(IPV6_TCLASS) */ - - REQUIRE(VALID_SOCKET(sock)); - -#ifdef IP_TOS - if (sock->pf == AF_INET) { - (void)setsockopt(sock->fd, IPPROTO_IP, IP_TOS, (char *)&dscp, - sizeof(dscp)); - } -#endif /* ifdef IP_TOS */ -#ifdef IPV6_TCLASS - if (sock->pf == AF_INET6) { - (void)setsockopt(sock->fd, IPPROTO_IPV6, IPV6_TCLASS, - (char *)&dscp, sizeof(dscp)); - } -#endif /* ifdef IPV6_TCLASS */ -} - -void -isc_socket_cleanunix(const isc_sockaddr_t *addr, bool active) { - UNUSED(addr); - UNUSED(active); -} - -isc_result_t -isc_socket_permunix(const isc_sockaddr_t *addr, uint32_t perm, uint32_t owner, - uint32_t group) { - UNUSED(addr); - UNUSED(perm); - UNUSED(owner); - UNUSED(group); - return (ISC_R_NOTIMPLEMENTED); -} - -void -isc_socket_setname(isc_socket_t *socket, const char *name, void *tag) { - /* - * Name 'socket'. - */ - - REQUIRE(VALID_SOCKET(socket)); - - LOCK(&socket->lock); - strlcpy(socket->name, name, sizeof(socket->name)); - socket->tag = tag; - UNLOCK(&socket->lock); -} - -const char * -isc_socket_getname(isc_socket_t *socket) { - return (socket->name); -} - -void * -isc_socket_gettag(isc_socket_t *socket) { - return (socket->tag); -} - -int -isc_socket_getfd(isc_socket_t *socket) { - return ((short)socket->fd); -} - -void -isc_socketmgr_setreserved(isc_socketmgr_t *manager, uint32_t reserved) { - UNUSED(manager); - UNUSED(reserved); -} - -isc_socketevent_t * -isc_socket_socketevent(isc_mem_t *mctx, void *sender, isc_eventtype_t eventtype, - isc_taskaction_t action, void *arg) { - return (allocate_socketevent(mctx, sender, eventtype, action, arg)); -} - -bool -isc_socket_hasreuseport(void) { - return (false); -} - -#ifdef HAVE_LIBXML2 - -static const char * -_socktype(isc_sockettype_t type) { - switch (type) { - case isc_sockettype_udp: - return ("udp"); - case isc_sockettype_tcp: - return ("tcp"); - case isc_sockettype_unix: - return ("unix"); - default: - return ("not-initialized"); - } -} - -#define TRY0(a) \ - do { \ - xmlrc = (a); \ - if (xmlrc < 0) \ - goto error; \ - } while (0) -int -isc_socketmgr_renderxml(isc_socketmgr_t *mgr, void *writer0) { - isc_socket_t *sock = NULL; - char peerbuf[ISC_SOCKADDR_FORMATSIZE]; - isc_sockaddr_t addr; - socklen_t len; - int xmlrc; - xmlTextWriterPtr writer = (xmlTextWriterPtr)writer0; - - LOCK(&mgr->lock); - - TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "sockets")); - sock = ISC_LIST_HEAD(mgr->socklist); - while (sock != NULL) { - LOCK(&sock->lock); - TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "socket")); - - TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "id")); - TRY0(xmlTextWriterWriteFormatString(writer, "%p", sock)); - TRY0(xmlTextWriterEndElement(writer)); - - if (sock->name[0] != 0) { - TRY0(xmlTextWriterStartElement(writer, - ISC_XMLCHAR "name")); - TRY0(xmlTextWriterWriteFormatString(writer, "%s", - sock->name)); - TRY0(xmlTextWriterEndElement(writer)); /* name */ - } - - TRY0(xmlTextWriterStartElement(writer, - ISC_XMLCHAR "references")); - TRY0(xmlTextWriterWriteFormatString( - writer, "%" PRIuFAST32, - isc_refcount_current(&sock->references))); - TRY0(xmlTextWriterEndElement(writer)); - - TRY0(xmlTextWriterWriteElement( - writer, ISC_XMLCHAR "type", - ISC_XMLCHAR _socktype(sock->type))); - - if (sock->connected) { - isc_sockaddr_format(&sock->address, peerbuf, - sizeof(peerbuf)); - TRY0(xmlTextWriterWriteElement( - writer, ISC_XMLCHAR "peer-address", - ISC_XMLCHAR peerbuf)); - } - - len = sizeof(addr); - if (getsockname(sock->fd, &addr.type.sa, (void *)&len) == 0) { - isc_sockaddr_format(&addr, peerbuf, sizeof(peerbuf)); - TRY0(xmlTextWriterWriteElement( - writer, ISC_XMLCHAR "local-address", - ISC_XMLCHAR peerbuf)); - } - - TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "states")); - if (sock->pending_recv) { - TRY0(xmlTextWriterWriteElement( - writer, ISC_XMLCHAR "state", - ISC_XMLCHAR "pending-receive")); - } - if (sock->pending_send) { - TRY0(xmlTextWriterWriteElement( - writer, ISC_XMLCHAR "state", - ISC_XMLCHAR "pending-send")); - } - if (sock->pending_accept) { - TRY0(xmlTextWriterWriteElement( - writer, ISC_XMLCHAR "state", - ISC_XMLCHAR "pending_accept")); - } - if (sock->listener) { - TRY0(xmlTextWriterWriteElement(writer, - ISC_XMLCHAR "state", - ISC_XMLCHAR "listener")); - } - if (sock->connected) { - TRY0(xmlTextWriterWriteElement( - writer, ISC_XMLCHAR "state", - ISC_XMLCHAR "connected")); - } - if (sock->pending_connect) { - TRY0(xmlTextWriterWriteElement( - writer, ISC_XMLCHAR "state", - ISC_XMLCHAR "connecting")); - } - if (sock->bound) { - TRY0(xmlTextWriterWriteElement(writer, - ISC_XMLCHAR "state", - ISC_XMLCHAR "bound")); - } - - TRY0(xmlTextWriterEndElement(writer)); /* states */ - - TRY0(xmlTextWriterEndElement(writer)); /* socket */ - - UNLOCK(&sock->lock); - sock = ISC_LIST_NEXT(sock, link); - } - TRY0(xmlTextWriterEndElement(writer)); /* sockets */ - -error: - if (sock != NULL) { - UNLOCK(&sock->lock); - } - - UNLOCK(&mgr->lock); - - return (xmlrc); -} -#endif /* HAVE_LIBXML2 */ - -#ifdef HAVE_JSON_C -#define CHECKMEM(m) \ - do { \ - if (m == NULL) { \ - result = ISC_R_NOMEMORY; \ - goto error; \ - } \ - } while (0) -isc_result_t -isc_socketmgr_renderjson(isc_socketmgr_t *mgr, void *stats0) { - isc_result_t result = ISC_R_SUCCESS; - isc_socket_t *sock = NULL; - char peerbuf[ISC_SOCKADDR_FORMATSIZE]; - isc_sockaddr_t addr; - socklen_t len; - json_object *obj, *array = json_object_new_array(); - json_object *stats = (json_object *)stats; - - CHECKMEM(array); - - LOCK(&mgr->lock); - -#ifdef USE_SHARED_MANAGER - obj = json_object_new_int(mgr->refs); - CHECKMEM(obj); - json_object_object_add(stats, "references", obj); -#endif /* USE_SHARED_MANAGER */ - - sock = ISC_LIST_HEAD(mgr->socklist); - while (sock != NULL) { - json_object *states, *entry = json_object_new_object(); - char buf[255]; - - CHECKMEM(entry); - json_object_array_add(array, entry); - - LOCK(&sock->lock); - - snprintf(buf, sizeof(buf), "%p", sock); - obj = json_object_new_string(buf); - CHECKMEM(obj); - json_object_object_add(entry, "id", obj); - - if (sock->name[0] != 0) { - obj = json_object_new_string(sock->name); - CHECKMEM(obj); - json_object_object_add(entry, "name", obj); - } - - obj = json_object_new_int( - isc_refcount_current(&sock->references)); - CHECKMEM(obj); - json_object_object_add(entry, "references", obj); - - obj = json_object_new_string(_socktype(sock->type)); - CHECKMEM(obj); - json_object_object_add(entry, "type", obj); - - if (sock->connected) { - isc_sockaddr_format(&sock->address, peerbuf, - sizeof(peerbuf)); - obj = json_object_new_string(peerbuf); - CHECKMEM(obj); - json_object_object_add(entry, "peer-address", obj); - } - - len = sizeof(addr); - if (getsockname(sock->fd, &addr.type.sa, (void *)&len) == 0) { - isc_sockaddr_format(&addr, peerbuf, sizeof(peerbuf)); - obj = json_object_new_string(peerbuf); - CHECKMEM(obj); - json_object_object_add(entry, "local-address", obj); - } - - states = json_object_new_array(); - CHECKMEM(states); - json_object_object_add(entry, "states", states); - - if (sock->pending_recv) { - obj = json_object_new_string("pending-receive"); - CHECKMEM(obj); - json_object_array_add(states, obj); - } - - if (sock->pending_send) { - obj = json_object_new_string("pending-send"); - CHECKMEM(obj); - json_object_array_add(states, obj); - } - - if (sock->pending_accept) { - obj = json_object_new_string("pending-accept"); - CHECKMEM(obj); - json_object_array_add(states, obj); - } - - if (sock->listener) { - obj = json_object_new_string("listener"); - CHECKMEM(obj); - json_object_array_add(states, obj); - } - - if (sock->connected) { - obj = json_object_new_string("connected"); - CHECKMEM(obj); - json_object_array_add(states, obj); - } - - if (sock->pending_connect) { - obj = json_object_new_string("connecting"); - CHECKMEM(obj); - json_object_array_add(states, obj); - } - - if (sock->bound) { - obj = json_object_new_string("bound"); - CHECKMEM(obj); - json_object_array_add(states, obj); - } - - UNLOCK(&sock->lock); - sock = ISC_LIST_NEXT(sock, link); - } - - json_object_object_add(stats, "sockets", array); - array = NULL; - result = ISC_R_SUCCESS; - -error: - if (array != NULL) { - json_object_put(array); - } - - if (sock != NULL) { - UNLOCK(&sock->lock); - } - - UNLOCK(&mgr->lock); - - return (result); -} -#endif /* HAVE_JSON_C */ - -void -isc_socketmgr_maxudp(isc_socketmgr_t *manager, unsigned int maxudp) { - REQUIRE(VALID_MANAGER(manager)); - - manager->maxudp = maxudp; -} diff --git a/lib/isc/win32/stdio.c b/lib/isc/win32/stdio.c deleted file mode 100644 index d77a640a07..0000000000 --- a/lib/isc/win32/stdio.c +++ /dev/null @@ -1,156 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#include -#include -#include -#include - -#include -#include - -#include "errno2result.h" - -isc_result_t -isc_stdio_open(const char *filename, const char *mode, FILE **fp) { - FILE *f; - - f = fopen(filename, mode); - if (f == NULL) { - return (isc__errno2result(errno)); - } - *fp = f; - return (ISC_R_SUCCESS); -} - -isc_result_t -isc_stdio_close(FILE *f) { - int r; - - r = fclose(f); - if (r == 0) { - return (ISC_R_SUCCESS); - } else { - return (isc__errno2result(errno)); - } -} - -isc_result_t -isc_stdio_seek(FILE *f, off_t offset, int whence) { - int r; - -#ifndef _WIN64 - r = fseek(f, offset, whence); -#else /* ifndef _WIN64 */ - r = _fseeki64(f, offset, whence); -#endif /* ifndef _WIN64 */ - if (r == 0) { - return (ISC_R_SUCCESS); - } else { - return (isc__errno2result(errno)); - } -} - -isc_result_t -isc_stdio_tell(FILE *f, off_t *offsetp) { -#ifndef _WIN64 - long r; -#else /* ifndef _WIN64 */ - __int64 r; -#endif /* ifndef _WIN64 */ - - REQUIRE(offsetp != NULL); - -#ifndef _WIN64 - r = ftell(f); -#else /* ifndef _WIN64 */ - r = _ftelli64(f); -#endif /* ifndef _WIN64 */ - if (r >= 0) { - *offsetp = r; - return (ISC_R_SUCCESS); - } else { - return (isc__errno2result(errno)); - } -} - -isc_result_t -isc_stdio_read(void *ptr, size_t size, size_t nmemb, FILE *f, size_t *nret) { - isc_result_t result = ISC_R_SUCCESS; - size_t r; - - clearerr(f); - r = fread(ptr, size, nmemb, f); - if (r != nmemb) { - if (feof(f)) { - result = ISC_R_EOF; - } else { - result = isc__errno2result(errno); - } - } - if (nret != NULL) { - *nret = r; - } - return (result); -} - -isc_result_t -isc_stdio_write(const void *ptr, size_t size, size_t nmemb, FILE *f, - size_t *nret) { - isc_result_t result = ISC_R_SUCCESS; - size_t r; - - clearerr(f); - r = fwrite(ptr, size, nmemb, f); - if (r != nmemb) { - result = isc__errno2result(errno); - } - if (nret != NULL) { - *nret = r; - } - return (result); -} - -isc_result_t -isc_stdio_flush(FILE *f) { - int r; - - r = fflush(f); - if (r == 0) { - return (ISC_R_SUCCESS); - } else { - return (isc__errno2result(errno)); - } -} - -isc_result_t -isc_stdio_sync(FILE *f) { - struct _stat buf; - int r; - - if (_fstat(_fileno(f), &buf) != 0) { - return (isc__errno2result(errno)); - } - - /* - * Only call _commit() on regular files. - */ - if ((buf.st_mode & S_IFMT) != S_IFREG) { - return (ISC_R_SUCCESS); - } - - r = _commit(_fileno(f)); - if (r == 0) { - return (ISC_R_SUCCESS); - } else { - return (isc__errno2result(errno)); - } -} diff --git a/lib/isc/win32/stdtime.c b/lib/isc/win32/stdtime.c deleted file mode 100644 index cff510a745..0000000000 --- a/lib/isc/win32/stdtime.c +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#include - -#include -#include -#include - -void -isc_stdtime_get(isc_stdtime_t *t) { - /* - * Set 't' to the number of seconds past 00:00:00 UTC, January 1, 1970. - */ - - REQUIRE(t != NULL); - - (void)_time32(t); -} - -void -isc_stdtime_tostring(isc_stdtime_t t, char *out, size_t outlen) { - time_t when; - - REQUIRE(out != NULL); - /* Minimum buffer as per ctime_r() specification. */ - REQUIRE(outlen >= 26); - - /* time_t and isc_stdtime_t might be different sizes */ - when = t; - INSIST((ctime_s(out, outlen, &when) == 0)); - *(out + strlen(out) - 1) = '\0'; -} diff --git a/lib/isc/win32/syslog.c b/lib/isc/win32/syslog.c deleted file mode 100644 index 96403e165d..0000000000 --- a/lib/isc/win32/syslog.c +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -static HANDLE hAppLog = NULL; -static FILE *log_stream; -static int debug_level = 0; - -static struct dsn_c_pvt_sfnt { - int val; - const char *strval; -} facilities[] = { { LOG_KERN, "kern" }, - { LOG_USER, "user" }, - { LOG_MAIL, "mail" }, - { LOG_DAEMON, "daemon" }, - { LOG_AUTH, "auth" }, - { LOG_SYSLOG, "syslog" }, - { LOG_LPR, "lpr" }, -#ifdef LOG_NEWS - { LOG_NEWS, "news" }, -#endif /* ifdef LOG_NEWS */ -#ifdef LOG_UUCP - { LOG_UUCP, "uucp" }, -#endif /* ifdef LOG_UUCP */ -#ifdef LOG_CRON - { LOG_CRON, "cron" }, -#endif /* ifdef LOG_CRON */ -#ifdef LOG_AUTHPRIV - { LOG_AUTHPRIV, "authpriv" }, -#endif /* ifdef LOG_AUTHPRIV */ -#ifdef LOG_FTP - { LOG_FTP, "ftp" }, -#endif /* ifdef LOG_FTP */ - { LOG_LOCAL0, "local0" }, - { LOG_LOCAL1, "local1" }, - { LOG_LOCAL2, "local2" }, - { LOG_LOCAL3, "local3" }, - { LOG_LOCAL4, "local4" }, - { LOG_LOCAL5, "local5" }, - { LOG_LOCAL6, "local6" }, - { LOG_LOCAL7, "local7" }, - { 0, NULL } }; - -isc_result_t -isc_syslog_facilityfromstring(const char *str, int *facilityp) { - int i; - - REQUIRE(str != NULL); - REQUIRE(facilityp != NULL); - - for (i = 0; facilities[i].strval != NULL; i++) { - if (strcasecmp(facilities[i].strval, str) == 0) { - *facilityp = facilities[i].val; - return (ISC_R_SUCCESS); - } - } - return (ISC_R_NOTFOUND); -} - -/* - * Log to the NT Event Log - */ -void -syslog(int level, const char *fmt, ...) { - va_list ap; - char buf[1024]; - char *str[1]; - - str[0] = buf; - - va_start(ap, fmt); - vsprintf(buf, fmt, ap); - va_end(ap); - - /* Make sure that the channel is open to write the event */ - if (hAppLog != NULL) { - switch (level) { - case LOG_INFO: - case LOG_NOTICE: - case LOG_DEBUG: - ReportEvent(hAppLog, EVENTLOG_INFORMATION_TYPE, 0, - BIND_INFO_MSG, NULL, 1, 0, str, NULL); - break; - case LOG_WARNING: - ReportEvent(hAppLog, EVENTLOG_WARNING_TYPE, 0, - BIND_WARN_MSG, NULL, 1, 0, str, NULL); - break; - default: - ReportEvent(hAppLog, EVENTLOG_ERROR_TYPE, 0, - BIND_ERR_MSG, NULL, 1, 0, str, NULL); - break; - } - } -} - -/* - * Initialize event logging - */ -void -openlog(const char *name, int flags, ...) { - /* Get a handle to the Application event log */ - hAppLog = RegisterEventSource(NULL, name); -} - -/* - * Close the Handle to the application Event Log - * We don't care whether or not we succeeded so ignore return values - * In fact if we failed then we would have nowhere to put the message - */ -void -closelog(void) { - DeregisterEventSource(hAppLog); -} - -/* - * Keep event logging synced with the current debug level - */ -void -ModifyLogLevel(int level) { - debug_level = level; -} - -/* - * Initialize logging for the port section of libbind. - * Piggyback onto stream given. - */ -void -InitNTLogging(FILE *stream, int debug) { - log_stream = stream; - ModifyLogLevel(debug); -} -/* - * This function is for reporting errors to the application - * event log in case the regular syslog is not available - * mainly during startup. It should not be used under normal - * circumstances. - */ -void -NTReportError(const char *name, const char *str) { - HANDLE hNTAppLog = NULL; - const char *buf[1]; - - buf[0] = str; - - hNTAppLog = RegisterEventSource(NULL, name); - - ReportEvent(hNTAppLog, EVENTLOG_ERROR_TYPE, 0, BIND_ERR_MSG, NULL, 1, 0, - buf, NULL); - - DeregisterEventSource(hNTAppLog); -} diff --git a/lib/isc/win32/syslog.h b/lib/isc/win32/syslog.h deleted file mode 100644 index 8571158a9a..0000000000 --- a/lib/isc/win32/syslog.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#ifndef _SYSLOG_H -#define _SYSLOG_H - -#include - -/* Constant definitions for openlog() */ -#define LOG_PID 1 -#define LOG_CONS 2 -/* NT event log does not support facility level */ -#define LOG_KERN 0 -#define LOG_USER 0 -#define LOG_MAIL 0 -#define LOG_DAEMON 0 -#define LOG_AUTH 0 -#define LOG_SYSLOG 0 -#define LOG_LPR 0 -#define LOG_LOCAL0 0 -#define LOG_LOCAL1 0 -#define LOG_LOCAL2 0 -#define LOG_LOCAL3 0 -#define LOG_LOCAL4 0 -#define LOG_LOCAL5 0 -#define LOG_LOCAL6 0 -#define LOG_LOCAL7 0 - -#define LOG_EMERG 0 /* system is unusable */ -#define LOG_ALERT 1 /* action must be taken immediately */ -#define LOG_CRIT 2 /* critical conditions */ -#define LOG_ERR 3 /* error conditions */ -#define LOG_WARNING 4 /* warning conditions */ -#define LOG_NOTICE 5 /* normal but signification condition */ -#define LOG_INFO 6 /* informational */ -#define LOG_DEBUG 7 /* debug-level messages */ - -void -syslog(int level, const char *fmt, ...); - -void -openlog(const char *, int, ...); - -void -closelog(void); - -void -ModifyLogLevel(int level); - -void -InitNTLogging(FILE *, int); - -void -NTReportError(const char *, const char *); -/* - * Include the event codes required for logging. - */ -#include - -#endif /* ifndef _SYSLOG_H */ diff --git a/lib/isc/win32/thread.c b/lib/isc/win32/thread.c deleted file mode 100644 index 9e9707b8bd..0000000000 --- a/lib/isc/win32/thread.c +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#include - -#include -#include -#include -#include -#include - -#include "trampoline_p.h" - -void -isc_thread_create(isc_threadfunc_t start, isc_threadarg_t arg, - isc_thread_t *threadp) { - isc_thread_t thread; - unsigned int id; - isc__trampoline_t *trampoline_arg; - - trampoline_arg = isc__trampoline_get(start, arg); - - thread = (isc_thread_t)_beginthreadex(NULL, 0, isc__trampoline_run, - trampoline_arg, 0, &id); - if (thread == NULL) { - char strbuf[ISC_STRERRORSIZE]; - strerror_r(errno, strbuf, sizeof(strbuf)); - isc_error_fatal(__FILE__, __LINE__, "_beginthreadex failed: %s", - strbuf); - } - - *threadp = thread; - - return; -} - -void -isc_thread_join(isc_thread_t thread, isc_threadresult_t *rp) { - DWORD result; - - result = WaitForSingleObject(thread, INFINITE); - if (result != WAIT_OBJECT_0) { - isc_error_fatal(__FILE__, __LINE__, - "WaitForSingleObject() != WAIT_OBJECT_0"); - } - if (rp != NULL && !GetExitCodeThread(thread, rp)) { - isc_error_fatal(__FILE__, __LINE__, - "GetExitCodeThread() failed: %d", - GetLastError()); - } - (void)CloseHandle(thread); -} - -void -isc_thread_setconcurrency(unsigned int level) { - /* - * This is unnecessary on Win32 systems, but is here so that the - * call exists - */ -} - -void -isc_thread_setname(isc_thread_t thread, const char *name) { - UNUSED(thread); - UNUSED(name); -} - -isc_result_t -isc_thread_setaffinity(int cpu) { - /* no-op on Windows for now */ - return (ISC_R_SUCCESS); -} diff --git a/lib/isc/win32/time.c b/lib/isc/win32/time.c deleted file mode 100644 index 316bc90430..0000000000 --- a/lib/isc/win32/time.c +++ /dev/null @@ -1,649 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -/* - * struct FILETIME uses "100-nanoseconds intervals". - * NS / S = 1000000000 (10^9). - * While it is reasonably obvious that this makes the needed - * conversion factor 10^7, it is coded this way for additional clarity. - */ -#define NS_PER_S 1000000000 -#define NS_INTERVAL 100 -#define INTERVALS_PER_S (NS_PER_S / NS_INTERVAL) - -/*** - *** Absolute Times - ***/ - -static const isc_time_t epoch = { { 0, 0 } }; -LIBISC_EXTERNAL_DATA const isc_time_t *const isc_time_epoch = &epoch; - -/*** - *** Intervals - ***/ - -static const isc_interval_t zero_interval = { 0 }; -LIBISC_EXTERNAL_DATA const isc_interval_t *const isc_interval_zero = - &zero_interval; - -void -isc_interval_set(isc_interval_t *i, unsigned int seconds, - unsigned int nanoseconds) { - REQUIRE(i != NULL); - REQUIRE(nanoseconds < NS_PER_S); - - /* - * This rounds nanoseconds up not down. - */ - i->interval = (LONGLONG)seconds * INTERVALS_PER_S + - (nanoseconds + NS_INTERVAL - 1) / NS_INTERVAL; -} - -bool -isc_interval_iszero(const isc_interval_t *i) { - REQUIRE(i != NULL); - if (i->interval == 0) { - return (true); - } - - return (false); -} - -void -isc_time_set(isc_time_t *t, unsigned int seconds, unsigned int nanoseconds) { - SYSTEMTIME epoch1970 = { 1970, 1, 4, 1, 0, 0, 0, 0 }; - FILETIME temp; - ULARGE_INTEGER i1; - - REQUIRE(t != NULL); - REQUIRE(nanoseconds < NS_PER_S); - - SystemTimeToFileTime(&epoch1970, &temp); - - i1.LowPart = temp.dwLowDateTime; - i1.HighPart = temp.dwHighDateTime; - - /* cppcheck-suppress unreadVariable */ - i1.QuadPart += (unsigned __int64)nanoseconds / 100; - /* cppcheck-suppress unreadVariable */ - i1.QuadPart += (unsigned __int64)seconds * 10000000; - - t->absolute.dwLowDateTime = i1.LowPart; - t->absolute.dwHighDateTime = i1.HighPart; -} - -void -isc_time_settoepoch(isc_time_t *t) { - REQUIRE(t != NULL); - - t->absolute.dwLowDateTime = 0; - t->absolute.dwHighDateTime = 0; -} - -bool -isc_time_isepoch(const isc_time_t *t) { - REQUIRE(t != NULL); - - if (t->absolute.dwLowDateTime == 0 && t->absolute.dwHighDateTime == 0) { - return (true); - } - - return (false); -} - -isc_result_t -isc_time_now(isc_time_t *t) { - REQUIRE(t != NULL); - - GetSystemTimeAsFileTime(&t->absolute); - - return (ISC_R_SUCCESS); -} - -isc_result_t -isc_time_now_hires(isc_time_t *t) { - REQUIRE(t != NULL); - - GetSystemTimePreciseAsFileTime(&t->absolute); - - return (ISC_R_SUCCESS); -} - -isc_result_t -isc_time_nowplusinterval(isc_time_t *t, const isc_interval_t *i) { - ULARGE_INTEGER i1; - - REQUIRE(t != NULL); - REQUIRE(i != NULL); - - GetSystemTimeAsFileTime(&t->absolute); - - i1.LowPart = t->absolute.dwLowDateTime; - i1.HighPart = t->absolute.dwHighDateTime; - - if (UINT64_MAX - i1.QuadPart < (unsigned __int64)i->interval) { - return (ISC_R_RANGE); - } - - /* cppcheck-suppress unreadVariable */ - i1.QuadPart += i->interval; - - t->absolute.dwLowDateTime = i1.LowPart; - t->absolute.dwHighDateTime = i1.HighPart; - - return (ISC_R_SUCCESS); -} - -int -isc_time_compare(const isc_time_t *t1, const isc_time_t *t2) { - REQUIRE(t1 != NULL && t2 != NULL); - - return ((int)CompareFileTime(&t1->absolute, &t2->absolute)); -} - -isc_result_t -isc_time_add(const isc_time_t *t, const isc_interval_t *i, isc_time_t *result) { - ULARGE_INTEGER i1; - - REQUIRE(t != NULL && i != NULL && result != NULL); - - i1.LowPart = t->absolute.dwLowDateTime; - i1.HighPart = t->absolute.dwHighDateTime; - - if (UINT64_MAX - i1.QuadPart < (unsigned __int64)i->interval) { - return (ISC_R_RANGE); - } - - /* cppcheck-suppress unreadVariable */ - i1.QuadPart += i->interval; - - result->absolute.dwLowDateTime = i1.LowPart; - result->absolute.dwHighDateTime = i1.HighPart; - - return (ISC_R_SUCCESS); -} - -isc_result_t -isc_time_subtract(const isc_time_t *t, const isc_interval_t *i, - isc_time_t *result) { - ULARGE_INTEGER i1; - - REQUIRE(t != NULL && i != NULL && result != NULL); - - i1.LowPart = t->absolute.dwLowDateTime; - i1.HighPart = t->absolute.dwHighDateTime; - - if (i1.QuadPart < (unsigned __int64)i->interval) { - return (ISC_R_RANGE); - } - - /* cppcheck-suppress unreadVariable */ - i1.QuadPart -= i->interval; - - result->absolute.dwLowDateTime = i1.LowPart; - result->absolute.dwHighDateTime = i1.HighPart; - - return (ISC_R_SUCCESS); -} - -uint64_t -isc_time_microdiff(const isc_time_t *t1, const isc_time_t *t2) { - ULARGE_INTEGER i1, i2; - LONGLONG i3; - - REQUIRE(t1 != NULL && t2 != NULL); - - /* cppcheck-suppress unreadVariable */ - i1.LowPart = t1->absolute.dwLowDateTime; - /* cppcheck-suppress unreadVariable */ - i1.HighPart = t1->absolute.dwHighDateTime; - /* cppcheck-suppress unreadVariable */ - i2.LowPart = t2->absolute.dwLowDateTime; - /* cppcheck-suppress unreadVariable */ - i2.HighPart = t2->absolute.dwHighDateTime; - - if (i1.QuadPart <= i2.QuadPart) { - return (0); - } - - /* - * Convert to microseconds. - */ - i3 = (i1.QuadPart - i2.QuadPart) / 10; - - return (i3); -} - -uint32_t -isc_time_seconds(const isc_time_t *t) { - SYSTEMTIME epoch1970 = { 1970, 1, 4, 1, 0, 0, 0, 0 }; - FILETIME temp; - ULARGE_INTEGER i1, i2; - LONGLONG i3; - - SystemTimeToFileTime(&epoch1970, &temp); - - /* cppcheck-suppress unreadVariable */ - i1.LowPart = t->absolute.dwLowDateTime; - /* cppcheck-suppress unreadVariable */ - i1.HighPart = t->absolute.dwHighDateTime; - /* cppcheck-suppress unreadVariable */ - i2.LowPart = temp.dwLowDateTime; - /* cppcheck-suppress unreadVariable */ - i2.HighPart = temp.dwHighDateTime; - - i3 = (i1.QuadPart - i2.QuadPart) / 10000000; - - return ((uint32_t)i3); -} - -isc_result_t -isc_time_secondsastimet(const isc_time_t *t, time_t *secondsp) { - time_t seconds; - - REQUIRE(t != NULL); - - seconds = (time_t)isc_time_seconds(t); - - INSIST(sizeof(unsigned int) == sizeof(uint32_t)); - INSIST(sizeof(time_t) >= sizeof(uint32_t)); - - if (isc_time_seconds(t) > (~0U >> 1) && seconds <= (time_t)(~0U >> 1)) { - return (ISC_R_RANGE); - } - - *secondsp = seconds; - - return (ISC_R_SUCCESS); -} - -uint32_t -isc_time_nanoseconds(const isc_time_t *t) { - ULARGE_INTEGER i; - - i.LowPart = t->absolute.dwLowDateTime; - i.HighPart = t->absolute.dwHighDateTime; - return ((uint32_t)(i.QuadPart % 10000000) * 100); -} - -void -isc_time_formattimestamp(const isc_time_t *t, char *buf, unsigned int len) { - FILETIME localft; - SYSTEMTIME st; - char DateBuf[50]; - char TimeBuf[50]; - - REQUIRE(t != NULL); - REQUIRE(buf != NULL); - REQUIRE(len > 0); - - if (FileTimeToLocalFileTime(&t->absolute, &localft) && - FileTimeToSystemTime(&localft, &st)) - { - GetDateFormat(LOCALE_USER_DEFAULT, 0, &st, "dd-MMM-yyyy", - DateBuf, 50); - GetTimeFormat(LOCALE_USER_DEFAULT, - TIME_NOTIMEMARKER | TIME_FORCE24HOURFORMAT, &st, - NULL, TimeBuf, 50); - - snprintf(buf, len, "%s %s.%03u", DateBuf, TimeBuf, - st.wMilliseconds); - } else { - strlcpy(buf, "99-Bad-9999 99:99:99.999", len); - } -} - -void -isc_time_formathttptimestamp(const isc_time_t *t, char *buf, unsigned int len) { - SYSTEMTIME st; - char DateBuf[50]; - char TimeBuf[50]; - - /* strftime() format: "%a, %d %b %Y %H:%M:%S GMT" */ - - REQUIRE(t != NULL); - REQUIRE(buf != NULL); - REQUIRE(len > 0); - - if (FileTimeToSystemTime(&t->absolute, &st)) { - GetDateFormat(LOCALE_USER_DEFAULT, 0, &st, "ddd',' dd MMM yyyy", - DateBuf, 50); - GetTimeFormat(LOCALE_USER_DEFAULT, - TIME_NOTIMEMARKER | TIME_FORCE24HOURFORMAT, &st, - "hh':'mm':'ss", TimeBuf, 50); - - snprintf(buf, len, "%s %s GMT", DateBuf, TimeBuf); - } else { - buf[0] = 0; - } -} - -isc_result_t -isc_time_parsehttptimestamp(char *buf, isc_time_t *t) { - struct tm t_tm; - time_t when; - char *p; - - REQUIRE(buf != NULL); - REQUIRE(t != NULL); - - p = isc_tm_strptime(buf, "%a, %d %b %Y %H:%M:%S", &t_tm); - if (p == NULL) { - return (ISC_R_UNEXPECTED); - } - when = isc_tm_timegm(&t_tm); - if (when == -1) { - return (ISC_R_UNEXPECTED); - } - isc_time_set(t, (unsigned int)when, 0); - return (ISC_R_SUCCESS); -} - -void -isc_time_formatISO8601L(const isc_time_t *t, char *buf, unsigned int len) { - SYSTEMTIME st; - char DateBuf[50]; - char TimeBuf[50]; - - /* strtime() format: "%Y-%m-%dT%H:%M:%S" */ - - REQUIRE(t != NULL); - REQUIRE(buf != NULL); - REQUIRE(len > 0); - - if (FileTimeToSystemTime(&t->absolute, &st)) { - GetDateFormat(LOCALE_USER_DEFAULT, 0, &st, "yyyy-MM-dd", - DateBuf, 50); - GetTimeFormat(LOCALE_USER_DEFAULT, - TIME_NOTIMEMARKER | TIME_FORCE24HOURFORMAT, &st, - "hh':'mm':'ss", TimeBuf, 50); - snprintf(buf, len, "%sT%s", DateBuf, TimeBuf); - } else { - buf[0] = 0; - } -} - -void -isc_time_formatISO8601Lms(const isc_time_t *t, char *buf, unsigned int len) { - SYSTEMTIME st; - char DateBuf[50]; - char TimeBuf[50]; - - /* strtime() format: "%Y-%m-%dT%H:%M:%S.SSS" */ - - REQUIRE(t != NULL); - REQUIRE(buf != NULL); - REQUIRE(len > 0); - - if (FileTimeToSystemTime(&t->absolute, &st)) { - GetDateFormat(LOCALE_USER_DEFAULT, 0, &st, "yyyy-MM-dd", - DateBuf, 50); - GetTimeFormat(LOCALE_USER_DEFAULT, - TIME_NOTIMEMARKER | TIME_FORCE24HOURFORMAT, &st, - "hh':'mm':'ss", TimeBuf, 50); - snprintf(buf, len, "%sT%s.%03u", DateBuf, TimeBuf, - st.wMilliseconds); - } else { - buf[0] = 0; - } -} - -void -isc_time_formatISO8601Lus(const isc_time_t *t, char *buf, unsigned int len) { - SYSTEMTIME st; - char DateBuf[50]; - char TimeBuf[50]; - - /* strtime() format: "%Y-%m-%dT%H:%M:%S.SSSSSS" */ - - REQUIRE(t != NULL); - REQUIRE(buf != NULL); - REQUIRE(len > 0); - - if (FileTimeToSystemTime(&t->absolute, &st)) { - ULARGE_INTEGER i; - - GetDateFormat(LOCALE_USER_DEFAULT, 0, &st, "yyyy-MM-dd", - DateBuf, 50); - GetTimeFormat(LOCALE_USER_DEFAULT, - TIME_NOTIMEMARKER | TIME_FORCE24HOURFORMAT, &st, - "hh':'mm':'ss", TimeBuf, 50); - i.LowPart = t->absolute.dwLowDateTime; - i.HighPart = t->absolute.dwHighDateTime; - snprintf(buf, len, "%sT%s.%06u", DateBuf, TimeBuf, - (uint32_t)(i.QuadPart % 10000000) / 10); - } else { - buf[0] = 0; - } -} - -void -isc_time_formatISO8601(const isc_time_t *t, char *buf, unsigned int len) { - SYSTEMTIME st; - char DateBuf[50]; - char TimeBuf[50]; - - /* strtime() format: "%Y-%m-%dT%H:%M:%SZ" */ - - REQUIRE(t != NULL); - REQUIRE(buf != NULL); - REQUIRE(len > 0); - - if (FileTimeToSystemTime(&t->absolute, &st)) { - GetDateFormat(LOCALE_NEUTRAL, 0, &st, "yyyy-MM-dd", DateBuf, - 50); - GetTimeFormat(LOCALE_NEUTRAL, - TIME_NOTIMEMARKER | TIME_FORCE24HOURFORMAT, &st, - "hh':'mm':'ss", TimeBuf, 50); - snprintf(buf, len, "%sT%sZ", DateBuf, TimeBuf); - } else { - buf[0] = 0; - } -} - -void -isc_time_formatISO8601ms(const isc_time_t *t, char *buf, unsigned int len) { - SYSTEMTIME st; - char DateBuf[50]; - char TimeBuf[50]; - - /* strtime() format: "%Y-%m-%dT%H:%M:%S.SSSZ" */ - - REQUIRE(t != NULL); - REQUIRE(buf != NULL); - REQUIRE(len > 0); - - if (FileTimeToSystemTime(&t->absolute, &st)) { - GetDateFormat(LOCALE_NEUTRAL, 0, &st, "yyyy-MM-dd", DateBuf, - 50); - GetTimeFormat(LOCALE_NEUTRAL, - TIME_NOTIMEMARKER | TIME_FORCE24HOURFORMAT, &st, - "hh':'mm':'ss", TimeBuf, 50); - snprintf(buf, len, "%sT%s.%03uZ", DateBuf, TimeBuf, - st.wMilliseconds); - } else { - buf[0] = 0; - } -} - -void -isc_time_formatISO8601us(const isc_time_t *t, char *buf, unsigned int len) { - SYSTEMTIME st; - char DateBuf[50]; - char TimeBuf[50]; - - /* strtime() format: "%Y-%m-%dT%H:%M:%S.SSSSSSZ" */ - - REQUIRE(t != NULL); - REQUIRE(buf != NULL); - REQUIRE(len > 0); - - if (FileTimeToSystemTime(&t->absolute, &st)) { - ULARGE_INTEGER i; - - GetDateFormat(LOCALE_NEUTRAL, 0, &st, "yyyy-MM-dd", DateBuf, - 50); - GetTimeFormat(LOCALE_NEUTRAL, - TIME_NOTIMEMARKER | TIME_FORCE24HOURFORMAT, &st, - "hh':'mm':'ss", TimeBuf, 50); - i.LowPart = t->absolute.dwLowDateTime; - i.HighPart = t->absolute.dwHighDateTime; - snprintf(buf, len, "%sT%s.%06uZ", DateBuf, TimeBuf, - (uint32_t)(i.QuadPart % 10000000) / 10); - } else { - buf[0] = 0; - } -} - -void -isc_time_formatshorttimestamp(const isc_time_t *t, char *buf, - unsigned int len) { - SYSTEMTIME st; - char DateBuf[50]; - char TimeBuf[50]; - - /* strtime() format: "%Y%m%d%H%M%SSSS" */ - - REQUIRE(t != NULL); - REQUIRE(buf != NULL); - REQUIRE(len > 0); - - if (FileTimeToSystemTime(&t->absolute, &st)) { - GetDateFormat(LOCALE_NEUTRAL, 0, &st, "yyyyMMdd", DateBuf, 50); - GetTimeFormat(LOCALE_NEUTRAL, - TIME_NOTIMEMARKER | TIME_FORCE24HOURFORMAT, &st, - "hhmmss", TimeBuf, 50); - snprintf(buf, len, "%s%s%03u", DateBuf, TimeBuf, - st.wMilliseconds); - } else { - buf[0] = 0; - } -} - -/* - * POSIX Shims - */ - -struct tm * -gmtime_r(const time_t *clock, struct tm *result) { - errno_t ret = gmtime_s(result, clock); - if (ret != 0) { - errno = ret; - return (NULL); - } - return (result); -} - -struct tm * -localtime_r(const time_t *clock, struct tm *result) { - errno_t ret = localtime_s(result, clock); - if (ret != 0) { - errno = ret; - return (NULL); - } - return (result); -} - -#define BILLION 1000000000 - -static isc_once_t nsec_ticks_once = ISC_ONCE_INIT; -static double nsec_ticks = 0; - -static void -nsec_ticks_init(void) { - LARGE_INTEGER ticks; - RUNTIME_CHECK(QueryPerformanceFrequency(&ticks) != 0); - nsec_ticks = (double)ticks.QuadPart / 1000000000.0; - RUNTIME_CHECK(nsec_ticks != 0.0); -} - -int -nanosleep(const struct timespec *req, struct timespec *rem) { - int_fast64_t sleep_msec; - uint_fast64_t ticks, until; - LARGE_INTEGER before, after; - - RUNTIME_CHECK(isc_once_do(&nsec_ticks_once, nsec_ticks_init) == - ISC_R_SUCCESS); - - if (req->tv_nsec < 0 || BILLION <= req->tv_nsec) { - errno = EINVAL; - return (-1); - } - - /* Sleep() is not interruptible; there is no remaining delay ever */ - if (rem != NULL) { - rem->tv_sec = 0; - rem->tv_nsec = 0; - } - - if (req->tv_sec >= 0) { - /* - * For requested delays of one second or more, 15ms resolution - * granularity is sufficient. - */ - Sleep(req->tv_sec * 1000 + req->tv_nsec / 1000000); - - return (0); - } - - /* Sleep has <-8,8> ms precision, so substract 10 milliseconds */ - sleep_msec = (int64_t)req->tv_nsec / 1000000 - 10; - ticks = req->tv_nsec * nsec_ticks; - - RUNTIME_CHECK(QueryPerformanceCounter(&before) != 0); - - until = before.QuadPart + ticks; - - if (sleep_msec > 0) { - Sleep(sleep_msec); - } - - while (true) { - LARGE_INTEGER after; - RUNTIME_CHECK(QueryPerformanceCounter(&after) != 0); - if (after.QuadPart >= until) { - break; - } - } - -done: - return (0); -} - -int -usleep(useconds_t useconds) { - struct timespec req; - - req.tv_sec = useconds / 1000000; - req.tv_nsec = (useconds * 1000) % 1000000000; - - nanosleep(&req, NULL); - - return (0); -} diff --git a/lib/isc/win32/unistd.h b/lib/isc/win32/unistd.h deleted file mode 100644 index 9025fdcc9d..0000000000 --- a/lib/isc/win32/unistd.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/* None of these are defined in NT, so define them for our use */ -#define O_NONBLOCK 1 - -/* - * fcntl() commands - */ -#define F_SETFL 0 -#define F_GETFL 1 -#define F_SETFD 2 -#define F_GETFD 3 -/* - * Enough problems not having full fcntl() without worrying about this! - */ -#undef F_DUPFD - -int -fcntl(int, int, ...); - -/* - * access() related definitions for winXP - */ -#include -#ifndef F_OK -#define F_OK 0 -#endif /* ifndef F_OK */ - -#ifndef X_OK -#define X_OK 1 -#endif /* ifndef X_OK */ - -#ifndef W_OK -#define W_OK 2 -#endif /* ifndef W_OK */ - -#ifndef R_OK -#define R_OK 4 -#endif /* ifndef R_OK */ - -#define access _access - -#include diff --git a/lib/isc/win32/win32os.c b/lib/isc/win32/win32os.c deleted file mode 100644 index c2c436abdc..0000000000 --- a/lib/isc/win32/win32os.c +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#include - -#ifndef TESTVERSION -#include -#else /* ifndef TESTVERSION */ -#include - -#include -#endif /* ifndef TESTVERSION */ -#include - -int -isc_win32os_versioncheck(unsigned int major, unsigned int minor, - unsigned int spmajor, unsigned int spminor) { - OSVERSIONINFOEX osVer; - DWORD typeMask; - ULONGLONG conditionMask; - - memset(&osVer, 0, sizeof(OSVERSIONINFOEX)); - osVer.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); - typeMask = 0; - conditionMask = 0; - - /* Optimistic: likely greater */ - osVer.dwMajorVersion = major; - typeMask |= VER_MAJORVERSION; - conditionMask = VerSetConditionMask(conditionMask, VER_MAJORVERSION, - VER_GREATER); - osVer.dwMinorVersion = minor; - typeMask |= VER_MINORVERSION; - conditionMask = VerSetConditionMask(conditionMask, VER_MINORVERSION, - VER_GREATER); - osVer.wServicePackMajor = spmajor; - typeMask |= VER_SERVICEPACKMAJOR; - conditionMask = VerSetConditionMask(conditionMask, VER_SERVICEPACKMAJOR, - VER_GREATER); - osVer.wServicePackMinor = spminor; - typeMask |= VER_SERVICEPACKMINOR; - conditionMask = VerSetConditionMask(conditionMask, VER_SERVICEPACKMINOR, - VER_GREATER); - if (VerifyVersionInfo(&osVer, typeMask, conditionMask)) { - return (1); - } - - /* Failed: retry with equal */ - conditionMask = 0; - conditionMask = VerSetConditionMask(conditionMask, VER_MAJORVERSION, - VER_EQUAL); - conditionMask = VerSetConditionMask(conditionMask, VER_MINORVERSION, - VER_EQUAL); - conditionMask = VerSetConditionMask(conditionMask, VER_SERVICEPACKMAJOR, - VER_EQUAL); - conditionMask = VerSetConditionMask(conditionMask, VER_SERVICEPACKMINOR, - VER_EQUAL); - if (VerifyVersionInfo(&osVer, typeMask, conditionMask)) { - return (0); - } else { - return (-1); - } -} - -#ifdef TESTVERSION -int -main(int argc, char **argv) { - unsigned int major = 0; - unsigned int minor = 0; - unsigned int spmajor = 0; - unsigned int spminor = 0; - int ret; - - if (argc > 1) { - --argc; - ++argv; - major = (unsigned int)atoi(argv[0]); - } - if (argc > 1) { - --argc; - ++argv; - minor = (unsigned int)atoi(argv[0]); - } - if (argc > 1) { - --argc; - ++argv; - spmajor = (unsigned int)atoi(argv[0]); - } - if (argc > 1) { - --argc; - POST(argc); - ++argv; - spminor = (unsigned int)atoi(argv[0]); - } - - ret = isc_win32os_versioncheck(major, minor, spmajor, spminor); - - printf("%s major %u minor %u SP major %u SP minor %u\n", - ret > 0 ? "greater" : (ret == 0 ? "equal" : "less"), major, - minor, spmajor, spminor); - return (ret); -} -#endif /* ifdef TESTVERSION */ diff --git a/lib/isccc/win32/DLLMain.c b/lib/isccc/win32/DLLMain.c deleted file mode 100644 index 150de214e4..0000000000 --- a/lib/isccc/win32/DLLMain.c +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#include -#include - -/* - * Called when we enter the DLL - */ -__declspec(dllexport) BOOL WINAPI - DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { - switch (fdwReason) { - /* - * The DLL is loading due to process - * initialization or a call to LoadLibrary. - */ - case DLL_PROCESS_ATTACH: - break; - - /* The attached process creates a new thread. */ - case DLL_THREAD_ATTACH: - break; - - /* The thread of the attached process terminates. */ - case DLL_THREAD_DETACH: - break; - - /* - * The DLL is unloading from a process due to - * process termination or a call to FreeLibrary. - */ - case DLL_PROCESS_DETACH: - break; - - default: - break; - } - return (TRUE); -} diff --git a/lib/isccc/win32/libisccc.def b/lib/isccc/win32/libisccc.def deleted file mode 100644 index 5cb5662b0c..0000000000 --- a/lib/isccc/win32/libisccc.def +++ /dev/null @@ -1,65 +0,0 @@ -LIBRARY libisccc - -; Exported Functions -EXPORTS - -isccc_alist_create -isccc_alist_alistp -isccc_alist_emptyp -isccc_alist_first -isccc_alist_assq -isccc_alist_delete -isccc_alist_define -isccc_alist_definestring -isccc_alist_definebinary -isccc_alist_lookup -isccc_alist_lookupstring -isccc_alist_lookupbinary -isccc_alist_prettyprint -isccc_base64_encode -isccc_base64_decode -isccc_cc_towire -isccc_cc_fromwire -isccc_cc_createmessage -isccc_cc_createack -isccc_cc_isack -isccc_cc_isreply -isccc_cc_createresponse -isccc_cc_definestring -isccc_cc_defineuint32 -isccc_cc_lookupstring -isccc_cc_lookupuint32 -isccc_cc_createsymtab -isccc_cc_cleansymtab -isccc_cc_checkdup -isccc_ccmsg_init -isccc_ccmsg_setmaxsize -isccc_ccmsg_readmessage -isccc_ccmsg_cancelread -isccc_ccmsg_invalidate -isccc_result_totext -isccc_result_register -isccc_sexpr_cons -isccc_sexpr_tconst -isccc_sexpr_fromstring -isccc_sexpr_frombinary -isccc_sexpr_free -isccc_sexpr_print -isccc_sexpr_car -isccc_sexpr_cdr -isccc_sexpr_setcar -isccc_sexpr_setcdr -isccc_sexpr_addtolist -isccc_sexpr_listp -isccc_sexpr_emptyp -isccc_sexpr_stringp -isccc_sexpr_binaryp -isccc_sexpr_tostring -isccc_sexpr_tobinary -isccc_symtab_destroy -isccc_symtab_create -isccc_symtab_destroy -isccc_symtab_lookup -isccc_symtab_define -isccc_symtab_undefine -isccc_symtab_foreach diff --git a/lib/isccc/win32/libisccc.vcxproj.filters.in b/lib/isccc/win32/libisccc.vcxproj.filters.in deleted file mode 100644 index dda104217a..0000000000 --- a/lib/isccc/win32/libisccc.vcxproj.filters.in +++ /dev/null @@ -1,81 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - diff --git a/lib/isccc/win32/libisccc.vcxproj.in b/lib/isccc/win32/libisccc.vcxproj.in deleted file mode 100644 index b4297cec17..0000000000 --- a/lib/isccc/win32/libisccc.vcxproj.in +++ /dev/null @@ -1,151 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {B556705F-1920-4400-878A-B259D3556047} - Win32Proj - libisccc - @WINDOWS_TARGET_PLATFORM_VERSION@ - - - - DynamicLibrary - true - MultiByte - @PLATFORM_TOOLSET@ - - - DynamicLibrary - false - true - MultiByte - @PLATFORM_TOOLSET@ - - - - - - - - - - - - - true - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - - - false - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - - - - - - Level4 - false - Disabled - WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBISCCC_EXPORTS;%(PreprocessorDefinitions);%(PreprocessorDefinitions) - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@include;..\include;..\..\isc\win32;..\..\isc\win32\include;..\..\isc\include;..\..\dns\include;%(AdditionalIncludeDirectories) - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - true - CompileAsC - - - Console - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - ..\..\isc\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@libisc.lib;ws2_32.lib;%(AdditionalDependencies) - $(ProjectName).def - .\$(Configuration)\$(ProjectName).lib - - - - - Level1 - true - - - MaxSpeed - true - @INTRINSIC@ - WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBISCCC_EXPORTS;%(PreprocessorDefinitions);%(PreprocessorDefinitions) - ..\..\..\config.h - .\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@include;..\include;..\..\isc\win32;..\..\isc\win32\include;..\..\isc\include;..\..\dns\include;%(AdditionalIncludeDirectories) - OnlyExplicitInline - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - false - CompileAsC - - - Console - false - true - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - ..\..\isc\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@libisc.lib;ws2_32.lib;%(AdditionalDependencies) - $(ProjectName).def - .\$(Configuration)\$(ProjectName).lib - Default - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {3840E563-D180-4761-AA9C-E6155F02EAFF} - - - - - - diff --git a/lib/isccc/win32/libisccc.vcxproj.user b/lib/isccc/win32/libisccc.vcxproj.user deleted file mode 100644 index ace9a86acb..0000000000 --- a/lib/isccc/win32/libisccc.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/lib/isccfg/win32/DLLMain.c b/lib/isccfg/win32/DLLMain.c deleted file mode 100644 index 2beacb05fe..0000000000 --- a/lib/isccfg/win32/DLLMain.c +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#include -#include - -/* - * Called when we enter the DLL - */ -__declspec(dllexport) BOOL WINAPI - DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { - switch (fdwReason) { - /* - * The DLL is loading due to process - * initialization or a call to LoadLibrary. - */ - case DLL_PROCESS_ATTACH: - break; - - /* - * The attached process creates a new thread. - */ - case DLL_THREAD_ATTACH: - break; - - /* The thread of the attached process terminates. */ - case DLL_THREAD_DETACH: - break; - - /* - * The DLL is unloading from a process due to - * process termination or a call to FreeLibrary. - */ - case DLL_PROCESS_DETACH: - break; - - default: - break; - } - return (TRUE); -} diff --git a/lib/isccfg/win32/libisccfg.def b/lib/isccfg/win32/libisccfg.def deleted file mode 100644 index eba897ec30..0000000000 --- a/lib/isccfg/win32/libisccfg.def +++ /dev/null @@ -1,175 +0,0 @@ -LIBRARY libisccfg - -; Exported Functions -EXPORTS - -cfg_acl_fromconfig -cfg_acl_fromconfig2 -cfg_aclconfctx_attach -cfg_aclconfctx_create -cfg_aclconfctx_detach -cfg_clause_validforzone -cfg_create_list -cfg_create_obj -cfg_create_tuple -cfg_doc_bracketed_list -cfg_doc_enum -cfg_doc_enum_or_other -cfg_doc_map -cfg_doc_mapbody -cfg_doc_obj -cfg_doc_sockaddr -cfg_doc_terminal -cfg_doc_tuple -cfg_doc_void -cfg_gettoken -cfg_is_enum -cfg_kasp_fromconfig -cfg_list_first -cfg_list_length -cfg_list_next -cfg_listelt_value -cfg_log_init -cfg_lookingat_netaddr -cfg_map_count -cfg_map_firstclause -cfg_map_get -cfg_map_getname -cfg_map_nextclause -cfg_obj_asboolean -cfg_obj_asduration -cfg_obj_asfixedpoint -cfg_obj_asnetprefix -cfg_obj_aspercentage -cfg_obj_assockaddr -cfg_obj_asstring -cfg_obj_asuint32 -cfg_obj_asuint64 -cfg_obj_attach -cfg_obj_destroy -cfg_obj_file -cfg_obj_getdscp -cfg_obj_isboolean -cfg_obj_isduration -cfg_obj_isfixedpoint -cfg_obj_islist -cfg_obj_ismap -cfg_obj_isnetprefix -cfg_obj_ispercentage -cfg_obj_issockaddr -cfg_obj_isstring -cfg_obj_istuple -cfg_obj_istype -cfg_obj_isuint32 -cfg_obj_isuint64 -cfg_obj_isvoid -cfg_obj_line -cfg_obj_log -cfg_parse_addressed_map -cfg_parse_astring -cfg_parse_boolean -cfg_parse_bracketed_list -cfg_parse_buffer -cfg_parse_dscp -cfg_parse_duration -cfg_parse_duration_or_unlimited -cfg_parse_enum -cfg_parse_enum_or_other -cfg_parse_file -cfg_parse_fixedpoint -cfg_parse_listelt -cfg_parse_map -cfg_parse_mapbody -cfg_parse_named_map -cfg_parse_netprefix -cfg_parse_netprefix_map -cfg_parse_obj -cfg_parse_percentage -cfg_parse_qstring -cfg_parse_rawaddr -cfg_parse_rawport -cfg_parse_sockaddr -cfg_parse_spacelist -cfg_parse_special -cfg_parse_sstring -cfg_parse_tuple -cfg_parse_uint32 -cfg_parse_void -cfg_parser_attach -cfg_parser_create -cfg_parser_destroy -cfg_parser_error -cfg_parser_mapadd -cfg_parser_reset -cfg_parser_setcallback -cfg_parser_setflags -cfg_parser_warning -cfg_peektoken -cfg_pluginlist_foreach -cfg_print -cfg_print_boolean -cfg_print_bracketed_list -cfg_print_chars -cfg_print_clauseflags -cfg_print_cstr -cfg_print_duration -cfg_print_duration_or_unlimited -cfg_print_fixedpoint -cfg_print_grammar -cfg_print_indent -cfg_print_map -cfg_print_mapbody -cfg_print_obj -cfg_print_percentage -cfg_print_rawaddr -cfg_print_rawuint -cfg_print_sockaddr -cfg_print_spacelist -cfg_print_tuple -cfg_print_uint32 -cfg_print_uint64 -cfg_print_ustring -cfg_print_void -cfg_print_zonegrammar -cfg_printx -cfg_tuple_get -cfg_ungettoken - -; Exported Data - -;cfg_rep_boolean -;cfg_rep_duration -;cfg_rep_fixedpoint -;cfg_rep_list -;cfg_rep_map -;cfg_rep_netprefix -;cfg_rep_percentage -;cfg_rep_sockaddr -;cfg_rep_string -;cfg_rep_tuple -;cfg_rep_uint32 -;cfg_rep_uint64 -;cfg_rep_void -;cfg_type_astring -;cfg_type_boolean -;cfg_type_bracketed_text -;cfg_type_fixedpoint -;cfg_type_netaddr -;cfg_type_netaddr4 -;cfg_type_netaddr4wild -;cfg_type_netaddr6 -;cfg_type_netaddr6wild -;cfg_type_netprefix -;cfg_type_optional_bracketed_text -;cfg_type_percentage -;cfg_type_qstring -;cfg_type_rndcconf -;cfg_type_sockaddr -;cfg_type_sockaddrdscp -;cfg_type_sstring -;cfg_type_token -;cfg_type_uint32 -;cfg_type_uint64 -;cfg_type_unsupported -;cfg_type_ustring -;cfg_type_void diff --git a/lib/isccfg/win32/libisccfg.vcxproj.filters.in b/lib/isccfg/win32/libisccfg.vcxproj.filters.in deleted file mode 100644 index 3d2faaf980..0000000000 --- a/lib/isccfg/win32/libisccfg.vcxproj.filters.in +++ /dev/null @@ -1,63 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - diff --git a/lib/isccfg/win32/libisccfg.vcxproj.in b/lib/isccfg/win32/libisccfg.vcxproj.in deleted file mode 100644 index e92129ed1f..0000000000 --- a/lib/isccfg/win32/libisccfg.vcxproj.in +++ /dev/null @@ -1,148 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {B2DFA58C-6347-478E-81E8-01E06999D4F1} - Win32Proj - libisccfg - @WINDOWS_TARGET_PLATFORM_VERSION@ - - - - DynamicLibrary - true - MultiByte - @PLATFORM_TOOLSET@ - - - DynamicLibrary - false - true - MultiByte - @PLATFORM_TOOLSET@ - - - - - - - - - - - - - true - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - - - false - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - - - - - - Level4 - false - Disabled - WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBISCCFG_EXPORTS;%(PreprocessorDefinitions);%(PreprocessorDefinitions) - ..\..\..\config.h - .\;..\..\..\;include;..\include;..\..\isc\win32;..\..\isc\win32\include;..\..\isc\include;..\..\dns\include;@LIBXML2_INC@@GEOIP_INC@%(AdditionalIncludeDirectories) - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - true - CompileAsC - - - Console - true - ..\..\dns\win32\$(Configuration);..\..\isc\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@libdns.lib;libisc.lib;ws2_32.lib;%(AdditionalDependencies) - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - $(ProjectName).def - .\$(Configuration)\$(ProjectName).lib - - - - - Level1 - true - - - MaxSpeed - true - @INTRINSIC@ - WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBISCCFG_EXPORTS;%(PreprocessorDefinitions);%(PreprocessorDefinitions) - ..\..\..\config.h - .\;..\..\..\;include;..\include;..\..\isc\win32;..\..\isc\win32\include;..\..\isc\include;..\..\dns\include;@LIBXML2_INC@@GEOIP_INC@%(AdditionalIncludeDirectories) - OnlyExplicitInline - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - false - CompileAsC - - - Console - false - true - true - ..\..\dns\win32\$(Configuration);..\..\isc\win32\$(Configuration);%(AdditionalLibraryDirectories) - @OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@libdns.lib;libisc.lib;ws2_32.lib;%(AdditionalDependencies) - Default - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - $(ProjectName).def - .\$(Configuration)\$(ProjectName).lib - - - - - - - - - - - - - - - - - - - - - - - - - {3840E563-D180-4761-AA9C-E6155F02EAFF} - - - {5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A} - - - - - - diff --git a/lib/isccfg/win32/libisccfg.vcxproj.user b/lib/isccfg/win32/libisccfg.vcxproj.user deleted file mode 100644 index ace9a86acb..0000000000 --- a/lib/isccfg/win32/libisccfg.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/lib/ns/client.c b/lib/ns/client.c index 24e244a3d2..ff098cc646 100644 --- a/lib/ns/client.c +++ b/lib/ns/client.c @@ -113,13 +113,8 @@ #define NS_CLIENT_DROPPORT 1 #endif /* ifndef NS_CLIENT_DROPPORT */ -#if defined(_WIN32) && !defined(_WIN64) -LIBNS_EXTERNAL_DATA atomic_uint_fast32_t ns_client_requests = - ATOMIC_VAR_INIT(0); -#else /* if defined(_WIN32) && !defined(_WIN64) */ LIBNS_EXTERNAL_DATA atomic_uint_fast64_t ns_client_requests = ATOMIC_VAR_INIT(0); -#endif /* if defined(_WIN32) && !defined(_WIN64) */ static void clientmgr_attach(ns_clientmgr_t *source, ns_clientmgr_t **targetp); diff --git a/lib/ns/hooks.c b/lib/ns/hooks.c index 9cb2fe4fb8..d608dd05fc 100644 --- a/lib/ns/hooks.c +++ b/lib/ns/hooks.c @@ -59,7 +59,6 @@ isc_result_t ns_plugin_expandpath(const char *src, char *dst, size_t dstsize) { int result; -#ifndef WIN32 /* * On Unix systems, differentiate between paths and filenames. */ @@ -74,12 +73,6 @@ ns_plugin_expandpath(const char *src, char *dst, size_t dstsize) { */ result = snprintf(dst, dstsize, "%s/%s", NAMED_PLUGINDIR, src); } -#else /* ifndef WIN32 */ - /* - * On Windows, always copy 'src' do 'dst'. - */ - result = snprintf(dst, dstsize, "%s", src); -#endif /* ifndef WIN32 */ if (result < 0) { return (isc_errno_toresult(errno)); diff --git a/lib/ns/include/ns/client.h b/lib/ns/include/ns/client.h index 8a36958545..1aa35f3220 100644 --- a/lib/ns/include/ns/client.h +++ b/lib/ns/include/ns/client.h @@ -277,11 +277,7 @@ struct ns_client { */ #define NS_FAILCACHE_CD 0x01 -#if defined(_WIN32) && !defined(_WIN64) -LIBNS_EXTERNAL_DATA extern atomic_uint_fast32_t ns_client_requests; -#else /* if defined(_WIN32) && !defined(_WIN64) */ LIBNS_EXTERNAL_DATA extern atomic_uint_fast64_t ns_client_requests; -#endif /* if defined(_WIN32) && !defined(_WIN64) */ /*** *** Functions diff --git a/lib/ns/include/ns/hooks.h b/lib/ns/include/ns/hooks.h index a0e8b363e4..425d248449 100644 --- a/lib/ns/include/ns/hooks.h +++ b/lib/ns/include/ns/hooks.h @@ -526,8 +526,6 @@ ns_plugin_expandpath(const char *src, char *dst, size_t dstsize); * path to the directory into which named plugins are installed will be * prepended to it and the result will be stored in 'dst'. * - * On Windows, 'src' is always copied to 'dst' verbatim. - * * Returns: *\li #ISC_R_SUCCESS Success *\li #ISC_R_NOSPACE 'dst' is not large enough to hold the output string diff --git a/lib/ns/tests/plugin_test.c b/lib/ns/tests/plugin_test.c index ada102a99e..bf0af1cfd5 100644 --- a/lib/ns/tests/plugin_test.c +++ b/lib/ns/tests/plugin_test.c @@ -147,11 +147,7 @@ ns_plugin_expandpath_test(void **state) { .input = "foo.so", .output_size = PATH_MAX, .result = ISC_R_SUCCESS, -#ifndef WIN32 .output = NAMED_PLUGINDIR "/foo.so", -#else /* ifndef WIN32 */ - .output = "foo.so", -#endif /* ifndef WIN32 */ }, { NS_TEST_ID("no space at all in target buffer"), @@ -171,14 +167,12 @@ ns_plugin_expandpath_test(void **state) { .output_size = 7, .result = ISC_R_NOSPACE, }, -#ifndef WIN32 { NS_TEST_ID("target buffer too small to fit full path"), .input = "foo.so", .output_size = 7, .result = ISC_R_NOSPACE, }, -#endif /* ifndef WIN32 */ }; for (i = 0; i < sizeof(tests) / sizeof(tests[0]); i++) { diff --git a/lib/ns/win32/DLLMain.c b/lib/ns/win32/DLLMain.c deleted file mode 100644 index 150de214e4..0000000000 --- a/lib/ns/win32/DLLMain.c +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -#include -#include - -/* - * Called when we enter the DLL - */ -__declspec(dllexport) BOOL WINAPI - DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { - switch (fdwReason) { - /* - * The DLL is loading due to process - * initialization or a call to LoadLibrary. - */ - case DLL_PROCESS_ATTACH: - break; - - /* The attached process creates a new thread. */ - case DLL_THREAD_ATTACH: - break; - - /* The thread of the attached process terminates. */ - case DLL_THREAD_DETACH: - break; - - /* - * The DLL is unloading from a process due to - * process termination or a call to FreeLibrary. - */ - case DLL_PROCESS_DETACH: - break; - - default: - break; - } - return (TRUE); -} diff --git a/lib/ns/win32/libns.def b/lib/ns/win32/libns.def deleted file mode 100644 index a149b26868..0000000000 --- a/lib/ns/win32/libns.def +++ /dev/null @@ -1,110 +0,0 @@ -LIBRARY libns - -; Exported Functions -EXPORTS - -ns__client_put_cb -ns__client_request -ns__client_reset_cb -ns__client_setup -ns__interfacemgr_getif -ns__interfacemgr_nextif -ns__query_sfcache -ns__query_start -ns__client_tcpconn -ns_client_aclmsg -ns_client_addopt -ns_client_checkacl -ns_client_checkaclsilent -ns_client_drop -ns_client_dumprecursing -ns_client_error -ns_client_findversion -ns_client_getdestaddr -ns_client_getnamebuf -ns_client_getsockaddr -ns_client_keepname -ns_client_killoldestquery -ns_client_log -ns_client_logv -ns_client_newdbversion -ns_client_newname -ns_client_newnamebuf -ns_client_newrdataset -ns_client_putrdataset -ns_client_qnamereplace -ns_client_recursing -ns_client_releasename -ns_client_send -ns_client_sendraw -ns_client_settimeout -ns_client_shuttingdown -ns_client_sourceip -ns_clientmgr_create -ns_clientmgr_destroy -ns_hook_add -ns_hooktable_create -ns_hooktable_free -ns_hooktable_init -ns_interface_attach -ns_interface_detach -ns_interface_shutdown -ns_interfacemgr_adjust -ns_interfacemgr_attach -ns_interfacemgr_create -ns_interfacemgr_detach -ns_interfacemgr_dumprecursing -ns_interfacemgr_getaclenv -ns_interfacemgr_getclientmgr -ns_interfacemgr_getserver -ns_interfacemgr_islistening -ns_interfacemgr_listeningon -ns_interfacemgr_scan -ns_interfacemgr_setbacklog -ns_interfacemgr_setlistenon4 -ns_interfacemgr_setlistenon6 -ns_interfacemgr_shutdown -ns_lib_init -ns_lib_shutdown -ns_listenelt_create -ns_listenelt_create_http -ns_listenelt_destroy -ns_listenlist_attach -ns_listenlist_create -ns_listenlist_default -ns_listenlist_detach -ns_log_init -ns_log_setcontext -ns_notify_start -ns_plugin_check -ns_plugin_expandpath -ns_plugin_register -ns_plugins_create -ns_plugins_free -ns_query_cancel -ns_query_done -ns_query_free -ns_query_hookasync -ns_query_init -ns_query_recurse -ns_query_start -ns_server_attach -ns_server_create -ns_server_detach -ns_server_getoption -ns_server_setoption -ns_server_setserverid -ns_sortlist_addrorder1 -ns_sortlist_addrorder2 -ns_sortlist_byaddrsetup -ns_sortlist_setup -ns_stats_attach -ns_stats_create -ns_stats_decrement -ns_stats_detach -ns_stats_get -ns_stats_get_counter -ns_stats_increment -ns_stats_update_if_greater -ns_update_start -ns_xfr_start diff --git a/lib/ns/win32/libns.vcxproj.filters b/lib/ns/win32/libns.vcxproj.filters deleted file mode 100644 index ac8950d637..0000000000 --- a/lib/ns/win32/libns.vcxproj.filters +++ /dev/null @@ -1,108 +0,0 @@ - - - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - diff --git a/lib/ns/win32/libns.vcxproj.in b/lib/ns/win32/libns.vcxproj.in deleted file mode 100644 index 02a97435fb..0000000000 --- a/lib/ns/win32/libns.vcxproj.in +++ /dev/null @@ -1,162 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {82ACD33C-E75F-45B8-BB6D-42643A10D7EE} - Win32Proj - libns - @WINDOWS_TARGET_PLATFORM_VERSION@ - - - - DynamicLibrary - true - MultiByte - @PLATFORM_TOOLSET@ - - - DynamicLibrary - false - MultiByte - @PLATFORM_TOOLSET@ - - - - - - - - - - - - - true - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - - - false - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - - - - - - Level4 - false - Disabled - WIN32;_DEBUG;_USRDLL;LIBNS_EXPORTS;%(PreprocessorDefinitions) - ..\..\..\config.h - .\;..\..\..\;include;..\include;..\..\isc\win32;..\..\isc\win32\include;..\..\isc\include;..\..\..\lib\dns\include;@LIBXML2_INC@@LIBUV_INC@@OPENSSL_INC@@GSSAPI_INC@@GEOIP_INC@%(AdditionalIncludeDirectories) - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - true - CompileAsC - - - Console - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - ..\..\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories) - @LIBUV_LIB@@OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@libisc.lib;libdns.lib;@LIBXML2_LIB@@GSSAPI_LIB@@GEOIP_LIB@ws2_32.lib;%(AdditionalDependencies) - $(ProjectName).def - .\$(Configuration)\$(ProjectName).lib - - - - - Level1 - true - - - MaxSpeed - true - @INTRINSIC@ - WIN32;NDEBUG;_USRDLL;LIBNS_EXPORTS;%(PreprocessorDefinitions) - ..\..\..\config.h - .\;..\..\..\;include;..\include;..\..\isc\win32;..\..\isc\win32\include;..\..\isc\include;..\..\..\lib\dns\include;@LIBXML2_INC@@LIBUV_INC@@OPENSSL_INC@@GSSAPI_INC@@GEOIP_INC@%(AdditionalIncludeDirectories) - OnlyExplicitInline - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - false - CompileAsC - - - Console - false - true - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - ..\..\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories) - @LIBUV_LIB@@OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@libisc.lib;libdns.lib;@LIBXML2_LIB@@GSSAPI_LIB@@GEOIP_LIB@ws2_32.lib;%(AdditionalDependencies) - $(ProjectName).def - .\$(Configuration)\$(ProjectName).lib - Default - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {3840E563-D180-4761-AA9C-E6155F02EAFF} - - - {5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A} - - - - - - diff --git a/lib/ns/win32/libns.vcxproj.user b/lib/ns/win32/libns.vcxproj.user deleted file mode 100644 index ace9a86acb..0000000000 --- a/lib/ns/win32/libns.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/lib/win32/bindevt/bindevt.c b/lib/win32/bindevt/bindevt.c deleted file mode 100644 index bbfc759ecc..0000000000 --- a/lib/win32/bindevt/bindevt.c +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (C) Internet Systems Consortium, Inc. ("ISC") - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, you can obtain one at https://mozilla.org/MPL/2.0/. - * - * See the COPYRIGHT file distributed with this work for additional - * information regarding copyright ownership. - */ - -/* - * bindevt.c : Defines the entry point for event log viewer DLL. - */ - -#include - -BOOL APIENTRY -DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) { - return (TRUE); -} diff --git a/lib/win32/bindevt/bindevt.mc b/lib/win32/bindevt/bindevt.mc deleted file mode 100644 index 7d34547211..0000000000 --- a/lib/win32/bindevt/bindevt.mc +++ /dev/null @@ -1,39 +0,0 @@ -; Copyright (C) Internet Systems Consortium, Inc. ("ISC") -; -; This Source Code Form is subject to the terms of the Mozilla Public -; License, v. 2.0. If a copy of the MPL was not distributed with this -; file, You can obtain one at http://mozilla.org/MPL/2.0/. -; -; See the COPYRIGHT file distributed with this work for additional -; information regarding copyright ownership. - -MessageIdTypedef=DWORD - -LanguageNames = (English=0x409:MSG00409) - -OutputBase = 16 - - -MessageId=0x1 -Severity=Error -Facility=Application -SymbolicName=BIND_ERR_MSG -Language=English -%1 -. - -MessageId=0x2 -Severity=Warning -Facility=Application -SymbolicName=BIND_WARN_MSG -Language=English -%1 -. - -MessageId=0x3 -Severity=Informational -Facility=Application -SymbolicName=BIND_INFO_MSG -Language=English -%1 -. diff --git a/lib/win32/bindevt/bindevt.vcxproj.filters.in b/lib/win32/bindevt/bindevt.vcxproj.filters.in deleted file mode 100644 index 2b9ee98eaa..0000000000 --- a/lib/win32/bindevt/bindevt.vcxproj.filters.in +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/lib/win32/bindevt/bindevt.vcxproj.in b/lib/win32/bindevt/bindevt.vcxproj.in deleted file mode 100644 index 7239b26c08..0000000000 --- a/lib/win32/bindevt/bindevt.vcxproj.in +++ /dev/null @@ -1,142 +0,0 @@ - - - - - Debug - @PLATFORM@ - - - Release - @PLATFORM@ - - - - {0D745CD9-FC3B-49DC-99BE-1E6DF85593F0} - Win32Proj - bindevt - @WINDOWS_TARGET_PLATFORM_VERSION@ - - - - DynamicLibrary - true - MultiByte - @PLATFORM_TOOLSET@ - - - DynamicLibrary - false - true - MultiByte - @PLATFORM_TOOLSET@ - - - - - - - - - - - - - true - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - ResourceCompile - true - - - false - ..\..\..\Build\$(Configuration)\ - .\$(Configuration)\ - None - ResourceCompile - true - - - - - - Level4 - false - Disabled - WIN32;_DEBUG;_WINDOWS;_USRDLL;BINDEVT_EXPORTS;%(PreprocessorDefinitions) - ..\include;..\..\..\include;%(AdditionalIncludeDirectories) - MultiThreadedDebugDLL - true - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - true - - - Console - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - .\$(Configuration)\$(ProjectName).lib - - - mc bindevt.mc - - - $(TargetName).rc - - - - - Level1 - true - - - MaxSpeed - true - false - WIN32;NDEBUG;_WINDOWS;_USRDLL;BINDEVT_EXPORTS;%(PreprocessorDefinitions) - ..\include;..\..\..\include;%(AdditionalIncludeDirectories) - OnlyExplicitInline - true - MultiThreadedDLL - .\$(Configuration)\$(TargetName).pch - .\$(Configuration)\ - .\$(Configuration)\ - $(OutDir)$(TargetName).pdb - false - - - Console - false - true - true - ..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt) - Default - .\$(Configuration)\$(ProjectName).lib - - - mc bindevt.mc - - - $(TargetName).rc - - - - - - - - - - - - - - {3840E563-D180-4761-AA9C-E6155F02EAFF} - - - - - - diff --git a/lib/win32/bindevt/bindevt.vcxproj.user b/lib/win32/bindevt/bindevt.vcxproj.user deleted file mode 100644 index ace9a86acb..0000000000 --- a/lib/win32/bindevt/bindevt.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/util/check-includes.pl b/util/check-includes.pl index 3ab62300ac..1e9f566ff0 100644 --- a/util/check-includes.pl +++ b/util/check-includes.pl @@ -22,9 +22,8 @@ use strict; use vars qw($debug $isc_includes $dns_includes $omapi_includes); -$isc_includes = "-Ilib/isc/include -Ilib/isc/unix/include " . - "-Ilib/isc/pthreads/include"; -$dns_includes = "-Ilib/dns/include -Ilib/dns/sec/dst/include"; +$isc_includes = "-Ilib/isc/include"; +$dns_includes = "-Ilib/dns/include -Ilib/dns/dst/include"; $omapi_includes = "-Ilib/omapi/include"; $0 =~ s%.*/%%; @@ -59,9 +58,6 @@ for (<>) { # From external sources; ignore. next if $file =~ m%lib/dns/sec/(dnssafe|openssl)%m; - # Totally wrong platform; ignore. - next if $file =~ m%lib/isc/win32%; - ($tmpfile = $file) =~ s%(.*/)?%/tmp/%; $tmpfile =~ s/\.h$/.c/; ($objfile = $tmpfile) =~ s/\.c$/\.o/;; diff --git a/util/check-instincludes.sh b/util/check-instincludes.sh index bafec40c90..d765da5818 100644 --- a/util/check-instincludes.sh +++ b/util/check-instincludes.sh @@ -51,7 +51,7 @@ EOF # Compile the test program. if gcc -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings \ - -I/usr/pkg/pthreads/include -I$prefix/include -c test.cc 2>&1 + "-I$prefix/include" -c test.cc 2>&1 then : else diff --git a/util/check-make-install.in b/util/check-make-install.in index ed4c827e4b..c468e4ffe5 100644 --- a/util/check-make-install.in +++ b/util/check-make-install.in @@ -17,7 +17,6 @@ install_dir="${DESTDIR}@prefix@" headers_to_install() { find "${abs_top_srcdir}/lib" -name "*.h" -or -name "*.h.in" | - grep -v -F /win32/ | sed -n \ -e "s|\.h\.in$|\.h|" \ -e "s|.*include/|${DESTDIR}${includedir}/|p" | diff --git a/util/check-win32util-configure b/util/check-win32util-configure deleted file mode 100644 index 9f758961a1..0000000000 --- a/util/check-win32util-configure +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, you can obtain one at https://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -status=0 -find */*/win32 win32utils -name \*.in | -sed -e '/\/Makefile.in$/d' \ - -e 's/.in$/"/' \ - -e 's/^/"..\//' \ - -e 's/"..\/win32utils\//"/' | -while read f -do - if grep -F "$f" win32utils/Configure > /dev/null - then - : - else - echo "missing $f from win32utils/Configure" - status=1 - fi -done -if test -f win32utils/Configure -then - cd win32utils - perl Configure checkfiles 2> /dev/null || status=1 -fi -exit $status diff --git a/util/checklibs.sh b/util/checklibs.sh index 6fe6489c3d..20876fd620 100755 --- a/util/checklibs.sh +++ b/util/checklibs.sh @@ -17,7 +17,7 @@ status=0 list=`git grep -l snprintf lib bin | grep '\.c$' | grep -vE -e '(lib/bind|lib/dns/rdata|lib/dns/gen.c)' \ - -e '(lib/isc/win32/time.c|dlzexternal/driver/driver.c)' | + -e '(dlzexternal/driver/driver.c)' | xargs grep -EL "(isc/print.h|print_p.h)" 2> /dev/null` [ -n "$list" ] && { status=1 @@ -32,7 +32,7 @@ list=`git grep -wl strerror_r lib bin | grep '\.c$' | grep -vE -e '(lib/bind|lib/dns/rdata|lib/dns/gen.c)' \ -e lib/isc/string.c \ - -e '(lib/isc/win32/time.c|dlzexternal/driver.c)' | + -e '(dlzexternal/driver.c)' | xargs grep -EL "(isc/strerr.h)" 2> /dev/null` [ -n "$list" ] && { status=1 @@ -54,65 +54,4 @@ list=`git grep -l uintptr_t lib bin | echo "$list" } -list=`git ls-files -c lib bin | grep '\.vcxproj\.in$' | - xargs grep -L '' | - awk '{a[$2]++;} END { for (g in a) if (a[g] != 1) print g;}'` -[ -n "$list" ] && { - status=1 - echo 'duplicate '"'"'s:' - echo "$list" -} - -for lib in `git ls-files -c lib | - sed -n 's;^lib/\([^/]*\)/win32/.*\.def.*$;\1;p' | - sort -u` -do - def=`git ls-files -c lib | - grep lib/${lib}/win32/lib${lib}.def | - sort | - tail -n 1` - test -z "$def" && continue; - test -f "$def" || continue; - dirs= - test -d lib/$lib/include && dirs="$dirs lib/$lib/include" - test -d lib/$lib/win32/include && dirs="$dirs lib/$lib/win32/include" - test -z "$dirs" && continue; - pat=$lib - test $lib = dns && pat='\(dns\|dst\)' - test $lib = isccfg && pat='cfg' - pat="^${pat}_[a-z0-9_]*(" - list=`git ls-files -c $dirs | grep '\.h$' | - xargs grep "$pat" | - sed -e 's/.*://' -e 's/(.*//' | - while read p - do - case $p in - isc__app_register) continue;; # internal - isc__mem_register) continue;; # internal - isc__task_register) continue;; # internal - isc__taskmgr_dispatch) continue;; # internal - isc__timer_register) continue;; # internal - isc_ntsecurity_getaccountgroups) continue;; # internal - isc__taskmgr_dispatch) continue;; # no threads - isc__taskmgr_ready) continue;; # no threads - isc_socketmgr_getmaxsockets) p=isc__socketmgr_getmaxsockets;; - esac - grep -q "^${p}"'$' $def && continue - test $lib = isc -a -f lib/isc/win32/libisc.def.exclude && - grep -q "^${p}"'$' lib/isc/win32/libisc.def.exclude && - continue - if test -d lib/$lib/win32 - then - grep -q "^$p(" lib/$lib/*.c lib/$lib/win32/*.c && echo "$p" - else - grep -q "^$p(" lib/$lib/*.c && echo "$p" - fi - done` - [ -n "$list" ] && { - status=1 - echo "Missing from ${def}:" - echo "$list" - } -done - exit $status diff --git a/util/copyrights b/util/copyrights index 9e4beecd80..d26efff951 100644 --- a/util/copyrights +++ b/util/copyrights @@ -13,40 +13,18 @@ ./bin/check/named-checkconf.rst RST 2020,2021 ./bin/check/named-checkzone.c C 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2018,2019,2020,2021 ./bin/check/named-checkzone.rst RST 2020,2021 -./bin/check/win32/checkconf.vcxproj.filters.in X 2013,2015,2018,2019,2020 -./bin/check/win32/checkconf.vcxproj.in X 2013,2014,2015,2016,2017,2018,2019,2020 -./bin/check/win32/checkconf.vcxproj.user X 2013,2018,2019,2020,2021 -./bin/check/win32/checktool.vcxproj.filters.in X 2013,2015,2018,2019,2020 -./bin/check/win32/checktool.vcxproj.in X 2013,2014,2015,2016,2017,2018,2019,2020 -./bin/check/win32/checktool.vcxproj.user X 2013,2018,2019,2020,2021 -./bin/check/win32/checkzone.vcxproj.filters.in X 2013,2015,2018,2019,2020 -./bin/check/win32/checkzone.vcxproj.in X 2013,2014,2015,2016,2017,2018,2019,2020 -./bin/check/win32/checkzone.vcxproj.user X 2013,2018,2019,2020,2021 ./bin/confgen/include/confgen/os.h C 2009,2016,2018,2019,2020,2021 ./bin/confgen/keygen.c C 2009,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021 ./bin/confgen/keygen.h C 2009,2016,2018,2019,2020,2021 +./bin/confgen/os.c C 2009,2016,2018,2019,2020,2021 ./bin/confgen/rndc-confgen.c C 2001,2003,2004,2005,2007,2008,2009,2011,2013,2014,2016,2017,2018,2019,2020,2021 ./bin/confgen/rndc-confgen.rst RST 2020,2021 ./bin/confgen/tsig-keygen.c C 2009,2011,2014,2016,2018,2019,2020,2021 ./bin/confgen/tsig-keygen.rst RST 2020,2021 -./bin/confgen/unix/os.c C 2009,2016,2018,2019,2020,2021 ./bin/confgen/util.c C 2009,2015,2016,2018,2019,2020,2021 ./bin/confgen/util.h C 2009,2016,2018,2019,2020,2021 -./bin/confgen/win32/confgentool.vcxproj.filters.in X 2013,2015,2018,2019,2020 -./bin/confgen/win32/confgentool.vcxproj.in X 2013,2015,2016,2017,2018,2019,2020 -./bin/confgen/win32/confgentool.vcxproj.user X 2013,2018,2019,2020,2021 -./bin/confgen/win32/os.c C 2009,2016,2018,2019,2020,2021 -./bin/confgen/win32/rndcconfgen.vcxproj.filters.in X 2013,2015,2018,2019,2020 -./bin/confgen/win32/rndcconfgen.vcxproj.in X 2013,2015,2016,2017,2018,2019,2020 -./bin/confgen/win32/rndcconfgen.vcxproj.user X 2013,2018,2019,2020,2021 -./bin/confgen/win32/tsigkeygen.vcxproj.filters.in X 2013,2015,2018,2019,2020 -./bin/confgen/win32/tsigkeygen.vcxproj.in X 2013,2014,2015,2016,2017,2018,2019,2020 -./bin/confgen/win32/tsigkeygen.vcxproj.user X 2013,2018,2019,2020,2021 ./bin/delv/delv.c C 2014,2015,2016,2017,2018,2019,2020,2021 ./bin/delv/delv.rst RST 2020,2021 -./bin/delv/win32/delv.vcxproj.filters.in X 2014,2015,2018,2019,2020 -./bin/delv/win32/delv.vcxproj.in X 2014,2015,2016,2017,2018,2019,2020 -./bin/delv/win32/delv.vcxproj.user X 2014,2018,2019,2020,2021 ./bin/dig/dig.c C 2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021 ./bin/dig/dig.rst RST 2020,2021 ./bin/dig/dighost.c C 2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021 @@ -56,18 +34,6 @@ ./bin/dig/nslookup.c C 2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021 ./bin/dig/nslookup.rst RST 2020,2021 ./bin/dig/readline.h C 2020,2021 -./bin/dig/win32/dig.vcxproj.filters.in X 2013,2015,2018,2019,2020 -./bin/dig/win32/dig.vcxproj.in X 2013,2014,2015,2016,2017,2018,2019,2020 -./bin/dig/win32/dig.vcxproj.user X 2013,2018,2019,2020,2021 -./bin/dig/win32/dighost.vcxproj.filters.in X 2013,2015,2018,2019,2020 -./bin/dig/win32/dighost.vcxproj.in X 2013,2014,2015,2016,2017,2018,2019,2020 -./bin/dig/win32/dighost.vcxproj.user X 2013,2018,2019,2020,2021 -./bin/dig/win32/host.vcxproj.filters.in X 2013,2015,2018,2019,2020 -./bin/dig/win32/host.vcxproj.in X 2013,2014,2015,2016,2017,2018,2019,2020 -./bin/dig/win32/host.vcxproj.user X 2013,2018,2019,2020,2021 -./bin/dig/win32/nslookup.vcxproj.filters.in X 2013,2015,2018,2019,2020 -./bin/dig/win32/nslookup.vcxproj.in X 2013,2014,2015,2016,2017,2018,2019,2020 -./bin/dig/win32/nslookup.vcxproj.user X 2013,2018,2019,2020,2021 ./bin/dnssec/dnssec-cds.c C 2017,2018,2019,2020,2021 ./bin/dnssec/dnssec-cds.rst RST 2020,2021 ./bin/dnssec/dnssec-dsfromkey.c C 2008,2009,2010,2011,2012,2014,2015,2016,2017,2018,2019,2020,2021 @@ -88,41 +54,12 @@ ./bin/dnssec/dnssec-verify.rst RST 2020,2021 ./bin/dnssec/dnssectool.c C 2000,2001,2003,2004,2005,2007,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021 ./bin/dnssec/dnssectool.h C 2000,2001,2003,2004,2007,2008,2009,2010,2011,2012,2014,2015,2016,2017,2018,2019,2020,2021 -./bin/dnssec/win32/cds.vcxproj.filters.in X 2019,2020 -./bin/dnssec/win32/cds.vcxproj.in X 2019,2020 -./bin/dnssec/win32/cds.vcxproj.user X 2019,2020,2021 -./bin/dnssec/win32/dnssectool.vcxproj.filters.in X 2013,2015,2018,2019,2020 -./bin/dnssec/win32/dnssectool.vcxproj.in X 2013,2014,2015,2016,2017,2018,2019,2020 -./bin/dnssec/win32/dnssectool.vcxproj.user X 2013,2018,2019,2020,2021 -./bin/dnssec/win32/dsfromkey.vcxproj.filters.in X 2013,2015,2018,2019,2020 -./bin/dnssec/win32/dsfromkey.vcxproj.in X 2013,2018,2019,2020 -./bin/dnssec/win32/dsfromkey.vcxproj.user X 2013,2018,2019,2020,2021 -./bin/dnssec/win32/importkey.vcxproj.filters.in X 2013,2015,2018,2019,2020 -./bin/dnssec/win32/importkey.vcxproj.in X 2013,2014,2015,2016,2017,2018,2019,2020 -./bin/dnssec/win32/importkey.vcxproj.user X 2013,2018,2019,2020,2021 -./bin/dnssec/win32/keyfromlabel.vcxproj.filters.in X 2013,2015,2018,2019,2020 -./bin/dnssec/win32/keyfromlabel.vcxproj.in X 2013,2014,2015,2016,2017,2018,2019,2020 -./bin/dnssec/win32/keyfromlabel.vcxproj.user X 2013,2018,2019,2020,2021 -./bin/dnssec/win32/keygen.vcxproj.filters.in X 2013,2015,2018,2019,2020 -./bin/dnssec/win32/keygen.vcxproj.in X 2013,2014,2015,2016,2017,2018,2019,2020 -./bin/dnssec/win32/keygen.vcxproj.user X 2013,2018,2019,2020,2021 -./bin/dnssec/win32/revoke.vcxproj.filters.in X 2013,2015,2018,2019,2020 -./bin/dnssec/win32/revoke.vcxproj.in X 2013,2014,2015,2016,2017,2018,2019,2020 -./bin/dnssec/win32/revoke.vcxproj.user X 2013,2018,2019,2020,2021 -./bin/dnssec/win32/settime.vcxproj.filters.in X 2013,2015,2018,2019,2020 -./bin/dnssec/win32/settime.vcxproj.in X 2013,2014,2015,2016,2017,2018,2019,2020 -./bin/dnssec/win32/settime.vcxproj.user X 2013,2018,2019,2020,2021 -./bin/dnssec/win32/signzone.vcxproj.filters.in X 2013,2015,2018,2019,2020 -./bin/dnssec/win32/signzone.vcxproj.in X 2013,2014,2015,2016,2017,2018,2019,2020 -./bin/dnssec/win32/signzone.vcxproj.user X 2013,2018,2019,2020,2021 -./bin/dnssec/win32/verify.vcxproj.filters.in X 2013,2015,2018,2019,2020 -./bin/dnssec/win32/verify.vcxproj.in X 2013,2014,2015,2016,2017,2018,2019,2020 -./bin/dnssec/win32/verify.vcxproj.user X 2013,2018,2019,2020,2021 ./bin/named/bind9.xsl SGML 2006,2007,2008,2009,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021 ./bin/named/builtin.c C 2001,2002,2003,2004,2005,2007,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021 ./bin/named/config.c C 2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021 ./bin/named/control.c C 2001,2002,2003,2004,2005,2006,2007,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021 ./bin/named/controlconf.c C 2001,2002,2003,2004,2005,2006,2007,2008,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021 +./bin/named/dlz_dlopen_driver.c C 2011,2012,2013,2014,2016,2017,2018,2019,2020,2021 ./bin/named/fuzz.c C 2016,2017,2018,2019,2020,2021 ./bin/named/geoip.c C 2013,2014,2016,2017,2018,2019,2020,2021 ./bin/named/include/dlz/dlz_dlopen_driver.h C 2011,2016,2018,2019,2020,2021 @@ -135,6 +72,7 @@ ./bin/named/include/named/log.h C 1999,2000,2001,2002,2004,2005,2007,2009,2015,2016,2017,2018,2019,2020,2021 ./bin/named/include/named/logconf.h C 1999,2000,2001,2004,2005,2006,2007,2016,2017,2018,2019,2020,2021 ./bin/named/include/named/main.h C 1999,2000,2001,2002,2004,2005,2007,2009,2013,2015,2016,2017,2018,2019,2020,2021 +./bin/named/include/named/os.h C 1999,2000,2001,2002,2004,2005,2007,2008,2009,2014,2016,2017,2018,2019,2020,2021 ./bin/named/include/named/server.h C 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021 ./bin/named/include/named/smf_globals.h C 2017,2018,2019,2020,2021 ./bin/named/include/named/statschannel.h C 2008,2016,2017,2018,2019,2020,2021 @@ -148,29 +86,16 @@ ./bin/named/main.c C 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021 ./bin/named/named.conf.rst X 2020,2021 ./bin/named/named.rst RST 2020,2021 +./bin/named/os.c C 1999,2000,2001,2002,2004,2005,2006,2007,2008,2009,2010,2011,2013,2014,2015,2016,2017,2018,2019,2020,2021 ./bin/named/server.c C 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021 ./bin/named/statschannel.c C 2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021 ./bin/named/tkeyconf.c C 1999,2000,2001,2004,2005,2006,2007,2009,2010,2012,2014,2016,2017,2018,2019,2020,2021 ./bin/named/transportconf.c C 2021 ./bin/named/tsigconf.c C 1999,2000,2001,2004,2005,2006,2007,2009,2011,2012,2016,2017,2018,2019,2020,2021 -./bin/named/unix/dlz_dlopen_driver.c C 2011,2012,2013,2014,2016,2017,2018,2019,2020,2021 -./bin/named/unix/include/named/os.h C 1999,2000,2001,2002,2004,2005,2007,2008,2009,2014,2016,2017,2018,2019,2020,2021 -./bin/named/unix/os.c C 1999,2000,2001,2002,2004,2005,2006,2007,2008,2009,2010,2011,2013,2014,2015,2016,2017,2018,2019,2020,2021 -./bin/named/win32/dlz_dlopen_driver.c C 2011,2012,2013,2014,2016,2018,2019,2020,2021 -./bin/named/win32/include/named/ntservice.h C 1999,2000,2001,2002,2003,2004,2007,2016,2018,2019,2020,2021 -./bin/named/win32/include/named/os.h C 1999,2000,2001,2002,2004,2007,2008,2009,2014,2016,2017,2018,2019,2020,2021 -./bin/named/win32/named.vcxproj.filters.in X 2013,2015,2016,2017,2018,2019,2020 -./bin/named/win32/named.vcxproj.in X 2013,2014,2015,2016,2017,2018,2019,2020 -./bin/named/win32/named.vcxproj.user X 2013,2018,2019,2020,2021 -./bin/named/win32/ntservice.c C 1999,2000,2001,2002,2004,2006,2007,2009,2011,2013,2014,2015,2016,2017,2018,2019,2020,2021 -./bin/named/win32/os.c C 1999,2000,2001,2002,2004,2005,2007,2008,2009,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021 ./bin/named/xsl_p.h X 2007,2008,2009,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021 ./bin/named/zoneconf.c C 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021 ./bin/nsupdate/nsupdate.c C 2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021 ./bin/nsupdate/nsupdate.rst RST 2020,2021 -./bin/nsupdate/win32/nsupdate.vcxproj.filters.in X 2013,2015,2018,2019,2020 -./bin/nsupdate/win32/nsupdate.vcxproj.in X 2013,2014,2015,2016,2017,2018,2019,2020 -./bin/nsupdate/win32/nsupdate.vcxproj.user X 2013,2018,2019,2020,2021 ./bin/pkcs11/pkcs11-destroy.c X 2009,2010,2014,2015,2018,2019,2020,2021 ./bin/pkcs11/pkcs11-destroy.rst RST 2020,2021 ./bin/pkcs11/pkcs11-keygen.c X 2009,2014,2015,2017,2018,2019,2020,2021 @@ -179,18 +104,6 @@ ./bin/pkcs11/pkcs11-list.rst RST 2020,2021 ./bin/pkcs11/pkcs11-tokens.c C 2014,2015,2016,2018,2019,2020,2021 ./bin/pkcs11/pkcs11-tokens.rst RST 2020,2021 -./bin/pkcs11/win32/pk11destroy.vcxproj.filters.in X 2013,2014,2015,2018,2019,2020 -./bin/pkcs11/win32/pk11destroy.vcxproj.in X 2013,2014,2015,2016,2017,2018,2019,2020 -./bin/pkcs11/win32/pk11destroy.vcxproj.user X 2013,2018,2019,2020,2021 -./bin/pkcs11/win32/pk11keygen.vcxproj.filters.in X 2013,2014,2015,2018,2019,2020 -./bin/pkcs11/win32/pk11keygen.vcxproj.in X 2013,2014,2015,2016,2017,2018,2019,2020 -./bin/pkcs11/win32/pk11keygen.vcxproj.user X 2013,2018,2019,2020,2021 -./bin/pkcs11/win32/pk11list.vcxproj.filters.in X 2013,2014,2015,2018,2019,2020 -./bin/pkcs11/win32/pk11list.vcxproj.in X 2013,2014,2015,2016,2017,2018,2019,2020 -./bin/pkcs11/win32/pk11list.vcxproj.user X 2013,2018,2019,2020,2021 -./bin/pkcs11/win32/pk11tokens.vcxproj.filters.in X 2014,2015,2018,2019,2020 -./bin/pkcs11/win32/pk11tokens.vcxproj.in X 2014,2015,2016,2017,2018,2019,2020 -./bin/pkcs11/win32/pk11tokens.vcxproj.user X 2014,2018,2019,2020,2021 ./bin/plugins/filter-a.c C 2018,2019,2020,2021 ./bin/plugins/filter-a.rst RST 2020,2021 ./bin/plugins/filter-aaaa.c C 2018,2019,2020,2021 @@ -200,9 +113,6 @@ ./bin/rndc/rndc.rst RST 2020,2021 ./bin/rndc/util.c C 2000,2001,2004,2005,2007,2015,2016,2018,2019,2020,2021 ./bin/rndc/util.h C 2000,2001,2004,2005,2007,2009,2016,2018,2019,2020,2021 -./bin/rndc/win32/rndc.vcxproj.filters.in X 2013,2015,2018,2019,2020 -./bin/rndc/win32/rndc.vcxproj.in X 2013,2015,2016,2017,2018,2019,2020 -./bin/rndc/win32/rndc.vcxproj.user X 2013,2018,2019,2020,2021 ./bin/tests/prepare-softhsm2.sh SH 2020,2021 ./bin/tests/startperf/README X 2011,2018,2019,2020,2021 ./bin/tests/startperf/clean.sh SH 2011,2012,2016,2018,2019,2020,2021 @@ -291,7 +201,6 @@ ./bin/tests/system/common/rndc.key X 2011,2013,2016,2018,2019,2020,2021 ./bin/tests/system/conf.sh.common SH 2018,2019,2020,2021 ./bin/tests/system/conf.sh.in SH 2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 -./bin/tests/system/conf.sh.win32 SH 2016,2017,2018,2019,2020,2021 ./bin/tests/system/cookie/ans9/ans.py PYTHON 2020,2021 ./bin/tests/system/cookie/clean.sh SH 2014,2015,2016,2018,2019,2020,2021 ./bin/tests/system/cookie/setup.sh SH 2018,2019,2020,2021 @@ -972,30 +881,6 @@ ./bin/tests/system/wildcard/ns1/sign.sh SH 2012,2013,2014,2016,2018,2019,2020,2021 ./bin/tests/system/wildcard/setup.sh SH 2012,2014,2016,2017,2018,2019,2020,2021 ./bin/tests/system/wildcard/tests.sh SH 2012,2013,2016,2018,2019,2020,2021 -./bin/tests/system/win32/bigkey.vcxproj.filters.in X 2016,2018,2019,2020 -./bin/tests/system/win32/bigkey.vcxproj.in X 2016,2017,2018,2019,2020 -./bin/tests/system/win32/bigkey.vcxproj.user X 2016,2018,2019,2020,2021 -./bin/tests/system/win32/feature-test.vcxproj.filters.in X 2016,2018,2019,2020 -./bin/tests/system/win32/feature-test.vcxproj.in X 2016,2017,2018,2019,2020 -./bin/tests/system/win32/feature-test.vcxproj.user X 2016,2018,2019,2020,2021 -./bin/tests/system/win32/gencheck.vcxproj.filters.in X 2016,2018,2019,2020 -./bin/tests/system/win32/gencheck.vcxproj.in X 2016,2017,2018,2019,2020 -./bin/tests/system/win32/gencheck.vcxproj.user X 2016,2018,2019,2020,2021 -./bin/tests/system/win32/keycreate.vcxproj.filters.in X 2016,2018,2019,2020 -./bin/tests/system/win32/keycreate.vcxproj.in X 2016,2017,2018,2019,2020 -./bin/tests/system/win32/keycreate.vcxproj.user X 2016,2018,2019,2020,2021 -./bin/tests/system/win32/keydelete.vcxproj.filters.in X 2016,2018,2019,2020 -./bin/tests/system/win32/keydelete.vcxproj.in X 2016,2017,2018,2019,2020 -./bin/tests/system/win32/keydelete.vcxproj.user X 2016,2018,2019,2020,2021 -./bin/tests/system/win32/makejournal.vcxproj.filters.in X 2016,2018,2019,2020 -./bin/tests/system/win32/makejournal.vcxproj.in X 2016,2017,2018,2019,2020 -./bin/tests/system/win32/makejournal.vcxproj.user X 2016,2018,2019,2020,2021 -./bin/tests/system/win32/pipequeries.vcxproj.filters.in X 2016,2018,2019,2020 -./bin/tests/system/win32/pipequeries.vcxproj.in X 2016,2017,2018,2019,2020 -./bin/tests/system/win32/pipequeries.vcxproj.user X 2016,2018,2019,2020,2021 -./bin/tests/system/win32/resolve.vcxproj.filters.in X 2014,2015,2018,2019,2020 -./bin/tests/system/win32/resolve.vcxproj.in X 2014,2015,2016,2017,2018,2019,2020 -./bin/tests/system/win32/resolve.vcxproj.user X 2014,2018,2019,2020,2021 ./bin/tests/system/xfer/ans5/badkeydata X 2011,2018,2019,2020,2021 ./bin/tests/system/xfer/ans5/badmessageid X 2020,2021 ./bin/tests/system/xfer/ans5/goodaxfr X 2011,2018,2019,2020,2021 @@ -1048,42 +933,7 @@ ./bin/tools/named-rrchecker.rst RST 2020,2021 ./bin/tools/nsec3hash.c C 2006,2008,2009,2011,2014,2016,2017,2018,2019,2020,2021 ./bin/tools/nsec3hash.rst RST 2020,2021 -./bin/tools/win32/arpaname.vcxproj.filters.in X 2013,2015,2018,2019,2020 -./bin/tools/win32/arpaname.vcxproj.in X 2013,2015,2016,2017,2018,2019,2020 -./bin/tools/win32/arpaname.vcxproj.user X 2013,2018,2019,2020,2021 -./bin/tools/win32/journalprint.vcxproj.filters.in X 2013,2015,2018,2019,2020 -./bin/tools/win32/journalprint.vcxproj.in X 2013,2015,2016,2017,2018,2019,2020 -./bin/tools/win32/journalprint.vcxproj.user X 2013,2018,2019,2020,2021 -./bin/tools/win32/mdig.vcxproj.filters.in X 2015,2018,2019,2020 -./bin/tools/win32/mdig.vcxproj.in X 2015,2016,2017,2018,2019,2020 -./bin/tools/win32/mdig.vcxproj.user X 2015,2018,2019,2020,2021 -./bin/tools/win32/nsec3hash.vcxproj.filters.in X 2013,2015,2018,2019,2020 -./bin/tools/win32/nsec3hash.vcxproj.in X 2013,2014,2015,2016,2017,2018,2019,2020 -./bin/tools/win32/nsec3hash.vcxproj.user X 2013,2018,2019,2020,2021 -./bin/tools/win32/rrchecker.vcxproj.filters.in X 2013,2015,2018,2019,2020 -./bin/tools/win32/rrchecker.vcxproj.in X 2013,2014,2015,2016,2017,2018,2019,2020 -./bin/tools/win32/rrchecker.vcxproj.user X 2013,2018,2019,2020,2021 -./bin/win32/BINDInstall/AccountInfo.cpp C.PORTION 2001,2002,2004,2007,2009,2013,2016,2017,2018,2019,2020,2021 -./bin/win32/BINDInstall/AccountInfo.h C 2001,2004,2007,2016,2018,2019,2020,2021 -./bin/win32/BINDInstall/BINDInstall.cpp C.PORTION 2001,2004,2007,2009,2016,2018,2019,2020,2021 -./bin/win32/BINDInstall/BINDInstall.h C.PORTION 2001,2004,2007,2016,2018,2019,2020,2021 -./bin/win32/BINDInstall/BINDInstall.rc X 2001,2005,2009,2014,2018,2019,2020,2021 -./bin/win32/BINDInstall/BINDInstall.vcxproj.filters.in X 2013,2015,2018,2019,2020 -./bin/win32/BINDInstall/BINDInstall.vcxproj.in X 2013,2014,2015,2016,2018,2019,2020 -./bin/win32/BINDInstall/BINDInstall.vcxproj.user X 2013,2018,2019,2020,2021 -./bin/win32/BINDInstall/BINDInstallDlg.cpp C.PORTION 2001,2003,2004,2005,2006,2007,2008,2009,2010,2013,2014,2015,2016,2017,2018,2019,2020,2021 -./bin/win32/BINDInstall/BINDInstallDlg.h C.PORTION 2001,2004,2007,2009,2015,2016,2017,2018,2019,2020,2021 -./bin/win32/BINDInstall/DirBrowse.cpp C.PORTION 2001,2004,2007,2016,2018,2019,2020,2021 -./bin/win32/BINDInstall/DirBrowse.h C.PORTION 2001,2004,2007,2016,2018,2019,2020,2021 -./bin/win32/BINDInstall/StdAfx.cpp X 2001,2018,2019,2020,2021 -./bin/win32/BINDInstall/StdAfx.h X 2001,2006,2011,2013,2018,2019,2020,2021 -./bin/win32/BINDInstall/VersionInfo.cpp X 2001,2008,2015,2017,2018,2019,2020,2021 -./bin/win32/BINDInstall/VersionInfo.h X 2001,2018,2019,2020,2021 -./bin/win32/BINDInstall/res/BINDInstall.ico X 2001,2018,2019,2020,2021 -./bin/win32/BINDInstall/res/BINDInstall.rc2 X 2001,2018,2019,2020,2021 -./bin/win32/BINDInstall/resource.h X 2001,2005,2009,2018,2019,2020,2021 ./bind.keys X 2009,2010,2011,2017,2018,2019,2020,2021 -./config.h.win32 C 1999,2000,2001,2004,2006,2007,2008,2009,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021 ./conftools/perllib/dnsconf/DNSConf-macros.h C 2000,2001,2004,2007,2016,2018,2019,2020,2021 ./conftools/perllib/dnsconf/DNSConf.i C 2000,2001,2004,2007,2016,2018,2019,2020,2021 ./conftools/perllib/dnsconf/Makefile.PL PERL 2000,2001,2004,2007,2012,2016,2018,2019,2020,2021 @@ -1120,11 +970,6 @@ ./contrib/dlz/example/README X 2011,2012,2013,2014,2018,2019,2020,2021 ./contrib/dlz/example/dlz_example.c X 2010,2011,2012,2013,2014,2018,2019,2020,2021 ./contrib/dlz/example/named.conf X 2011,2014,2018,2019 -./contrib/dlz/example/win32/DLLMain.c X 2011,2016,2018,2019,2020,2021 -./contrib/dlz/example/win32/dxdriver.def X 2011,2018,2019,2020,2021 -./contrib/dlz/example/win32/dxdriver.dsp X 2018,2019,2020,2021 -./contrib/dlz/example/win32/dxdriver.dsw X 2011,2018,2019,2020,2021 -./contrib/dlz/example/win32/dxdriver.mak X 2018,2019,2020,2021 ./contrib/dlz/modules/bdbhpt/Makefile X 2013,2018,2019,2020,2021 ./contrib/dlz/modules/bdbhpt/dlz_bdbhpt_dynamic.c X 2013,2015,2018,2019,2020,2021 ./contrib/dlz/modules/bdbhpt/testing/README X 2015,2018,2019,2020,2021 @@ -1230,7 +1075,6 @@ ./doc/design/tasks TXT.BRIEF 1999,2000,2001,2004,2016,2018,2019,2020,2021 ./doc/design/unsupported-algorithms-in-bind9 TXT.BRIEF 2019,2020,2021 ./doc/design/verify TXT.BRIEF 2012,2016,2018,2019,2020,2021 -./doc/design/windows-nt TXT.BRIEF 1999,2000,2001,2004,2016,2018,2019,2020,2021 ./doc/design/zone TXT.BRIEF 1999,2000,2001,2004,2016,2018,2019,2020,2021 ./doc/dev/DBC TXT.BRIEF 1999,2000,2001,2004,2016,2018,2019,2020,2021 ./doc/dev/autoconf TXT.BRIEF 2001,2002,2004,2016,2018,2019,2020,2021 @@ -1330,11 +1174,6 @@ ./lib/bind9/getaddresses.c C 2001,2002,2004,2005,2007,2014,2015,2016,2017,2018,2019,2020,2021 ./lib/bind9/include/bind9/check.h C 2001,2004,2005,2006,2007,2016,2018,2019,2020,2021 ./lib/bind9/include/bind9/getaddresses.h C 2001,2004,2005,2006,2007,2009,2016,2017,2018,2019,2020,2021 -./lib/bind9/win32/DLLMain.c C 2001,2004,2007,2016,2018,2019,2020,2021 -./lib/bind9/win32/libbind9.def X 2001,2018,2019,2020,2021 -./lib/bind9/win32/libbind9.vcxproj.filters.in X 2013,2015,2016,2018,2019,2020 -./lib/bind9/win32/libbind9.vcxproj.in X 2013,2014,2015,2016,2017,2018,2019,2020 -./lib/bind9/win32/libbind9.vcxproj.user X 2013,2018,2019,2020,2021 ./lib/dns/acl.c C 1999,2000,2001,2002,2004,2005,2006,2007,2008,2009,2011,2013,2014,2016,2017,2018,2019,2020,2021 ./lib/dns/adb.c C 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021 ./lib/dns/badcache.c C 2014,2015,2016,2018,2019,2020,2021 @@ -1367,9 +1206,8 @@ ./lib/dns/ecs.c C 2017,2018,2019,2020,2021 ./lib/dns/fixedname.c C 2018,2019,2020,2021 ./lib/dns/forward.c C 2000,2001,2004,2005,2007,2009,2013,2016,2018,2019,2020,2021 -./lib/dns/gen-unix.h C 1999,2000,2001,2004,2005,2007,2009,2016,2018,2019,2020,2021 -./lib/dns/gen-win32.h C 1999,2000,2001,2004,2005,2006,2007,2009,2014,2016,2018,2019,2020,2021 ./lib/dns/gen.c C 1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021 +./lib/dns/gen.h C 1999,2000,2001,2004,2005,2007,2009,2016,2018,2019,2020,2021 ./lib/dns/geoip2.c C 2019,2020,2021 ./lib/dns/gssapi_link.c C 2000,2001,2002,2004,2005,2006,2007,2008,2009,2011,2012,2013,2014,2015,2016,2018,2019,2020,2021 ./lib/dns/gssapictx.c C 2000,2001,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021 @@ -1780,14 +1618,6 @@ ./lib/dns/update.c C 2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021 ./lib/dns/validator.c C 2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021 ./lib/dns/view.c C 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021 -./lib/dns/win32/DLLMain.c C 2001,2004,2007,2016,2018,2019,2020,2021 -./lib/dns/win32/gen.vcxproj.filters.in X 2013,2015,2018,2019,2020 -./lib/dns/win32/gen.vcxproj.in X 2013,2015,2016,2017,2018,2019,2020 -./lib/dns/win32/gen.vcxproj.user X 2013,2018,2019,2020,2021 -./lib/dns/win32/libdns.def.in X 2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 -./lib/dns/win32/libdns.vcxproj.filters.in X 2013,2014,2015,2016,2017,2018,2019,2020 -./lib/dns/win32/libdns.vcxproj.in X 2013,2014,2015,2016,2017,2018,2019,2020 -./lib/dns/win32/libdns.vcxproj.user X 2013,2018,2019,2020,2021 ./lib/dns/xfrin.c C 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021 ./lib/dns/zone.c C 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021 ./lib/dns/zone_p.h C 2018,2019,2020,2021 @@ -1814,12 +1644,6 @@ ./lib/irs/tests/testdata/sortlist-v4.conf CONF-SH 2016,2018,2019 ./lib/irs/tests/testdata/timeout.conf CONF-SH 2016,2018,2019 ./lib/irs/tests/testdata/unknown.conf CONF-SH 2016,2018,2019 -./lib/irs/win32/DLLMain.c C 2014,2016,2018,2019,2020,2021 -./lib/irs/win32/libirs.def X 2014,2018,2019,2020,2021 -./lib/irs/win32/libirs.vcxproj.filters.in X 2014,2015,2016,2018,2019,2020 -./lib/irs/win32/libirs.vcxproj.in X 2014,2015,2016,2017,2018,2019,2020 -./lib/irs/win32/libirs.vcxproj.user X 2014,2018,2019,2020,2021 -./lib/irs/win32/resconf.c C 2018,2019,2020,2021 ./lib/isc/aes.c C 2014,2016,2017,2018,2019,2020,2021 ./lib/isc/app.c C 1999,2000,2001,2002,2003,2004,2005,2007,2008,2009,2013,2014,2015,2016,2017,2018,2019,2020,2021 ./lib/isc/assertions.c C 1997,1998,1999,2000,2001,2004,2005,2007,2008,2009,2015,2016,2018,2019,2020,2021 @@ -1830,12 +1654,19 @@ ./lib/isc/bind9.c C 2013,2016,2018,2019,2020,2021 ./lib/isc/buffer.c C 1998,1999,2000,2001,2002,2004,2005,2006,2007,2008,2012,2014,2015,2016,2017,2018,2019,2020,2021 ./lib/isc/commandline.c C.PORTION 1999,2000,2001,2004,2005,2007,2008,2014,2015,2016,2018,2019,2020,2021 +./lib/isc/condition.c C 1998,1999,2000,2001,2004,2005,2007,2012,2016,2018,2019,2020,2021 ./lib/isc/counter.c C 2014,2016,2018,2019,2020,2021 ./lib/isc/crc64.c C 2013,2016,2018,2019,2020,2021 +./lib/isc/dir.c C 1999,2000,2001,2004,2005,2007,2008,2009,2011,2012,2016,2017,2018,2019,2020,2021 ./lib/isc/entropy.c C 2018,2019,2020,2021 ./lib/isc/entropy_private.h C 2018,2019,2020,2021 +./lib/isc/errno.c C 2016,2018,2019,2020,2021 +./lib/isc/errno2result.c C 2000,2001,2002,2004,2005,2007,2011,2012,2013,2016,2018,2019,2020,2021 +./lib/isc/errno2result.h C 2000,2001,2004,2005,2007,2011,2012,2016,2018,2019,2020,2021 ./lib/isc/error.c C 1998,1999,2000,2001,2004,2005,2007,2015,2016,2018,2019,2020,2021 ./lib/isc/event.c C 1998,1999,2000,2001,2004,2005,2007,2014,2016,2017,2018,2019,2020,2021 +./lib/isc/file.c C 2000,2001,2002,2004,2005,2007,2009,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021 +./lib/isc/fsaccess.c C 2000,2001,2004,2005,2006,2007,2016,2018,2019,2020,2021 ./lib/isc/fsaccess_common.c C 2000,2001,2004,2005,2007,2016,2017,2018,2019,2020,2021 ./lib/isc/fsaccess_common_p.h C 2000,2001,2004,2005,2007,2016,2017,2018,2019,2020,2021 ./lib/isc/glob.c C 2020,2021 @@ -1847,6 +1678,7 @@ ./lib/isc/ht.c C 2016,2017,2018,2019,2020,2021 ./lib/isc/httpd.c C 2006,2007,2008,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021 ./lib/isc/include/isc/aes.h C 2014,2016,2018,2019,2020,2021 +./lib/isc/include/isc/align.h C 2019,2020,2021 ./lib/isc/include/isc/app.h C 1999,2000,2001,2004,2005,2006,2007,2009,2013,2014,2015,2016,2018,2019,2020,2021 ./lib/isc/include/isc/assertions.h C 1997,1998,1999,2000,2001,2004,2005,2006,2007,2008,2009,2016,2017,2018,2019,2020,2021 ./lib/isc/include/isc/astack.h C 2019,2020,2021 @@ -1860,9 +1692,11 @@ ./lib/isc/include/isc/buffer.h C 1998,1999,2000,2001,2002,2004,2005,2006,2007,2008,2010,2012,2014,2016,2017,2018,2019,2020,2021 ./lib/isc/include/isc/cmocka.h C 2020,2021 ./lib/isc/include/isc/commandline.h C 1999,2000,2001,2004,2005,2006,2007,2015,2016,2018,2019,2020,2021 +./lib/isc/include/isc/condition.h C 1998,1999,2000,2001,2004,2005,2007,2016,2018,2019,2020,2021 ./lib/isc/include/isc/counter.h C 2014,2016,2018,2019,2020,2021 ./lib/isc/include/isc/crc64.h C 2013,2016,2018,2019,2020,2021 ./lib/isc/include/isc/deprecated.h C 2017,2018,2019,2020,2021 +./lib/isc/include/isc/dir.h C 1999,2000,2001,2004,2005,2007,2016,2018,2019,2020,2021 ./lib/isc/include/isc/endian.h C 2019,2020,2021 ./lib/isc/include/isc/errno.h C 2016,2018,2019,2020,2021 ./lib/isc/include/isc/error.h C 1998,1999,2000,2001,2004,2005,2006,2007,2009,2016,2017,2018,2019,2020,2021 @@ -1893,12 +1727,17 @@ ./lib/isc/include/isc/md.h C 2018,2019,2020,2021 ./lib/isc/include/isc/mem.h C 1997,1998,1999,2000,2001,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2015,2016,2017,2018,2019,2020,2021 ./lib/isc/include/isc/meminfo.h C 2015,2016,2018,2019,2020,2021 +./lib/isc/include/isc/mutex.h C 1998,1999,2000,2001,2002,2004,2005,2007,2016,2018,2019,2020,2021 ./lib/isc/include/isc/mutexatomic.h C 2019,2020,2021 ./lib/isc/include/isc/mutexblock.h C 1999,2000,2001,2004,2005,2006,2007,2016,2018,2019,2020,2021 +./lib/isc/include/isc/net.h C 1999,2000,2001,2002,2003,2004,2005,2007,2008,2012,2013,2014,2016,2017,2018,2019,2020,2021 ./lib/isc/include/isc/netaddr.h C 1998,1999,2000,2001,2002,2004,2005,2006,2007,2009,2015,2016,2017,2018,2019,2020,2021 +./lib/isc/include/isc/netdb.h C 1999,2000,2001,2004,2005,2007,2016,2018,2019,2020,2021 ./lib/isc/include/isc/netmgr.h C 2019,2020,2021 ./lib/isc/include/isc/netscope.h C 2002,2004,2005,2006,2007,2009,2016,2018,2019,2020,2021 ./lib/isc/include/isc/nonce.h C 2018,2019,2020,2021 +./lib/isc/include/isc/offset.h C 2000,2001,2004,2005,2007,2008,2016,2018,2019,2020,2021 +./lib/isc/include/isc/once.h C 1999,2000,2001,2004,2005,2007,2016,2018,2019,2020,2021 ./lib/isc/include/isc/os.h C 2000,2001,2004,2005,2006,2007,2016,2018,2019,2020,2021 ./lib/isc/include/isc/parseint.h C 2001,2002,2004,2005,2006,2007,2016,2018,2019,2020,2021 ./lib/isc/include/isc/platform.h.in C 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2013,2014,2015,2016,2017,2018,2019,2020 @@ -1922,13 +1761,19 @@ ./lib/isc/include/isc/siphash.h C 2019,2020,2021 ./lib/isc/include/isc/sockaddr.h C 1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2009,2012,2015,2016,2018,2019,2020,2021 ./lib/isc/include/isc/socket.h C 1998,1999,2000,2001,2002,2004,2005,2006,2007,2008,2009,2011,2012,2013,2014,2016,2018,2019,2020,2021 +./lib/isc/include/isc/stat.h C 2004,2007,2014,2016,2018,2019,2020,2021 ./lib/isc/include/isc/stats.h C 2009,2012,2016,2018,2019,2020,2021 +./lib/isc/include/isc/stdatomic.h C 2019,2020,2021 ./lib/isc/include/isc/stdio.h C 2000,2001,2004,2005,2006,2007,2013,2016,2018,2019,2020,2021 +./lib/isc/include/isc/stdtime.h C 1999,2000,2001,2004,2005,2007,2011,2012,2016,2018,2019,2020,2021 ./lib/isc/include/isc/strerr.h C 2018,2019,2020,2021 ./lib/isc/include/isc/string.h C 2000,2001,2003,2004,2005,2006,2007,2014,2016,2018,2019,2020,2021 ./lib/isc/include/isc/symtab.h C 1996,1997,1998,1999,2000,2001,2004,2005,2006,2007,2009,2011,2012,2013,2016,2018,2019,2020,2021 +./lib/isc/include/isc/syslog.h C 1999,2000,2001,2004,2005,2007,2016,2018,2019,2020,2021 ./lib/isc/include/isc/task.h C 1998,1999,2000,2001,2003,2004,2005,2006,2007,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021 ./lib/isc/include/isc/taskpool.h C 1999,2000,2001,2004,2005,2006,2007,2011,2012,2016,2018,2019,2020,2021 +./lib/isc/include/isc/thread.h C 1998,1999,2000,2001,2004,2005,2007,2013,2016,2017,2018,2019,2020,2021 +./lib/isc/include/isc/time.h C 1998,1999,2000,2001,2004,2005,2006,2007,2008,2009,2012,2014,2015,2016,2017,2018,2019,2020,2021 ./lib/isc/include/isc/timer.h C 1998,1999,2000,2001,2002,2004,2005,2006,2007,2008,2009,2012,2013,2014,2016,2018,2019,2020,2021 ./lib/isc/include/isc/tls.h C 2021 ./lib/isc/include/isc/tm.h C 2014,2016,2018,2019,2020,2021 @@ -1942,16 +1787,19 @@ ./lib/isc/include/pk11/result.h C 2014,2016,2018,2019,2020,2021 ./lib/isc/include/pk11/site.h C 2016,2017,2018,2019,2020,2021 ./lib/isc/include/pkcs11/pkcs11.h X 2019,2020,2021 +./lib/isc/interfaceiter.c C 1999,2000,2001,2002,2003,2004,2005,2007,2008,2014,2016,2017,2018,2019,2020,2021 ./lib/isc/iterated_hash.c C 2006,2008,2009,2016,2018,2019,2020,2021 ./lib/isc/lex.c C 1998,1999,2000,2001,2002,2003,2004,2005,2007,2013,2014,2015,2016,2017,2018,2019,2020,2021 ./lib/isc/lib.c C 1999,2000,2001,2004,2005,2007,2009,2013,2014,2015,2016,2018,2019,2020,2021 -./lib/isc/lib_p.h C 2021 ./lib/isc/log.c C 1999,2000,2001,2002,2003,2004,2005,2006,2007,2009,2011,2012,2013,2014,2016,2017,2018,2019,2020,2021 ./lib/isc/managers.c C 2021 ./lib/isc/md.c C 2018,2019,2020,2021 ./lib/isc/mem.c C 1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021 ./lib/isc/mem_p.h C 2018,2019,2020,2021 +./lib/isc/meminfo.c C 2015,2016,2018,2019,2020,2021 +./lib/isc/mutex.c C 2000,2001,2002,2004,2005,2007,2008,2011,2012,2014,2015,2016,2018,2019,2020,2021 ./lib/isc/mutexblock.c C 1999,2000,2001,2004,2005,2007,2011,2012,2016,2018,2019,2020,2021 +./lib/isc/net.c C 1999,2000,2001,2002,2003,2004,2005,2007,2008,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021 ./lib/isc/netaddr.c C 1999,2000,2001,2002,2004,2005,2007,2010,2011,2012,2014,2015,2016,2017,2018,2019,2020,2021 ./lib/isc/netmgr/http.c C 2021 ./lib/isc/netmgr/netmgr-int.h C 2019,2020,2021 @@ -1969,18 +1817,13 @@ ./lib/isc/nonce.c C 2018,2019,2020,2021 ./lib/isc/openssl_shim.c C 2018,2019,2020,2021 ./lib/isc/openssl_shim.h C 2020,2021 +./lib/isc/os.c C 2000,2001,2004,2005,2007,2016,2018,2019,2020,2021 ./lib/isc/parseint.c C 2001,2002,2003,2004,2005,2007,2012,2016,2018,2019,2020,2021 ./lib/isc/pk11.c C 2014,2015,2016,2017,2018,2019,2020,2021 +./lib/isc/pk11_api.c C 2014,2016,2018,2019,2020,2021 ./lib/isc/pk11_result.c C 2014,2015,2016,2018,2019,2020,2021 ./lib/isc/pool.c C 2013,2015,2016,2018,2019,2020,2021 ./lib/isc/portset.c C 2008,2016,2017,2018,2019,2020,2021 -./lib/isc/pthreads/condition.c C 1998,1999,2000,2001,2004,2005,2007,2012,2016,2018,2019,2020,2021 -./lib/isc/pthreads/include/isc/condition.h C 1998,1999,2000,2001,2004,2005,2007,2016,2018,2019,2020,2021 -./lib/isc/pthreads/include/isc/mutex.h C 1998,1999,2000,2001,2002,2004,2005,2007,2016,2018,2019,2020,2021 -./lib/isc/pthreads/include/isc/once.h C 1999,2000,2001,2004,2005,2007,2016,2018,2019,2020,2021 -./lib/isc/pthreads/include/isc/thread.h C 1998,1999,2000,2001,2004,2005,2007,2013,2016,2017,2018,2019,2020,2021 -./lib/isc/pthreads/mutex.c C 2000,2001,2002,2004,2005,2007,2008,2011,2012,2014,2015,2016,2018,2019,2020,2021 -./lib/isc/pthreads/thread.c C 2000,2001,2003,2004,2005,2007,2013,2016,2017,2018,2019,2020,2021 ./lib/isc/queue.c C 2019,2020,2021 ./lib/isc/quota.c C 2000,2001,2004,2005,2007,2016,2018,2019,2020,2021 ./lib/isc/radix.c C 2007,2008,2009,2011,2012,2013,2014,2015,2016,2018,2019,2020,2021 @@ -1988,16 +1831,21 @@ ./lib/isc/ratelimiter.c C 1999,2000,2001,2002,2004,2005,2007,2012,2014,2015,2016,2017,2018,2019,2020,2021 ./lib/isc/regex.c C 2013,2014.2015,2015,2016,2018,2019,2020,2021 ./lib/isc/region.c C 2002,2004,2005,2007,2016,2018,2019,2020,2021 +./lib/isc/resource.c C 2000,2001,2004,2007,2008,2009,2016,2018,2019,2020,2021 ./lib/isc/result.c C 1998,1999,2000,2001,2003,2004,2005,2007,2008,2012,2014,2015,2016,2017,2018,2019,2020,2021 ./lib/isc/rwlock.c C 1998,1999,2000,2001,2003,2004,2005,2007,2009,2011,2012,2015,2016,2017,2018,2019,2020,2021 ./lib/isc/safe.c C 2020,2021 ./lib/isc/serial.c C 1999,2000,2001,2004,2005,2007,2016,2018,2019,2020,2021 ./lib/isc/siphash.c C 2019,2020,2021 ./lib/isc/sockaddr.c C 1999,2000,2001,2002,2003,2004,2005,2006,2007,2010,2011,2012,2014,2015,2016,2017,2018,2019,2020,2021 +./lib/isc/socket.c C 1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021 ./lib/isc/socket_p.h C 2021 ./lib/isc/stats.c C 2009,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021 +./lib/isc/stdio.c C 2000,2001,2004,2007,2011,2012,2013,2014,2016,2018,2019,2020,2021 +./lib/isc/stdtime.c C 1999,2000,2001,2004,2005,2007,2016,2018,2019,2020,2021 ./lib/isc/string.c C 1999,2000,2001,2003,2004,2005,2006,2007,2011,2012,2014,2015,2016,2018,2019,2020,2021 ./lib/isc/symtab.c C 1996,1997,1998,1999,2000,2001,2004,2005,2007,2011,2012,2013,2016,2018,2019,2020,2021 +./lib/isc/syslog.c C 2001,2004,2005,2007,2016,2018,2019,2020,2021 ./lib/isc/task.c C 1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021 ./lib/isc/task_p.h C 2021 ./lib/isc/taskpool.c C 1999,2000,2001,2004,2005,2007,2011,2012,2013,2016,2018,2019,2020,2021 @@ -2037,6 +1885,8 @@ ./lib/isc/tests/time_test.c C 2014,2015,2016,2018,2019,2020,2021 ./lib/isc/tests/timer_test.c C 2018,2019,2020,2021 ./lib/isc/tests/uv_wrap.h C 2020,2021 +./lib/isc/thread.c C 2000,2001,2003,2004,2005,2007,2013,2016,2017,2018,2019,2020,2021 +./lib/isc/time.c C 1998,1999,2000,2001,2003,2004,2005,2006,2007,2008,2011,2012,2014,2015,2016,2017,2018,2019,2020,2021 ./lib/isc/timer.c C 1998,1999,2000,2001,2002,2004,2005,2007,2008,2009,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021 ./lib/isc/timer_p.h C 2021 ./lib/isc/tls.c C 2021 @@ -2044,90 +1894,8 @@ ./lib/isc/tm.c C 2014,2016,2018,2019,2020,2021 ./lib/isc/trampoline.c C 2021 ./lib/isc/trampoline_p.h C 2021 -./lib/isc/unix/dir.c C 1999,2000,2001,2004,2005,2007,2008,2009,2011,2012,2016,2017,2018,2019,2020,2021 -./lib/isc/unix/errno.c C 2016,2018,2019,2020,2021 -./lib/isc/unix/errno2result.c C 2000,2001,2002,2004,2005,2007,2011,2012,2013,2016,2018,2019,2020,2021 -./lib/isc/unix/errno2result.h C 2000,2001,2004,2005,2007,2011,2012,2016,2018,2019,2020,2021 -./lib/isc/unix/file.c C 2000,2001,2002,2004,2005,2007,2009,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021 -./lib/isc/unix/fsaccess.c C 2000,2001,2004,2005,2006,2007,2016,2018,2019,2020,2021 -./lib/isc/unix/include/isc/align.h C 2019,2020,2021 -./lib/isc/unix/include/isc/dir.h C 1999,2000,2001,2004,2005,2007,2016,2018,2019,2020,2021 -./lib/isc/unix/include/isc/net.h C 1999,2000,2001,2002,2003,2004,2005,2007,2008,2012,2013,2014,2016,2017,2018,2019,2020,2021 -./lib/isc/unix/include/isc/netdb.h C 1999,2000,2001,2004,2005,2007,2016,2018,2019,2020,2021 -./lib/isc/unix/include/isc/offset.h C 2000,2001,2004,2005,2007,2008,2016,2018,2019,2020,2021 -./lib/isc/unix/include/isc/stat.h C 2004,2007,2014,2016,2018,2019,2020,2021 -./lib/isc/unix/include/isc/stdatomic.h C 2019,2020,2021 -./lib/isc/unix/include/isc/stdtime.h C 1999,2000,2001,2004,2005,2007,2011,2012,2016,2018,2019,2020,2021 -./lib/isc/unix/include/isc/syslog.h C 1999,2000,2001,2004,2005,2007,2016,2018,2019,2020,2021 -./lib/isc/unix/include/isc/time.h C 1998,1999,2000,2001,2004,2005,2006,2007,2008,2009,2012,2014,2015,2016,2017,2018,2019,2020,2021 -./lib/isc/unix/interfaceiter.c C 1999,2000,2001,2002,2003,2004,2005,2007,2008,2014,2016,2017,2018,2019,2020,2021 -./lib/isc/unix/meminfo.c C 2015,2016,2018,2019,2020,2021 -./lib/isc/unix/net.c C 1999,2000,2001,2002,2003,2004,2005,2007,2008,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021 -./lib/isc/unix/os.c C 2000,2001,2004,2005,2007,2016,2018,2019,2020,2021 -./lib/isc/unix/pk11_api.c C 2014,2016,2018,2019,2020,2021 -./lib/isc/unix/resource.c C 2000,2001,2004,2007,2008,2009,2016,2018,2019,2020,2021 -./lib/isc/unix/socket.c C 1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021 -./lib/isc/unix/stdio.c C 2000,2001,2004,2007,2011,2012,2013,2014,2016,2018,2019,2020,2021 -./lib/isc/unix/stdtime.c C 1999,2000,2001,2004,2005,2007,2016,2018,2019,2020,2021 -./lib/isc/unix/syslog.c C 2001,2004,2005,2007,2016,2018,2019,2020,2021 -./lib/isc/unix/time.c C 1998,1999,2000,2001,2003,2004,2005,2006,2007,2008,2011,2012,2014,2015,2016,2017,2018,2019,2020,2021 ./lib/isc/url.c C 2021 ./lib/isc/utf8.c C 2020,2021 -./lib/isc/win32/DLLMain.c C 2001,2004,2007,2016,2018,2019,2020,2021 -./lib/isc/win32/condition.c C 1998,1999,2000,2001,2004,2006,2007,2016,2018,2019,2020,2021 -./lib/isc/win32/dir.c C 1999,2000,2001,2004,2007,2008,2009,2011,2012,2013,2016,2017,2018,2019,2020,2021 -./lib/isc/win32/errno.c C 2016,2018,2019,2020,2021 -./lib/isc/win32/errno2result.c C 2000,2001,2002,2004,2005,2007,2008,2013,2016,2018,2019,2020,2021 -./lib/isc/win32/errno2result.h C 2000,2001,2004,2005,2007,2016,2018,2019,2020,2021 -./lib/isc/win32/file.c C 2000,2001,2002,2004,2007,2009,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021 -./lib/isc/win32/fsaccess.c C 2000,2001,2002,2004,2007,2013,2016,2017,2018,2019,2020,2021 -./lib/isc/win32/include/isc/align.h C 2019,2020,2021 -./lib/isc/win32/include/isc/bind_registry.h C 2001,2004,2007,2016,2018,2019,2020,2021 -./lib/isc/win32/include/isc/bindevt.h C 2001,2004,2007,2016,2018,2019,2020,2021 -./lib/isc/win32/include/isc/condition.h C 1998,1999,2000,2001,2004,2007,2016,2018,2019,2020,2021 -./lib/isc/win32/include/isc/dir.h C 1999,2000,2001,2004,2007,2016,2018,2019,2020,2021 -./lib/isc/win32/include/isc/ipv6.h C 1999,2000,2001,2002,2004,2005,2007,2011,2012,2016,2018,2019,2020,2021 -./lib/isc/win32/include/isc/mutex.h C 1998,1999,2000,2001,2004,2007,2008,2009,2016,2018,2019,2020,2021 -./lib/isc/win32/include/isc/net.h C 1999,2000,2001,2002,2003,2004,2005,2007,2008,2012,2013,2016,2017,2018,2019,2020,2021 -./lib/isc/win32/include/isc/netdb.h C 1999,2000,2001,2004,2007,2016,2018,2019,2020,2021 -./lib/isc/win32/include/isc/ntgroups.h C 2001,2004,2007,2016,2018,2019,2020,2021 -./lib/isc/win32/include/isc/ntpaths.h C 2000,2001,2004,2007,2009,2015,2016,2017,2018,2019,2020,2021 -./lib/isc/win32/include/isc/offset.h C 2000,2001,2004,2007,2016,2018,2019,2020,2021 -./lib/isc/win32/include/isc/once.h C 1999,2000,2001,2004,2007,2016,2018,2019,2020,2021 -./lib/isc/win32/include/isc/platform.h.in C 2001,2004,2005,2007,2008,2009,2013,2014,2015,2016,2017,2018,2019,2020 -./lib/isc/win32/include/isc/stat.h C 2000,2001,2003,2004,2007,2009,2012,2016,2018,2019,2020,2021 -./lib/isc/win32/include/isc/stdatomic.h C 2018,2019,2020,2021 -./lib/isc/win32/include/isc/stdtime.h C 1999,2000,2001,2004,2005,2007,2011,2012,2016,2018,2019,2020,2021 -./lib/isc/win32/include/isc/syslog.h C 1999,2000,2001,2004,2007,2016,2018,2019,2020,2021 -./lib/isc/win32/include/isc/thread.h C 1998,1999,2000,2001,2004,2005,2007,2009,2013,2016,2017,2018,2019,2020,2021 -./lib/isc/win32/include/isc/time.h C 1998,1999,2000,2001,2004,2006,2007,2008,2009,2012,2014,2015,2016,2017,2018,2019,2020,2021 -./lib/isc/win32/include/isc/win32os.h C 2002,2004,2007,2009,2015,2016,2018,2019,2020,2021 -./lib/isc/win32/interfaceiter.c C 1999,2000,2001,2004,2007,2008,2009,2013,2014,2015,2016,2018,2019,2020,2021 -./lib/isc/win32/ipv6.c C 1999,2000,2001,2004,2007,2016,2018,2019,2020,2021 -./lib/isc/win32/libgen.h C 2009,2016,2018,2019,2020,2021 -./lib/isc/win32/libisc.def.exclude X 2015,2017,2018,2019,2020,2021 -./lib/isc/win32/libisc.def.in X 2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020 -./lib/isc/win32/libisc.vcxproj.filters.in X 2013,2014,2015,2016,2018,2019,2020 -./lib/isc/win32/libisc.vcxproj.in X 2013,2014,2015,2016,2017,2018,2019,2020 -./lib/isc/win32/libisc.vcxproj.user X 2013,2018,2019,2020,2021 -./lib/isc/win32/meminfo.c C 2015,2016,2018,2019,2020,2021 -./lib/isc/win32/net.c C 1999,2000,2001,2002,2003,2004,2005,2007,2008,2009,2011,2012,2013,2014,2015,2016,2018,2019,2020,2021 -./lib/isc/win32/netdb.h C 2000,2001,2004,2006,2007,2009,2013,2016,2018,2019,2020,2021 -./lib/isc/win32/ntgroups.c C 2001,2004,2006,2007,2009,2013,2016,2018,2019,2020,2021 -./lib/isc/win32/ntpaths.c C 2001,2004,2007,2009,2014,2015,2016,2017,2018,2019,2020,2021 -./lib/isc/win32/once.c C 1999,2000,2001,2004,2007,2016,2018,2019,2020,2021 -./lib/isc/win32/os.c C 2000,2001,2002,2004,2007,2013,2016,2018,2019,2020,2021 -./lib/isc/win32/pk11_api.c C 2014,2016,2018,2019,2020,2021 -./lib/isc/win32/resource.c C 2000,2001,2004,2007,2008,2016,2018,2019,2020,2021 -./lib/isc/win32/socket.c C 2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021 -./lib/isc/win32/stdio.c C 2000,2001,2004,2007,2013,2016,2018,2019,2020,2021 -./lib/isc/win32/stdtime.c C 1999,2000,2001,2004,2007,2013,2016,2018,2019,2020,2021 -./lib/isc/win32/syslog.c C 2001,2002,2003,2004,2007,2014,2016,2018,2019,2020,2021 -./lib/isc/win32/syslog.h C 2001,2002,2004,2007,2016,2018,2019,2020,2021 -./lib/isc/win32/thread.c C 1998,1999,2000,2001,2004,2005,2007,2016,2017,2018,2019,2020,2021 -./lib/isc/win32/time.c C 1998,1999,2000,2001,2003,2004,2006,2007,2008,2009,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021 -./lib/isc/win32/unistd.h C 2000,2001,2004,2007,2008,2009,2016,2018,2019,2020,2021 -./lib/isc/win32/win32os.c C 2002,2004,2007,2013,2014,2015,2016,2018,2019,2020,2021 ./lib/isccc/alist.c C.NOM 2001,2004,2005,2007,2015,2016,2018,2019,2020,2021 ./lib/isccc/base64.c C.NOM 2001,2004,2005,2007,2013,2016,2018,2019,2020,2021 ./lib/isccc/cc.c C.NOM 2001,2002,2003,2004,2005,2006,2007,2012,2013,2014,2015,2016,2018,2019,2020,2021 @@ -2147,11 +1915,6 @@ ./lib/isccc/sexpr.c C.NOM 2001,2004,2005,2007,2014,2015,2016,2018,2019,2020,2021 ./lib/isccc/symtab.c C.NOM 2001,2004,2005,2007,2016,2018,2019,2020,2021 ./lib/isccc/tests/result_test.c C 2018,2019,2020,2021 -./lib/isccc/win32/DLLMain.c C 2001,2004,2007,2016,2018,2019,2020,2021 -./lib/isccc/win32/libisccc.def X 2001,2016,2018,2019,2020,2021 -./lib/isccc/win32/libisccc.vcxproj.filters.in X 2013,2015,2016,2018,2019,2020 -./lib/isccc/win32/libisccc.vcxproj.in X 2013,2014,2015,2016,2017,2018,2019,2020 -./lib/isccc/win32/libisccc.vcxproj.user X 2013,2018,2019,2020,2021 ./lib/isccfg/aclconf.c C 1999,2000,2001,2002,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021 ./lib/isccfg/dnsconf.c C 2009,2016,2018,2019,2020,2021 ./lib/isccfg/include/isccfg/aclconf.h C 1999,2000,2001,2004,2005,2006,2007,2010,2011,2012,2013,2014,2016,2018,2019,2020,2021 @@ -2166,11 +1929,6 @@ ./lib/isccfg/parser.c C 2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021 ./lib/isccfg/tests/duration_test.c C 2019,2020,2021 ./lib/isccfg/tests/parser_test.c C 2016,2018,2019,2020,2021 -./lib/isccfg/win32/DLLMain.c C 2001,2004,2007,2016,2018,2019,2020,2021 -./lib/isccfg/win32/libisccfg.def X 2001,2002,2005,2009,2010,2011,2013,2014,2015,2016,2018,2019,2020,2021 -./lib/isccfg/win32/libisccfg.vcxproj.filters.in X 2013,2014,2015,2016,2018,2019,2020 -./lib/isccfg/win32/libisccfg.vcxproj.in X 2013,2014,2015,2016,2017,2018,2019,2020 -./lib/isccfg/win32/libisccfg.vcxproj.user X 2013,2018,2019,2020,2021 ./lib/ns/client.c C 2017,2018,2019,2020,2021 ./lib/ns/hooks.c C 2018,2019,2020,2021 ./lib/ns/include/ns/client.h C 2017,2018,2019,2020,2021 @@ -2205,17 +1963,7 @@ ./lib/ns/tests/query_test.c C 2017,2018,2019,2020,2021 ./lib/ns/tests/testdata/notify/notify1.msg X 2017,2018,2019,2020,2021 ./lib/ns/update.c C 2017,2018,2019,2020,2021 -./lib/ns/win32/DLLMain.c C 2017,2018,2019,2020,2021 -./lib/ns/win32/libns.def X 2017,2018,2019,2020,2021 -./lib/ns/win32/libns.vcxproj.filters X 2017,2018,2019,2020,2021 -./lib/ns/win32/libns.vcxproj.in X 2017,2018,2019,2020 -./lib/ns/win32/libns.vcxproj.user X 2017,2018,2019,2020,2021 ./lib/ns/xfrout.c C 2017,2018,2019,2020,2021 -./lib/win32/bindevt/bindevt.c C 2000,2001,2004,2007,2016,2018,2019,2020,2021 -./lib/win32/bindevt/bindevt.mc X 2001,2004,2007,2016,2018,2019,2020,2021 -./lib/win32/bindevt/bindevt.vcxproj.filters.in X 2013,2015,2018,2019,2020 -./lib/win32/bindevt/bindevt.vcxproj.in X 2013,2014,2015,2016,2018,2019,2020 -./lib/win32/bindevt/bindevt.vcxproj.user X 2013,2018,2019,2020,2021 ./util/COPYRIGHT X 1996,1997,1998,1999,2000,2001,2004,2007,2016,2018,2019,2020,2021 ./util/COPYRIGHT.BRIEF X 1996,1997,1998,1999,2000,2001,2004,2016,2018,2019,2020,2021 ./util/COPYRIGHT.BSDI X 2000,2001,2004,2007,2016,2018,2019,2020,2021 @@ -2234,7 +1982,6 @@ ./util/check-make-install.in SH 2020 ./util/check-pullups.pl PERL 2001,2002,2003,2004,2007,2012,2016,2018,2019,2020,2021 ./util/check-sources.pl PERL 2000,2001,2004,2007,2012,2013,2016,2018,2019,2020,2021 -./util/check-win32util-configure SH 2019,2020,2021 ./util/checklibs.sh SH 2017,2018,2019,2020,2021 ./util/commit-arm.sh SH 2012,2016,2018,2019,2020,2021 ./util/copyrights X 1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021 @@ -2247,7 +1994,6 @@ ./util/models.c C 2015,2016,2017,2018,2019,2020,2021 ./util/nanny.pl PERL 2000,2001,2004,2007,2012,2016,2018,2019,2020,2021 ./util/new-func PERL 2005,2007,2012,2016,2018,2019,2020,2021 -./util/nt-kit SH 1999,2000,2001,2004,2007,2012,2016,2018,2019,2020,2021 ./util/pairwise-testing.sh SH 2020,2021 ./util/parse_tsan.py PYTHON-BIN 2019,2020,2021 ./util/run-clang-tidy X 2020,2021 @@ -2257,6 +2003,3 @@ ./util/update-drafts.pl PERL 2000,2001,2004,2007,2012,2016,2018,2019,2020,2021 ./util/update_branches PERL 2005,2007,2012,2016,2018,2019,2020,2021 ./util/update_copyrights PERL 1998,1999,2000,2001,2004,2005,2006,2007,2008,2009,2010,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021 -./win32utils/Configure PERL 2013,2014,2015,2016,2017,2018,2019,2020,2021 -./win32utils/GeoIP.diff X 2013,2018,2019,2020,2021 -./win32utils/bind9.sln.in X 2013,2014,2015,2016,2017,2018,2019,2020 diff --git a/util/kit.sh b/util/kit.sh index 67d97a1175..dae8c2b39a 100644 --- a/util/kit.sh +++ b/util/kit.sh @@ -163,17 +163,6 @@ then chmod +x lib/bind/configure lib/bind/mkinstalldirs fi -# Fix files which should be using DOS style newlines -windirs=`find lib bin -type d -name win32` -windirs="$windirs win32utils" -winnames="-name *.mak -or -name *.dsp -or -name *.dsw -or -name *.txt -or -name *.bat" -for f in `find $windirs -type f \( $winnames \) -print` -do - awk '{sub("\r$", "", $0); printf("%s\r\n", $0);}' < $f > tmp - touch -r $f tmp - mv tmp $f -done - # check that documentation has been updated properly; issue a warning # if it hasn't ok= diff --git a/util/nt-kit b/util/nt-kit deleted file mode 100644 index 85f5ca5b46..0000000000 --- a/util/nt-kit +++ /dev/null @@ -1,180 +0,0 @@ -#! /bin/sh -ex -# -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, you can obtain one at https://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -# XXX no command line options at all. especially useful would be a way -# to specify the target directory on the NT machine, since it is needed -# in the Makefiles and otherwise config.status.win32 needs to be edited. - -# XXX long term something different clearly needs to be done, so someone -# without any Unix boxes at all could download the source kit and compile. -# it'll happen; it has been a higher priority just to try to work -# on the code issues. - -ZIP=bind9-nt.zip -DOZIP=false - -case "$1" in --nozip) DOZIP=false; shift ;; --zip) DOZIP=true ; shift ;; -esac - -case $# in -0) - dstdir=../bind9-nt - rmtdir=g:/proj/bind9-nt - ;; -1) - dstdir=../bind9-nt - rmtdir="$1" - ;; -2) - dstdir="$2" - rmtdir="$1" - ;; -*) - echo "usage: $0 rmtdir [dstdir]" >&2 - exit 99 - ;; -esac - -test -f version || { - echo "$0: must be run in bind9 top level directory" >&2 - exit 1 -} - -set -- `ls -i version` -this_version=$1 -if test -e "$dstdir/version"; then - set -- `ls -i "$dstdir/version" 2>&1` -else - set -- 0 -fi -that_version=$1 - -# Try to make an effort to not wipe out current directory or non-bind directory -test "0$this_version" -eq "0$that_version" && { - echo "$0: dstdir must not be current directory" >&2 - exit 1 -} - -test ! -d $dstdir -o "$that_version" -ne 0 || { - echo "$0: existing dstdir must be a bind9 source directory" >&2 - exit 1 -} - -rm -rf $dstdir -mkdir $dstdir -tar cf - . | (cd $dstdir; tar xfp -) -cd $dstdir - -# XXX Tale BSD/OS special -rm -f stdio.h - -# Start with a clean slate. This is not done in the source tree before -# the copy so as not to disturb things there. -./configure -make clean - -# XXX header files that (currently) need to be built on Unix -##cd lib/isc -##make -##cd ../dns -##make code.h include/dns/enumtype.h include/dns/enumclass.h include/dns/rdatastruct.h -##cd ../.. - -# XXX Need a better way -perl -pi -e '$_ = "" if /chmod\(.*\)/' lib/dns/sec/dst/dst_parse.c - -# XXX grrr. -perl -pi -e 'last if /^##confparser\.c/' lib/dns/config/Makefile.in - -# Adjust Makefiles to have NT paths and nmake-compatible variable expansion. -set +x -echo doing Makefile substitutions -while read file type dates; do - case $file in - */Makefile.in|./make/includes.in|./version) - echo $file - perl -pi -e 'tr%{}/%()\\%; - s%(-I.*)unix%$1win32%; - s%(-I.*)pthreads.*?(\\?)$%$2%; - s%-I ?%/I %g; - s%-D%/D %g; - s%(\$\(ARFLAGS\)) \$@%$1 /out:\$@%; - s%\$\(UNIXOBJS\)%\$(WIN32OBJS)%; - s%\$\(PTHREADOBJS\)%%; - s%^(SUBDIRS.*)(pthreads)(.*)%$1$3%; - s%^(SUBDIRS.*)(unix)(.*)%$1win32$3%; - s%rm -f%-del /q /f%; - s%rm -rf%-rd /q /s%; - s%touch%copy NUL:%' $file - ;; - ./make/rules.in) - echo frobbing conditionals in $file - - # /K is specified in MAKEDEFS *YUCK* because nmake - # for some BRAINDAMAGED REASON does not put K - # in MAKEFLAGS (confirm with "nmake /PKN foo"; - # only P and N are in Makeflags.) However ... doing - # things this way ends up putting /K when you might not - # want it. Thanks, Microsoft. - perl -pi -e \ - 'print "MAKEDEFS = /nologo /K\$(MAKEFLAGS)\n" - if $. == 1; - - tr%{}/%()\\%; - - s%-I%/I %g; - s%-D%/D %g; - s%-c%/c %g; - - s/\.c\.o:/.c.obj:/; - - s%rm -f%-del /q /f%; - s%rm -rf%-rd /q /s%; - - s/for\ i\ in\ \$\(ALL_SUBDIRS\).* - /for %i in (\$(ALL_SUBDIRS)) do \\/x; - - s/if\ \[\ (\S+)\ !=\ "nulldir".* - /\@if NOT $1=="nulldir" \\/x; - - s/^.*echo "making .* in .*\n//; - - s/\(cd\ (\S+);\ (.*)\);\ \\ - /pushd $1 && cd && $2 && popd || popd/x; - - s/\$\$i/%i/g; - - s/^\t+(fi|done).*\n//' $file - ;; - esac -done < util/copyrights -set -x - -# Make Makefiles -./config.status.win32 $rmtdir - -# Copy win32 special files -cp config.h.win32 config.h - -if $DOZIP; then - dir="`basename $dstdir`" - cd .. - rm -f $ZIP - # q = quiet - # r = recurse - # l = LF -> CRLF - # 9 = highest compression - zip -qrl9 $ZIP $dir -fi - -exit 0 diff --git a/util/unused-headers.sh b/util/unused-headers.sh index 35af0f69f8..c4c12140b0 100755 --- a/util/unused-headers.sh +++ b/util/unused-headers.sh @@ -10,7 +10,7 @@ # information regarding copyright ownership. unused_headers=$( - git ls-files -- '*.h' ':!:*include*' ':!:*rdata*' ':!:*win32*' | + git ls-files -- '*.h' ':!:*include*' ':!:*rdata*' | sed 's|.*/\(.*\.h\)|\1|' | while read -r header; do git grep -q "#include \".*${header}\"" || echo "${header}" diff --git a/win32utils/Configure b/win32utils/Configure deleted file mode 100644 index c3903f0a84..0000000000 --- a/win32utils/Configure +++ /dev/null @@ -1,2707 +0,0 @@ -#!/usr/bin/perl -# -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, you can obtain one at https://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -# Configure -# -# This script builds nmake and visual studio build files -# - -require 5.18.0; -no warnings 'experimental::smartmatch'; - -use strict; -use File::Spec; - -# files to configure - -my $configfile = "../config.h"; -my $platformfile = "../lib/isc/win32/include/isc/platform.h"; -my @confshlist = ("../bin/tests/system/conf.sh", - "../bin/tests/system/run.sh", - "../bin/tests/system/start.sh", - "../bin/tests/system/stop.sh"); - -my @filelist = ("../lib/dns/win32/libdns.def", - "../lib/isc/win32/libisc.def"); - -my @projectlist = ("../bin/check/win32/checkconf.vcxproj", - "../bin/check/win32/checkconf.vcxproj.filters", - "../bin/check/win32/checktool.vcxproj", - "../bin/check/win32/checktool.vcxproj.filters", - "../bin/check/win32/checkzone.vcxproj", - "../bin/check/win32/checkzone.vcxproj.filters", - "../bin/confgen/win32/confgentool.vcxproj", - "../bin/confgen/win32/confgentool.vcxproj.filters", - "../bin/confgen/win32/tsigkeygen.vcxproj", - "../bin/confgen/win32/tsigkeygen.vcxproj.filters", - "../bin/confgen/win32/rndcconfgen.vcxproj", - "../bin/confgen/win32/rndcconfgen.vcxproj.filters", - "../bin/delv/win32/delv.vcxproj", - "../bin/delv/win32/delv.vcxproj.filters", - "../bin/dig/win32/dig.vcxproj", - "../bin/dig/win32/dig.vcxproj.filters", - "../bin/dig/win32/dighost.vcxproj", - "../bin/dig/win32/dighost.vcxproj.filters", - "../bin/dig/win32/host.vcxproj", - "../bin/dig/win32/host.vcxproj.filters", - "../bin/dig/win32/nslookup.vcxproj", - "../bin/dig/win32/nslookup.vcxproj.filters", - "../bin/dnssec/win32/cds.vcxproj", - "../bin/dnssec/win32/cds.vcxproj.filters", - "../bin/dnssec/win32/dnssectool.vcxproj", - "../bin/dnssec/win32/dnssectool.vcxproj.filters", - "../bin/dnssec/win32/dsfromkey.vcxproj", - "../bin/dnssec/win32/dsfromkey.vcxproj.filters", - "../bin/dnssec/win32/importkey.vcxproj", - "../bin/dnssec/win32/importkey.vcxproj.filters", - "../bin/dnssec/win32/keyfromlabel.vcxproj", - "../bin/dnssec/win32/keyfromlabel.vcxproj.filters", - "../bin/dnssec/win32/keygen.vcxproj", - "../bin/dnssec/win32/keygen.vcxproj.filters", - "../bin/dnssec/win32/revoke.vcxproj", - "../bin/dnssec/win32/revoke.vcxproj.filters", - "../bin/dnssec/win32/settime.vcxproj", - "../bin/dnssec/win32/settime.vcxproj.filters", - "../bin/dnssec/win32/signzone.vcxproj", - "../bin/dnssec/win32/signzone.vcxproj.filters", - "../bin/dnssec/win32/verify.vcxproj", - "../bin/dnssec/win32/verify.vcxproj.filters", - "../bin/named/win32/named.vcxproj", - "../bin/named/win32/named.vcxproj.filters", - "../bin/nsupdate/win32/nsupdate.vcxproj", - "../bin/nsupdate/win32/nsupdate.vcxproj.filters", - "../bin/pkcs11/win32/pk11destroy.vcxproj", - "../bin/pkcs11/win32/pk11destroy.vcxproj.filters", - "../bin/pkcs11/win32/pk11keygen.vcxproj", - "../bin/pkcs11/win32/pk11keygen.vcxproj.filters", - "../bin/pkcs11/win32/pk11list.vcxproj", - "../bin/pkcs11/win32/pk11list.vcxproj.filters", - "../bin/pkcs11/win32/pk11tokens.vcxproj", - "../bin/pkcs11/win32/pk11tokens.vcxproj.filters", - "../bin/rndc/win32/rndc.vcxproj", - "../bin/rndc/win32/rndc.vcxproj.filters", - "../bin/tools/win32/arpaname.vcxproj", - "../bin/tools/win32/arpaname.vcxproj.filters", - "../bin/tools/win32/journalprint.vcxproj", - "../bin/tools/win32/journalprint.vcxproj.filters", - "../bin/tools/win32/mdig.vcxproj", - "../bin/tools/win32/mdig.vcxproj.filters", - "../bin/tools/win32/nsec3hash.vcxproj", - "../bin/tools/win32/nsec3hash.vcxproj.filters", - "../bin/tools/win32/rrchecker.vcxproj", - "../bin/tools/win32/rrchecker.vcxproj.filters", - "../bin/tests/system/win32/bigkey.vcxproj", - "../bin/tests/system/win32/bigkey.vcxproj.filters", - "../bin/tests/system/win32/feature-test.vcxproj", - "../bin/tests/system/win32/feature-test.vcxproj.filters", - "../bin/tests/system/win32/gencheck.vcxproj", - "../bin/tests/system/win32/gencheck.vcxproj.filters", - "../bin/tests/system/win32/keycreate.vcxproj", - "../bin/tests/system/win32/keycreate.vcxproj.filters", - "../bin/tests/system/win32/keydelete.vcxproj", - "../bin/tests/system/win32/keydelete.vcxproj.filters", - "../bin/tests/system/win32/pipequeries.vcxproj", - "../bin/tests/system/win32/pipequeries.vcxproj.filters", - "../bin/tests/system/win32/makejournal.vcxproj", - "../bin/tests/system/win32/makejournal.vcxproj.filters", - "../bin/tests/system/win32/resolve.vcxproj", - "../bin/tests/system/win32/resolve.vcxproj.filters", - "../bin/win32/BINDInstall/BINDInstall.vcxproj", - "../bin/win32/BINDInstall/BINDInstall.vcxproj.filters", - "../lib/bind9/win32/libbind9.vcxproj", - "../lib/bind9/win32/libbind9.vcxproj.filters", - "../lib/dns/win32/gen.vcxproj", - "../lib/dns/win32/gen.vcxproj.filters", - "../lib/dns/win32/libdns.vcxproj", - "../lib/dns/win32/libdns.vcxproj.filters", - "../lib/irs/win32/libirs.vcxproj", - "../lib/irs/win32/libirs.vcxproj.filters", - "../lib/isc/win32/libisc.vcxproj", - "../lib/isc/win32/libisc.vcxproj.filters", - "../lib/isccc/win32/libisccc.vcxproj", - "../lib/isccc/win32/libisccc.vcxproj.filters", - "../lib/isccfg/win32/libisccfg.vcxproj", - "../lib/isccfg/win32/libisccfg.vcxproj.filters", - "../lib/ns/win32/libns.vcxproj", - "../lib/win32/bindevt/bindevt.vcxproj", - "../lib/win32/bindevt/bindevt.vcxproj.filters", - "bind9.sln"); - -# for config.h - -my %configdefh; - -my @substdefh = ("PACKAGE_VERSION_MAJOR", - "PACKAGE_VERSION_MINOR", - "PACKAGE_VERSION_PATCH", - "PACKAGE_VERSION_EXTRA", - "PACKAGE_VERSION", - "PACKAGE_NAME", - "PACKAGE_DESCRIPTION", - "PACKAGE_SRCID", - "PACKAGE_CONFIGARGS", - "PACKAGE_BUILDER", - "PACKAGE_STRING", - "MAPAPI", - "DNS_RDATASET_FIXED", - "HAVE_GEOIP2", - "HAVE_GSSAPI", - "HAVE_GSSAPI_H", - "HAVE_GSSAPI_KRB5_H", - "HAVE_KRB5_H", - "HAVE_GSSAPI_GSSAPI_H", - "HAVE_GSSAPI_GSSAPI_KRB5_H", - "HAVE_KRB5_KRB5_H", - "HAVE_LIBXML2", - "USE_BACKTRACE", - "USE_OPENSSL", - "USE_PKCS11", - "HAVE_READLINE", - "HAVE_ZLIB", - "ISC_LIST_CHECKINIT", - "TUNE_LARGE", - "WANT_QUERYTRACE", - "WITH_IDN", - "CPU_RELAX", - "VALIDATION_DEFAULT", - ); - -# for platform.h - -my %configdefp; - -my @substdefp = (); - -# for conf.sh - -my %configtest; - -my @substtest = ("CRYPTO", - "DEVELOPER_MODE", - "DNSTAP", - "FSTRM_CAPTURE", - "JSONSTATS", - "NZD_TOOLS", - "XMLSTATS", - "ZLIB", - "builddir", - "srcdir", - "abs_builddir", - "abs_srcdir", - "top_builddir", - "top_srcdir", - "abs_top_builddir", - "abs_top_srcdir"); - -# includes - -my %configinc; - -my @substinc = ("GSSAPI_INC", - "GEOIP_INC", - "IDN_INC", - "LIBXML2_INC", - "LIBUV_INC", - "NGHTTP2_INC", - "OPENSSL_INC", - "READLINE_INC", - "ZLIB_INC"); - -# libraries - -my %configlib; - -my @substlib = ("GSSAPI_LIB", - "GEOIP_LIB", - "IDN_LIB", - "KRB5_LIB", - "LIBXML2_LIB", - "LIBUV_LIB", - "NGHTTP2_LIB", - "OPENSSL_LIBCRYPTO", - "OPENSSL_LIBSSL", - "READLINE_LIB", - "READLINE_LIBD", - "ZLIB_LIB"); - -# DLLs - -my %configdll; - -my @substdll = ("COMERR_DLL", - "GSSAPI_DLL", - "ICONV_DLL", - "IDN_DLL", - "KRB5_DLL", - "K5SPRT_DLL", - "LIBXML2_DLL", - "LIBUV_DLL", - "NGHTTP2_DLL", - "OPENSSL_DLLCRYPTO", - "OPENSSL_DLLSSL", - "WSHELP_DLL", - "ZLIB_DLL"); - -# variables - -my %configvar = ( - "TOOLS_VERSION" => "4.0", -); - -my @substvar = ("BIND9_VERSION", - "BUILD_MACHINE", - "BUILD_PLATFORM", - "COPTI", - "COPTML", - "COPTMLD", - "COPTX", - "COPTY", - "DLZ_SYSTEM_TEST", - "EXEEXT", - "INTRINSIC", - "MACHINE", - "OPENSSL_PATH", - "PLATFORM", - "PLATFORM_TOOLSET", - "prefix", - "PSSUSPEND", - "PYTHON", - "TOOLS_VERSION", - "VCREDIST_PATH", - "WINDOWS_TARGET_PLATFORM_VERSION"); - -# defines - -my %configdefd; - -my @substdefd = ("PK11_LIB_LOCATION", - "USE_PYTHON"); - -# conditions - -my %configcond; - -my @substcond = ("ATOMIC", - "GSSAPI", - "GEOIP", - "IDNKIT", - "LIBXML2", - "OPENSSL", - "PKCS11", - "PYTHON", - "STESTS", - "TESTS", - "ZLIB"); - -my @allcond = (@substcond, "NOTYET", "NOLONGER"); - -# paths - -my $top_builddir = File::Spec->updir(); -my $top_srcdir = File::Spec->updir(); -my $abs_top_builddir = File::Spec->rel2abs($top_builddir); -my $abs_top_srcdir = File::Spec->rel2abs($top_srcdir); - -# arguments - -# enable-xxx/disable-xxx - -my @enablelist = ("developer", - "fixed-rrset", - "intrinsics", - "native-pkcs11", - "openssl-hash", - "querytrace"); - -# with-xxx/without-xxx - -my @withlist = ("aes", - "cross-compile", - "extra-tests", - "gssapi", - "geoip2", - "iconv", - "idn", - "openssl", - "libxml2", - "nghttp2", - "pkcs11", - "pssuspend", - "python", - "readline", - "system-tests", - "tests", - "tuning", - "libuv", - "vcredist", - "zlib"); - -# general arguments - -my @optionlist = ("help", "verbose", "legacy", "win32", "x64", "clean"); - -# usage - -my @usage = ("Usage: perl Configure help\n", - " perl Configure options* win32|x64\n", - " perl Configure clean\n"); - -# help - -my @help = ( -"'Configure' configures BIND9 build files.\n\n", -@usage, -"\nGeneral Options and Commands:\n", -" verbose (options) print messages\n", -" help (command) print this help\n", -" win32 (command) configure for Win32 platform\n", -" x64 (command) configure for x64 platform\n", -" clean (command) clean up generated files\n", -" (command) print a summary of the configuration\n", -"\nOptional Features:\n", -" enable-intrinsics enable intrinsic/atomic functions [default=yes]\n", -" enable-native-pkcs11 use native PKCS#11 for all crypto [default=no]\n", -" enable-openssl-hash use OpenSSL for hash functions [default=yes]\n", -" enable-fixed-rrset enable fixed rrset ordering [default=no]\n", -" enable-developer enable developer build settings [default=no]\n", -" enable-querytrace enable very verbose query trace [default=no]\n", -"\nOptional Packages:\n", -" with-tests build with test suite\n", -" with-extra-tests build with extra test suite\n", -" with-system-tests build with system test suite\n", -" with-openssl[=PATH] build with OpenSSL yes|path (mandatory)\n", -" with-libuv[=PATH] build with libuv yes|path (mandatory)\n", -" with-nghttp2[=PATH] build with nghttp2 yes|path (mandatory)\n", -" with-pkcs11[=PATH] build with PKCS#11 support yes|no|provider-path\n", -" with-gssapi[=PATH] build with MIT KfW GSSAPI yes|no|path\n", -" with-libxml2[=PATH] build with libxml2 library yes|no|path\n", -" with-geoip2[=PATH] build with GeoIP2 support yes|no|path\n", -" with-pssuspend[=COMMAND] specify pssuspend command\n", -" with-python[=COMMAND] specify python interpreter python|command\n", -" with-readline[=PATH] build with readline library support yes|no|path\n", -" with-idn[=PATH] build with IDN kit support yes|no|path\n", -" with-iconv[=PATH] path of the iconv DLL [default=same than idn]\n", -" with-zlib[=PATH] build with zlib library yes|no|path\n", -" with-vcredist[=PATH] visual C++ redistributable package yes|path\n", -" with-tuning=OPTION tune for platform size (small|default)\n", -" with-cross-compile 32 / 64 bit build / host platforms\n", -"\nOptional Visual Studio project parameters:\n", -" with-tools-version=VERSION set the ToolsVersion attribute to VERSION\n", -" with-platform-toolset=VERSION use supplied toolset VERSION for building\n", -" with-platform-version=VERSION use supplied Windows SDK VERSION for building\n"); - -# Parse arguments - -my $verbose = 0; -my $legacy_only = 0; -my $want_help = "no"; -my $want_win32 = "no"; -my $want_x64 = "no"; -my $want_clean = "no"; -my $want_unknown = "no"; -my $unknown_value; -my $enable_intrinsics = "yes"; -my $cryptolib = ""; -my $enable_native_pkcs11 = "no"; -my $enable_crypto_rand = "yes"; -my $enable_fixed_rrset = "no"; -my $enable_developer = "no"; -my $enable_querytrace = "no"; -my $enable_rpz_nsip = "yes"; -my $enable_rpz_nsdname = "yes"; -my $use_tests = "no"; -my $use_stests = "no"; -my $use_libuv = "auto"; -my $libuv_path = "../../"; -my $nghttp2_path = "../../"; -my $use_nghttp2 = "auto"; -my $use_openssl = "auto"; -my $openssl_path = "../../"; -my $use_pkcs11 = "no"; -my $pkcs11_path = "unknown"; -my $use_aes = "auto"; -my $use_gssapi = "no"; -my $validation_default = "auto"; -my $gssapi_path = "C:/Program\ Files/MIT/Kerberos/"; -my $use_geoip2 = "no"; -my $geoip2_path = ""; -my $use_libxml2 = "auto"; -my $libxml2_path = "../../"; -my $with_pssuspend = "no"; -my $pssuspend_command = "pssuspend.exe"; -my $use_python = "auto"; -my $python_command = "python.exe"; -my $use_readline = "no"; -my $readline_path = "../../"; -my $use_idn = "no"; -my $idn_path = "../../"; -my $iconv_path = " --idn-- "; -my $use_zlib = "no"; -my $zlib_path = "../../"; -my $use_vcredist = "yes"; -my $vcredist_path = " --infer-- "; -my $cross_compile = "no"; -my $tuning = "default"; -my $want_checkfiles = "no"; - -# no arguments -> usage - -if ($#ARGV < 0) { - foreach (@usage) { - print $_; - } - exit 1; -} - -# parse arguments - -foreach (@ARGV) { - if (/^verbose$/i) { - $verbose = 1; - } elsif (/^help$/i) { - $want_help = "yes"; - } elsif (/^disable-(.*)$/i) { - appargs($_); - myenable($1, "no"); - } elsif (/^enable-(.*)$/i) { - appargs($_); - myenable($1, "yes"); - } elsif (/^without-(.*)$/i) { - appargs($_); - mywith($1, "no"); - } elsif (/^with-(.*)=(.*)$/i) { - appargs($_); - mywith($1, $2); - } elsif (/^with-(.*)$/i) { - appargs($_); - mywith($1, "yes"); - } elsif (/^legacy$/i) { - $legacy_only = 1; - } elsif (/^win32$/i) { - $want_win32 = "yes"; - } elsif (/^x64$/i) { - appargs($_); - $want_x64 = "yes"; - } elsif (/^clean$/i) { - $want_clean = "yes"; - } elsif (/^checkfiles$/i) { - $want_checkfiles = "yes"; - } else { - $want_unknown = "yes"; - $unknown_value = $_; - } -} - -# old legacy mode - -if ($legacy_only) { - print "legacy mode is obsolete (so ignored)\n"; -} - -if ($want_checkfiles eq "yes") { - my $status=0; - foreach (@filelist) { - my $name = $_; - $name =~ s/\\/\//g; - next if -r $_ . ".in"; - s/\\/\//g; - next if -r $_ . ".in"; - print "remove '$name' from filelist in win32utils/Configure or add to repository\n"; - $status = 1; - } - foreach (@projectlist) { - my $name = $_; - $name =~ s/\\/\//g; - next if -r $_ . ".in"; - s/\\/\//g; - next if -r $_ . ".in"; - print "remove '$name' from projectlist in win32utils/Configure or add to repository\n"; - $status = 1; - } - exit($status); -} - -# configure the platform - -if (($want_win32 eq "yes") && ($want_x64 eq "yes")) { - die "can't ask for both Win32 and x64 platforms\n"; -} elsif ($want_win32 eq "yes") { - $configvar{"PLATFORM"} = "Win32"; - $configvar{"BUILD_PLATFORM"} = "Win32"; - $configvar{"MACHINE"} = "/machine:X86"; - $configvar{"BUILD_MACHINE"} = "/machine:X86"; -} elsif ($want_x64 eq "yes") { - $configvar{"PLATFORM"} = "x64"; - $configvar{"BUILD_PLATFORM"} = "x64"; - $configvar{"MACHINE"} = "/machine:X64"; - $configvar{"BUILD_MACHINE"} = "/machine:X64"; -} -# Standard configure variable -$configvar{"EXEEXT"} = ".exe"; - -$configtest{"builddir"} = kw("."); -$configtest{"srcdir"} = kw("."); -$configtest{"abs_top_builddir"} = kw($abs_top_builddir); -$configtest{"abs_top_builddir"} =~ s/\\/\//g; -$configtest{"abs_top_srcdir"} = kw($abs_top_srcdir); -$configtest{"abs_top_srcdir"} =~ s/\\/\//g; - -# Mimic AC_INIT() from autoconf by loading values from configure.ac - -sub ac_init { - my $package_name; - my $package_bugreport; - my $package_url; - my $package_version; - my $package_version_major; - my $package_version_minor; - my $package_version_patch; - my $package_version_extra; - my $package_description; - my $package_srcid; - my $mapapi; - - open V, "../configure.ac" || die $!; - while () { - chomp; - if (/^AC_INIT\(\[(.*?)\],\s*bind_PKG_VERSION,\s*\[(.*?)\],\s*\[(.*?)\],\s*\[(.*?)\]\)$/) { - $package_name = $1; - $package_bugreport = $2; - $package_url = $4; - } elsif (/m4_define\(\[bind_VERSION_MAJOR\],\s*(.*?)\)/) { - $package_version_major = $1; - } elsif (/m4_define\(\[bind_VERSION_MINOR\],\s*(.*?)\)/) { - $package_version_minor = $1; - } elsif (/m4_define\(\[bind_VERSION_PATCH\],\s*(.*?)\)/) { - $package_version_patch = $1; - } elsif (/m4_define\(\[bind_VERSION_EXTRA\],\s*(.*?)\)/) { - $package_version_extra = $1; - } elsif (/m4_define\(\[bind_DESCRIPTION\],\s*\[(.*?)\]\)/) { - $package_description = $1; - } elsif (/AC_DEFINE\(\[MAPAPI\],\s*\[(.*?)\],\s*\[.*?\]\)/) { - $mapapi = $1; - } - } - close V; - - $package_version = "${package_version_major}.${package_version_minor}.${package_version_patch}${package_version_extra}"; - - my $srcid_fn = "../srcid"; - - if (-f $srcid_fn) { - open(my $fh, '<', $srcid_fn) or die "cannot open file $srcid_fn"; - { - local $/; - $package_srcid = <$fh>; - } - close($fh); - } elsif (-d "../.git") { - $package_srcid = substr(`git rev-list --max-count=1 HEAD`, 0, 7); - } else { - $package_srcid = ""; - } - chomp($package_srcid); - - if (length($package_srcid) == 0) { - $package_srcid = "unset_id"; - } - if ($verbose) { - print "BIND SRCID: $package_srcid\n"; - } - - # Now define those in config.h - - $configdefh{'PACKAGE_NAME'} = "\"$package_name\""; - $configdefh{'PACKAGE_BUGREPORT'} = "\"$package_bugreport\""; - $configdefh{'PACKAGE_URL'} = "\"$package_url\""; - - $configdefh{'PACKAGE_VERSION_MAJOR'} = "\"$package_version_major\""; - $configdefh{'PACKAGE_VERSION_MINOR'} = "\"$package_version_minor\""; - $configdefh{'PACKAGE_VERSION_PATCH'} = "\"$package_version_patch\""; - $configdefh{'PACKAGE_VERSION_EXTRA'} = "\"$package_version_extra\""; - $configdefh{'PACKAGE_DESCRIPTION'} = "\" $package_description\""; - $configdefh{'PACKAGE_SRCID'} = "\"$package_srcid\""; - - $configdefh{'PACKAGE_VERSION'} = "\"$package_version\""; - $configdefh{'PACKAGE_STRING'} = "\"$package_name $package_version\""; - $configdefh{'MAPAPI'} = $mapapi; -} - -ac_init(); - -# append seen args to CONFIGARGS define - -sub appargs { - my $arg = $_[0]; - # escape backslashes and double quotes - $arg =~ s/([\\"])/\\$1/g; - $arg =~ s/([\s])/\\\\$1/g; - if (defined($configdefh{"PACKAGE_CONFIGARGS"})) { - $configdefh{"PACKAGE_CONFIGARGS"} .= " " . $arg; - } else { - $configdefh{"PACKAGE_CONFIGARGS"} = $arg; - } -} - -if (!$configdefh{"PACKAGE_CONFIGARGS"}) { - # CONFIGARGS default is "default" - $configdefh{"PACKAGE_CONFIGARGS"} = "\"default\""; -} else { - my $val = $configdefh{"PACKAGE_CONFIGARGS"}; - $configdefh{"PACKAGE_CONFIGARGS"} = "\"'$val'\""; -} - -# parse enable/disable - -sub myenable { - my $key = $_[0]; - my $val = $_[1]; - - if ($key =~ /^intrinsics$/i) { - if ($val =~ /^no$/i) { - $enable_intrinsics = "no"; - } - } elsif ($key =~ /^native-pkcs11$/i) { - if ($val =~ /^yes$/i) { - $enable_native_pkcs11 = "yes"; - } - } elsif ($key =~ /^fixed-rrset$/i) { - if ($val =~ /^yes$/i) { - $enable_fixed_rrset = "yes"; - } - } elsif ($key =~ /^developer$/i) { - if ($val =~ /^yes$/i) { - $enable_developer = "yes"; - } - } elsif ($key =~ /^querytrace$/i) { - if ($val =~ /^yes$/i) { - $enable_querytrace = "yes"; - } - } elsif ($key =~ /^auto-validation$/i) { - if ($val =~ /^no$/i) { - $validation_default = "yes"; - } - } else { - $want_unknown = "yes"; - if ($val eq "no") { - $unknown_value = "disable-" . $key; - } else { - $unknown_value = "enable-". $key; - } - } -} - -# enable-developer expansion now - -if ($enable_developer eq "yes") { - $configtest{"DEVELOPER_MODE"} = "yes"; - $configdefh{"ISC_LIST_CHECKINIT"} = 1; - $enable_querytrace = "yes"; - # no atf on WIN32 - $enable_fixed_rrset = "yes"; - # TODO: dlz filesystem - $use_tests = "yes"; - $use_stests = "yes"; -} - -# parse with/without - -sub mywith { - my $key = $_[0]; - my $val = $_[1]; - - if ($key =~ /^tests$/i) { - if ($val =~ /^yes$/i) { - $use_tests = "yes"; - } - } elsif ($key =~ /^extra-tests$/i) { - if ($val =~ /^yes$/i) { - $use_tests = "yes"; - } - } elsif ($key =~ /^system-tests$/i) { - if ($val =~ /^yes$/i) { - $use_tests = "yes"; - $use_stests = "yes"; - } - } elsif ($key =~ /^openssl$/i) { - if ($val =~ /^no$/i) { - die "OpenSSL support is now mandatory\n"; - } elsif ($val !~ /^yes$/i) { - $use_openssl = "yes"; - $openssl_path = $val; - } - } elsif ($key =~ /^libuv$/i) { - if ($val =~ /^no$/i) { - die "libuv is required\n"; - } elsif ($val !~ /^yes$/i) { - $use_libuv = "yes"; - $libuv_path = $val; - } - } elsif ($key =~ /^nghttp2$/i) { - if ($val =~ /^no$/i) { - die "nghttp2 is required\n"; - } elsif ($val !~ /^yes$/i) { - $use_nghttp2 = "yes"; - $nghttp2_path = $val; - } - } elsif ($key =~ /^pkcs11$/i) { - if ($val =~ /^yes$/i) { - $use_pkcs11 = "yes"; - } elsif ($val !~ /^no$/i) { - $use_pkcs11= "yes"; - $pkcs11_path = $val; - $pkcs11_path =~ s/\.dll$//i; - } - } elsif ($key =~ /^aes$/i) { - if ($val =~ /^no$/i) { - $use_aes = "no"; - } elsif ($val =~ /^yes$/i) { - $use_aes = "yes"; - } - } elsif ($key =~ /^gssapi$/i) { - if ($val !~ /^no$/i) { - $use_gssapi = "yes"; - if ($val !~ /^yes$/i) { - $gssapi_path = $val; - } - } - } elsif ($key =~ /^libxml2$/i) { - if ($val =~ /^no$/i) { - $use_libxml2 = "no"; - } elsif ($val !~ /^yes$/i) { - $use_libxml2 = "yes"; - $libxml2_path = $val; - } - } elsif ($key =~ /^geoip2$/i) { - if ($val !~ /^no$/i) { - $use_geoip2 = "yes"; - if ($val !~ /^yes$/i) { - $geoip2_path = $val; - } else { - $geoip2_path = "../../GeoIP2"; - } - } - } elsif ($key =~ /^readline$/i) { - if ($val !~ /^no$/i) { - $use_readline = "yes"; - if ($val !~ /^yes$/i) { - $readline_path = $val; - } - } - } elsif ($key =~ /^idn$/i) { - if ($val !~ /^no$/i) { - $use_idn = "yes"; - if ($val !~ /^yes$/i) { - $idn_path = $val; - } - } - } elsif ($key =~ /^iconv$/i) { - if ($val =~ /^no$/i) { - $want_unknown = "yes"; - $unknown_value = "without-iconv doesn't make sense)"; - } elsif ($val !~ /^yes$/i) { - $iconv_path = $val; - } - } elsif ($key =~ /^zlib$/i) { - if ($val !~ /^no$/i) { - $use_zlib = "yes"; - if ($val !~ /^yes$/i) { - $zlib_path = $val; - } - } - } elsif ($key =~ /^pssuspend$/i) { - if ($val =~ /^no$/i) { - $with_pssuspend = "no"; - } else { - if ($val !~ /^yes$/i) { - $pssuspend_command = $val; - } - } - } elsif ($key =~ /^python$/i) { - if ($val =~ /^no$/i) { - $use_python = "no"; - } else { - $use_python = "yes"; - if ($val !~ /^yes$/i) { - $python_command = $val; - } - } - } elsif ($key =~ /^vcredist$/i) { - if ($val =~ /^no$/i) { - $want_unknown = "yes"; - $unknown_value = "without-vcredist (vcredist is required)"; - } elsif ($val !~ /^yes$/i) { - $vcredist_path = $val; - } - } elsif ($key =~ /^cross-compile$/i) { - if ($val =~ /^yes$/i) { - $cross_compile = "yes"; - } - } elsif ($key =~ /^tuning$/i) { - if ($val =~ /^small$/i) { - $tuning = "small"; - } - } elsif ($key =~ /^tools-version$/i) { - $configvar{"TOOLS_VERSION"} = $val; - } elsif ($key =~ /^platform-version$/i) { - $configvar{"WINDOWS_TARGET_PLATFORM_VERSION"} = "$val"; - } elsif ($key =~ /^platform-toolset$/i) { - $configvar{"PLATFORM_TOOLSET"} = "$val"; - } else { - $want_unknown = "yes"; - if ($val eq "no") { - $unknown_value = "without-" . $key; - } else { - $unknown_value = "with-" . $key; - } - } -} - -if ($want_help ne "no") { - foreach (@help) { - print $_; - } - exit 1; -} - -# clean up and exit if requested -if ($want_clean eq "yes") { - my $file; - - unlink($configfile); - unlink($platformfile); - - foreach $file (@confshlist) { - unlink($file); - } - - foreach $file (@filelist) { - unlink($file); - } - - foreach $file (@projectlist) { - unlink($file); - } - - exit 0; -} - -if ($want_unknown ne "no") { - print STDERR "can't parse $unknown_value\n"; - exit 1; -} - -if ($verbose) { - if ($want_win32 eq "yes") { - print "configure for win32\n"; - } - if ($want_x64 eq "yes") { - print "configure for x64\n"; - } - if ($cross_compile eq "yes") { - print "cross compiling"; - if ($want_x64 eq "yes") { - print ": build on win32 for x64 host\n"; - } elsif ($want_win32 eq "yes") { - print ": build on x64 for win32 host\n"; - } else { - print "\n"; - } - } - if ($enable_intrinsics eq "yes") { - print "intrinsics: enabled\n"; - } else { - print "intrinsics: disabled\n"; - } - if ($enable_native_pkcs11 eq "yes") { - print "native-pkcs11: enabled\n"; - } else { - print "native-pkcs11: disabled\n"; - } - print "openssl-hash: enabled\n"; - if ($enable_fixed_rrset eq "yes") { - print "fixed-rrset: enabled\n"; - } else { - print "fixed-rrset: disabled\n"; - } - if ($enable_developer eq "yes") { - print "developer: enabled\n"; - } else { - print "developer: disabled\n"; - } - if ($enable_querytrace eq "yes") { - print "querytrace: enabled\n"; - } else { - print "querytrace: disabled\n"; - } - print "libuv-path: $libuv_path\n"; - print "nghttp2-path: $nghttp2_path\n"; - print "openssl-path: $openssl_path\n"; - if ($use_tests eq "yes") { - print "tests: enabled\n"; - } - if ($use_stests eq "yes") { - print "system tests: enabled\n"; - } - if ($use_pkcs11 eq "no") { - print "pkcs11: disabled\n"; - } else { - print "pkcs11-provider-path: $pkcs11_path\n"; - } - if ($use_aes eq "no") { - print "aes: disabled\n"; - } else { - print "aes: enabled\n"; - } - if ($use_gssapi eq "no") { - print "gssapi: disabled\n"; - } else { - print "gssapi-path: $gssapi_path\n"; - } - if ($use_libxml2 eq "no") { - print "libxml2: disabled\n"; - } else { - print "libxml2-path: $libxml2_path\n"; - } - if ($use_geoip2 eq "no") { - print "geoip2: disabled\n"; - } else { - print "geoip2-path: $geoip2_path\n"; - } - if ($use_readline eq "no") { - print "readline: disabled\n"; - } else { - print "readline-path: $readline_path\n"; - } - if ($use_idn eq "no") { - print "idn: disabled\n"; - } else { - print "idn-path: $idn_path\n"; - if ($iconv_path ne " --idn-- ") { - print "iconv-path: $iconv_path\n"; - } - } - if ($use_zlib eq "no") { - print "zlib: disabled\n"; - } else { - print "zlib-path: $zlib_path\n"; - } - if ($with_pssuspend eq "no") { - print "pssuspend: disabled\n"; - } else { - print "pssuspend-command: $pssuspend_command\n"; - } - if ($use_python eq "no") { - print "python: disabled\n"; - } else { - print "python-command: $python_command\n"; - } - print "vcredist-path: $vcredist_path\n"; -} - -# Check environment - -# infer vcredist when not given -if ($vcredist_path eq " --infer-- ") { - if ($verbose) { - print "trying to infer vcredist path from build environment\n"; - } - - my @vcpaths = {}; - push(@vcpaths, $ENV{"VCRedistPath"}) if ($ENV{"VCRedistPath"} ne ""); - push(@vcpaths, File::Spec->catdir( File::Spec->curdir(), "..", ".." )); - - if ($ENV{"FrameworkSDKDir"} ne "" && $want_win32 eq "yes") { - push(@vcpaths, File::Spec->catdir($ENV{"FrameworkSDKDir"}, - "BootStrapper", "Packages", - "vcredist_x86")); - } elsif ($ENV{"FrameworkSDKDir"} ne "" && $want_x64 eq "yes") { - push(@vcpaths, File::Spec->catdir($ENV{"FrameworkSDKDir"}, - "BootStrapper", "Packages", - "vcredist_x64")); - } - - if ($ENV{"WindowsSDKDir"} ne "" && $want_win32 eq "yes") { - push(@vcpaths, File::Spec->catdir($ENV{"WindowsSDKDir"}, - "BootStrapper", "Packages", - "vcredist_x86")); - } elsif ($ENV{"WindowsSDKDir"} ne "" && $want_x64 eq "yes") { - push(@vcpaths, File::Spec->catdir($ENV{"WindowsSDKDir"}, - "BootStrapper", "Packages", - "vcredist_x64")); - } - - if ($ENV{"WindowsSDKDir_old"} ne "" && $want_win32 eq "yes") { - push(@vcpaths, File::Spec->catdir($ENV{"WindowsSDKDir_old"}, - "BootStrapper", "Packages", - "vcredist_x86")); - } elsif ($ENV{"WindowsSDKDir_old"} ne "" && $want_x64 eq "yes") { - push(@vcpaths, File::Spec->catdir($ENV{"WindowsSDKDir_old"}, - "BootStrapper", "Packages", - "vcredist_x64")); - } - - if ($ENV{"VCINSTALLDIR"}) { - push(@vcpaths, File::Spec->catdir($ENV{"VCINSTALLDIR"}, - "redist", "1033")); - } - - # 'VCToolsRedistDir' is available since Visual Studio 2017. - if ($ENV{"VCToolsRedistDir"}) { - push(@vcpaths, $ENV{"VCToolsRedistDir"}); - } - - my $rfile; - if ($want_win32 eq "yes") { - $rfile = "vcredist_x86.exe"; - } else { - $rfile = "vcredist_x64.exe"; - } - - foreach (@vcpaths) { - my $vp = File::Spec->catfile($_, $rfile); - if (-f $vp) { - $vcredist_path = $vp; - last; - } - } - - if ($vcredist_path eq " --infer-- ") { - die "with-vcredist is REQUIRED\n"; - } - - if ($verbose) { - print "found vcredist at " . $vcredist_path . "\n"; - } -} - -my $msc_ver = 0; - -open F, ">mscver.c" || die $!; -print F << 'EOF'; -#include -#include - -int -main(void) -{ - printf("%d", _MSC_VER); - return(0); -} -EOF -close F; -my $compret = `cl /nologo /MD mscver.c`; -if (grep { -f and -x } "./mscver.exe") { - $msc_ver = `./mscver.exe`; -} else { - die "can't get _MSC_VER value: $compret\n"; -} -if ($verbose) { - print "_MSC_VER == $msc_ver\n"; -} -if ($msc_ver < 1910) { - print STDERR "too old version of C++ compiler/Visual Studio\n"; - exit 1; -} - -$configdefh{'PACKAGE_BUILDER'} = "\"MSVC $msc_ver\""; - -# gen single threaded for < VS 2005 - -if ($msc_ver < 1400) { - $configvar{"COPTML"} = "/ML"; - $configvar{"COPTMLD"} = "/MLD"; -} - -# /GX deprecated in VS 2005 - -if ($msc_ver < 1400) { - $configvar{"COPTX"} = "/GX"; -} else { - $configvar{"COPTX"} = "/EHsc"; -} - -# /YX for < VS 2005 - -if ($msc_ver < 1400) { - $configvar{"COPTY"} = "/YX"; -} - -# backtrace for >= VS 2012 - -if ($msc_ver >= 1700) { - $configdefh{"USE_BACKTRACE"} = 1; -} - -# warn when cross compiling - -if ($cross_compile eq "yes") { - if ($want_x64 eq "yes") { - $configvar{"BUILD_PLATFORM"} = "Win32"; - $configvar{"BUILD_MACHINE"} = "/machine:X86"; - } - if ($want_win32 eq "yes") { - $configvar{"BUILD_PLATFORM"} = "x64"; - $configvar{"BUILD_MACHINE"} = "/machine:X64"; - } -} elsif ($want_win32 eq "yes") { - open F, ">cross.c" || die $!; - print F << 'EOF'; -#include -#include - -int -main(void) -{ -#ifdef _WIN64 - fprintf(stderr, "compiling for x64 when win32 was asked?!\n"); -#endif - return(0); -} -EOF - close F; - my $compret = `cl /nologo /MD cross.c`; - if (grep { -f and -x } "./cross.exe") { - my $cross = `./cross.exe`; - if ($cross) { - print STDERR $cross; - } - } else { - print STDERR "can't check cross compile: $compret\n"; - } -} else { - open F, ">cross.c" || die $!; - print F << 'EOF'; -#include -#include - -int -main(void) -{ -#ifndef _WIN64 - fprintf(stderr, "compiling in 32 bits when x64 was asked?!\n"); -#endif - return(0); -} -EOF - close F; - my $compret = `cl /nologo /MD cross.c`; - if (grep { -f and -x } "./cross.exe") { - my $cross = `./cross.exe`; - if ($cross) { - print STDERR $cross; - } - } else { - print STDERR "can't check cross compile: $compret\n"; - } -} - -# Process arguments - -# enable-native-pkcs11 -if ($enable_native_pkcs11 eq "yes") { - $cryptolib = "pkcs11"; - if ($use_pkcs11 ne "yes") { - if ($verbose) { - print "native PKCS#11 support: force with-pkcs11\n"; - } - $use_pkcs11 = "yes"; - } - if ($pkcs11_path eq "unknown") { - if ($verbose) { - print "native PKCS#11 support: no PKCS#11 provider defined?\n"; - } - } -} - -# enable-fixed-rrset -if ($enable_fixed_rrset eq "yes") { - $configdefh{"DNS_RDATASET_FIXED"} = 1; -} - -# enable-querytrace -if ($enable_querytrace eq "yes") { - $configdefh{"WANT_QUERYTRACE"} = 1; -} - -# with-tests -if ($use_tests eq "yes") { - $configcond{"TESTS"} = 1; -} - -# with-system-tests -if ($use_stests eq "yes") { - $configcond{"STESTS"} = 1; -} - -# with-libuv -if ($use_libuv eq "auto") { - if ($verbose) { - print "checking for an libuv built directory at sibling root\n"; - } - opendir DIR, $libuv_path || die "No Directory: $!\n"; - my @dirlist = grep (/^libuv-v[0-9]+\.[0-9]+\.[0-9]+(-rc[0-9]+){0,1}$/i, - readdir(DIR)); - closedir(DIR); - - # Make sure we have something - if (scalar(@dirlist) == 0) { - die "can't find an libuv at sibling root\n"; - } - # Now see if we have a directory or just a file. - # Make sure we are case insensitive - my $file; - foreach $file (sort {uc($b) cmp uc($a)} @dirlist) { - if (-f File::Spec->catfile($libuv_path, - $file, - "include", "uv.h")) { - $libuv_path = File::Spec->catdir($libuv_path, $file); - $use_libuv = "yes"; - last; - } - } - - # If we have one use it otherwise report the error - if ($use_libuv eq "auto") { - die "can't find an libuv built directory at sibling root\n"; - } -} -# falls into (so no else) -if ($use_libuv eq "yes") { - $libuv_path = File::Spec->rel2abs($libuv_path); - if ($verbose) { - print "checking for libuv built directory at \"$libuv_path\"\n"; - } - my $libuv_new = 0; - if (!-f File::Spec->catfile($libuv_path, - "include", "uv.h")) { - die "can't find libuv uv.h include\n"; - } - my $libuv_inc = File::Spec->catdir($libuv_path, "include"); - my $libuv_libdir = File::Spec->catdir($libuv_path, "build\\Release"); - my $libuv_lib = File::Spec->catfile($libuv_libdir, "uv.lib"); - my $libuv_dll = File::Spec->catfile($libuv_libdir, "uv.dll"); - if (!-f $libuv_lib) { - die "can't find uv.lib library\n"; - } - if (!-f $libuv_dll) { - die "can't find uv.dll library\n"; - } - $configvar{"LIBUV_PATH"} = "$libuv_path"; - $configinc{"LIBUV_INC"} = "$libuv_inc"; - $configlib{"LIBUV_LIB"} = "$libuv_lib"; - $configdll{"LIBUV_DLL"} = "$libuv_dll"; -} - -# with-nghttp2 -if ($use_nghttp2 eq "auto") { - if ($verbose) { - print "checking for an nghttp2 built directory at sibling root\n"; - } - opendir DIR, $nghttp2_path || die "No Directory: $!\n"; - my @dirlist = grep (/^nghttp2-[0-9]+\.[0-9]+\.[0-9]+$/i, readdir(DIR)); - closedir(DIR); - - # Make sure we have something - if (scalar(@dirlist) == 0) { - die "can't find an nghttp2 at sibling root\n"; - } - # Now see if we have a directory or just a file. - # Make sure we are case insensitive - my $file; - foreach $file (sort {uc($b) cmp uc($a)} @dirlist) { - if (-f File::Spec->catfile($nghttp2_path, - $file, - "include", "nghttp2", "nghttp2.h")) { - $nghttp2_path = File::Spec->catdir($nghttp2_path, $file); - $use_nghttp2 = "yes"; - last; - } - } - - # If we have one use it otherwise report the error - if ($use_nghttp2 eq "auto") { - die "can't find an nghttp2 built directory at sibling root\n"; - } -} - -if ($use_nghttp2 eq "yes") { - $nghttp2_path = File::Spec->rel2abs($nghttp2_path); - if ($verbose) { - print "checking for nghttp2 directory at \"$nghttp2_path\"\n"; - } - if (!-f File::Spec->catfile($nghttp2_path, - "include", "nghttp2", "nghttp2.h")) { - die "can't find nghttp2 nghttp2.h include\n"; - } - my $nghttp2_inc = File::Spec->catdir($nghttp2_path, "include"); - my $nghttp2_bindir = File::Spec->catdir($nghttp2_path, "bin"); - my $nghttp2_libdir = File::Spec->catdir($nghttp2_path, "lib"); - my $nghttp2_dll = File::Spec->catfile($nghttp2_bindir, "nghttp2.dll"); - my $nghttp2_lib = File::Spec->catfile($nghttp2_libdir, "nghttp2.lib"); - if (!-f $nghttp2_lib) { - die "can't find nghttp2.lib library\n"; - } - if (!-f $nghttp2_dll) { - die "can't find nghttp2.dll library\n"; - } - $configinc{"NGHTTP2_INC"} = "$nghttp2_inc"; - $configlib{"NGHTTP2_LIB"} = "$nghttp2_lib"; - $configdll{"NGHTTP2_DLL"} = "$nghttp2_dll"; -} - -# with-openssl -if ($use_openssl eq "auto") { - if ($verbose) { - print "checking for an OpenSSL built directory at sibling root\n"; - } - opendir DIR, $openssl_path || die "No Directory: $!\n"; - my @dirlist = grep (/^openssl-[0-9]+\.[0-9]+\.[0-9]+[a-z]{0,1}$/i, - readdir(DIR)); - closedir(DIR); - - # Make sure we have something - if (scalar(@dirlist) == 0) { - die "can't find an OpenSSL at sibling root\n"; - } - # Now see if we have a directory or just a file. - # Make sure we are case insensitive - my $file; - foreach $file (sort {uc($b) cmp uc($a)} @dirlist) { - if (-f File::Spec->catfile($openssl_path, - $file, - "inc32/openssl/opensslv.h")) { - $openssl_path = File::Spec->catdir($openssl_path, $file); - $use_openssl = "yes"; - last; - } - if (-f File::Spec->catfile($openssl_path, - $file, - "include/openssl/opensslv.h")) { - $openssl_path = File::Spec->catdir($openssl_path, $file); - $use_openssl = "yes"; - last; - } - } - - # If we have one use it otherwise report the error - if ($use_openssl eq "auto") { - die "can't find an OpenSSL built directory at sibling root\n"; - } -} -# falls into (so no else) -if ($use_openssl eq "yes") { - my @dirlist; - $openssl_path = File::Spec->rel2abs($openssl_path); - if ($verbose) { - print "checking for OpenSSL built directory at \"$openssl_path\"\n"; - } - if (!-f File::Spec->catfile($openssl_path, - "include/openssl/opensslv.h")) { - die "can't find OpenSSL 1.1 opensslv.h include\n"; - } - my $openssl_inc = File::Spec->catdir($openssl_path, "include"); - my $openssl_libdir = $openssl_path; - my $openssl_libcrypto = File::Spec->catfile($openssl_path, "libcrypto.lib"); - my $openssl_libssl = File::Spec->catfile($openssl_libdir, "libssl.lib"); - my $openssl_dllcrypto = File::Spec->catfile($openssl_libdir, "libcrypto.dll"); - my $openssl_dllssl = File::Spec->catfile($openssl_libdir, "libssl.dll"); - - if (!-f $openssl_libcrypto) { - die "can't find OpenSSL libcrypto.lib library\n"; - } - opendir DIR, $openssl_path || die "No Directory: $!\n"; - @dirlist = grep (/^libcrypto-[^.]+\.dll$/i, readdir(DIR)); - closedir(DIR); - # We must get one file only - if (scalar(@dirlist) == 0) { - die "can't find OpenSSL libcrypto-*.dll DLL\n"; - } - if (scalar(@dirlist) != 1) { - die "found more than one OpenSSL libcrypto-*.dll DLL candidate\n"; - } - $openssl_dllcrypto = File::Spec->catdir($openssl_path, "$dirlist[0]"); - - if (!-f $openssl_libssl) { - die "can't find OpenSSL libssl.lib library\n"; - } - opendir DIR, $openssl_path || die "No Directory: $!\n"; - @dirlist = grep (/^libssl-[^.]+\.dll$/i, readdir(DIR)); - closedir(DIR); - # We must get one file only - if (scalar(@dirlist) == 0) { - die "can't find OpenSSL libssl-*.dll DLL\n"; - } - if (scalar(@dirlist) != 1) { - die "found more than one OpenSSL libssl-*.dll DLL candidate\n"; - } - $openssl_dllssl = File::Spec->catdir($openssl_path, "$dirlist[0]"); - - $cryptolib = "openssl"; - $configvar{"OPENSSL_PATH"} = "$openssl_path"; - $configinc{"OPENSSL_INC"} = "$openssl_inc"; - $configlib{"OPENSSL_LIBCRYPTO"} = "$openssl_libcrypto"; - $configdll{"OPENSSL_DLLCRYPTO"} = "$openssl_dllcrypto"; - $configlib{"OPENSSL_LIBSSL"} = "$openssl_libssl"; - $configdll{"OPENSSL_DLLSSL"} = "$openssl_dllssl"; -} - -if ($cryptolib eq "openssl") { - $configdefh{"USE_OPENSSL"} = 1; - $configtest{"CRYPTO"} = "OpenSSL"; -} else { - $configdefh{"USE_PKCS11"} = 1; - $configtest{"CRYPTO"} = "pkcs11"; -} - -# check OpenSSL -if ($use_openssl eq "yes") { -#prepare the environment - my $dll = $configdll{"OPENSSL_DLLCRYPTO"}; - my $ret = `copy "$dll" .`; - if ($? != 0) { - die "Can't copy OpenSSL DLL to working directory: $ret\n"; - } - - $dll = $configdll{"OPENSSL_DLLSSL"}; - $ret = `copy "$dll" .`; - if ($? != 0) { - die "Can't copy OpenSSL DLL to working directory: $ret\n"; - } - - my $include = $configinc{"OPENSSL_INC"}; - my $libcrypto = $configlib{"OPENSSL_LIBCRYPTO"}; - my $libssl = $configlib{"OPENSSL_LIBSSL"}; - -# check libcrypto - if ($verbose) { - print "checking whether linking with OpenSSL libcrypto works\n"; - } - - open F, ">testossl.c" || die $!; - print F << 'EOF'; -#include - -int -main(void) -{ - ERR_clear_error(); - return(0); -} -EOF - close F; - - $compret = `cl /nologo /MD /I "$include" testossl.c "$libcrypto"`; - if (grep { -f and -x } "./testossl.exe") { - `./testossl.exe`; - if ($? != 0) { - die "OpenSSL libcrypto test failed\n"; - } - } else { - die "can't compile OpenSSL libcrypto test: $compret\n"; - } - - if ($verbose) { - print "checking whether linking with OpenSSL libssl works\n"; - } - - open F, ">testossl.c" || die $!; - print F << 'EOF'; -#include - -int -main(void) -{ - SSL_CTX *ctx = SSL_CTX_new(SSLv23_method()); - SSL_CTX_free(ctx); - return(0); -} -EOF - close F; - $compret = `cl /nologo /MD /I "$include" testossl.c "$libcrypto" "$libssl"`; - if (grep { -f and -x } "./testossl.exe") { - `./testossl.exe`; - if ($? != 0) { - die "OpenSSL libssl test failed\n"; - } - } else { - die "can't compile OpenSSL libssl test: $compret\n"; - } - -# check OpenSSL version - if ($verbose) { - printf "checking OpenSSL library version\n"; - } - open F, ">testosslv.c" || die $!; - print F << 'EOF'; -#include -#include - -int main() { - if (OPENSSL_VERSION_NUMBER >= 0x10101000L) { - return (0); - } - printf("\n\nFound OPENSSL_VERSION_NUMBER %#010x\n", - OPENSSL_VERSION_NUMBER); - printf("Require OPENSSL_VERSION_NUMBER 0x10101000L or greater (1.1.1)\n\n"); - return (1); -} -EOF - close F; - - $compret = `cl /nologo /MD /I "$include" testosslv.c "$libcrypto"`; - if (grep { -f and -x } "./testosslv.exe") { - `./testosslv.exe`; - if ($? != 0) { - die "OpenSSL version test failed\n"; - } - } else { - die "can't compile OpenSSL version test: $compret\n"; - } - - if ($verbose) { - print "checking for OpenSSL Ed25519 support\n"; - } - open F, ">tested25519.c" || die $!; - print F << 'EOF'; -#include -#include - -int -main(void) -{ - EVP_PKEY_CTX *ctx; - - ctx = EVP_PKEY_CTX_new_id(NID_ED25519, NULL); - if (ctx == NULL) - return (2); - return (0); -} -EOF - close F; - - $compret = `cl /nologo /MD /I "$include" tested25519.c "$libcrypto"`; - if (grep { -f and -x } "./tested25519.exe") { - `./tested25519.exe`; - if ($? == 0) { - $configdefh{"HAVE_OPENSSL_ED25519"} = 1; - } else { - if ($verbose) { - print "Ed25519 test failed: disabling Ed25519\n"; - } - } - } else { - if ($verbose) { - print "can't compile Ed25519 test: $compret\n"; - print "disabling Ed25519\n"; - } - } - - if ($verbose) { - print "checking for OpenSSL Ed448 support\n"; - } - open F, ">tested448.c" || die $!; - print F << 'EOF'; -#include -#include - -int -main(void) -{ - EVP_PKEY_CTX *ctx; - - ctx = EVP_PKEY_CTX_new_id(NID_ED448, NULL); - if (ctx == NULL) - return (2); - return (0); -} -EOF - close F; - - $compret = `cl /nologo /MD /I "$include" tested448.c "$libcrypto"`; - if (grep { -f and -x } "./tested448.exe") { - `./tested448.exe`; - if ($? == 0) { - $configdefh{"HAVE_OPENSSL_ED448"} = 1; - } else { - if ($verbose) { - print "Ed448 test failed: disabling Ed448\n"; - } - } - } else { - if ($verbose) { - print "can't compile Ed448 test: $compret\n"; - print "disabling Ed448\n"; - } - } -} - -# with-aes -if ($use_openssl eq "no") { - if ($use_aes ne "pkcs11") { - $use_aes = "no"; - } -} - -if ($cryptolib ne "") { - print "Cryptographic library for DNSSEC: $cryptolib\n"; -} else { - die "No cryptography library has been found or provided." -} - -# with-pkcs11 -if ($use_pkcs11 ne "no") { - $configcond{"PKCS11"} = 1; - $configdefd{"PK11_LIB_LOCATION"} = "PK11_LIB_LOCATION=\"$pkcs11_path\""; -} - -# with-gssapi -if ($use_gssapi eq "no") { - if ($verbose) { - print "gssapi library is disabled\n"; - } -} else { - $gssapi_path = File::Spec->rel2abs($gssapi_path); - if ($verbose) { - print "checking for gssapi directory at \"$gssapi_path\"\n"; - } - $configcond{"GSSAPI"} = 1; - $configdefh{"HAVE_GSSAPI"} = 1; - if (-f File::Spec->catfile($gssapi_path, "include", - "gssapi", "gssapi.h")) { - $configdefh{"HAVE_GSSAPI_GSSAPI_H"} = 1; - } elsif (-f File::Spec->catfile($gssapi_path, "include", - "gssapi", "gssapi.h")) { - $configdefh{"HAVE_GSSAPI_H"} = 1; - } else { - die "can't find gssapi.h include\n"; - } - if (-f File::Spec->catfile($gssapi_path, "include", - "gssapi", "gssapi_krb5.h")) { - $configdefh{"HAVE_GSSAPI_GSSAPI_KRB5_H"} = 1; - } elsif (-f File::Spec->catfile($gssapi_path, "include", - "gssapi_krb5.h")) { - $configdefh{"HAVE_GSSAPI_KRB5_H"} = 1; - } else { - die "can't find gssapi_krb5.h include\n"; - } - if (-f File::Spec->catfile($gssapi_path, "include", - "krb5", "krb5.h")) { - $configdefh{"HAVE_KRB5_KRB5_H"} = 1; - } elsif (-f File::Spec->catfile($gssapi_path, "include", - "krb5", "krb5.h")) { - $configdefh{"HAVE_KRB5_H"} = 1; - } else { - die "can't find krb5.h include\n"; - } - $configinc{"GSSAPI_INC"} = File::Spec->catdir($gssapi_path, "include"); - my $bits = "32"; - my $gssapi_lib; - my $krb5_lib; - if ($want_win32 eq "yes") { - $bits = "32"; - if (!-f File::Spec->catfile($gssapi_path, "lib", "i386", - "gssapi${bits}.lib")) { - die "can't find gssapi${bits}.lib library\n"; - } - $gssapi_lib = File::Spec->catfile($gssapi_path, "lib", "i386", - "gssapi${bits}.lib"); - if (!-f File::Spec->catfile($gssapi_path, "lib", "i386", - "krb5_${bits}.lib")) { - die "can't find krb5_${bits}.lib library\n"; - } - $krb5_lib = File::Spec->catfile($gssapi_path, "lib", "i386", - "krb5_${bits}.lib"); - } elsif ($want_x64 eq "yes") { - $bits = "64"; - if (!-f File::Spec->catfile($gssapi_path, "lib", "amd64", - "gssapi${bits}.lib")) { - die "can't find gssapi${bits}.lib library\n"; - } - $gssapi_lib = File::Spec->catfile($gssapi_path, "lib", "amd64", - "gssapi${bits}.lib"); - if (!-f File::Spec->catfile($gssapi_path, "lib", "amd64", - "krb5_${bits}.lib")) { - die "can't find krb5_${bits}.lib library\n"; - } - $krb5_lib = File::Spec->catfile($gssapi_path, "lib", "amd64", - "krb5_${bits}.lib"); - } else { - die "can't happen: no choice between Win32 and x64\n"; - } - if (!-f File::Spec->catfile($gssapi_path, "bin", "gssapi${bits}.dll")) { - die "can't find gssapi${bits}.dll DLL\n"; - } - if (!-f File::Spec->catfile($gssapi_path, "bin", "krb5_${bits}.dll")) { - die "can't find krb5_${bits}.dll DLL\n"; - } - if (!-f File::Spec->catfile($gssapi_path, "bin", "comerr${bits}.dll")) { - die "can't find comerr${bits}.dll DLL\n"; - } - if (!-f File::Spec->catfile($gssapi_path, "bin", "k5sprt${bits}.dll")) { - die "can't find k5sprt${bits}.dll DLL\n"; - } - if (!-f File::Spec->catfile($gssapi_path, "bin", "wshelp${bits}.dll")) { - die "can't find wshelp${bits}.dll DLL\n"; - } - $configlib{"GSSAPI_LIB"} = "$gssapi_lib"; - $configlib{"KRB5_LIB"} = "$krb5_lib"; - my $gssapi_dll = File::Spec->catfile($gssapi_path, "bin", - "gssapi${bits}.dll"); - $configdll{"GSSAPI_DLL"} = "$gssapi_dll"; - my $krb5_dll = File::Spec->catfile($gssapi_path, "bin", - "krb5_${bits}.dll"); - $configdll{"KRB5_DLL"} = "$krb5_dll"; - my $comerr_dll = File::Spec->catfile($gssapi_path, "bin", - "comerr${bits}.dll"); - $configdll{"COMERR_DLL"} = "$comerr_dll"; - my $k5sprt_dll = File::Spec->catfile($gssapi_path, "bin", - "k5sprt${bits}.dll"); - $configdll{"K5SPRT_DLL"} = "$k5sprt_dll"; - my $wshelp_dll = File::Spec->catfile($gssapi_path, "bin", - "wshelp${bits}.dll"); - $configdll{"WSHELP_DLL"} = "$wshelp_dll"; -} - -# disable-auto-validation -$configdefh{"VALIDATION_DEFAULT"} = "\"$validation_default\""; - -# with-geoip2 -if ($use_geoip2 eq "no") { - if ($verbose) { - print "geoip2 library is disabled\n"; - } -} else { - $configcond{"GEOIP"} = 1; - $geoip2_path = File::Spec->rel2abs($geoip2_path); - if ($verbose) { - print "checking for geoip2 directory at \"$geoip2_path\"\n"; - } - if (!-f File::Spec->catfile($geoip2_path, "maxminddb.h")) { - die "can't find maxminddb.h include\n"; - } - if (!-f File::Spec->catfile($geoip2_path, "maxminddb_config.h")) { - die "can't find maxminddb_config.h include\n"; - } - if (!-f File::Spec->catfile($geoip2_path, "libmaxminddb.lib")) { - die "can't find libmaxminddb.lib library\n"; - } - $configinc{"GEOIP_INC"} = "$geoip2_path"; - my $geoip2_lib = File::Spec->catfile($geoip2_path, "libmaxminddb.lib"); - $configlib{"GEOIP_LIB"} = "$geoip2_lib"; - my $geoip_inc = qq(/I "$geoip2_path"); - my $geoip2_libs = qq("$geoip2_lib" Ws2_32.Lib); - - if ($verbose) { - print "checking for GeoIP2 support\n"; - } - open F, ">testgeoip2.c" || die $!; - print F << 'EOF'; -#include -int main(void) { - return MMDB_lib_version() != 0; -} -EOF - close F; - $compret = `cl /nologo $geoip_inc /MD testgeoip2.c $geoip2_libs`; - if (grep { -f and -x } "./testgeoip2.exe") { - `./testgeoip2.exe`; - if ($? == 0) { - die "GeoIP2 test failed\n"; - } - } else { - die "can't compile GeoIP2 test: $compret\n"; - } - $configdefh{"HAVE_GEOIP2"} = 1; -} - -# with-readline -if ($use_readline eq "no") { - if ($verbose) { - print "readline library is disabled\n"; - } -} else { - $readline_path = File::Spec->rel2abs($readline_path); - if ($verbose) { - print "checking for readline directory at \"$readline_path\"\n"; - } - if (!-f File::Spec->catfile($readline_path, "readline", "readline.h")) { - die "can't find readline.h include\n"; - } - if (!-f File::Spec->catfile($readline_path, "readline", "readline.lib")) { - die "can't find readline.lib library\n"; - } - $configdefh{"HAVE_READLINE"} = 1; - $configinc{"READLINE_INC"} = "$readline_path"; - my $readline_lib = File::Spec->catfile($readline_path, - "readline", "readline.lib"); - $configlib{"READLINE_LIB"} = "$readline_lib"; - if (-f File::Spec->catfile($readline_path, "readline", "readlineD.lib")) { - my $readline_libd = File::Spec->catfile($readline_path, - "readline", "readlineD.lib"); - $configlib{"READLINE_LIBD"} = "$readline_libd"; - } else { - $configlib{"READLINE_LIBD"} = "$readline_lib"; - } -} - -# with-idn (including with-iconv) -if ($use_idn eq "no") { - if ($verbose) { - print "IDN kit is disabled\n"; - } -} else { - $idn_path = File::Spec->rel2abs($idn_path); - if ($verbose) { - print "checking for IDN kit directory at \"$idn_path\"\n"; - } - if (!-f File::Spec->catfile($idn_path, "idn", "api.h")) { - die "can't find idn/api.h include\n"; - } - if (!-f File::Spec->catfile($idn_path, "idn", "idnkit.lib")) { - die "can't find idnkit.lib library\n"; - } - if (!-f File::Spec->catfile($idn_path, "idn", "idnkit.dll")) { - die "can't find idnkit.dll DLL\n"; - } - $configcond{"IDNKIT"} = 1; - $configdefh{"WITH_IDN"} = 1; - $configinc{"IDN_INC"} = "$idn_path"; - my $idn_lib = File::Spec->catfile($idn_path, "idn", "idnkit.lib"); - $configlib{"IDN_LIB"} = "$idn_lib"; - my $idn_dll = File::Spec->catfile($idn_path, "idn", "idnkit.dll"); - $configdll{"IDN_DLL"} = "$idn_dll"; - if ($iconv_path eq " --idn-- ") { - my $iconv_dll = File::Spec->catfile($idn_path, "idn", "iconv.dll"); - $configdll{"ICONV_DLL"} = "$iconv_dll"; - } else { - my $iconv_dll = File::Spec->catfile($iconv_path, "iconv.dll"); - $configdll{"ICONV_DLL"} = "$iconv_dll"; - } -} - -# with-libxml2 -if ($use_libxml2 eq "no") { - if ($verbose) { - print "libxml2 library is disabled\n"; - } -} elsif ($use_libxml2 eq "auto") { - if ($verbose) { - print "checking for a libxml2 built directory at sibling root\n"; - } - opendir DIR, $libxml2_path || die "No Directory: $!\n"; - my @dirlist = grep (/^libxml2-[0-9]+\.[0-9]+\.[0-9]+[a-z]*/i, - readdir(DIR)); - closedir(DIR); - - # Make sure we have something - if (scalar(@dirlist) == 0) { - die "can't find a libxml2 at sibling root\n"; - } - # Now see if we have a directory or just a file. - # Make sure we are case insensitive - my $file; - foreach $file (sort {uc($b) cmp uc($a)} @dirlist) { - if (-f File::Spec->catfile($libxml2_path, - $file, - "include", "libxml", - "xmlversion.h")) { - $libxml2_path = File::Spec->catdir($libxml2_path, $file); - $use_libxml2 = "yes"; - last; - } - } - - # If we have one use it otherwise report the error - if ($use_libxml2 eq "auto") { - die "can't find a libxml2 built directory at sibling root\n"; - } -} -# falls into (so no else) -if ($use_libxml2 eq "yes") { - $libxml2_path = File::Spec->rel2abs($libxml2_path); - if ($verbose) { - print "checking for libxml2 built directory at \"$libxml2_path\"\n"; - } - if (!-f File::Spec->catfile($libxml2_path, - "include" , "libxml", - "xmlversion.h")) { - die "can't find libxml2 xmlversion.h include\n"; - } - if (!-f File::Spec->catfile($libxml2_path, - "win32" , "bin.msvc", - "libxml2.lib")) { - die "can't find Libxml2 libxml2.lib library\n"; - } - if (!-f File::Spec->catfile($libxml2_path, - "win32", "bin.msvc", - "libxml2.dll")) { - die "can't find Libxml2 DLL\n"; - } - $configcond{"LIBXML2"} = 1; - $configdefh{"HAVE_LIBXML2"} = 1; - $configtest{"XMLSTATS"} = 1; - my $libxml2_inc = File::Spec->catdir($libxml2_path, "include"); - $configinc{"LIBXML2_INC"} = "$libxml2_inc"; - my $libxml2_libdir = File::Spec->catdir($libxml2_path, "win32", "bin.msvc"); - my $libxml2_lib = File::Spec->catfile($libxml2_libdir, "libxml2.lib"); - $configlib{"LIBXML2_LIB"} = "$libxml2_lib"; - my $libxml2_dll = File::Spec->catfile($libxml2_libdir, "libxml2.dll"); - $configdll{"LIBXML2_DLL"} = "$libxml2_dll"; -} - -# with-zlib -if ($use_zlib eq "no") { - if ($verbose) { - print "zlib library is disabled\n"; - } -} else { - $configcond{"ZLIB"} = 1; - $configtest{"ZLIB"} = 1; - $zlib_path = File::Spec->rel2abs($zlib_path); - if ($verbose) { - print "checking for zlib directory at \"$zlib_path\"\n"; - } - if (!-f File::Spec->catfile($zlib_path, "zlib.h")) { - die "can't find zlib.h include\n"; - } - if (!-f File::Spec->catfile($zlib_path, "zdll.lib")) { - die "can't find zdll.lib library\n"; - } - if (!-f File::Spec->catfile($zlib_path, "zlib1.dll")) { - die "can't find zlib1.dll DLL\n"; - } - $configdefh{"HAVE_ZLIB"} = 1; - $configinc{"ZLIB_INC"} = "$zlib_path"; - my $zlib_lib = File::Spec->catfile($zlib_path, "zdll.lib"); - $configlib{"ZLIB_LIB"} = "$zlib_lib"; - my $zlib_dll = File::Spec->catfile($zlib_path, "zlib1.dll"); - $configdll{"ZLIB_DLL"} = "$zlib_dll"; -} - -if ($with_pssuspend ne "no") { - $configvar{"PSSUSPEND"} = "$pssuspend_command"; -} - -# with-python -if ($use_python eq "no") { - if ($verbose) { - print "python is disabled\n"; - } -} elsif ($use_python eq "auto") { - if ($verbose) { - print "checking for python in path\n"; - } - my $pythonret = `python.exe -c "quit()" 2>&1`; - if ($? != 0) { - print STDERR "can't launch the python interpreter: $pythonret\n"; - $use_python = "no"; - } -} -if ($use_python ne "no") { - if ($use_python ne "auto") { - if ($verbose) { - print "checking for $python_command\n"; - } - my $pythonret = `"$python_command" -c "quit()" 2>&1`; - if ($? != 0) { - die "can't launch $python_command: $pythonret\n"; - } - } - if ($python_command !~ /\.exe$/i) { - $python_command = $python_command . ".exe"; - } - if ($use_python ne "no") { - $configcond{"PYTHON"} = 1; - $configdefd{"USE_PYTHON"} = "USE_PYTHON"; - $configvar{"PYTHON"} = "$python_command"; - # Doesn't matter - $configvar{"prefix"} = "__prefix__"; - } -} - -# with-vcredist -$vcredist_path = File::Spec->rel2abs($vcredist_path); -if (!grep { -f and -x } $vcredist_path) { - die "$vcredist_path is not correct\n"; -} else { - $configvar{"VCREDIST_PATH"} = "$vcredist_path"; -} - -# tuning -if ($tuning ne "small") { - $configdefh{"TUNE_LARGE"} = 1; -} - -# escape spaces - -sub kw { - if ($_[0] =~ / /) { - return "\"$_[0]\""; - } else { - return "$_[0]"; - } -} - -# setup config.h with %configdefh - -sub setupconfigh { - my $line; - my @Lines; - - open F, $configfile . ".win32" || die $!; - @Lines = ; - close F; - - foreach $line (@Lines) { - chomp $line; - if ($line =~ /^@([^@]+)\@$/) { - if (defined($configdefh{$1})) { - $line = "#define $1 $configdefh{$1}"; - } else { - $line = "/* #undef $1 */"; - } - } - } - - open F, ">" . $configfile || die $!; - if ($verbose) { - print "Setting up $configfile\n"; - } - foreach $line (@Lines) { - print F $line . "\n"; - } - close F; -} - -# setup platform.h with %configdefp - -sub setupplatformh { - my $line; - my @Lines; - - open F, $platformfile . ".in" || die $!; - @Lines = ; - close F; - - foreach $line (@Lines) { - chomp $line; - if ($line =~ /^@([^@]+)\@$/) { - if (defined($configdefp{$1})) { - $line = "#define $1 $configdefp{$1}"; - } else { - $line = "/* #undef $1 */"; - } - } - } - - open F, ">" . $platformfile || die $!; - if ($verbose) { - print "Setting up $platformfile\n"; - } - foreach $line (@Lines) { - print F $line . "\n"; - } - close F; -} - -# setup conf.sh with %configtest and %configvar - -sub setupconfsh { - my $line; - my @lines; - my $val; - my $confshvolume; - my $confshdirectory; - my $confshbasefile; - - foreach my $confshfile (@confshlist) { - my $confshfilein; - if (-f $confshfile . ".win32") { - $confshfilein = $confshfile . ".win32"; - } else { - $confshfilein = $confshfile . ".in"; - } - open(my $fin, "<" . $confshfilein) || die $!; - - ($confshvolume, $confshdirectory, $confshbasefile) = File::Spec->splitpath($confshfile); - - @lines = <$fin>; - close($fin); - - foreach $line (@lines) { - chomp $line; - while ($line =~ /@([^@]+)\@/) { - if ($1 ~~ @substtest) { - if (defined($configtest{$1})) { - $val = kw($configtest{$1}); - } elsif ($1 eq "abs_builddir") { - $val = kw(File::Spec->rel2abs($confshdirectory, File::Spec->curdir())); - $val =~ s/\\/\//g; - } elsif ($1 eq "abs_srcdir") { - $val = kw(File::Spec->rel2abs($confshdirectory, File::Spec->curdir())); - $val =~ s/\\/\//g; - } elsif ($1 eq "top_builddir") { - $val = kw(File::Spec->abs2rel($top_builddir, $confshdirectory)); - $val =~ s/\\/\//g; - } elsif ($1 eq "top_srcdir") { - $val = kw(File::Spec->abs2rel($top_srcdir, $confshdirectory)); - $val =~ s/\\/\//g; - } else { - $val = ""; - } - } elsif ($1 ~~ @substvar) { - if (defined($configvar{$1})) { - $val = kw($configvar{$1}); - } else { - $val = ""; - } - } else { - die "unknown control $& in $confshfilein\n"; - } - $line = "$`$val$'"; - } - } - - open(my $fout, ">" . $confshfile) || die $!; - if ($verbose) { - print "Setting up $confshfile\n"; - } - binmode($fout); - foreach $line (@lines) { - print $fout $line . "\n"; - } - close($fout); - } -} - -# setup a file with %configcond stack and %config{var,defd,inc,lib,dll,test} - -sub setupfile { - my $line; - my @Linesin; - my @Linesout; - my $filename = $_[0]; - my $cond; - my @conds; - my $pass = 1; - my @passes; - my $val; - - open F, $filename . ".in" || die $!; - @Linesin = ; - close F; - - foreach $line (@Linesin) { - chomp $line; - if ($line =~ /^\@IF (.*)$/) { - if (defined($cond)) { - unshift(@conds, $cond); - unshift(@passes, $pass); - } - if ($1 ~~ @allcond) { - $cond = $1; - if (defined($configcond{$cond})) { - # do nothing - } else { - $pass = 0; - } - } else { - die "unknown condition \@IF $1 in $filename\n"; - } - next; - } elsif ($line =~ /^\@ELSE (.*)$/) { - if ($cond ne $1) { - die "\@ELSE $1 mismatch in $filename\n"; - } - if (defined($configcond{$cond})) { - $pass = 0; - } else { - if (scalar(@conds) > 0) { - $pass = $passes[0]; - } else { - $pass = 1; - } - } - next; - } elsif ($line =~ /^\@END (.*)$/) { - if ($cond ne $1) { - die "\@END $1 mismatch in $filename\n"; - } - $cond = shift(@conds); - if (scalar(@passes) > 0) { - $pass = shift(@passes); - } else { - $pass = 1; - } - next; - } - if ($pass == 0) { - next; - } - while ($line =~ /@([^@ ]*)@/) { - if ($1 ~~ @substvar) { - if (defined($configvar{$1})) { - $val = kw($configvar{$1}); - $line = "$`$val$'"; - } else { - $line = "$`$'"; - } - } elsif ($1 ~~ @substdefd) { - if (defined($configdefd{$1})) { - my $def = $configdefd{$1}; - my $pre = "$`"; - my $post = "$'"; - $def =~ s/([\\ "])/\\$1/g; - $line = qq($pre/D "$def"$post); - } else { - $line = "$`$'"; - } - } elsif ($1 ~~ @substinc) { - if (defined($configinc{$1})) { - $line = qq($`/I "$configinc{$1}"$'); - } else { - $line = "$`$'"; - } - } elsif ($1 ~~ @substlib) { - if (defined($configlib{$1})) { - $val = kw($configlib{$1}); - $line = "$`$val$'"; - } else { - $line = "$`$'"; - } - } elsif ($1 ~~ @substdll) { - if (defined($configdll{$1})) { - $val = kw($configdll{$1}); - $line = "$`$val$'"; - } else { - $line = "$`$'"; - } - } else { - die "unknown control $& in $filename\n"; - } - } - push @Linesout, $line; - } - - open F, ">" . $filename || die $!; - if ($verbose) { - print "Setting up $filename\n"; - } - binmode(F); - foreach $line (@Linesout) { - print F $line . "\n"; - } - close F; -} - -# setup a project with %configcond stack and %config{var,defd,inc,lib,dll} - -sub setupproject { - my $line; - my @Linesin; - my @Linesout; - my $projectname = $_[0]; - my $cond; - my @conds; - my $pass = 1; - my @passes; - my $val; - - open F, $projectname . ".in" || die $!; - @Linesin = ; - close F; - - foreach $line (@Linesin) { - chomp $line; - if ($line =~ /^\@IF (.*)$/) { - if (defined($cond)) { - unshift(@conds, $cond); - unshift(@passes, $pass); - } - if ($1 ~~ @allcond) { - $cond = $1; - if (defined($configcond{$cond})) { - # do nothing - } else { - $pass = 0; - } - } else { - die "unknown condition \@IF $1 in $projectname\n"; - } - next; - } elsif ($line =~ /^\@ELSE (.*)$/) { - if ($cond ne $1) { - die "\@ELSE $1 mismatch in $projectname\n"; - } - if (defined($configcond{$cond})) { - $pass = 0; - } else { - if (scalar(@conds) > 0) { - $pass = $passes[0]; - } else { - $pass = 1; - } - } - next; - } elsif ($line =~ /^\@END (.*)$/) { - if ($cond ne $1) { - die "\@END $1 mismatch in $projectname\n"; - } - $cond = shift(@conds); - if (scalar(@passes) > 0) { - $pass = shift(@passes); - } else { - $pass = 1; - } - next; - } - if ($pass == 0) { - next; - } - while ($line =~ /@([^@ ]*)@/) { - if ($1 ~~ @substvar) { - if (defined($configvar{$1})) { - $val = kw($configvar{$1}); - $line = "$`$val$'"; - } else { - $line = "$`$'"; - } - } elsif ($1 ~~ @substdefd) { - if (defined($configdefd{$1})) { - $val = kw($configdefd{$1}); - $line = "$`$val;$'"; - } else { - $line = "$`$'"; - } - } elsif ($1 ~~ @substinc) { - if (defined($configinc{$1})) { - $val = kw($configinc{$1}); - $line = "$`$val;$'"; - } else { - $line = "$`$'"; - } - } elsif ($1 ~~ @substlib) { - if (defined($configlib{$1})) { - $val = kw($configlib{$1}); - $line = "$`$val;$'"; - } else { - $line = "$`$'"; - } - } elsif ($1 ~~ @substdll) { - if (defined($configdll{$1})) { - $val = kw($configdll{$1}); - $line = "$`$val$'"; - } else { - $line = "$`$'"; - } - } else { - die "unknown control $& in $projectname\n"; - } - } - push @Linesout, $line; - } - - open F, ">" . $projectname || die $!; - if ($verbose) { - print "Setting up $projectname\n"; - } - foreach $line (@Linesout) { - print F $line . "\n"; - } - close F; -} - -# Make bind.keys.h -# Keep this in sync with util/bindkeys.pl - -sub makebindkeysh { - my $bindkeysh = `perl.exe ../util/bindkeys.pl ../bind.keys`; - die "Failed to generate bind.keys.h!\n" unless (length($bindkeysh)); - - open(my $fout, ">" . "../bind.keys.h") || die $!; - print $fout $bindkeysh; - close($fout); -} - -# Build install files - -sub makeinstallfile { - open FOUT, ">InstallFlags" || die "cannot open InstallFlags: $!\n"; - print FOUT "# Flags for BINDInstall\n"; - if ($msc_ver >= 1400) { - print FOUT "runvcredist\n"; - } - if ($want_x64 eq "yes") { - print FOUT "forwin64\n"; - } - close FOUT; - - open LOUT, ">InstallFiles" || die "cannot open InstallFiles: $!\n"; - print LOUT "# File list for BINDInstall\n"; - if ($msc_ver < 1400) { - if ($msc_ver >= 1310) { - print LOUT "mfc71.dll-WCTT\n"; - print LOUT "msvcr71.dll-WCTT\n"; - } elsif (($msc_ver > 1200) && ($msc_ver < 1310)) { - print LOUT "mfc70.dll-WCTT\n"; - print LOUT "msvcr70.dll-WCTT\n"; - } - } - print LOUT "bindevt.dll-BNFT\n"; - print LOUT "libbind9.dll-BCFT\n"; - print LOUT "libisc.dll-BCFT\n"; - print LOUT "libisccfg.dll-BCFT\n"; - print LOUT "libisccc.dll-BCFT\n"; - print LOUT "libdns.dll-BCFT\n"; - print LOUT "libirs.dll-BCFT\n"; - print LOUT "libns.dll-BCFT\n"; - print LOUT "nghttp2.dll-BCFT\n"; - print LOUT "uv.dll-BCFT\n"; - if ($use_openssl eq "yes") { - my $v; - my $d; - my $name; - ($v, $d, $name) =File::Spec->splitpath($configdll{"OPENSSL_DLLCRYPTO"}); - print LOUT "${name}-BCFT\n"; - ($v, $d, $name) =File::Spec->splitpath($configdll{"OPENSSL_DLLSSL"}); - print LOUT "${name}-BCFT\n"; - } - if ($use_libxml2 eq "yes") { - print LOUT "libxml2.dll-BCFT\n"; - } - if ($use_gssapi eq "yes") { - if ($want_x64 eq "yes") { - print LOUT "gssapi64.dll-BCFT\n"; - print LOUT "krb5_64.dll-BCFT\n"; - } else { - print LOUT "gssapi32.dll-BCFT\n"; - print LOUT "krb5_32.dll-BCFT\n"; - } - } - if ($use_idn eq "yes") { - print LOUT "idnkit.dll-BCFT\n"; - print LOUT "iconv.dll-BCFT\n"; - } - print LOUT "named.exe-BCFF\n"; - print LOUT "nsupdate.exe-BNFT\n"; - print LOUT "BINDInstall.exe-BNFT\n"; - print LOUT "InstallFlags-BNFT\n"; - print LOUT "InstallFiles-BNFT\n"; - print LOUT "rndc.exe-BNFF\n"; - print LOUT "dig.exe-BNFT\n"; - print LOUT "host.exe-BNFT\n"; - print LOUT "mdig.exe-BNFT\n"; - print LOUT "nslookup.exe-BNFT\n"; - print LOUT "delv.exe-BNFT\n"; - print LOUT "arpaname.exe-BNFT\n"; - print LOUT "nsec3hash.exe-BNFF\n"; - print LOUT "rndc-confgen.exe-BNFF\n"; - print LOUT "ddns-confgen.exe-BNFF\n"; - print LOUT "tsig-keygen.exe-BNFF\n"; - print LOUT "dnssec-keygen.exe-BNFF\n"; - print LOUT "dnssec-signzone.exe-BNFF\n"; - print LOUT "dnssec-dsfromkey.exe-BNFF\n"; - print LOUT "dnssec-importkey.exe-BNFF\n"; - print LOUT "dnssec-keyfromlabel.exe-BNFF\n"; - print LOUT "dnssec-revoke.exe-BNFF\n"; - print LOUT "dnssec-settime.exe-BNFF\n"; - print LOUT "dnssec-verify.exe-BNFF\n"; - print LOUT "named-checkconf.exe-BNFF\n"; - print LOUT "named-checkzone.exe-BNFF\n"; - print LOUT "named-compilezone.exe-BNFF\n"; - print LOUT "named-journalprint.exe-BNFF\n"; - print LOUT "named-rrchecker.exe-BNFF\n"; - if ($use_pkcs11 eq "yes") { - print LOUT "pkcs11-destroy.exe-BNFF\n"; - print LOUT "pkcs11-keygen.exe-BNFF\n"; - print LOUT "pkcs11-list.exe-BNFF\n"; - print LOUT "pkcs11-tokens.exe-BNFF\n"; - } - print LOUT "readme1st.txt-BTFT\n"; - close LOUT; -} - -# Adjust system tests - -# dnstap not supported -#$configtest{"DNSTAP"} = "dnstap"; -#$configtest{"FSTRM_CAPTURE"} = "fstrm_capture"; - -# no json-c library for WIN32 -#$configtest{"JSONSTATS"} = 1; - -# lmdb not supported -#$configtest{"NZD_TOOLS"} = "nzd"; - -# TODO check for pkcs11ssl and set PKCS11_TEST - -# Status - -if ($verbose) { - my $name; - - print "Configuration Status\n"; - - print "\tconfig.h:\n"; - foreach $name (@substdefh) { - if (defined($configdefh{$name})) { - print qq(\t\t$name defined to "$configdefh{$name}"\n); - } else { - printf qq(\t\t$name undefined\n); - } - } - - print "\tplatform.h:\n"; - foreach $name (@substdefp) { - if (defined($configdefp{$name})) { - print qq(\t\t$name defined to "$configdefp{$name}"\n); - } else { - printf qq(\t\t$name undefined\n); - } - } - - print "\tconf.sh:\n"; - foreach $name (@substtest) { - if (defined($configtest{$name})) { - print qq(\t\t$name defined to "$configtest{$name}"\n); - } else { - printf qq(\t\t$name undefined\n); - } - } - - print "\tconditions:\n"; - foreach $name (@substcond) { - if (defined($configcond{$name})) { - print "\t\t$name is true\n"; - } else { - print "\t\t$name is false\n"; - } - } - - print "\tsubstitutions:\n"; - foreach $name (@substvar) { - if (defined($configvar{$name})) { - print qq(\t\t$name -> "$configvar{$name}"\n); - } - } - - print "\tdefines:\n"; - foreach $name (@substdefd) { - if (defined($configdefd{$name})) { - print qq(\t\t/D "$configdefd{$name}"\n); - } - } - - print "\tincludes:\n"; - foreach $name (@substinc) { - if (defined($configinc{$name})) { - print qq(\t\t/I "$configinc{$name}"\n); - } - } - - print "\tlibraries:\n"; - foreach $name (@substlib) { - if (defined($configlib{$name})) { - print "\t\t$configlib{$name}\n"; - } - } - - print "\tDLLs:\n"; - foreach $name (@substdll) { - if (defined($configdll{$name})) { - print "\t\t$configdll{$name}\n"; - } - } - - print "\n"; -} - -# Setup -if (($want_win32 eq "yes") || ($want_x64 eq "yes")) { - setupconfigh(); - - setupplatformh(); - - setupconfsh(); - - my $file; - foreach $file (@filelist) { - setupfile($file); - } - - foreach $file (@projectlist) { - setupproject($file); - } - - makeinstallfile(); - - makebindkeysh(); - - print "Configured.\n"; -} else { - print "add win32 or x64 to commit configuration to build files\n"; -} - -exit 0; - -# Notes: Unix configure.in options -# --enable-developer partially supported -# --enable-native-pkcs11 supported -# --enable-openssl-version-check included without a way to disable it -# --enable-openssl-hash supported -# --enable-threads included without a way to disable it -# --enable-backtrace backtrace included without a way to disable it -# --enable-symtable incompatible with DLLs -# --enable-ipv6 included without a way to disable it -# --enable-atomic supported (renamed to intrinsic) -# --enable-fixed-rrset supported -# --enable-querytrace supported -# --enable-full-report supported by verbose -# --enable-dnstap not supported (requires libfstrm support on WIN32) -# --enable-afl not supported (not yet available on Visual Studio C++) -# --disable-auto-validation supported -# --with-python supported -# --with-openssl supported -# --with-pkcs11 supported -# --with-aes supported -# --with-randomdev not supported on WIN32 (makes no sense) -# --with-geoip2 supported -# --with-gssapi supported with MIT (K)erberos (f)or (W)indows -# --with-lmdb no supported on WIN32 (port is not reliable) -# --with-libxml2 supported -# --with-json-c not supported on WIN32 (package not available on WIN32) -# --with-zlib supported -# --with-purify not supported (package available on WIN32 but for free?) -# --with-locktype not supported on WIN32 (not yet available on WIN32) -# --with-readline supported -# --with-protobuf-c not supported (no reason to until libfstrm is ready) -# --with-libfrtrm not supported (not yet available on WIN32) -# --with-docbook-xsl not supported (?) -# --with-idn[lib] supported -# --with-[lib]iconv supported (part of IDN) -# --with-atf not supported on WIN32 (package not available on WIN32) -# --with-tuning supported -# --with-dlopen included without a way to disable it -# --with-dlz-* ? -# -# Notes: MSVC versions -# MSVC 15.x _MSC_VER == 191y (VS 2017) -# MSVC 14.0 _MSC_VER == 1900 (VS 2015) -# MSVC 12.0 _MSC_VER == 1800 (VS 2013) -# MSVC 11.0 _MSC_VER == 1700 (VS 2012) -# MSVC 10.0 _MSC_VER == 1600 (VS 2010) -# MSVC 9.0 _MSC_VER == 1500 (VS 2008) -# MSVC 8.0 _MSC_VER == 1400 (VS 2005) -# MSVC 7.1 _MSC_VER == 1310 (VS .NET 2003) -# MSVC 7.0 _MSC_VER == 1300 (VS .NET (2002)) -# MSVC 6.0 _MSC_VER == 1200 (VS 6.0 (1998)) -# MSVC 5.0 _MSC_VER == 1100 (VS 97) diff --git a/win32utils/GeoIP.diff b/win32utils/GeoIP.diff deleted file mode 100644 index bc9b6bcb5c..0000000000 --- a/win32utils/GeoIP.diff +++ /dev/null @@ -1,345 +0,0 @@ -diff -ruN dists/GeoIP-1.5.1/libGeoIP/GeoIP.c dev/GeoIP-1.5.1/libGeoIP/GeoIP.c ---- dists/GeoIP-1.5.1/libGeoIP/GeoIP.c 2013-03-23 03:26:09.000000000 +0100 -+++ dev/GeoIP-1.5.1/libGeoIP/GeoIP.c 2013-07-19 16:56:58.000000000 +0200 -@@ -19,6 +19,7 @@ - */ - - #include "GeoIP.h" -+#include "GeoIP_internal.h" - - static geoipv6_t IPV6_NULL; - -@@ -44,6 +45,10 @@ - #include /* For uint32_t */ - #endif - -+#if defined(_WIN32) -+#include "pread.h" -+#endif -+ - #ifdef _UNUSED - #elif defined(__GNUC__) - #define _UNUSED __attribute__ ((unused)) -diff -ruN dists/GeoIP-1.5.1/libGeoIP/GeoIP.h dev/GeoIP-1.5.1/libGeoIP/GeoIP.h ---- dists/GeoIP-1.5.1/libGeoIP/GeoIP.h 2013-03-23 03:26:09.000000000 +0100 -+++ dev/GeoIP-1.5.1/libGeoIP/GeoIP.h 2013-07-19 16:53:33.000000000 +0200 -@@ -154,31 +154,33 @@ - GEOIP_CORPORATE_SPEED = 3, - } GeoIPNetspeedValues; - -+#ifdef GEOIP_EXPORTS -+#define GEOIP_API __declspec(dllexport) -+#define GEOIP_DATA __declspec(dllexport) -+#else -+#define GEOIP_DATA __declspec(dllimport) -+#define GEOIP_API -+#endif /* GEOIP_EXPORTS */ -+ - extern char **GeoIPDBFileName; --extern const char * GeoIPDBDescription[NUM_DB_TYPES]; --extern const char *GeoIPCountryDBFileName; --extern const char *GeoIPRegionDBFileName; --extern const char *GeoIPCityDBFileName; --extern const char *GeoIPOrgDBFileName; --extern const char *GeoIPISPDBFileName; --extern const char *GeoIPLocationADBFileName; --extern const char *GeoIPAccuracyRadiusFileName; --extern const char *GeoIPCityConfidenceFileName; -+extern GEOIP_DATA const char * GeoIPDBDescription[NUM_DB_TYPES]; -+extern GEOIP_DATA const char *GeoIPCountryDBFileName; -+extern GEOIP_DATA const char *GeoIPRegionDBFileName; -+extern GEOIP_DATA const char *GeoIPCityDBFileName; -+extern GEOIP_DATA const char *GeoIPOrgDBFileName; -+extern GEOIP_DATA const char *GeoIPISPDBFileName; -+extern GEOIP_DATA const char *GeoIPLocationADBFileName; -+extern GEOIP_DATA const char *GeoIPAccuracyRadiusFileName; -+extern GEOIP_DATA const char *GeoIPCityConfidenceFileName; - extern char * GeoIP_custom_directory; - - /* Warning: do not use those arrays as doing so may break your - * program with newer GeoIP versions */ --extern const char GeoIP_country_code[255][3]; --extern const char GeoIP_country_code3[255][4]; --extern const char * GeoIP_country_name[255]; --extern const char * GeoIP_utf8_country_name[255]; --extern const char GeoIP_country_continent[255][3]; -- --#ifdef DLL --#define GEOIP_API __declspec(dllexport) --#else --#define GEOIP_API --#endif /* DLL */ -+extern GEOIP_DATA const char GeoIP_country_code[255][3]; -+extern GEOIP_DATA const char GeoIP_country_code3[255][4]; -+extern GEOIP_DATA const char * GeoIP_country_name[255]; -+extern GEOIP_DATA const char * GeoIP_utf8_country_name[255]; -+extern GEOIP_DATA const char GeoIP_country_continent[255][3]; - - GEOIP_API void GeoIP_setup_custom_directory(char *dir); - GEOIP_API GeoIP* GeoIP_open_type (int type, int flags); -diff -ruN dists/GeoIP-1.5.1/libGeoIP/GeoIPCity.c dev/GeoIP-1.5.1/libGeoIP/GeoIPCity.c ---- dists/GeoIP-1.5.1/libGeoIP/GeoIPCity.c 2013-03-23 03:26:09.000000000 +0100 -+++ dev/GeoIP-1.5.1/libGeoIP/GeoIPCity.c 2013-07-19 15:41:05.000000000 +0200 -@@ -35,6 +35,10 @@ - #include /* For uint32_t */ - #endif - -+#if defined(_WIN32) -+#include "pread.h" -+#endif -+ - #ifndef HAVE_PREAD - #define pread(fd, buf, count, offset) \ - ( \ -diff -ruN dists/GeoIP-1.5.1/libGeoIP/GeoIPCity.h dev/GeoIP-1.5.1/libGeoIP/GeoIPCity.h ---- dists/GeoIP-1.5.1/libGeoIP/GeoIPCity.h 2013-03-23 03:26:09.000000000 +0100 -+++ dev/GeoIP-1.5.1/libGeoIP/GeoIPCity.h 2013-07-19 16:23:58.000000000 +0200 -@@ -48,22 +48,22 @@ - int netmask; - } GeoIPRecord; - --GeoIPRecord * GeoIP_record_by_ipnum (GeoIP* gi, unsigned long ipnum); --GeoIPRecord * GeoIP_record_by_addr (GeoIP* gi, const char *addr); --GeoIPRecord * GeoIP_record_by_name (GeoIP* gi, const char *host); -- --GeoIPRecord * GeoIP_record_by_ipnum_v6 (GeoIP* gi, geoipv6_t ipnum); --GeoIPRecord * GeoIP_record_by_addr_v6 (GeoIP* gi, const char *addr); --GeoIPRecord * GeoIP_record_by_name_v6 (GeoIP* gi, const char *host); -+GEOIP_API GeoIPRecord * GeoIP_record_by_ipnum (GeoIP* gi, unsigned long ipnum); -+GEOIP_API GeoIPRecord * GeoIP_record_by_addr (GeoIP* gi, const char *addr); -+GEOIP_API GeoIPRecord * GeoIP_record_by_name (GeoIP* gi, const char *host); -+ -+GEOIP_API GeoIPRecord * GeoIP_record_by_ipnum_v6 (GeoIP* gi, geoipv6_t ipnum); -+GEOIP_API GeoIPRecord * GeoIP_record_by_addr_v6 (GeoIP* gi, const char *addr); -+GEOIP_API GeoIPRecord * GeoIP_record_by_name_v6 (GeoIP* gi, const char *host); - --int GeoIP_record_id_by_addr (GeoIP* gi, const char *addr); --int GeoIP_record_id_by_addr_v6 (GeoIP* gi, const char *addr); -+GEOIP_API int GeoIP_record_id_by_addr (GeoIP* gi, const char *addr); -+GEOIP_API int GeoIP_record_id_by_addr_v6 (GeoIP* gi, const char *addr); - --int GeoIP_init_record_iter (GeoIP* gi); -+GEOIP_API int GeoIP_init_record_iter (GeoIP* gi); - /* returns 0 on success, 1 on failure */ --int GeoIP_next_record (GeoIP* gi, GeoIPRecord **gir, int *record_iter); -+GEOIP_API int GeoIP_next_record (GeoIP* gi, GeoIPRecord **gir, int *record_iter); - --void GeoIPRecord_delete (GeoIPRecord *gir); -+GEOIP_API void GeoIPRecord_delete (GeoIPRecord *gir); - - /* NULL on failure otherwise a malloced string in utf8 */ - /* char * GeoIP_iso_8859_1__utf8(const char *); */ -diff -ruN dists/GeoIP-1.5.1/libGeoIP/Makefile.vc dev/GeoIP-1.5.1/libGeoIP/Makefile.vc ---- dists/GeoIP-1.5.1/libGeoIP/Makefile.vc 2013-03-23 03:26:09.000000000 +0100 -+++ dev/GeoIP-1.5.1/libGeoIP/Makefile.vc 2013-07-19 16:47:45.000000000 +0200 -@@ -1,29 +1,42 @@ - #NMAKE makefile for Windows developers. --#Produces a static library (GeoIP.lib). -+##Produces a static library (GeoIP.lib). -+#Produces a DLL (GeoIP.dll) and library (GeoIP.lib). - - COMPILER=cl - --CFLAGS=-DWIN32 -MD -nologo -+CFLAGS=-DWIN32 -DGEOIP_EXPORTS -MD -nologo - - GEOIPINC = -I..\libGeoIP - --CC1 = $(COMPILER) $(CFLAGS) $(GEOIPINC) -DGEOIPDATADIR=\"$(GEOIPDATADIR)\" -+CC1 = $(COMPILER) $(CFLAGS) $(GEOIPINC) -DGEOIPDATADIR=\"$(GEOIPDATADIR)\" -DPACKAGE_VERSION=\"1.5.1\" - --OBJS=GeoIP.obj GeoIPCity.obj regionName.obj md5.obj timeZone.obj -+LINKER=link -+ -+LDFLAGS=/DLL /nologo /subsystem:console -+ -+LD1 = $(LINKER) $(LDFLAGS) -+ -+OBJS=GeoIP.obj GeoIPCity.obj GeoIP_depreciated.obj regionName.obj md5.obj timeZone.obj pread.obj - --EXTRA_LIBS= advapi32.lib wsock32.lib -+EXTRA_LIBS= ws2_32.lib - - AR=lib - --GeoIP.lib: GeoIP.obj GeoIPCity.obj regionName.obj md5.obj timeZone.obj -- $(AR) -nologo $(OBJS) $(EXTRA_LIBS) /OUT:GeoIP.lib -+#GeoIP.lib: GeoIP.obj GeoIPCity.obj regionName.obj md5.obj timeZone.obj pread.obj -+# $(AR) -nologo $(OBJS) $(EXTRA_LIBS) /OUT:GeoIP.lib - -+GeoIP.dll GeoIP.lib: $(OBJS) -+ $(LD1) $(OBJS) $(EXTRA_LIBS) /out:GeoIP.dll /implib:GeoIP.lib -+ - GeoIP.obj: GeoIP.c - $(CC1) -c GeoIP.c $(GEOIPINC) - - GeoIPCity.obj: GeoIPCity.c - $(CC1) -c GeoIPCity.c $(GEOIPINC) - -+GeoIP_depreciated.obj: GeoIP_depreciated.c -+ $(CC1) -c GeoIP_depreciated.c $(GEOIPINC) -+ - regionName.obj: regionName.c - $(CC1) -c regionName.c $(GEOIPINC) - -@@ -32,3 +45,6 @@ - - timeZone.obj: timeZone.c - $(CC1) -c timeZone.c $(GEOIPINC) -+ -+pread.obj: pread.c -+ $(CC1) -c pread.c $(GEOIPINC) -diff -ruN dists/GeoIP-1.5.1/libGeoIP/pread.c dev/GeoIP-1.5.1/libGeoIP/pread.c ---- dists/GeoIP-1.5.1/libGeoIP/pread.c 1970-01-01 01:00:00.000000000 +0100 -+++ dev/GeoIP-1.5.1/libGeoIP/pread.c 2013-07-19 15:37:44.000000000 +0200 -@@ -0,0 +1,73 @@ -+/* -+ * Copyright (C) 2013 Internet Systems Consortium, Inc. ("ISC") -+ * -+ * Permission to use, copy, modify, and/or distribute this software for any -+ * purpose with or without fee is hereby granted, provided that the above -+ * copyright notice and this permission notice appear in all copies. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH -+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -+ * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, -+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -+ * PERFORMANCE OF THIS SOFTWARE. -+ */ -+ -+#include -+#include -+ -+#include "pread.h" -+ -+CRITICAL_SECTION preadsc; -+ -+#ifdef _WIN64 -+int pread(int fd, void *buf, unsigned int nbyte, __int64 offset) -+{ -+ int cc = -1; -+ __int64 prev = (__int64)-1L; -+ -+ EnterCriticalSection(&preadsc); -+ prev = _lseeki64(fd, 0L, SEEK_CUR); -+ if (prev == (__int64)-1L) -+ goto done; -+ if (_lseeki64(fd, offset, SEEK_SET) != offset) -+ goto done; -+ cc = _read(fd, buf, nbyte); -+ -+done: -+ if (prev != (__int64)-1L) -+ (void)_lseeki64(fd, prev, SEEK_SET); -+ LeaveCriticalSection(&preadsc); -+ -+ return cc; -+} -+#else -+int pread(int fd, void *buf, unsigned int nbyte, long offset) -+{ -+ int cc = -1; -+ long prev = -1L; -+ -+ EnterCriticalSection(&preadsc); -+ prev = _lseek(fd, 0L, SEEK_CUR); -+ if (prev == -1L) -+ goto done; -+ if (_lseek(fd, offset, SEEK_SET) != offset) -+ goto done; -+ cc = _read(fd, buf, nbyte); -+ -+done: -+ if (prev != -1L) -+ (void)_lseek(fd, prev, SEEK_SET); -+ LeaveCriticalSection(&preadsc); -+ -+ return cc; -+} -+#endif -+ -+BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpReserved ) -+{ -+ if (fdwReason == DLL_PROCESS_ATTACH) -+ InitializeCriticalSection(&preadsc); -+ return TRUE; -+} -diff -ruN dists/GeoIP-1.5.1/libGeoIP/pread.h dev/GeoIP-1.5.1/libGeoIP/pread.h ---- dists/GeoIP-1.5.1/libGeoIP/pread.h 1970-01-01 01:00:00.000000000 +0100 -+++ dev/GeoIP-1.5.1/libGeoIP/pread.h 2013-07-19 15:39:01.000000000 +0200 -@@ -0,0 +1,29 @@ -+/* -+ * Copyright (C) 2013 Internet Systems Consortium, Inc. ("ISC") -+ * -+ * Permission to use, copy, modify, and/or distribute this software for any -+ * purpose with or without fee is hereby granted, provided that the above -+ * copyright notice and this permission notice appear in all copies. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH -+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -+ * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, -+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -+ * PERFORMANCE OF THIS SOFTWARE. -+ */ -+ -+#ifdef _WIN64 -+typedef __int64 ssize_t; -+ -+int pread(int fd, void *buf, unsigned int nbyte, __int64 offset); -+#else -+typedef int ssize_t; -+ -+int pread(int fd, void *buf, unsigned int nbyte, long offset); -+#endif -+ -+#define HAVE_PREAD -+ -+extern CRITICAL_SECTION preadsc; -diff -ruN dists/GeoIP-1.5.1/libGeoIP/regionName.c dev/GeoIP-1.5.1/libGeoIP/regionName.c ---- dists/GeoIP-1.5.1/libGeoIP/regionName.c 2013-03-23 03:26:09.000000000 +0100 -+++ dev/GeoIP-1.5.1/libGeoIP/regionName.c 2013-07-19 16:37:56.000000000 +0200 -@@ -1,3 +1,5 @@ -+#include "GeoIP.h" -+ - #include - #include - -diff -ruN dists/GeoIP-1.5.1/libGeoIP/timeZone.c dev/GeoIP-1.5.1/libGeoIP/timeZone.c ---- dists/GeoIP-1.5.1/libGeoIP/timeZone.c 2013-03-23 03:26:09.000000000 +0100 -+++ dev/GeoIP-1.5.1/libGeoIP/timeZone.c 2013-07-19 17:22:44.000000000 +0200 -@@ -1,4 +1,7 @@ -+#include "GeoIP.h" -+ - #include -+ - const char* GeoIP_time_zone_by_country_and_region(const char * country,const char * region) { - const char* timezone = NULL; - if (country == NULL) { -diff -ruN dists/GeoIP-1.5.1/test/Makefile.vc dev/GeoIP-1.5.1/test/Makefile.vc ---- dists/GeoIP-1.5.1/test/Makefile.vc 2013-03-23 03:26:09.000000000 +0100 -+++ dev/GeoIP-1.5.1/test/Makefile.vc 2013-07-19 16:48:55.000000000 +0200 -@@ -9,7 +9,7 @@ - - GEOIPINC = -I..\libGeoIP - --CC1 = $(COMPILER) $(CFLAGS) $(GEOIPINC) -+CC1 = $(COMPILER) $(CFLAGS) $(GEOIPINC) -DSRCDIR=\"../\" - - GEOIPLIB = ..\libGeoIP\GeoIP.lib - -diff -ruN dists/GeoIP-1.5.1/test/benchmark.c dev/GeoIP-1.5.1/test/benchmark.c ---- dists/GeoIP-1.5.1/test/benchmark.c 2013-03-23 03:26:09.000000000 +0100 -+++ dev/GeoIP-1.5.1/test/benchmark.c 2013-07-19 16:26:23.000000000 +0200 -@@ -81,7 +81,7 @@ - void testgeoiporg(int flags, const char *msg, int numlookups) - { - GeoIP *i = NULL; -- GeoIPRegion *i3 = NULL; -+ char *i3 = NULL; - int i4 = 0; - int i2 = 0; - double t = 0; diff --git a/win32utils/bind9.sln.in b/win32utils/bind9.sln.in deleted file mode 100644 index 6eb03a607c..0000000000 --- a/win32utils/bind9.sln.in +++ /dev/null @@ -1,329 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual C++ Express 2010 -# BINDInstall must be the first project -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BINDInstall", "..\bin\win32\BINDInstall\BINDInstall.vcxproj", "{190CC424-E8CC-46F2-9013-3152D6905118}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libisc", "..\lib\isc\win32\libisc.vcxproj", "{3840E563-D180-4761-AA9C-E6155F02EAFF}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gen", "..\lib\dns\win32\gen.vcxproj", "{A3F71D12-F38A-4C77-8D87-8E8854CA74A1}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libdns", "..\lib\dns\win32\libdns.vcxproj", "{5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libisccc", "..\lib\isccc\win32\libisccc.vcxproj", "{B556705F-1920-4400-878A-B259D3556047}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libns", "..\lib\ns\win32\libns.vcxproj", "{82ACD33C-E75F-45B8-BB6D-42643A10D7EE}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libisccfg", "..\lib\isccfg\win32\libisccfg.vcxproj", "{B2DFA58C-6347-478E-81E8-01E06999D4F1}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbind9", "..\lib\bind9\win32\libbind9.vcxproj", "{E741C10B-B075-4206-9596-46765B665E03}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libirs", "..\lib\irs\win32\libirs.vcxproj", "{A4F29CEB-7644-4A7F-BE9E-02B6A90E4919}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bindevt", "..\lib\win32\bindevt\bindevt.vcxproj", "{0D745CD9-FC3B-49DC-99BE-1E6DF85593F0}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "named", "..\bin\named\win32\named.vcxproj", "{723C65DA-A96C-4BA3-A34E-44F11CA346F9}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rndc", "..\bin\rndc\win32\rndc.vcxproj", "{39721F26-8B80-4AA9-9826-2AEF7322C3D5}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dighost", "..\bin\dig\win32\dighost.vcxproj", "{140DE800-E552-43CC-B0C7-A33A92E368CA}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dig", "..\bin\dig\win32\dig.vcxproj", "{F938F9B8-D395-4A40-BEC7-0122D289C692}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "host", "..\bin\dig\win32\host.vcxproj", "{BA1048A8-6961-4A20-BE12-08BE20611C9D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nslookup", "..\bin\dig\win32\nslookup.vcxproj", "{C15A6E1A-94CE-4686-99F9-6BC5FD623EB5}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "delv", "..\bin\delv\win32\delv.vcxproj", "{BE172EFE-C1DC-4812-BFB9-8C5F8ADB7E9F}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dnssectool", "..\bin\dnssec\win32\dnssectool.vcxproj", "{2CB7DC75-023B-4AA3-AF3A-AE5046A4EE70}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "keygen", "..\bin\dnssec\win32\keygen.vcxproj", "{0BF11E21-168C-4CAA-B784-429D126BBAE5}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "signzone", "..\bin\dnssec\win32\signzone.vcxproj", "{205ED8A9-2E4C-41CC-9385-F3613402AA90}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cds", "..\bin\dnssec\win32\cds.vcxproj", "{0EB1727E-2BBD-47A6-AD12-418F9DEB0531}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "keyfromlabel", "..\bin\dnssec\win32\keyfromlabel.vcxproj", "{17455DC6-5FBB-47C3-8F44-7DB574A188D3}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dsfromkey", "..\bin\dnssec\win32\dsfromkey.vcxproj", "{6E6297F4-69D7-4533-85E1-BD17C30017C8}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "revoke", "..\bin\dnssec\win32\revoke.vcxproj", "{D171F185-D3C2-4463-9CF3-ED1D0B1D6832}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "settime", "..\bin\dnssec\win32\settime.vcxproj", "{03FB7588-C5A7-4572-968F-14F1206BC69C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "verify", "..\bin\dnssec\win32\verify.vcxproj", "{FD653434-F1A8-44A9-85B2-A7468491DA6D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "importkey", "..\bin\dnssec\win32\importkey.vcxproj", "{AB6690A0-055E-458F-BAC5-BF38BCC5834F}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "arpaname", "..\bin\tools\win32\arpaname.vcxproj", "{91E60FDA-E48C-4DA0-92A2-97F963348E00}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "journalprint", "..\bin\tools\win32\journalprint.vcxproj", "{B19042CE-D3D9-469B-BCD2-C3140150939A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nsec3hash", "..\bin\tools\win32\nsec3hash.vcxproj", "{4EE91023-94C3-48C0-B71C-5333B726C2EE}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rrchecker", "..\bin\tools\win32\rrchecker.vcxproj", "{98743A7C-6AF8-467F-9911-FA69C451AF2B}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mdig", "..\bin\tools\win32\mdig.vcxproj", "{3115091C-8135-481F-9757-F013A26255E0}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nsupdate", "..\bin\nsupdate\win32\nsupdate.vcxproj", "{C41266C7-E27E-4D60-9815-82D3B32BF82F}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "checktool", "..\bin\check\win32\checktool.vcxproj", "{2C1F7096-C5B5-48D4-846F-A7ACA454335D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "checkconf", "..\bin\check\win32\checkconf.vcxproj", "{03A96113-CB14-43AA-AEB2-48950E3915C5}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "checkzone", "..\bin\check\win32\checkzone.vcxproj", "{66028555-7DD5-4016-B601-9EF9A1EE8BFA}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "confgentool", "..\bin\confgen\win32\confgentool.vcxproj", "{64964B03-4815-41F0-9057-E766A94AF197}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rndcconfgen", "..\bin\confgen\win32\rndcconfgen.vcxproj", "{1E2C1635-3093-4D59-80E7-4743AC10F22F}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tsigkeygen", "..\bin\confgen\win32\tsigkeygen.vcxproj", "{1EA4FC64-F33B-4A50-970A-EA052BBE9CF1}" -EndProject -@IF PKCS11 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pk11keygen", "..\bin\pkcs11\win32\pk11keygen.vcxproj", "{5042D371-0402-4FA3-A52A-769708694422}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pk11list", "..\bin\pkcs11\win32\pk11list.vcxproj", "{C663B088-F7BC-4C8C-8D06-A76636EED651}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pk11destroy", "..\bin\pkcs11\win32\pk11destroy.vcxproj", "{5B3137E5-7E1F-49AA-8810-A09AA417D326}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pk11tokens", "..\bin\pkcs11\win32\pk11tokens.vcxproj", "{403FD4B1-A4F9-4159-9013-5860E3A4417D}" -EndProject -@END PKCS11 -@IF STESTS -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "makejournal", "..\bin\tests\system\win32\makejournal.vcxproj", "{31715139-2C27-47D2-8394-71B71A8AC3D5}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "resolve", "..\bin\tests\system\win32\resolve.vcxproj", "{F66D8B7E-721D-4602-99AD-820D19AD1313}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gencheck", "..\bin\tests\system\win32\gencheck.vcxproj", "{764DBE24-C8B3-46E8-BE73-196431353A5D}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bigkey", "..\bin\tests\system\win32\bigkey.vcxproj", "{61F9D673-EB5C-47A5-8907-24E034C75EF8}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pipequeries", "..\bin\tests\system\win32\pipequeries.vcxproj", "{E1478F40-786C-4738-8E99-E7A71DD98661}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "keycreate", "..\bin\tests\system\win32\keycreate.vcxproj", "{4F9A0F6F-366D-4483-B131-793832840508}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "keydelete", "..\bin\tests\system\win32\keydelete.vcxproj", "{85ADFF2A-BE31-4B8D-9089-9AD56CE78D7E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "feature-test", "..\bin\tests\system\win32\feature-test.vcxproj", "{63A921F6-1200-4723-828A-98960127B73D}" -EndProject -@END STESTS -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|@PLATFORM@ = Debug|@PLATFORM@ - Release|@PLATFORM@ = Release|@PLATFORM@ - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {190CC424-E8CC-46F2-9013-3152D6905118}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {190CC424-E8CC-46F2-9013-3152D6905118}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {190CC424-E8CC-46F2-9013-3152D6905118}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {190CC424-E8CC-46F2-9013-3152D6905118}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {A3F71D12-F38A-4C77-8D87-8E8854CA74A1}.Debug|@BUILD_PLATFORM@.ActiveCfg = Debug|@BUILD_PLATFORM@ - {A3F71D12-F38A-4C77-8D87-8E8854CA74A1}.Debug|@BUILD_PLATFORM@.Build.0 = Debug|@BUILD_PLATFORM@ - {A3F71D12-F38A-4C77-8D87-8E8854CA74A1}.Release|@BUILD_PLATFORM@.ActiveCfg = Release|@BUILD_PLATFORM@ - {A3F71D12-F38A-4C77-8D87-8E8854CA74A1}.Release|@BUILD_PLATFORM@.Build.0 = Release|@BUILD_PLATFORM@ - {3840E563-D180-4761-AA9C-E6155F02EAFF}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {3840E563-D180-4761-AA9C-E6155F02EAFF}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {3840E563-D180-4761-AA9C-E6155F02EAFF}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {3840E563-D180-4761-AA9C-E6155F02EAFF}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {B556705F-1920-4400-878A-B259D3556047}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {B556705F-1920-4400-878A-B259D3556047}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {B556705F-1920-4400-878A-B259D3556047}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {B556705F-1920-4400-878A-B259D3556047}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {5FEBFD4E-CCB0-48B9-B733-E15EEB85C16A}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {82ACD33C-E75F-45B8-BB6D-42643A10D7EE}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {82ACD33C-E75F-45B8-BB6D-42643A10D7EE}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {82ACD33C-E75F-45B8-BB6D-42643A10D7EE}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {82ACD33C-E75F-45B8-BB6D-42643A10D7EE}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {B2DFA58C-6347-478E-81E8-01E06999D4F1}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {B2DFA58C-6347-478E-81E8-01E06999D4F1}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {B2DFA58C-6347-478E-81E8-01E06999D4F1}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {B2DFA58C-6347-478E-81E8-01E06999D4F1}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {E741C10B-B075-4206-9596-46765B665E03}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {E741C10B-B075-4206-9596-46765B665E03}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {E741C10B-B075-4206-9596-46765B665E03}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {E741C10B-B075-4206-9596-46765B665E03}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {A4F29CEB-7644-4A7F-BE9E-02B6A90E4919}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {A4F29CEB-7644-4A7F-BE9E-02B6A90E4919}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {A4F29CEB-7644-4A7F-BE9E-02B6A90E4919}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {A4F29CEB-7644-4A7F-BE9E-02B6A90E4919}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {0D745CD9-FC3B-49DC-99BE-1E6DF85593F0}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {0D745CD9-FC3B-49DC-99BE-1E6DF85593F0}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {0D745CD9-FC3B-49DC-99BE-1E6DF85593F0}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {0D745CD9-FC3B-49DC-99BE-1E6DF85593F0}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {723C65DA-A96C-4BA3-A34E-44F11CA346F9}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {723C65DA-A96C-4BA3-A34E-44F11CA346F9}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {723C65DA-A96C-4BA3-A34E-44F11CA346F9}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {723C65DA-A96C-4BA3-A34E-44F11CA346F9}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {39721F26-8B80-4AA9-9826-2AEF7322C3D5}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {39721F26-8B80-4AA9-9826-2AEF7322C3D5}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {39721F26-8B80-4AA9-9826-2AEF7322C3D5}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {39721F26-8B80-4AA9-9826-2AEF7322C3D5}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {140DE800-E552-43CC-B0C7-A33A92E368CA}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {140DE800-E552-43CC-B0C7-A33A92E368CA}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {140DE800-E552-43CC-B0C7-A33A92E368CA}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {140DE800-E552-43CC-B0C7-A33A92E368CA}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {F938F9B8-D395-4A40-BEC7-0122D289C692}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {F938F9B8-D395-4A40-BEC7-0122D289C692}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {F938F9B8-D395-4A40-BEC7-0122D289C692}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {F938F9B8-D395-4A40-BEC7-0122D289C692}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {BA1048A8-6961-4A20-BE12-08BE20611C9D}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {BA1048A8-6961-4A20-BE12-08BE20611C9D}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {BA1048A8-6961-4A20-BE12-08BE20611C9D}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {BA1048A8-6961-4A20-BE12-08BE20611C9D}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {C15A6E1A-94CE-4686-99F9-6BC5FD623EB5}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {C15A6E1A-94CE-4686-99F9-6BC5FD623EB5}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {C15A6E1A-94CE-4686-99F9-6BC5FD623EB5}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {C15A6E1A-94CE-4686-99F9-6BC5FD623EB5}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {BE172EFE-C1DC-4812-BFB9-8C5F8ADB7E9F}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {BE172EFE-C1DC-4812-BFB9-8C5F8ADB7E9F}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {BE172EFE-C1DC-4812-BFB9-8C5F8ADB7E9F}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {BE172EFE-C1DC-4812-BFB9-8C5F8ADB7E9F}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {2CB7DC75-023B-4AA3-AF3A-AE5046A4EE70}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {2CB7DC75-023B-4AA3-AF3A-AE5046A4EE70}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {2CB7DC75-023B-4AA3-AF3A-AE5046A4EE70}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {2CB7DC75-023B-4AA3-AF3A-AE5046A4EE70}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {0BF11E21-168C-4CAA-B784-429D126BBAE5}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {0BF11E21-168C-4CAA-B784-429D126BBAE5}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {0BF11E21-168C-4CAA-B784-429D126BBAE5}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {0BF11E21-168C-4CAA-B784-429D126BBAE5}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {205ED8A9-2E4C-41CC-9385-F3613402AA90}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {205ED8A9-2E4C-41CC-9385-F3613402AA90}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {205ED8A9-2E4C-41CC-9385-F3613402AA90}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {205ED8A9-2E4C-41CC-9385-F3613402AA90}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {0EB1727E-2BBD-47A6-AD12-418F9DEB0531}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {0EB1727E-2BBD-47A6-AD12-418F9DEB0531}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {0EB1727E-2BBD-47A6-AD12-418F9DEB0531}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {0EB1727E-2BBD-47A6-AD12-418F9DEB0531}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {17455DC6-5FBB-47C3-8F44-7DB574A188D3}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {17455DC6-5FBB-47C3-8F44-7DB574A188D3}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {17455DC6-5FBB-47C3-8F44-7DB574A188D3}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {17455DC6-5FBB-47C3-8F44-7DB574A188D3}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {6E6297F4-69D7-4533-85E1-BD17C30017C8}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {6E6297F4-69D7-4533-85E1-BD17C30017C8}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {6E6297F4-69D7-4533-85E1-BD17C30017C8}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {6E6297F4-69D7-4533-85E1-BD17C30017C8}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {D171F185-D3C2-4463-9CF3-ED1D0B1D6832}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {D171F185-D3C2-4463-9CF3-ED1D0B1D6832}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {D171F185-D3C2-4463-9CF3-ED1D0B1D6832}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {D171F185-D3C2-4463-9CF3-ED1D0B1D6832}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {03FB7588-C5A7-4572-968F-14F1206BC69C}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {03FB7588-C5A7-4572-968F-14F1206BC69C}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {03FB7588-C5A7-4572-968F-14F1206BC69C}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {03FB7588-C5A7-4572-968F-14F1206BC69C}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {FD653434-F1A8-44A9-85B2-A7468491DA6D}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {FD653434-F1A8-44A9-85B2-A7468491DA6D}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {FD653434-F1A8-44A9-85B2-A7468491DA6D}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {FD653434-F1A8-44A9-85B2-A7468491DA6D}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {AB6690A0-055E-458F-BAC5-BF38BCC5834F}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {AB6690A0-055E-458F-BAC5-BF38BCC5834F}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {AB6690A0-055E-458F-BAC5-BF38BCC5834F}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {AB6690A0-055E-458F-BAC5-BF38BCC5834F}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {91E60FDA-E48C-4DA0-92A2-97F963348E00}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {91E60FDA-E48C-4DA0-92A2-97F963348E00}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {91E60FDA-E48C-4DA0-92A2-97F963348E00}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {91E60FDA-E48C-4DA0-92A2-97F963348E00}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {B19042CE-D3D9-469B-BCD2-C3140150939A}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {B19042CE-D3D9-469B-BCD2-C3140150939A}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {B19042CE-D3D9-469B-BCD2-C3140150939A}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {B19042CE-D3D9-469B-BCD2-C3140150939A}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {4EE91023-94C3-48C0-B71C-5333B726C2EE}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {4EE91023-94C3-48C0-B71C-5333B726C2EE}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {4EE91023-94C3-48C0-B71C-5333B726C2EE}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {4EE91023-94C3-48C0-B71C-5333B726C2EE}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {98743A7C-6AF8-467F-9911-FA69C451AF2B}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {98743A7C-6AF8-467F-9911-FA69C451AF2B}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {98743A7C-6AF8-467F-9911-FA69C451AF2B}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {98743A7C-6AF8-467F-9911-FA69C451AF2B}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {3115091C-8135-481F-9757-F013A26255E0}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {3115091C-8135-481F-9757-F013A26255E0}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {3115091C-8135-481F-9757-F013A26255E0}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {3115091C-8135-481F-9757-F013A26255E0}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {C41266C7-E27E-4D60-9815-82D3B32BF82F}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {C41266C7-E27E-4D60-9815-82D3B32BF82F}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {C41266C7-E27E-4D60-9815-82D3B32BF82F}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {C41266C7-E27E-4D60-9815-82D3B32BF82F}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {2C1F7096-C5B5-48D4-846F-A7ACA454335D}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {2C1F7096-C5B5-48D4-846F-A7ACA454335D}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {2C1F7096-C5B5-48D4-846F-A7ACA454335D}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {2C1F7096-C5B5-48D4-846F-A7ACA454335D}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {03A96113-CB14-43AA-AEB2-48950E3915C5}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {03A96113-CB14-43AA-AEB2-48950E3915C5}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {03A96113-CB14-43AA-AEB2-48950E3915C5}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {03A96113-CB14-43AA-AEB2-48950E3915C5}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {66028555-7DD5-4016-B601-9EF9A1EE8BFA}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {66028555-7DD5-4016-B601-9EF9A1EE8BFA}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {66028555-7DD5-4016-B601-9EF9A1EE8BFA}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {66028555-7DD5-4016-B601-9EF9A1EE8BFA}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {64964B03-4815-41F0-9057-E766A94AF197}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {64964B03-4815-41F0-9057-E766A94AF197}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {64964B03-4815-41F0-9057-E766A94AF197}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {64964B03-4815-41F0-9057-E766A94AF197}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {1E2C1635-3093-4D59-80E7-4743AC10F22F}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {1E2C1635-3093-4D59-80E7-4743AC10F22F}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {1E2C1635-3093-4D59-80E7-4743AC10F22F}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {1E2C1635-3093-4D59-80E7-4743AC10F22F}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {1EA4FC64-F33B-4A50-970A-EA052BBE9CF1}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {1EA4FC64-F33B-4A50-970A-EA052BBE9CF1}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {1EA4FC64-F33B-4A50-970A-EA052BBE9CF1}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {1EA4FC64-F33B-4A50-970A-EA052BBE9CF1}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ -@IF PKCS11 - {5042D371-0402-4FA3-A52A-769708694422}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {5042D371-0402-4FA3-A52A-769708694422}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {5042D371-0402-4FA3-A52A-769708694422}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {5042D371-0402-4FA3-A52A-769708694422}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {C663B088-F7BC-4C8C-8D06-A76636EED651}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {C663B088-F7BC-4C8C-8D06-A76636EED651}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {C663B088-F7BC-4C8C-8D06-A76636EED651}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {C663B088-F7BC-4C8C-8D06-A76636EED651}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {5B3137E5-7E1F-49AA-8810-A09AA417D326}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {5B3137E5-7E1F-49AA-8810-A09AA417D326}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {5B3137E5-7E1F-49AA-8810-A09AA417D326}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {5B3137E5-7E1F-49AA-8810-A09AA417D326}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {403FD4B1-A4F9-4159-9013-5860E3A4417D}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {403FD4B1-A4F9-4159-9013-5860E3A4417D}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {403FD4B1-A4F9-4159-9013-5860E3A4417D}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {403FD4B1-A4F9-4159-9013-5860E3A4417D}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ -@END PKCS11 -@IF STESTS - {31715139-2C27-47D2-8394-71B71A8AC3D5}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {31715139-2C27-47D2-8394-71B71A8AC3D5}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {31715139-2C27-47D2-8394-71B71A8AC3D5}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {31715139-2C27-47D2-8394-71B71A8AC3D5}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {764DBE24-C8B3-46E8-BE73-196431353A5D}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {764DBE24-C8B3-46E8-BE73-196431353A5D}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {764DBE24-C8B3-46E8-BE73-196431353A5D}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {764DBE24-C8B3-46E8-BE73-196431353A5D}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {61F9D673-EB5C-47A5-8907-24E034C75EF8}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {61F9D673-EB5C-47A5-8907-24E034C75EF8}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {61F9D673-EB5C-47A5-8907-24E034C75EF8}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {61F9D673-EB5C-47A5-8907-24E034C75EF8}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {E1478F40-786C-4738-8E99-E7A71DD98661}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {E1478F40-786C-4738-8E99-E7A71DD98661}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {E1478F40-786C-4738-8E99-E7A71DD98661}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {E1478F40-786C-4738-8E99-E7A71DD98661}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {4F9A0F6F-366D-4483-B131-793832840508}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {4F9A0F6F-366D-4483-B131-793832840508}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {4F9A0F6F-366D-4483-B131-793832840508}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {4F9A0F6F-366D-4483-B131-793832840508}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {85ADFF2A-BE31-4B8D-9089-9AD56CE78D7E}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {85ADFF2A-BE31-4B8D-9089-9AD56CE78D7E}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {85ADFF2A-BE31-4B8D-9089-9AD56CE78D7E}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {85ADFF2A-BE31-4B8D-9089-9AD56CE78D7E}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {63A921F6-1200-4723-828A-98960127B73D}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {63A921F6-1200-4723-828A-98960127B73D}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {63A921F6-1200-4723-828A-98960127B73D}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {63A921F6-1200-4723-828A-98960127B73D}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ - {F66D8B7E-721D-4602-99AD-820D19AD1313}.Debug|@PLATFORM@.ActiveCfg = Debug|@PLATFORM@ - {F66D8B7E-721D-4602-99AD-820D19AD1313}.Debug|@PLATFORM@.Build.0 = Debug|@PLATFORM@ - {F66D8B7E-721D-4602-99AD-820D19AD1313}.Release|@PLATFORM@.ActiveCfg = Release|@PLATFORM@ - {F66D8B7E-721D-4602-99AD-820D19AD1313}.Release|@PLATFORM@.Build.0 = Release|@PLATFORM@ -@END STESTS - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/win32utils/build.txt b/win32utils/build.txt deleted file mode 100644 index 7cf15a8703..0000000000 --- a/win32utils/build.txt +++ /dev/null @@ -1,246 +0,0 @@ -Building BIND 9 on Windows has the following prerequisites: - -1) You need to install Perl for Windows. ActivePerl -(http://www.activestate.com/) and Strawberry Perl -(http://www.strawberryperl.com) have both been tested and found -to work. - -2) libuv (https://libuv.org/) must be downloaded and built on the -system on which you are building BIND 9. - -3) OpenSSL (https://www.openssl.org) must be downloaded and built on -the system on which you are building BIND 9. - -4) If you wish to use the statistics channel, LibXML2 -(ftp://xmlsoft.org/libxml2) must be downloaded and built on -the system on which you are building BIND 9. - -5) Optional external packages (not used by default) - -If you wish to use IP geolocation, GeoIP API and database must be -downloaded, patched and built on the system on which you are building -BIND 9. - -If you wish to use zlib/deflate on the statistics channel, zlib -must be downloaded and built on the system on which you are building -BIND 9. - -If you wish to use readline, the readline library must be downloaded -and built on the system on which you are building BIND 9. - -6) The BIND 9 Installer (BINDInstall) includes a copy of the -redistributable runtime object vcredist_x86.exe (or vcredist_x64.exe), -which is included with Visual Studio and can be downloaded from -Microsoft. This file must be in place prior to running Configure. - -Step 1: Download and build libuv - - Download and untar the libuv sources from https://libuv.org/ in the same - directory in which you extracted the BIND 9 source: if BIND 9 is in - \build\bind-9.16.9, for instance, libuv should be in \build\libuv-v1.40.0 - (subject to version number changes). - - As of this writing, a patch (win32utils/libuv.diff) needs to be applied - to the libuv source code in order for it to work with BIND on Windows. A - pull request including the changes from this patch has been submitted to - the libuv maintainers: - - https://github.com/libuv/libuv/pull/2653 - - Applying the win32utils/libuv.diff patch will no longer be necessary - for libuv versions released after this pull request has been merged. - - On Windows, libuv is built using CMake. Here is a sample sequence of - commands which builds a 64-bit shared libuv library: - - cd libuv-v1.40.0 - mkdir build - cd build - cmake -DCMAKE_GENERATOR_PLATFORM=x64 .. - cmake --build . --config Release - -Step 2: Download and build OpenSSL - - Download and untar the OpenSSL sources from https://www.openssl.org/ in - the same directory in which you extracted the BIND 9 source: if BIND 9 is - in \build\bind-9.16.0, for instance, OpenSSL should be in - \build\openssl-1.1.1d (subject to version number changes). - - Note: Building OpenSSL requires that you install Perl and NASM as it - uses these during its build process. The following commands work as of - openssl-1.1.1d, but you should check the OpenSSL distribution to see - if the build instructions in the INSTALL file have changed: - - (In an x64 Visual Studio Command Prompt window) - cd openssl-1.1.1d - perl Configure VC-WIN64A - nmake - -Step 3: Download and build LibXML2 - - LibXML2 is required to use the statistics channel. If you wish to - build BIND 9 without support for this feature, skip to step 4. - - Download and untar the libxml2 sources from ftp://xmlsoft.org/libxml2 in - the same directory in which you extracted the BIND 9 source: if BIND 9 is - in \build\bind-9.16.0, for instance, libxml2 should be in - \build\libxml2-2.9.2 (subject to version number changes). - - Now build libxml2: - - cd libxml2-2.9.2\win32 - cscript configure.js iconv=no - nmake /f Makefile.msvc - -Step 4: Download and build zlib - - The statistics channel (aka internal HTTP server) can support - zlib "deflate" compression method. If you don't want to this - feature, skip to step 5. - - Download and untar the zlib sources from https://www.zlib.net in the same - directory in which you extracted the BIND 9 source: if BIND 9 is in - \build\bind-9.16.0, for instance, zlib should be in \build\zlib-1.2.11 - (subject to version number changes). - - Read the win32\Makefile.msc for the Usage comment at the beginning of - this file, then build the zlib1.dll DLL for the intended processor (i.e., - win32 aka x86, or x64), e.g.: - - cd zlib-1.2.11 - nmake /f win32\Makefile.msc - -Step 5: Download and build GeoIP - - Geographic ("geoip") ACLs require libGeoIP. If you wish to build BIND 9 - without support for this feature, skip to step 6. - - The libGeoIP source code is available from: - - https://github.com/maxmind/geoip-api-c/releases. - - As of this writing, the current version of libGeoIP is 1.6.0. There - is a known bug in this and all prior versions which prevents it from - building a suitable DLL with thread support on Windows. You can apply - the patch file bind9/win32utils/GeoIP.diff to address the problem. - This patch has been submitted upstream, and will be included in - future versions of libGeoIP. - -Step 6: Download and build Readline - - The readline library adds command-line editing in nslookup and nsupdate. - If you wish to build BIND 9 without support for this feature, skip to - step 8. - - Because the original GNU source for the readline library has no WIN32 - support, it will be necessary to download a version of the static - readline library source that is ready to be built by Visual Studio. One - such version is available at: - - http://gpsim.sourceforge.net/gpsimWin32/gpsimWin32.html#readline_lib - - Note: Windows command (cmd.exe) provides an integrated line editing - feature so it is not recommended to configure bind with readline. - -Step 7: Make the redistributable runtime object available - - Check that the Microsoft redistributable object (vcredist_x86.exe or - vcredist_x64.exe) is available to the build. The file may be placed - in the directory in which the BIND 9 source was extracted (for - instance, if BIND 9 is in \build\bind-9.16.0, the redistributable - may be placed in \build\vcredist_x86.exe). Or, the path to the file - can be specified via the VCREDIST_PATH environment variable, or via - the "with-vcredist=PATH" option to the configuration script (see - step 9). If none of these options is used, Configure will attempt to - find the redistributable based on clues in the build environment. - -Step 8: Configuring the BIND 9 build - - From the command prompt, cd to the win32utils directory under - the BIND 9 root: - - cd bind-9.16.0\win32utils - - In this directory, you can prepare the Windows build by running: - - perl Configure x64 - - This will set up all the files needed for building BIND 9 according - to the given options. To see the available options, run: - - perl Configure help - - To remove all files generated by Configure, run: - - perl Configure clean - -Step 9: Building BIND 9 - - Building using 'nmake' or older versions of Visual Studio - (e.g. VS 2005 or VS 2008) is no longer supported. - - Building with a version of Visual Studio newer than VS 2010 - requires the solution to first be upgraded by running: - - devenv bind9.sln /upgrade - - If the build host only has Visual Studio Build Tools available - and not a full Visual Studio installation, devenv.exe will not - be present. In that case, the Configure invocation from step 9 - must be extended with the following parameters set to values - matching the Visual Studio Build Tools version used: - - with-tools-version - with-platform-version - with-platform-toolset - - Example use for a 64-bit Visual Studio 2017 build: - - perl Configure ^ - with-tools-version=15.0 ^ - with-platform-toolset=v141 ^ - with-platform-version=10.0.17763.0 ^ - ... - x64 - - To build using the Visual Studio GUI in VS 2010 or newer: - open the bind9.sln solution file; this will load the project - files for all of the BIND 9 libraries and applications. Select - "Build->Batch Build", click "Select All", then click "Build". - - To build using MSBuild in VS 2010 or newer: call MSBuild on - the bind9.sln solution file: - - msbuild /t:Build /p:Configuration=Release bind9.sln - msbuild /t:Build /p:Configuration=Debug bind9.sln - - Note: This mode does not support building for Windows XP. - - After this step this documentation applies to external or remote - builds, i.e., is common with installation. - -Step 10: Install - - Installation is accomplished by running the BINDInstall program. All - DLL's are copied to the Program Files area and all applications - (including BINDInstall which may be necessary for uninstalling BIND - 9) to the bin directory. If BIND 8 has previously been installed on - the system it must be uninstalled first by running it's own - BINDInstall program. The BIND 9 installer does not yet do this. - - Note: BINDInstall.exe requires the MFC (Microsoft Foundation Class). - This is only distributed with non-free (i.e., not "Express") versions of - Visual Studio. The other BIND 9 libraries and applications do not have - this dependency. - - The very last version of BINDInstall uses two files created by - the Configure perl script: - - InstallFlags: 32/64 bit build, and/or should the redistributable - object be run. - - InstallFiles: the list of files to install with for each files - 4 flags (destination, importance, check version and part of tools). - The idea is to be able to use any BINDInstall.exe binary so - a non-free version of Visual Studio is no longer required. - -Please report bugs, whether in the process of building the application -or in BIND 9 itself, at https://gitlab.isc.org/isc-projects/bind9. diff --git a/win32utils/readme1st.txt b/win32utils/readme1st.txt deleted file mode 100644 index c8ba18e7e9..0000000000 --- a/win32utils/readme1st.txt +++ /dev/null @@ -1,145 +0,0 @@ -KIT INSTALLATION: - -Unpack the kit into any convenient directory and run the BINDInstall -program. This will install the named and associated programs into -the correct directories and set up the required registry keys. - -Usually BINDInstall must be run by/as Administrator or it can fail -to operate on the filesystem or the registry or even return messages -like "A referral was returned from the server". The best way to -avoid this kind of problems on Windows 7 or newer is: - - open a "Windows Explorer" window - - go where the distribution was extracted - - click right on the BINDInstall application - - open "Properties" (last) menu - - open "Compatibility" (second) tab - - check the (last) "Run this program as an administrator" box -Unfortunately this is not saved by zip (or any archiver?) as -it is a property saved in the Registry. - -BINDInstall requires that you install it under an account with -restricted privileges. The installer will prompt you for an account -name (the default is "named") and a password for that account. It -will also check for the existence of that account. If it does not -exist is will create it with only the privileges required to run -BIND 9. If the account does exist it will check that it has only the -one privilege required: "Log on as a service". If it has too many -privileges it will prompt you if you want to continue. - -With BIND 9 running under an account name, it is necessary for all -files and directories that BIND 9 uses to have permissions set up for -the named account if the files are on an NTFS disk. BIND 9 requires -that the account have read and write access to the directory for -the pid file, any files that are maintained either for slave zones -or for master zones supporting dynamic updates. The account will -also need read access to the named.conf and any other file that it -needs to read. - -"NT AUTHORITY\LocalService" is also an acceptable account -(and the only acceptable on some recent versions of Windows). -This account is built into Windows and no password is required. -Appropriate file permissions will also need to be set for "NT -AUTHORITY\LocalService" similar to those that would have been -required for the "named" account. - -It is important that on Windows the directory directive is used in -the options section to tell BIND 9 where to find the files used in -named.conf (default "%ProgramFiles%\ISC BIND 9\etc\named.conf"). For -example: - - options { - directory "C:\Program Files (x86)\ISC BIND 9\etc"; - }; - -for a 32 bit BIND 9 on a 64 bit US Domestic Windows system. -Messages are logged to the Application log in the EventViewer. - -CONTROLLING BIND 9: - -Windows uses the same rndc program as is used on Unix systems. The -rndc.conf file must be configured for your system in order to work. -You will need to generate a key for this. To do this use the -rndc-confgen program. The program will be installed in the same -directory as named: "%ProgramFiles%\ISC BIND 9\bin". From the DOS -prompt, use the command this way: - -rndc-confgen -a - -which will create a rndc.key file in the "%ProgramFiles%\ISC BIND 9\etc" -directory. This will allow you to run rndc without an explicit -rndc.conf file or key and control entry in named.conf file. See -the ARM for details of this. An rndc.conf can also be generated by -running: - -rndc-confgen > rndc.conf - -which will create the rndc.conf file in the current directory, but -not copy it to the "%ProgramFiles%\ISC BIND 9\etc" directory where -it needs to reside. If you create rndc.conf this way you will need -to copy the same key statement into named.conf. - -The additions look like the following: - -key "rndc-key" { algorithm hmac-sha256; secret "xxxxxxxxx=="; }; - -controls { - inet 127.0.0.1 port 953 allow { localhost; } keys { "rndc-key"; }; -}; - -Note that the value of the secret must come from the key generated -above for rndc and must be the same key value for both. Details of -this may be found in the ARM. If you have rndc on a Unix box you can -use it to control BIND 9 on the Windows box as well as using the Windows -version of rndc to control a BIND 9 daemon on a Unix box. However you -must have key statements valid for the servers you wish to control, -specifically the IP address and key in both named.conf and rndc.conf. -Again see the ARM for details. - -In order to run rndc from a different system it is important to -ensure that the clocks are synchronized. The clocks must be kept -within 5 minutes of each other or the rndc commands will fail -authentication. Use NTP or other time synchronization software to -keep your clocks accurate. NTP can be found at http://www.ntp.org/. - -In addition BIND 9 is installed as a win32 system service, can be -started and stopped in the same way as any other service and -automatically starts whenever the system is booted. Signals are not -supported and are in fact ignored. - -Note: Unlike most Windows applications, named does not change its -working directory when started as a service. If you wish to use -relative files in named.conf you will need to specify a working -directory using the directory directive options. - -DOCUMENTATION: - -This kit includes Documentation in HTML format. The documentation -is not copied during the installation process so you should move -it to any convenient location for later reference. Of particular -importance is the BIND 9 Administrator's Reference Manual (Bv9ARM*.html) -which provides detailed information on BIND 9. In addition, there -are HTML pages for each of the BIND 9 applications. - -IMPORTANT NOTE ON USING BIND 9 TOOLS: - -It is no longer necessary to create a resolv.conf file on Windows -as BIND 9 tools will look in the registry for the required name server -information. However, if you do create a resolv.conf file as follows, -the tools will use it in preference to the registry name server -entries. - -Place resolv.conf the "%ProgramFiles%\ISC BIND 9\etc" directory. -It must contain a list of recursive server addresses. The format -of this file is: - -nameserver 1.2.3.4 -nameserver 5.6.7.8 - -Replace the above IP addresses with the real name server addresses. -127.0.0.1 is a valid address if you are running a recursive name -server on the localhost. - -PROBLEMS: - -Please report bugs at https://gitlab.isc.org/isc-projects/bind9. -Other questions can go to the bind-users@isc.org mailing list. From 0b5f205b57166401ae5a1eb88aa6cde1e4857bf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Thu, 20 May 2021 16:05:11 +0200 Subject: [PATCH 2/2] Add CHANGES and release note for GL #2690 --- CHANGES | 2 ++ doc/notes/notes-current.rst | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 28b3edd3af..bce9191042 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,5 @@ +5654. [func] Windows support has been removed. [GL #2690] + 5653. [bug] Fixed a bug that caused the NSEC3 salt to be changed for KASP zones on restart. [GL #2725] diff --git a/doc/notes/notes-current.rst b/doc/notes/notes-current.rst index 92f0a693ed..520a61c7f8 100644 --- a/doc/notes/notes-current.rst +++ b/doc/notes/notes-current.rst @@ -39,7 +39,9 @@ New Features Removed Features ~~~~~~~~~~~~~~~~ -- None. +- Support for compiling and running BIND 9 natively on Windows has been + completely removed. The last release branch that has working Windows + support is BIND 9.16. :gl:`#2690` Feature Changes ~~~~~~~~~~~~~~~