changeset 487:d46effa10a19

Lazy update
author Aleksandr Rybalko <ray@ddteam.net>
date Wed, 25 Jul 2012 16:21:35 +0300
parents 03e1a37e8949
children 7449ca4973e7
files head/contrib/bind9/CHANGES head/contrib/bind9/README head/contrib/bind9/bin/named/builtin.c head/contrib/bind9/bin/named/query.c head/contrib/bind9/bin/named/server.c head/contrib/bind9/bin/named/unix/dlz_dlopen_driver.c head/contrib/bind9/lib/bind9/api head/contrib/bind9/lib/bind9/check.c head/contrib/bind9/lib/dns/api head/contrib/bind9/lib/dns/dnssec.c head/contrib/bind9/lib/dns/include/dns/ecdb.h head/contrib/bind9/lib/dns/include/dns/rpz.h head/contrib/bind9/lib/dns/include/dns/sdb.h head/contrib/bind9/lib/dns/include/dns/stats.h head/contrib/bind9/lib/dns/include/dns/tsec.h head/contrib/bind9/lib/dns/include/dns/view.h head/contrib/bind9/lib/dns/rbtdb.c head/contrib/bind9/lib/dns/rdata.c head/contrib/bind9/lib/dns/rdata/generic/tlsa_52.c head/contrib/bind9/lib/dns/rdata/generic/tlsa_52.h head/contrib/bind9/lib/dns/rdataslab.c head/contrib/bind9/lib/dns/resolver.c head/contrib/bind9/lib/dns/sdb.c head/contrib/bind9/lib/dns/tkey.c head/contrib/bind9/lib/dns/zone.c head/contrib/bind9/lib/isc/pthreads/mutex.c head/contrib/bind9/lib/isccfg/api head/contrib/bind9/lib/isccfg/parser.c head/contrib/bind9/version head/contrib/binutils/gas/config/tc-i386.c head/contrib/binutils/ld/emultempl/ppc32elf.em head/contrib/binutils/opcodes/i386-dis.c head/contrib/binutils/opcodes/i386-opc.h head/contrib/binutils/opcodes/i386-opc.tbl head/contrib/binutils/opcodes/i386-tbl.h head/contrib/bsnmp/lib/bsnmpclient.3 head/contrib/bsnmp/lib/bsnmplib.3 head/contrib/bsnmp/snmp_mibII/mibII_tcp.c head/contrib/bsnmp/snmp_target/snmp_target.3 head/contrib/bsnmp/snmp_usm/snmp_usm.3 head/contrib/bsnmp/snmp_vacm/snmp_vacm.3 head/contrib/byacc/ACKNOWLEDGEMENTS head/contrib/byacc/AUTHORS head/contrib/byacc/CHANGES head/contrib/byacc/Makefile.old head/contrib/byacc/NEW_FEATURES head/contrib/byacc/NOTES head/contrib/byacc/NO_WARRANTY head/contrib/byacc/README head/contrib/byacc/VERSION head/contrib/byacc/aclocal.m4 head/contrib/byacc/closure.c head/contrib/byacc/config.guess head/contrib/byacc/config.sub head/contrib/byacc/config_h.in head/contrib/byacc/configure head/contrib/byacc/configure.in head/contrib/byacc/defs.h head/contrib/byacc/descrip.mms head/contrib/byacc/error.c head/contrib/byacc/graph.c head/contrib/byacc/install-sh head/contrib/byacc/lalr.c head/contrib/byacc/lr0.c head/contrib/byacc/main.c head/contrib/byacc/makefile.in head/contrib/byacc/mkpar.c head/contrib/byacc/output.c head/contrib/byacc/package/byacc.spec head/contrib/byacc/package/debian/changelog head/contrib/byacc/package/debian/compat head/contrib/byacc/package/debian/control head/contrib/byacc/package/debian/copyright head/contrib/byacc/package/debian/docs head/contrib/byacc/package/debian/postinst head/contrib/byacc/package/debian/prerm head/contrib/byacc/package/debian/rules head/contrib/byacc/package/debian/source/format head/contrib/byacc/package/debian/watch head/contrib/byacc/package/pkgsrc/DESCR head/contrib/byacc/package/pkgsrc/Makefile head/contrib/byacc/package/pkgsrc/PLIST head/contrib/byacc/package/pkgsrc/distinfo head/contrib/byacc/reader.c head/contrib/byacc/skeleton.c head/contrib/byacc/symtab.c head/contrib/byacc/test/README head/contrib/byacc/test/calc.output head/contrib/byacc/test/calc.tab.c head/contrib/byacc/test/calc.tab.h head/contrib/byacc/test/calc.y head/contrib/byacc/test/calc1.output head/contrib/byacc/test/calc1.tab.c head/contrib/byacc/test/calc1.tab.h head/contrib/byacc/test/calc1.y head/contrib/byacc/test/calc2.output head/contrib/byacc/test/calc2.tab.c head/contrib/byacc/test/calc2.tab.h head/contrib/byacc/test/calc2.y head/contrib/byacc/test/calc3.output head/contrib/byacc/test/calc3.tab.c head/contrib/byacc/test/calc3.tab.h head/contrib/byacc/test/calc3.y head/contrib/byacc/test/code_calc.code.c head/contrib/byacc/test/code_calc.output head/contrib/byacc/test/code_calc.tab.c head/contrib/byacc/test/code_calc.tab.h head/contrib/byacc/test/code_calc.y head/contrib/byacc/test/code_error.code.c head/contrib/byacc/test/code_error.output head/contrib/byacc/test/code_error.tab.c head/contrib/byacc/test/code_error.tab.h head/contrib/byacc/test/code_error.y head/contrib/byacc/test/error.output head/contrib/byacc/test/error.tab.c head/contrib/byacc/test/error.tab.h head/contrib/byacc/test/error.y head/contrib/byacc/test/ftp.output head/contrib/byacc/test/ftp.tab.c head/contrib/byacc/test/ftp.tab.h head/contrib/byacc/test/ftp.y head/contrib/byacc/test/grammar.output head/contrib/byacc/test/grammar.tab.c head/contrib/byacc/test/grammar.tab.h head/contrib/byacc/test/grammar.y head/contrib/byacc/test/pure_calc.output head/contrib/byacc/test/pure_calc.tab.c head/contrib/byacc/test/pure_calc.tab.h head/contrib/byacc/test/pure_calc.y head/contrib/byacc/test/pure_error.output head/contrib/byacc/test/pure_error.tab.c head/contrib/byacc/test/pure_error.tab.h head/contrib/byacc/test/pure_error.y head/contrib/byacc/test/quote_calc-s.output head/contrib/byacc/test/quote_calc-s.tab.c head/contrib/byacc/test/quote_calc-s.tab.h head/contrib/byacc/test/quote_calc.output head/contrib/byacc/test/quote_calc.tab.c head/contrib/byacc/test/quote_calc.tab.h head/contrib/byacc/test/quote_calc.y head/contrib/byacc/test/quote_calc2-s.output head/contrib/byacc/test/quote_calc2-s.tab.c head/contrib/byacc/test/quote_calc2-s.tab.h head/contrib/byacc/test/quote_calc2.output head/contrib/byacc/test/quote_calc2.tab.c head/contrib/byacc/test/quote_calc2.tab.h head/contrib/byacc/test/quote_calc2.y head/contrib/byacc/test/quote_calc3-s.output head/contrib/byacc/test/quote_calc3-s.tab.c head/contrib/byacc/test/quote_calc3-s.tab.h head/contrib/byacc/test/quote_calc3.output head/contrib/byacc/test/quote_calc3.tab.c head/contrib/byacc/test/quote_calc3.tab.h head/contrib/byacc/test/quote_calc3.y head/contrib/byacc/test/quote_calc4-s.output head/contrib/byacc/test/quote_calc4-s.tab.c head/contrib/byacc/test/quote_calc4-s.tab.h head/contrib/byacc/test/quote_calc4.output head/contrib/byacc/test/quote_calc4.tab.c head/contrib/byacc/test/quote_calc4.tab.h head/contrib/byacc/test/quote_calc4.y head/contrib/byacc/test/run_lint.sh head/contrib/byacc/test/run_make.sh head/contrib/byacc/test/run_test.sh head/contrib/byacc/verbose.c head/contrib/byacc/vmsbuild.com head/contrib/byacc/warshall.c head/contrib/byacc/yacc.1 head/contrib/com_err/com_err.3 head/contrib/compiler-rt/lib/sparc64/divmod.m4 head/contrib/compiler-rt/lib/sparc64/divsi3.S head/contrib/compiler-rt/lib/sparc64/modsi3.S head/contrib/dtc/Documentation/dts-format.txt head/contrib/dtc/Documentation/manual.txt head/contrib/dtc/Makefile head/contrib/dtc/Makefile.convert-dtsv0 head/contrib/dtc/Makefile.ftdump head/contrib/dtc/checks.c head/contrib/dtc/convert-dtsv0-lexer.l head/contrib/dtc/data.c head/contrib/dtc/dtc-lexer.l head/contrib/dtc/dtc-parser.y head/contrib/dtc/dtc.c head/contrib/dtc/dtc.h head/contrib/dtc/dtdiff head/contrib/dtc/fdtdump.c head/contrib/dtc/fdtget.c head/contrib/dtc/fdtput.c head/contrib/dtc/flattree.c head/contrib/dtc/fstree.c head/contrib/dtc/ftdump.c head/contrib/dtc/libfdt/Makefile.libfdt head/contrib/dtc/libfdt/fdt.c head/contrib/dtc/libfdt/fdt_empty_tree.c head/contrib/dtc/libfdt/fdt_ro.c head/contrib/dtc/libfdt/fdt_rw.c head/contrib/dtc/libfdt/libfdt.h head/contrib/dtc/libfdt/libfdt_env.h head/contrib/dtc/libfdt/libfdt_internal.h head/contrib/dtc/livetree.c head/contrib/dtc/srcpos.c head/contrib/dtc/srcpos.h head/contrib/dtc/treesource.c head/contrib/dtc/util.c head/contrib/dtc/util.h head/contrib/gcc/ChangeLog.gcc43 head/contrib/gcc/config/arm/freebsd.h head/contrib/gcc/config/i386/freebsd.h head/contrib/gcc/config/i386/freebsd64.h head/contrib/gcc/config/ia64/freebsd.h head/contrib/gcc/config/mips/freebsd.h head/contrib/gcc/config/rs6000/freebsd.h head/contrib/gcc/config/rs6000/rs6000.md head/contrib/gcc/config/sparc/freebsd.h head/contrib/gcc/config/sparc/sparc.md head/contrib/gcc/cse.c head/contrib/gcc/expr.c head/contrib/gcc/fold-const.c head/contrib/gcc/gimplify.c head/contrib/gcc/ipa-pure-const.c head/contrib/gcc/ipa-utils.c head/contrib/gcc/rtl.h head/contrib/gcc/tree-ssa-ccp.c head/contrib/gcc/tree-ssa-pre.c head/contrib/gcc/var-tracking.c head/contrib/gcc/varasm.c head/contrib/groff/tmac/doc-common head/contrib/jemalloc/ChangeLog head/contrib/jemalloc/FREEBSD-Xlist head/contrib/jemalloc/FREEBSD-diffs head/contrib/jemalloc/FREEBSD-upgrade head/contrib/jemalloc/VERSION head/contrib/jemalloc/doc/jemalloc.3 head/contrib/jemalloc/include/jemalloc/internal/arena.h head/contrib/jemalloc/include/jemalloc/internal/atomic.h head/contrib/jemalloc/include/jemalloc/internal/chunk.h head/contrib/jemalloc/include/jemalloc/internal/chunk_mmap.h head/contrib/jemalloc/include/jemalloc/internal/ctl.h head/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal.h head/contrib/jemalloc/include/jemalloc/internal/mutex.h head/contrib/jemalloc/include/jemalloc/internal/private_namespace.h head/contrib/jemalloc/include/jemalloc/internal/prof.h head/contrib/jemalloc/include/jemalloc/internal/tcache.h head/contrib/jemalloc/include/jemalloc/internal/tsd.h head/contrib/jemalloc/include/jemalloc/internal/util.h head/contrib/jemalloc/include/jemalloc/jemalloc.h head/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h head/contrib/jemalloc/include/jemalloc/jemalloc_defs.h head/contrib/jemalloc/src/arena.c head/contrib/jemalloc/src/chunk.c head/contrib/jemalloc/src/chunk_dss.c head/contrib/jemalloc/src/chunk_mmap.c head/contrib/jemalloc/src/ctl.c head/contrib/jemalloc/src/huge.c head/contrib/jemalloc/src/jemalloc.c head/contrib/jemalloc/src/mutex.c head/contrib/jemalloc/src/prof.c head/contrib/jemalloc/src/quarantine.c head/contrib/jemalloc/src/stats.c head/contrib/jemalloc/src/tcache.c head/contrib/jemalloc/src/tsd.c head/contrib/jemalloc/src/util.c head/contrib/less/LICENSE head/contrib/less/Makefile.aut head/contrib/less/NEWS head/contrib/less/README head/contrib/less/brac.c head/contrib/less/ch.c head/contrib/less/charset.c head/contrib/less/charset.h head/contrib/less/cmd.h head/contrib/less/cmdbuf.c head/contrib/less/command.c head/contrib/less/configure head/contrib/less/configure.ac head/contrib/less/cvt.c head/contrib/less/decode.c head/contrib/less/defines.ds head/contrib/less/defines.h.in head/contrib/less/defines.o2 head/contrib/less/defines.o9 head/contrib/less/defines.wn head/contrib/less/edit.c head/contrib/less/filename.c head/contrib/less/forwback.c head/contrib/less/funcs.h head/contrib/less/help.c head/contrib/less/ifile.c head/contrib/less/input.c head/contrib/less/jump.c head/contrib/less/less.h head/contrib/less/less.hlp head/contrib/less/less.man head/contrib/less/less.nro head/contrib/less/lessecho.c head/contrib/less/lessecho.man head/contrib/less/lessecho.nro head/contrib/less/lesskey.c head/contrib/less/lesskey.h head/contrib/less/lesskey.man head/contrib/less/lesskey.nro head/contrib/less/lglob.h head/contrib/less/line.c head/contrib/less/linenum.c head/contrib/less/lsystem.c head/contrib/less/main.c head/contrib/less/mark.c head/contrib/less/mkhelp.c head/contrib/less/optfunc.c head/contrib/less/option.c head/contrib/less/option.h head/contrib/less/opttbl.c head/contrib/less/os.c head/contrib/less/output.c head/contrib/less/pattern.c head/contrib/less/pattern.h head/contrib/less/pckeys.h head/contrib/less/position.c head/contrib/less/position.h head/contrib/less/prompt.c head/contrib/less/screen.c head/contrib/less/scrsize.c head/contrib/less/search.c head/contrib/less/signal.c head/contrib/less/tags.c head/contrib/less/ttyin.c head/contrib/less/version.c head/contrib/libc++/include/__bit_reference head/contrib/libc++/include/__config head/contrib/libc++/include/__tuple head/contrib/libc++/include/algorithm head/contrib/libc++/include/atomic head/contrib/libc++/include/cmath head/contrib/libc++/include/limits head/contrib/libc++/include/memory head/contrib/libc++/include/random head/contrib/libc++/include/system_error head/contrib/libc++/include/tuple head/contrib/libc++/include/type_traits head/contrib/libc++/include/utility head/contrib/libc++/src/iostream.cpp head/contrib/libc++/src/stdexcept.cpp head/contrib/libc++/src/utility.cpp head/contrib/libpcap/CHANGES head/contrib/libpcap/CREDITS head/contrib/libpcap/Makefile.in head/contrib/libpcap/README head/contrib/libpcap/VERSION head/contrib/libpcap/bpf/net/bpf_filter.c head/contrib/libpcap/config.h.in head/contrib/libpcap/configure head/contrib/libpcap/configure.in head/contrib/libpcap/ethertype.h head/contrib/libpcap/fad-getad.c head/contrib/libpcap/filtertest.c head/contrib/libpcap/findalldevstest.c head/contrib/libpcap/gencode.c head/contrib/libpcap/gencode.h head/contrib/libpcap/grammar.y head/contrib/libpcap/inet.c head/contrib/libpcap/opentest.c head/contrib/libpcap/packaging/pcap.spec.in head/contrib/libpcap/pcap-bpf.c head/contrib/libpcap/pcap-bt-linux.c head/contrib/libpcap/pcap-common.c head/contrib/libpcap/pcap-config.in head/contrib/libpcap/pcap-dag.c head/contrib/libpcap/pcap-dlpi.c head/contrib/libpcap/pcap-filter.manmisc head/contrib/libpcap/pcap-filter.manmisc.in head/contrib/libpcap/pcap-int.h head/contrib/libpcap/pcap-libdlpi.c head/contrib/libpcap/pcap-linktype.manmisc head/contrib/libpcap/pcap-linktype.manmisc.in head/contrib/libpcap/pcap-linux.c head/contrib/libpcap/pcap-netfilter-linux.c head/contrib/libpcap/pcap-netfilter-linux.h head/contrib/libpcap/pcap-savefile.manfile head/contrib/libpcap/pcap-stdinc.h head/contrib/libpcap/pcap-tstamp.manmisc head/contrib/libpcap/pcap-tstamp.manmisc.in head/contrib/libpcap/pcap-usb-linux.c head/contrib/libpcap/pcap-win32.c head/contrib/libpcap/pcap.3pcap head/contrib/libpcap/pcap.3pcap.in head/contrib/libpcap/pcap.c head/contrib/libpcap/pcap/bpf.h head/contrib/libpcap/pcap/pcap.h head/contrib/libpcap/pcap_activate.3pcap head/contrib/libpcap/pcap_can_set_rfmon.3pcap head/contrib/libpcap/pcap_compile.3pcap head/contrib/libpcap/pcap_compile.3pcap.in head/contrib/libpcap/pcap_datalink.3pcap head/contrib/libpcap/pcap_datalink.3pcap.in head/contrib/libpcap/pcap_datalink_name_to_val.3pcap head/contrib/libpcap/pcap_datalink_val_to_name.3pcap head/contrib/libpcap/pcap_dump_open.3pcap head/contrib/libpcap/pcap_fileno.3pcap head/contrib/libpcap/pcap_findalldevs.3pcap head/contrib/libpcap/pcap_free_datalinks.3pcap head/contrib/libpcap/pcap_freealldevs.3pcap head/contrib/libpcap/pcap_get_selectable_fd.3pcap head/contrib/libpcap/pcap_list_datalinks.3pcap head/contrib/libpcap/pcap_list_datalinks.3pcap.in head/contrib/libpcap/pcap_list_tstamp_types.3pcap head/contrib/libpcap/pcap_list_tstamp_types.3pcap.in head/contrib/libpcap/pcap_loop.3pcap head/contrib/libpcap/pcap_major_version.3pcap head/contrib/libpcap/pcap_next_ex.3pcap head/contrib/libpcap/pcap_open_dead.3pcap head/contrib/libpcap/pcap_open_live.3pcap head/contrib/libpcap/pcap_open_offline.3pcap head/contrib/libpcap/pcap_set_datalink.3pcap head/contrib/libpcap/pcap_set_tstamp_type.3pcap head/contrib/libpcap/pcap_set_tstamp_type.3pcap.in head/contrib/libpcap/pcap_tstamp_type_name_to_val.3pcap head/contrib/libpcap/pcap_tstamp_type_val_to_name.3pcap head/contrib/libpcap/savefile.c head/contrib/libpcap/scanner.l head/contrib/libpcap/selpolltest.c head/contrib/libpcap/sf-pcap-ng.c head/contrib/libpcap/sf-pcap.c head/contrib/libpcap/test/filtertest.c head/contrib/libpcap/test/findalldevstest.c head/contrib/libpcap/test/nonblocktest.c head/contrib/libpcap/test/opentest.c head/contrib/libpcap/test/reactivatetest.c head/contrib/libpcap/test/selpolltest.c head/contrib/libstdc++/include/bits/locale_facets.tcc head/contrib/libstdc++/include/bits/stl_bvector.h head/contrib/libstdc++/include/bits/stl_deque.h head/contrib/libstdc++/include/bits/stl_list.h head/contrib/libstdc++/include/bits/stl_map.h head/contrib/libstdc++/include/bits/stl_multimap.h head/contrib/libstdc++/include/bits/stl_multiset.h head/contrib/libstdc++/include/bits/stl_set.h head/contrib/libstdc++/include/bits/stl_tree.h head/contrib/libstdc++/include/bits/stl_vector.h head/contrib/llvm/include/llvm-c/lto.h head/contrib/llvm/include/llvm/ADT/SmallPtrSet.h head/contrib/llvm/include/llvm/ADT/StringMap.h head/contrib/llvm/include/llvm/CodeGen/DFAPacketizer.h head/contrib/llvm/include/llvm/CodeGen/Passes.h head/contrib/llvm/include/llvm/CodeGen/ScheduleDAGInstrs.h head/contrib/llvm/include/llvm/CodeGen/SlotIndexes.h head/contrib/llvm/include/llvm/IntrinsicsX86.td head/contrib/llvm/include/llvm/LLVMContext.h head/contrib/llvm/include/llvm/MC/MCParser/AsmLexer.h head/contrib/llvm/include/llvm/MC/MCParser/MCAsmLexer.h head/contrib/llvm/include/llvm/Object/ELF.h head/contrib/llvm/include/llvm/Operator.h head/contrib/llvm/include/llvm/Support/FileSystem.h head/contrib/llvm/include/llvm/Support/IRBuilder.h head/contrib/llvm/include/llvm/Support/JSONParser.h head/contrib/llvm/include/llvm/Support/Locale.h head/contrib/llvm/include/llvm/Support/MDBuilder.h head/contrib/llvm/include/llvm/Support/Process.h head/contrib/llvm/include/llvm/Support/SourceMgr.h head/contrib/llvm/include/llvm/Support/YAMLParser.h head/contrib/llvm/include/llvm/Support/raw_ostream.h head/contrib/llvm/include/llvm/TableGen/Error.h head/contrib/llvm/include/llvm/TableGen/Record.h head/contrib/llvm/include/llvm/Target/TargetLibraryInfo.h head/contrib/llvm/include/llvm/Target/TargetRegisterInfo.h head/contrib/llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h head/contrib/llvm/include/llvm/Transforms/Vectorize.h head/contrib/llvm/lib/Analysis/ConstantFolding.cpp head/contrib/llvm/lib/Analysis/ScalarEvolution.cpp head/contrib/llvm/lib/Analysis/ValueTracking.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfAccelTable.h head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp head/contrib/llvm/lib/CodeGen/DFAPacketizer.cpp head/contrib/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp head/contrib/llvm/lib/CodeGen/MachineBasicBlock.cpp head/contrib/llvm/lib/CodeGen/MachineBlockPlacement.cpp head/contrib/llvm/lib/CodeGen/Passes.cpp head/contrib/llvm/lib/CodeGen/ScheduleDAGInstrs.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp head/contrib/llvm/lib/CodeGen/SlotIndexes.cpp head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/GDBRegistrar.cpp head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/JITRegistrar.h head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/ObjectImage.h head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h head/contrib/llvm/lib/MC/MCParser/AsmParser.cpp head/contrib/llvm/lib/Object/ELFObjectFile.cpp head/contrib/llvm/lib/Support/JSONParser.cpp head/contrib/llvm/lib/Support/Locale.cpp head/contrib/llvm/lib/Support/LocaleGeneric.inc head/contrib/llvm/lib/Support/LocaleWindows.inc head/contrib/llvm/lib/Support/LocaleXlocale.inc head/contrib/llvm/lib/Support/Memory.cpp head/contrib/llvm/lib/Support/SmallPtrSet.cpp head/contrib/llvm/lib/Support/SourceMgr.cpp head/contrib/llvm/lib/Support/Unix/PathV2.inc head/contrib/llvm/lib/Support/Unix/Process.inc head/contrib/llvm/lib/Support/Windows/PathV2.inc head/contrib/llvm/lib/Support/Windows/Process.inc head/contrib/llvm/lib/Support/YAMLParser.cpp head/contrib/llvm/lib/Support/raw_ostream.cpp head/contrib/llvm/lib/TableGen/Error.cpp head/contrib/llvm/lib/Target/ARM/ARMCallingConv.td head/contrib/llvm/lib/Target/ARM/ARMInstrFormats.td head/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td head/contrib/llvm/lib/Target/ARM/ARMInstrNEON.td head/contrib/llvm/lib/Target/ARM/ARMTargetMachine.cpp head/contrib/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp head/contrib/llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp head/contrib/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp head/contrib/llvm/lib/Target/CellSPU/SPUCallingConv.td head/contrib/llvm/lib/Target/CellSPU/SPUTargetMachine.cpp head/contrib/llvm/lib/Target/Hexagon/Hexagon.h head/contrib/llvm/lib/Target/Hexagon/HexagonAsmPrinter.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonISelLowering.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonInstrFormats.td head/contrib/llvm/lib/Target/Hexagon/HexagonInstrFormatsV4.td head/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfo.h head/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfo.td head/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfoV3.td head/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfoV4.td head/contrib/llvm/lib/Target/Hexagon/HexagonMCInst.h head/contrib/llvm/lib/Target/Hexagon/HexagonMCInstLower.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonSchedule.td head/contrib/llvm/lib/Target/Hexagon/HexagonScheduleV4.td head/contrib/llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp head/contrib/llvm/lib/Target/Hexagon/InstPrinter/HexagonInstPrinter.cpp head/contrib/llvm/lib/Target/Hexagon/InstPrinter/HexagonInstPrinter.h head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonBaseInfo.h head/contrib/llvm/lib/Target/MBlaze/MBlazeCallingConv.td head/contrib/llvm/lib/Target/MBlaze/MBlazeTargetMachine.cpp head/contrib/llvm/lib/Target/MSP430/MSP430TargetMachine.cpp head/contrib/llvm/lib/Target/Mips/Disassembler/MipsDisassembler.cpp head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp head/contrib/llvm/lib/Target/Mips/Mips64InstrInfo.td head/contrib/llvm/lib/Target/Mips/MipsCondMov.td head/contrib/llvm/lib/Target/Mips/MipsISelLowering.cpp head/contrib/llvm/lib/Target/Mips/MipsInstrFPU.td head/contrib/llvm/lib/Target/Mips/MipsInstrFormats.td head/contrib/llvm/lib/Target/Mips/MipsInstrInfo.td head/contrib/llvm/lib/Target/Mips/MipsTargetMachine.cpp head/contrib/llvm/lib/Target/PTX/PTXTargetMachine.cpp head/contrib/llvm/lib/Target/PowerPC/PPCCallingConv.td head/contrib/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp head/contrib/llvm/lib/Target/Sparc/SparcTargetMachine.cpp head/contrib/llvm/lib/Target/TargetLibraryInfo.cpp head/contrib/llvm/lib/Target/X86/Utils/X86ShuffleDecode.cpp head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp head/contrib/llvm/lib/Target/X86/X86ISelLowering.h head/contrib/llvm/lib/Target/X86/X86InstrFragmentsSIMD.td head/contrib/llvm/lib/Target/X86/X86InstrInfo.cpp head/contrib/llvm/lib/Target/X86/X86InstrSSE.td head/contrib/llvm/lib/Target/X86/X86Subtarget.cpp head/contrib/llvm/lib/Target/X86/X86TargetMachine.cpp head/contrib/llvm/lib/Target/XCore/XCoreTargetMachine.cpp head/contrib/llvm/lib/Transforms/IPO/Internalize.cpp head/contrib/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp head/contrib/llvm/lib/Transforms/Scalar/ObjCARC.cpp head/contrib/llvm/lib/Transforms/Scalar/Reassociate.cpp head/contrib/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp head/contrib/llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp head/contrib/llvm/lib/Transforms/Vectorize/BBVectorize.cpp head/contrib/llvm/lib/VMCore/AutoUpgrade.cpp head/contrib/llvm/lib/VMCore/Instructions.cpp head/contrib/llvm/lib/VMCore/LLVMContext.cpp head/contrib/llvm/lib/VMCore/Module.cpp head/contrib/llvm/lib/VMCore/Verifier.cpp head/contrib/llvm/tools/bugpoint/ToolRunner.cpp head/contrib/llvm/tools/clang/include/clang/AST/Decl.h head/contrib/llvm/tools/clang/include/clang/AST/DeclBase.h head/contrib/llvm/tools/clang/include/clang/AST/DeclLookups.h head/contrib/llvm/tools/clang/include/clang/AST/Expr.h head/contrib/llvm/tools/clang/include/clang/AST/ExternalASTSource.h head/contrib/llvm/tools/clang/include/clang/AST/RecursiveASTVisitor.h head/contrib/llvm/tools/clang/include/clang/AST/Stmt.h head/contrib/llvm/tools/clang/include/clang/AST/Type.h head/contrib/llvm/tools/clang/include/clang/AST/VTableBuilder.h head/contrib/llvm/tools/clang/include/clang/Analysis/ProgramPoint.h head/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsX86.def head/contrib/llvm/tools/clang/include/clang/Basic/ConvertUTF.h head/contrib/llvm/tools/clang/include/clang/Basic/DelayedCleanupPool.h head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/ExceptionSpecificationType.h head/contrib/llvm/tools/clang/include/clang/Basic/OnDiskHashTable.h head/contrib/llvm/tools/clang/include/clang/Basic/StmtNodes.td head/contrib/llvm/tools/clang/include/clang/Basic/TargetInfo.h head/contrib/llvm/tools/clang/include/clang/Driver/CC1Options.td head/contrib/llvm/tools/clang/include/clang/Driver/Compilation.h head/contrib/llvm/tools/clang/include/clang/Frontend/ASTUnit.h head/contrib/llvm/tools/clang/include/clang/Frontend/FrontendActions.h head/contrib/llvm/tools/clang/include/clang/Frontend/FrontendOptions.h head/contrib/llvm/tools/clang/include/clang/Frontend/TextDiagnostic.h head/contrib/llvm/tools/clang/include/clang/Index/ASTLocation.h head/contrib/llvm/tools/clang/include/clang/Index/Analyzer.h head/contrib/llvm/tools/clang/include/clang/Index/DeclReferenceMap.h head/contrib/llvm/tools/clang/include/clang/Index/Entity.h head/contrib/llvm/tools/clang/include/clang/Index/GlobalCallGraph.h head/contrib/llvm/tools/clang/include/clang/Index/GlobalSelector.h head/contrib/llvm/tools/clang/include/clang/Index/Handlers.h head/contrib/llvm/tools/clang/include/clang/Index/IndexProvider.h head/contrib/llvm/tools/clang/include/clang/Index/Indexer.h head/contrib/llvm/tools/clang/include/clang/Index/Program.h head/contrib/llvm/tools/clang/include/clang/Index/STLExtras.h head/contrib/llvm/tools/clang/include/clang/Index/SelectorMap.h head/contrib/llvm/tools/clang/include/clang/Index/TranslationUnit.h head/contrib/llvm/tools/clang/include/clang/Parse/Parser.h head/contrib/llvm/tools/clang/include/clang/Sema/Initialization.h head/contrib/llvm/tools/clang/include/clang/Sema/ParsedTemplate.h head/contrib/llvm/tools/clang/include/clang/Sema/Scope.h head/contrib/llvm/tools/clang/include/clang/Sema/Sema.h head/contrib/llvm/tools/clang/include/clang/Serialization/ASTBitCodes.h head/contrib/llvm/tools/clang/include/clang/Serialization/ASTReader.h head/contrib/llvm/tools/clang/include/clang/Serialization/ASTWriter.h head/contrib/llvm/tools/clang/include/clang/Serialization/Module.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h head/contrib/llvm/tools/clang/include/clang/Tooling/CompilationDatabase.h head/contrib/llvm/tools/clang/lib/AST/ASTContext.cpp head/contrib/llvm/tools/clang/lib/AST/Decl.cpp head/contrib/llvm/tools/clang/lib/AST/Expr.cpp head/contrib/llvm/tools/clang/lib/AST/ExprConstant.cpp head/contrib/llvm/tools/clang/lib/AST/ExternalASTSource.cpp head/contrib/llvm/tools/clang/lib/AST/ItaniumMangle.cpp head/contrib/llvm/tools/clang/lib/AST/Stmt.cpp head/contrib/llvm/tools/clang/lib/AST/StmtPrinter.cpp head/contrib/llvm/tools/clang/lib/AST/StmtProfile.cpp head/contrib/llvm/tools/clang/lib/AST/Type.cpp head/contrib/llvm/tools/clang/lib/AST/VTableBuilder.cpp head/contrib/llvm/tools/clang/lib/Analysis/CFG.cpp head/contrib/llvm/tools/clang/lib/Analysis/UninitializedValues.cpp head/contrib/llvm/tools/clang/lib/Basic/TargetInfo.cpp head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp head/contrib/llvm/tools/clang/lib/Basic/Version.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGBlocks.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGCall.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGClass.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGDecl.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGExpr.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGExprAgg.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGExprCXX.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGExprConstant.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGStmt.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenFunction.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenFunction.h head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTBAA.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTBAA.h head/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.cpp head/contrib/llvm/tools/clang/lib/Driver/Compilation.cpp head/contrib/llvm/tools/clang/lib/Driver/Driver.cpp head/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp head/contrib/llvm/tools/clang/lib/Frontend/ASTUnit.cpp head/contrib/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp head/contrib/llvm/tools/clang/lib/Frontend/CompilerInvocation.cpp head/contrib/llvm/tools/clang/lib/Frontend/FrontendActions.cpp head/contrib/llvm/tools/clang/lib/Frontend/InitHeaderSearch.cpp head/contrib/llvm/tools/clang/lib/Frontend/TextDiagnostic.cpp head/contrib/llvm/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp head/contrib/llvm/tools/clang/lib/Headers/avx2intrin.h head/contrib/llvm/tools/clang/lib/Headers/avxintrin.h head/contrib/llvm/tools/clang/lib/Index/ASTLocation.cpp head/contrib/llvm/tools/clang/lib/Index/ASTVisitor.h head/contrib/llvm/tools/clang/lib/Index/Analyzer.cpp head/contrib/llvm/tools/clang/lib/Index/DeclReferenceMap.cpp head/contrib/llvm/tools/clang/lib/Index/Entity.cpp head/contrib/llvm/tools/clang/lib/Index/EntityImpl.h head/contrib/llvm/tools/clang/lib/Index/GlobalCallGraph.cpp head/contrib/llvm/tools/clang/lib/Index/GlobalSelector.cpp head/contrib/llvm/tools/clang/lib/Index/Handlers.cpp head/contrib/llvm/tools/clang/lib/Index/IndexProvider.cpp head/contrib/llvm/tools/clang/lib/Index/Indexer.cpp head/contrib/llvm/tools/clang/lib/Index/Program.cpp head/contrib/llvm/tools/clang/lib/Index/ProgramImpl.h head/contrib/llvm/tools/clang/lib/Index/SelectorMap.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseCXXInlineMethods.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseDecl.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseDeclCXX.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseExpr.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseExprCXX.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseStmt.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseTemplate.cpp head/contrib/llvm/tools/clang/lib/Parse/Parser.cpp head/contrib/llvm/tools/clang/lib/Rewrite/RewriteModernObjC.cpp head/contrib/llvm/tools/clang/lib/Rewrite/RewriteRope.cpp head/contrib/llvm/tools/clang/lib/Sema/Sema.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaAccess.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaDeclCXX.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaExceptionSpec.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaExpr.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaExprCXX.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaExprMember.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaLookup.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaOverload.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaPseudoObject.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaStmt.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaStmtAttr.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaTemplate.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaTemplateDeduction.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaTemplateInstantiate.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaType.cpp head/contrib/llvm/tools/clang/lib/Sema/TreeTransform.h head/contrib/llvm/tools/clang/lib/Serialization/ASTReader.cpp head/contrib/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp head/contrib/llvm/tools/clang/lib/Serialization/ASTReaderInternals.h head/contrib/llvm/tools/clang/lib/Serialization/ASTReaderStmt.cpp head/contrib/llvm/tools/clang/lib/Serialization/ASTWriter.cpp head/contrib/llvm/tools/clang/lib/Serialization/ASTWriterDecl.cpp head/contrib/llvm/tools/clang/lib/Serialization/ASTWriterStmt.cpp head/contrib/llvm/tools/clang/lib/Serialization/Module.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCSelfInitChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/AnalysisManager.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp head/contrib/llvm/tools/clang/lib/Tooling/CompilationDatabase.cpp head/contrib/llvm/tools/llc/llc.cpp head/contrib/llvm/tools/lli/lli.cpp head/contrib/llvm/tools/llvm-mc/Disassembler.cpp head/contrib/llvm/tools/llvm-mc/Disassembler.h head/contrib/llvm/tools/llvm-mc/llvm-mc.cpp head/contrib/llvm/tools/llvm-stress/llvm-stress.cpp head/contrib/llvm/tools/opt/opt.cpp head/contrib/llvm/utils/TableGen/AsmMatcherEmitter.cpp head/contrib/llvm/utils/TableGen/AsmWriterEmitter.cpp head/contrib/llvm/utils/TableGen/CodeGenDAGPatterns.cpp head/contrib/llvm/utils/TableGen/CodeGenRegisters.cpp head/contrib/llvm/utils/TableGen/EDEmitter.cpp head/contrib/llvm/utils/TableGen/RegisterInfoEmitter.cpp head/contrib/ncurses/man/curs_threads.3x head/contrib/netcat/FREEBSD-vendor head/contrib/netcat/nc.1 head/contrib/netcat/netcat.c head/contrib/openpam/CREDITS head/contrib/openpam/HISTORY head/contrib/openpam/LICENSE head/contrib/openpam/Makefile.am head/contrib/openpam/Makefile.in head/contrib/openpam/RELNOTES head/contrib/openpam/TODO head/contrib/openpam/aclocal.m4 head/contrib/openpam/bin/Makefile.am head/contrib/openpam/bin/Makefile.in head/contrib/openpam/bin/openpam_dump_policy/Makefile.am head/contrib/openpam/bin/openpam_dump_policy/Makefile.in head/contrib/openpam/bin/openpam_dump_policy/openpam_dump_policy.c head/contrib/openpam/bin/pamtest/pamtest.1 head/contrib/openpam/bin/pamtest/pamtest.c head/contrib/openpam/bin/su/su.1 head/contrib/openpam/config.h.in head/contrib/openpam/configure head/contrib/openpam/configure.ac head/contrib/openpam/doc/man/Makefile.am head/contrib/openpam/doc/man/Makefile.in head/contrib/openpam/doc/man/openpam.3 head/contrib/openpam/doc/man/openpam_borrow_cred.3 head/contrib/openpam/doc/man/openpam_free_data.3 head/contrib/openpam/doc/man/openpam_free_envlist.3 head/contrib/openpam/doc/man/openpam_get_feature.3 head/contrib/openpam/doc/man/openpam_get_option.3 head/contrib/openpam/doc/man/openpam_log.3 head/contrib/openpam/doc/man/openpam_nullconv.3 head/contrib/openpam/doc/man/openpam_readline.3 head/contrib/openpam/doc/man/openpam_readlinev.3 head/contrib/openpam/doc/man/openpam_readword.3 head/contrib/openpam/doc/man/openpam_restore_cred.3 head/contrib/openpam/doc/man/openpam_set_feature.3 head/contrib/openpam/doc/man/openpam_set_option.3 head/contrib/openpam/doc/man/openpam_straddch.3 head/contrib/openpam/doc/man/openpam_subst.3 head/contrib/openpam/doc/man/openpam_ttyconv.3 head/contrib/openpam/doc/man/pam.3 head/contrib/openpam/doc/man/pam.conf.5 head/contrib/openpam/doc/man/pam_acct_mgmt.3 head/contrib/openpam/doc/man/pam_authenticate.3 head/contrib/openpam/doc/man/pam_chauthtok.3 head/contrib/openpam/doc/man/pam_close_session.3 head/contrib/openpam/doc/man/pam_conv.3 head/contrib/openpam/doc/man/pam_end.3 head/contrib/openpam/doc/man/pam_error.3 head/contrib/openpam/doc/man/pam_get_authtok.3 head/contrib/openpam/doc/man/pam_get_data.3 head/contrib/openpam/doc/man/pam_get_item.3 head/contrib/openpam/doc/man/pam_get_user.3 head/contrib/openpam/doc/man/pam_getenv.3 head/contrib/openpam/doc/man/pam_getenvlist.3 head/contrib/openpam/doc/man/pam_info.3 head/contrib/openpam/doc/man/pam_open_session.3 head/contrib/openpam/doc/man/pam_prompt.3 head/contrib/openpam/doc/man/pam_putenv.3 head/contrib/openpam/doc/man/pam_set_data.3 head/contrib/openpam/doc/man/pam_set_item.3 head/contrib/openpam/doc/man/pam_setcred.3 head/contrib/openpam/doc/man/pam_setenv.3 head/contrib/openpam/doc/man/pam_sm_acct_mgmt.3 head/contrib/openpam/doc/man/pam_sm_authenticate.3 head/contrib/openpam/doc/man/pam_sm_chauthtok.3 head/contrib/openpam/doc/man/pam_sm_close_session.3 head/contrib/openpam/doc/man/pam_sm_open_session.3 head/contrib/openpam/doc/man/pam_sm_setcred.3 head/contrib/openpam/doc/man/pam_start.3 head/contrib/openpam/doc/man/pam_strerror.3 head/contrib/openpam/doc/man/pam_verror.3 head/contrib/openpam/doc/man/pam_vinfo.3 head/contrib/openpam/doc/man/pam_vprompt.3 head/contrib/openpam/include/security/openpam.h head/contrib/openpam/include/security/openpam_version.h head/contrib/openpam/lib/Makefile.am head/contrib/openpam/lib/Makefile.in head/contrib/openpam/lib/openpam_check_owner_perms.c head/contrib/openpam/lib/openpam_configure.c head/contrib/openpam/lib/openpam_constants.h head/contrib/openpam/lib/openpam_ctype.h head/contrib/openpam/lib/openpam_debug.h head/contrib/openpam/lib/openpam_dynamic.c head/contrib/openpam/lib/openpam_features.c head/contrib/openpam/lib/openpam_features.h head/contrib/openpam/lib/openpam_get_feature.c head/contrib/openpam/lib/openpam_get_option.c head/contrib/openpam/lib/openpam_impl.h head/contrib/openpam/lib/openpam_load.c head/contrib/openpam/lib/openpam_log.c head/contrib/openpam/lib/openpam_readline.c head/contrib/openpam/lib/openpam_readlinev.c head/contrib/openpam/lib/openpam_readword.c head/contrib/openpam/lib/openpam_set_feature.c head/contrib/openpam/lib/openpam_set_option.c head/contrib/openpam/lib/openpam_straddch.c head/contrib/openpam/lib/openpam_strlcat.h head/contrib/openpam/lib/openpam_strlcmp.h head/contrib/openpam/lib/openpam_strlcpy.h head/contrib/openpam/lib/openpam_subst.c head/contrib/openpam/lib/openpam_ttyconv.c head/contrib/openpam/lib/pam_get_authtok.c head/contrib/openpam/lib/pam_putenv.c head/contrib/openpam/lib/pam_setenv.c head/contrib/openpam/ltmain.sh head/contrib/openpam/misc/gendoc.pl head/contrib/openpam/pamgdb.in head/contrib/openpam/t/Makefile.am head/contrib/openpam/t/Makefile.in head/contrib/openpam/t/t.h head/contrib/openpam/t/t_main.c head/contrib/openpam/t/t_openpam_readlinev.c head/contrib/openpam/t/t_openpam_readword.c head/contrib/tcpdump/CHANGES head/contrib/tcpdump/CREDITS head/contrib/tcpdump/Makefile.in head/contrib/tcpdump/VERSION head/contrib/tcpdump/acconfig.h head/contrib/tcpdump/addrtoname.c head/contrib/tcpdump/addrtoname.h head/contrib/tcpdump/bootp.h head/contrib/tcpdump/config.h.in head/contrib/tcpdump/configure head/contrib/tcpdump/configure.in head/contrib/tcpdump/cpack.c head/contrib/tcpdump/cpack.h head/contrib/tcpdump/ethertype.h head/contrib/tcpdump/forces.h head/contrib/tcpdump/ieee802_11_radio.h head/contrib/tcpdump/in_cksum.c head/contrib/tcpdump/interface.h head/contrib/tcpdump/ip.h head/contrib/tcpdump/ip6.h head/contrib/tcpdump/ipproto.c head/contrib/tcpdump/ipproto.h head/contrib/tcpdump/missing/addrsize.h head/contrib/tcpdump/missing/bittypes.h head/contrib/tcpdump/missing/resolv6.h head/contrib/tcpdump/missing/resolv_ext.h head/contrib/tcpdump/netdissect.h head/contrib/tcpdump/ospf.h head/contrib/tcpdump/oui.c head/contrib/tcpdump/oui.h head/contrib/tcpdump/ppi.h head/contrib/tcpdump/print-802_11.c head/contrib/tcpdump/print-802_15_4.c head/contrib/tcpdump/print-ap1394.c head/contrib/tcpdump/print-arcnet.c head/contrib/tcpdump/print-arp.c head/contrib/tcpdump/print-atalk.c head/contrib/tcpdump/print-atm.c head/contrib/tcpdump/print-babel.c head/contrib/tcpdump/print-bgp.c head/contrib/tcpdump/print-carp.c head/contrib/tcpdump/print-cdp.c head/contrib/tcpdump/print-chdlc.c head/contrib/tcpdump/print-dccp.c head/contrib/tcpdump/print-dhcp6.c head/contrib/tcpdump/print-enc.c head/contrib/tcpdump/print-ether.c head/contrib/tcpdump/print-forces.c head/contrib/tcpdump/print-fr.c head/contrib/tcpdump/print-gre.c head/contrib/tcpdump/print-icmp.c head/contrib/tcpdump/print-icmp6.c head/contrib/tcpdump/print-igmp.c head/contrib/tcpdump/print-ip.c head/contrib/tcpdump/print-ip6.c head/contrib/tcpdump/print-ipnet.c head/contrib/tcpdump/print-ipx.c head/contrib/tcpdump/print-isoclns.c head/contrib/tcpdump/print-juniper.c head/contrib/tcpdump/print-lane.c head/contrib/tcpdump/print-llc.c head/contrib/tcpdump/print-lldp.c head/contrib/tcpdump/print-mobile.c head/contrib/tcpdump/print-mpls.c head/contrib/tcpdump/print-null.c head/contrib/tcpdump/print-ospf.c head/contrib/tcpdump/print-pflog.c head/contrib/tcpdump/print-pgm.c head/contrib/tcpdump/print-pim.c head/contrib/tcpdump/print-ppi.c head/contrib/tcpdump/print-ppp.c head/contrib/tcpdump/print-rpki-rtr.c head/contrib/tcpdump/print-rrcp.c head/contrib/tcpdump/print-sctp.c head/contrib/tcpdump/print-sflow.c head/contrib/tcpdump/print-sl.c head/contrib/tcpdump/print-sll.c head/contrib/tcpdump/print-sunrpc.c head/contrib/tcpdump/print-symantec.c head/contrib/tcpdump/print-tcp.c head/contrib/tcpdump/print-tftp.c head/contrib/tcpdump/print-udp.c head/contrib/tcpdump/print-vrrp.c head/contrib/tcpdump/tcp.h head/contrib/tcpdump/tcpdump-stdinc.h head/contrib/tcpdump/tcpdump.1.in head/contrib/tcpdump/tcpdump.c head/contrib/tcpdump/tests/02-sunrise-sunset-esp.puu head/contrib/tcpdump/tests/08-sunrise-sunset-aes.puu head/contrib/tcpdump/tests/08-sunrise-sunset-esp2.puu head/contrib/tcpdump/tests/TESTLIST head/contrib/tcpdump/tests/TESTonce head/contrib/tcpdump/tests/TESTrun.sh head/contrib/tcpdump/tests/bgp-infinite-loop.pcap head/contrib/tcpdump/tests/bgp_vpn_attrset.out head/contrib/tcpdump/tests/bgp_vpn_attrset.pcap head/contrib/tcpdump/tests/chdlc-slarp-short.pcap head/contrib/tcpdump/tests/chdlc-slarp.pcap head/contrib/tcpdump/tests/dio.out head/contrib/tcpdump/tests/dio.pcap head/contrib/tcpdump/tests/e1000g.out head/contrib/tcpdump/tests/e1000g.pcap head/contrib/tcpdump/tests/eapon1.gdbinit head/contrib/tcpdump/tests/eapon1.out head/contrib/tcpdump/tests/eapon1.puu head/contrib/tcpdump/tests/eapon2.puu head/contrib/tcpdump/tests/esp-secrets.txt head/contrib/tcpdump/tests/esp0.out head/contrib/tcpdump/tests/esp1.gdbinit head/contrib/tcpdump/tests/esp1.out head/contrib/tcpdump/tests/esp2.gdbinit head/contrib/tcpdump/tests/esp2.out head/contrib/tcpdump/tests/esp3.gdbinit head/contrib/tcpdump/tests/esp4.gdbinit head/contrib/tcpdump/tests/esp5.gdbinit head/contrib/tcpdump/tests/esp5.out head/contrib/tcpdump/tests/espudp1.out head/contrib/tcpdump/tests/espudp1.puu head/contrib/tcpdump/tests/forces1.out head/contrib/tcpdump/tests/forces1.pcap head/contrib/tcpdump/tests/forces1vvv.out head/contrib/tcpdump/tests/forces1vvvv.out head/contrib/tcpdump/tests/forces2.out head/contrib/tcpdump/tests/forces2.pcap head/contrib/tcpdump/tests/forces2v.out head/contrib/tcpdump/tests/forces2vv.out head/contrib/tcpdump/tests/ikev2.puu head/contrib/tcpdump/tests/ikev2four.out head/contrib/tcpdump/tests/ikev2four.puu head/contrib/tcpdump/tests/ikev2fourv.out head/contrib/tcpdump/tests/ikev2fourv4.out head/contrib/tcpdump/tests/ikev2pI2-secrets.txt head/contrib/tcpdump/tests/ikev2pI2.out head/contrib/tcpdump/tests/ikev2pI2.puu head/contrib/tcpdump/tests/isakmp-delete-segfault.puu head/contrib/tcpdump/tests/isakmp-identification-segfault.puu head/contrib/tcpdump/tests/isakmp-pointer-loop.puu head/contrib/tcpdump/tests/isakmp1.out head/contrib/tcpdump/tests/isakmp2.out head/contrib/tcpdump/tests/isakmp3.out head/contrib/tcpdump/tests/isakmp4.out head/contrib/tcpdump/tests/isakmp4500.puu head/contrib/tcpdump/tests/isis-infinite-loop.pcap head/contrib/tcpdump/tests/ldp-infinite-loop.pcap head/contrib/tcpdump/tests/lmp.out head/contrib/tcpdump/tests/lmp.puu head/contrib/tcpdump/tests/lmp.sh head/contrib/tcpdump/tests/lspping-fec-ldp.pcap head/contrib/tcpdump/tests/lspping-fec-rsvp.pcap head/contrib/tcpdump/tests/mpls-ldp-hello.out head/contrib/tcpdump/tests/mpls-ldp-hello.puu head/contrib/tcpdump/tests/mpls-traceroute.pcap head/contrib/tcpdump/tests/ospf-gmpls.out head/contrib/tcpdump/tests/ospf-gmpls.puu head/contrib/tcpdump/tests/print-A.out head/contrib/tcpdump/tests/print-AA.out head/contrib/tcpdump/tests/print-capX.out head/contrib/tcpdump/tests/print-capXX.out head/contrib/tcpdump/tests/print-flags.puu head/contrib/tcpdump/tests/print-flags.sh head/contrib/tcpdump/tests/print-x.out head/contrib/tcpdump/tests/print-xx.out head/contrib/tcpdump/tests/rsvp-infinite-loop.pcap head/contrib/tcpdump/udp.h head/contrib/telnet/telnet/telnet.1 head/contrib/top/display.c head/contrib/top/layout.h head/contrib/top/machine.h head/contrib/top/top.c head/contrib/traceroute/traceroute.8 head/contrib/traceroute/traceroute.c
diffstat 1031 files changed, 88226 insertions(+), 58379 deletions(-) [+]
line wrap: on
line diff
--- a/head/contrib/bind9/CHANGES	Wed Jul 25 16:20:13 2012 +0300
+++ b/head/contrib/bind9/CHANGES	Wed Jul 25 16:21:35 2012 +0300
@@ -1,3 +1,70 @@
+	--- 9.8.3-P2 released ---
+
+3346.	[security]	Bad-cache data could be used before it was
+			initialized, causing an assert. [RT #30025]
+
+3342.	[bug]		Change #3314 broke saving of stub zones to disk
+			resulting in excessive cpu usage in some cases.
+			[RT #29952]
+
+	--- 9.8.3-P1 released ---
+
+3331.	[security]	dns_rdataslab_fromrdataset could produce bad
+			rdataslabs. [RT #29644]
+			
+	--- 9.8.3 released ---
+
+3318.	[tuning]	Reduce the amount of work performed while holding a
+			bucket lock when finshed with a fetch context.
+			[RT #29239]
+
+3314.	[bug]		The masters list could be updated while refesh_callback
+			and stub_callback were using it. [RT #26732]
+
+3313.	[protocol]	Add TLSA record type. [RT #28989]
+
+3312.	[bug]		named-checkconf didn't detect a bad dns64 clients acl.
+			[RT #27631]
+
+3311.	[bug]		Abort the zone dump if zone->db is NULL in
+			zone.c:zone_gotwritehandle. [RT #29028]
+
+3310.	[test]		Increase table size for mutex profiling. [RT #28809]
+
+3309.	[bug]		resolver.c:fctx_finddone() was not threadsafe.
+			[RT #27995]
+
+3307.	[bug]		Add missing ISC_LANG_BEGINDECLS and ISC_LANG_ENDDECLS.
+			[RT #28956]
+
+3306.	[bug]		Improve DNS64 reverse zone performance. [RT #28563]
+
+3305.	[func]		Add wire format lookup method to sdb. [RT #28563]
+
+3304.	[bug]		Use hmctx, not mctx when freeing rbtdb->heaps.
+			[RT #28571]
+
+3302.	[bug]		dns_dnssec_findmatchingkeys could fail to find
+			keys if the zone name contained character that
+			required special mappings. [RT #28600]
+
+3301.	[contrib]	Update queryperf to build on darwin.  Add -R flag
+			for non-recursive queries. [RT #28565]
+
+3300.	[bug]		Named could die if gssapi was enabled in named.conf
+			but was not compiled in. [RT #28338]
+
+3299.	[bug]		Make SDB handle errors from database drivers better.
+			[RT #28534]
+
+3232.	[bug]		Zero zone->curmaster before return in
+			dns_zone_setmasterswithkeys(). [RT #26732]
+
+3183.	[bug]		Added RTLD_GLOBAL flag to dlopen call. [RT #26301]
+
+3197.	[bug]		Don't try to log the filename and line number when
+			the config parser can't open a file. [RT #22263]
+
 	--- 9.8.2 released ---
 
 3298.	[bug]		Named could dereference a NULL pointer in
@@ -58,9 +125,9 @@
 3274.	[bug]		Log when a zone is not reusable.  Only set loadtime
 			on successful loads.  [RT #27650]
 
-3273.   [bug]           AAAA responses could be returned in the additional
-                        section even when filter-aaaa-on-v4 was in use.
-                        [RT #27292]
+3273.	[bug]		AAAA responses could be returned in the additional
+			section even when filter-aaaa-on-v4 was in use.
+			[RT #27292]
 
 3271.	[port]		darwin: mksymtbl is not always stable, loop several
 			times before giving up.  mksymtbl was using non
--- a/head/contrib/bind9/README	Wed Jul 25 16:20:13 2012 +0300
+++ b/head/contrib/bind9/README	Wed Jul 25 16:21:35 2012 +0300
@@ -51,6 +51,10 @@
         For up-to-date release notes and errata, see
         http://www.isc.org/software/bind9/releasenotes
 
+BIND 9.8.3
+
+	BIND 9.8.3 is a maintenance release.
+
 BIND 9.8.2
 
 	BIND 9.8.2 includes a number of bug fixes and prevents a security
--- a/head/contrib/bind9/bin/named/builtin.c	Wed Jul 25 16:20:13 2012 +0300
+++ b/head/contrib/bind9/bin/named/builtin.c	Wed Jul 25 16:21:35 2012 +0300
@@ -69,35 +69,79 @@
 static builtin_t dns64_builtin = { do_dns64_lookup, NULL, NULL };
 
 static dns_sdbimplementation_t *builtin_impl;
+static dns_sdbimplementation_t *dns64_impl;
 
-static const char hex[] = "0123456789abcdef";
-static const char HEX[] = "0123456789ABCDEF";
+/*
+ * Pre computed HEX * 16 or 1 table.
+ */
+static const unsigned char hex16[256] = {
+	 1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1, /*00*/
+	 1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,	/*10*/
+	 1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1, /*20*/
+	 0, 16, 32, 48, 64, 80, 96,112,128,144,  1,  1,  1,  1,  1,  1,	/*30*/
+	 1,160,176,192,208,224,240,  1,  1,  1,  1,  1,  1,  1,  1,  1, /*40*/
+	 1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1, /*50*/
+	 1,160,176,192,208,224,240,  1,  1,  1,  1,  1,  1,  1,  1,  1, /*60*/
+	 1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1, /*70*/
+	 1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1, /*80*/
+	 1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1, /*90*/
+	 1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1, /*A0*/
+	 1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1, /*B0*/
+	 1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1, /*C0*/
+	 1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1, /*D0*/
+	 1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1, /*E0*/
+	 1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1  /*F0*/
+};
+
+const unsigned char decimal[] = "0123456789";
+
+static size_t
+dns64_rdata(unsigned char *v, size_t start, unsigned char *rdata) {
+	size_t i, j = 0;
+
+	for (i = 0; i < 4; i++) {
+		unsigned char c = v[start++];
+		if (start == 7)
+			start++;
+		if (c > 99) {
+			rdata[j++] = 3;
+			rdata[j++] = decimal[c/100]; c = c % 100;
+			rdata[j++] = decimal[c/10]; c = c % 10;
+			rdata[j++] = decimal[c];
+		} else if (c > 9) {
+			rdata[j++] = 2;
+			rdata[j++] = decimal[c/10]; c = c % 10;
+			rdata[j++] = decimal[c];
+		} else {
+			rdata[j++] = 1;
+			rdata[j++] = decimal[c];
+		}
+	}
+	memcpy(&rdata[j], "\07in-addr\04arpa", 14);
+	return (j + 14);
+}
 
 static isc_result_t
-dns64_cname(const char *zone, const char *name, dns_sdblookup_t *lookup) {
-	size_t zlen, nlen, j;
-	const char *s;
-	unsigned char v[16];
+dns64_cname(const dns_name_t *zone, const dns_name_t *name,
+	    dns_sdblookup_t *lookup)
+{
+	size_t zlen, nlen, j, len;
+	unsigned char v[16], n;
 	unsigned int i;
-	char reverse[sizeof("123.123.123.123.in-addr.arpa.")];
+	unsigned char rdata[sizeof("123.123.123.123.in-addr.arpa.")];
+	unsigned char *ndata;
 
 	/*
-	 * The sum the length of the relative name and the length of the zone
-	 * name for a IPv6 reverse lookup comes to 71.
+	 * The combined length of the zone and name is 74.
 	 *
-	 * The reverse of 2001::10.0.0.1 (dns64 2001::/96) has a zone of
-	 * "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.1.0.0.2.ip6.arpa"
-	 * and a name of "1.0.0.0.0.0.a.0".  The sum of the lengths of these
-	 * two strings is 71.
+	 * The minimum zone length is 10 ((3)ip6(4)arpa(0)).
 	 *
-	 * The minimum length for a ip6.arpa zone name is 8.
-	 *
-	 * The length of name should always be odd as we are expecting
+	 * The length of name should always be even as we are expecting
 	 * a series of nibbles.
 	 */
-	zlen = strlen(zone);
-	nlen = strlen(name);
-	if ((zlen + nlen) > 71U || zlen < 8U || (nlen % 2) != 1U)
+	zlen = zone->length;
+	nlen = name->length;
+	if ((zlen + nlen) > 74U || zlen < 10U || (nlen % 2) != 0U)
 		return (ISC_R_NOTFOUND);
 
 	/*
@@ -116,25 +160,20 @@
 	 * are byte aligned and we correctly return ISC_R_NOTFOUND or
 	 * ISC_R_SUCCESS.  We will not generate a CNAME in this case.
 	 */
-	i = (nlen % 4) == 1U ? 1 : 0;
+	ndata = name->ndata;
+	i = (nlen % 4) == 2U ? 1 : 0;
 	j = nlen;
 	memset(v, 0, sizeof(v));
-	while (j >= 1U) {
+	while (j != 0) {
 		INSIST((i/2) < sizeof(v));
-		if (j > 1U && name[1] != '.')
+		if (ndata[0] != 1)
 			return (ISC_R_NOTFOUND);
-		v[i/2] >>= 4;
-		if ((s = strchr(hex, name[0])) != NULL)
-			v[i/2] |= (s - hex) << 4;
-		else if ((s = strchr(HEX, name[0])) != NULL)
-			v[i/2] |= (s - HEX) << 4;
-		else
+		n = hex16[ndata[1]&0xff];
+		if (n == 1)
 			return (ISC_R_NOTFOUND);
-		if (j > 1U)
-			j -= 2;
-		else
-			j -= 1;
-		name += 2;
+		v[i/2] = n | (v[i/2]>>4);
+		j -= 2;
+		ndata += 2;
 		i++;
 	}
 
@@ -144,90 +183,91 @@
 	 * it corresponds to a empty node in the zone or there should be
 	 * a CNAME.
 	 */
+#define ZLEN(x) (10 + (x)/2)
 	switch (zlen) {
-	case 24:	/* prefix len 32 */
-		/*
-		 * If the total length is not 71 then this is a empty node
-		 * so return success.
-		 */
-		if (nlen + zlen != 71U)
-			return (ISC_R_SUCCESS);
-		snprintf(reverse, sizeof(reverse), "%u.%u.%u.%u.in-addr.arpa.",
-			 v[8], v[9], v[10], v[11]);
-		break;
-	case 28:	/* prefix len 40 */
+	case ZLEN(32):	/* prefix len 32 */
 		/*
 		 * The nibbles that map to this byte must be zero for 'name'
 		 * to exist in the zone.
 		 */
-		if (nlen > 11U && v[nlen/4 - 3] != 0)
+		if (nlen > 16U && v[(nlen-1)/4 - 4] != 0)
 			return (ISC_R_NOTFOUND);
 		/*
-		 * If the total length is not 71 then this is a empty node
+		 * If the total length is not 74 then this is a empty node
 		 * so return success.
 		 */
-		if (nlen + zlen != 71U)
+		if (nlen + zlen != 74U)
 			return (ISC_R_SUCCESS);
-		snprintf(reverse, sizeof(reverse), "%u.%u.%u.%u.in-addr.arpa.",
-			 v[6], v[8], v[9], v[10]);
+		len = dns64_rdata(v, 8, rdata);
 		break;
-	case 32:	/* prefix len 48 */
+	case ZLEN(40):	/* prefix len 40 */
+		/*
+		 * The nibbles that map to this byte must be zero for 'name'
+		 * to exist in the zone.
+		 */
+		if (nlen > 12U && v[(nlen-1)/4 - 3] != 0)
+			return (ISC_R_NOTFOUND);
+		/*
+		 * If the total length is not 74 then this is a empty node
+		 * so return success.
+		 */
+		if (nlen + zlen != 74U)
+			return (ISC_R_SUCCESS);
+		len = dns64_rdata(v, 6, rdata);
+		break;
+	case ZLEN(48):	/* prefix len 48 */
 		/*
 		 * The nibbles that map to this byte must be zero for 'name'
 		 * to exist in the zone.
 		 */
-		if (nlen > 7U && v[nlen/4 - 2] != 0)
+		if (nlen > 8U && v[(nlen-1)/4 - 2] != 0)
 			return (ISC_R_NOTFOUND);
 		/*
-		 * If the total length is not 71 then this is a empty node
+		 * If the total length is not 74 then this is a empty node
 		 * so return success.
 		 */
-		if (nlen + zlen != 71U)
+		if (nlen + zlen != 74U)
 			return (ISC_R_SUCCESS);
-		snprintf(reverse, sizeof(reverse), "%u.%u.%u.%u.in-addr.arpa.",
-			 v[5], v[6], v[8], v[9]);
+		len = dns64_rdata(v, 5, rdata);
 		break;
-	case 36:	/* prefix len 56 */
+	case ZLEN(56):	/* prefix len 56 */
 		/*
 		 * The nibbles that map to this byte must be zero for 'name'
 		 * to exist in the zone.
 		 */
-		if (nlen > 3U && v[nlen/4 - 1] != 0)
+		if (nlen > 4U && v[(nlen-1)/4 - 1] != 0)
 			return (ISC_R_NOTFOUND);
 		/*
-		 * If the total length is not 71 then this is a empty node
+		 * If the total length is not 74 then this is a empty node
 		 * so return success.
 		 */
-		if (nlen + zlen != 71U)
+		if (nlen + zlen != 74U)
 			return (ISC_R_SUCCESS);
-		snprintf(reverse, sizeof(reverse), "%u.%u.%u.%u.in-addr.arpa.",
-			 v[4], v[5], v[6], v[8]);
+		len = dns64_rdata(v, 4, rdata);
 		break;
-	case 40:	/* prefix len 64 */
+	case ZLEN(64):	/* prefix len 64 */
 		/*
 		 * The nibbles that map to this byte must be zero for 'name'
 		 * to exist in the zone.
 		 */
-		if (v[nlen/4] != 0)
+		if (v[(nlen-1)/4] != 0)
 			return (ISC_R_NOTFOUND);
 		/*
-		 * If the total length is not 71 then this is a empty node
+		 * If the total length is not 74 then this is a empty node
 		 * so return success.
 		 */
-		if (nlen + zlen != 71U)
+		if (nlen + zlen != 74U)
 			return (ISC_R_SUCCESS);
-		snprintf(reverse, sizeof(reverse), "%u.%u.%u.%u.in-addr.arpa.",
-			 v[3], v[4], v[5], v[6]);
+		len = dns64_rdata(v, 3, rdata);
 		break;
-	case 56:	/* prefix len 96 */
+	case ZLEN(96):	/* prefix len 96 */
 		/*
-		 * If the total length is not 71 then this is a empty node
+		 * If the total length is not 74 then this is a empty node
 		 * so return success.
 		 */
-		if (nlen + zlen != 71U)
+		if (nlen + zlen != 74U)
 			return (ISC_R_SUCCESS);
-		snprintf(reverse, sizeof(reverse), "%u.%u.%u.%u.in-addr.arpa.",
-			 v[0], v[1], v[2], v[3]);
+		len = dns64_rdata(v, 0, rdata);
 		break;
 	default:
 		/*
@@ -236,7 +276,7 @@
 		 */
 		return (ISC_R_NOTFOUND);
 	}
-	return (dns_sdb_putrr(lookup, "CNAME", 600, reverse));
+	return (dns_sdb_putrdata(lookup, dns_rdatatype_cname, 600, rdata, len));
 }
 
 static isc_result_t
@@ -249,13 +289,23 @@
 
 	if (strcmp(name, "@") == 0)
 		return (b->do_lookup(lookup));
-	else if (b->do_lookup == do_dns64_lookup)
-		return (dns64_cname(zone, name, lookup));
 	else
 		return (ISC_R_NOTFOUND);
 }
 
 static isc_result_t
+dns64_lookup(const dns_name_t *zone, const dns_name_t *name, void *dbdata,
+	     dns_sdblookup_t *lookup)
+{
+	builtin_t *b = (builtin_t *) dbdata;
+
+	if (name->labels == 0 && name->length == 0)
+		return (b->do_lookup(lookup));
+	else
+		return (dns64_cname(zone, name, lookup));
+}
+
+static isc_result_t
 put_txt(dns_sdblookup_t *lookup, const char *text) {
 	unsigned char buf[256];
 	unsigned int len = strlen(text);
@@ -481,7 +531,17 @@
 	builtin_authority,
 	NULL,		/* allnodes */
 	builtin_create,
-	builtin_destroy
+	builtin_destroy,
+	NULL
+};
+
+static dns_sdbmethods_t dns64_methods = {
+	NULL,
+	builtin_authority,
+	NULL,		/* allnodes */
+	builtin_create,
+	builtin_destroy,
+	dns64_lookup,
 };
 
 isc_result_t
@@ -491,11 +551,17 @@
 				       DNS_SDBFLAG_RELATIVERDATA,
 				       ns_g_mctx, &builtin_impl)
 		      == ISC_R_SUCCESS);
+	RUNTIME_CHECK(dns_sdb_register("_dns64", &dns64_methods, NULL,
+				       DNS_SDBFLAG_RELATIVEOWNER |
+				       DNS_SDBFLAG_RELATIVERDATA |
+				       DNS_SDBFLAG_DNS64,
+				       ns_g_mctx, &dns64_impl)
+		      == ISC_R_SUCCESS);
 	return (ISC_R_SUCCESS);
 }
 
 void
 ns_builtin_deinit(void) {
 	dns_sdb_unregister(&builtin_impl);
+	dns_sdb_unregister(&dns64_impl);
 }
-
--- a/head/contrib/bind9/bin/named/query.c	Wed Jul 25 16:20:13 2012 +0300
+++ b/head/contrib/bind9/bin/named/query.c	Wed Jul 25 16:21:35 2012 +0300
@@ -3354,6 +3354,11 @@
 		dns_name_copy(name, cname, NULL);
 		while (result == DNS_R_NXDOMAIN) {
 			labels = dns_name_countlabels(cname) - 1;
+			/*
+			 * Sanity check.
+			 */
+			if (labels == 0U)
+				goto cleanup;
 			dns_name_split(cname, labels, NULL, cname);
 			result = dns_db_find(db, cname, version,
 					     dns_rdatatype_nsec,
--- a/head/contrib/bind9/bin/named/server.c	Wed Jul 25 16:20:13 2012 +0300
+++ b/head/contrib/bind9/bin/named/server.c	Wed Jul 25 16:21:35 2012 +0300
@@ -1358,7 +1358,7 @@
 {
 	char *cp;
 	char reverse[48+sizeof("ip6.arpa.")];
-	const char *dns64_dbtype[4] = { "_builtin", "dns64", ".", "." };
+	const char *dns64_dbtype[4] = { "_dns64", "dns64", ".", "." };
 	const char *sep = ": view ";
 	const char *viewname = view->name;
 	const unsigned char *s6;
--- a/head/contrib/bind9/bin/named/unix/dlz_dlopen_driver.c	Wed Jul 25 16:20:13 2012 +0300
+++ b/head/contrib/bind9/bin/named/unix/dlz_dlopen_driver.c	Wed Jul 25 16:21:35 2012 +0300
@@ -250,7 +250,7 @@
 	isc_mutex_init(&cd->lock);
 
 	/* Open the library */
-	dlopen_flags = RTLD_NOW;
+	dlopen_flags = RTLD_NOW|RTLD_GLOBAL;
 
 #ifdef RTLD_DEEPBIND
 	/*
--- a/head/contrib/bind9/lib/bind9/api	Wed Jul 25 16:20:13 2012 +0300
+++ b/head/contrib/bind9/lib/bind9/api	Wed Jul 25 16:21:35 2012 +0300
@@ -4,5 +4,5 @@
 # 9.8: 80-89
 # 9.9: 90-109
 LIBINTERFACE = 80
-LIBREVISION = 4
+LIBREVISION = 5
 LIBAGE = 0
--- a/head/contrib/bind9/lib/bind9/check.c	Wed Jul 25 16:20:13 2012 +0300
+++ b/head/contrib/bind9/lib/bind9/check.c	Wed Jul 25 16:21:35 2012 +0300
@@ -434,7 +434,7 @@
 	int nbytes;
 	int i;
 
-	static const char *acls[] = { "client", "exclude", "mapped", NULL};
+	static const char *acls[] = { "clients", "exclude", "mapped", NULL};
 
 	if (voptions != NULL)
 		cfg_map_get(voptions, "dns64", &dns64);
--- a/head/contrib/bind9/lib/dns/api	Wed Jul 25 16:20:13 2012 +0300
+++ b/head/contrib/bind9/lib/dns/api	Wed Jul 25 16:21:35 2012 +0300
@@ -4,5 +4,5 @@
 # 9.8: 80-89
 # 9.9: 90-109
 LIBINTERFACE = 87
-LIBREVISION = 0
+LIBREVISION = 1
 LIBAGE = 6
--- a/head/contrib/bind9/lib/dns/dnssec.c	Wed Jul 25 16:20:13 2012 +0300
+++ b/head/contrib/bind9/lib/dns/dnssec.c	Wed Jul 25 16:21:35 2012 +0300
@@ -1246,7 +1246,7 @@
 	isc_dir_init(&dir);
 
 	isc_buffer_init(&b, namebuf, sizeof(namebuf) - 1);
-	RETERR(dns_name_totext(origin, ISC_FALSE, &b));
+	RETERR(dns_name_tofilenametext(origin, ISC_FALSE, &b));
 	len = isc_buffer_usedlength(&b);
 	namebuf[len] = '\0';
 
--- a/head/contrib/bind9/lib/dns/include/dns/ecdb.h	Wed Jul 25 16:20:13 2012 +0300
+++ b/head/contrib/bind9/lib/dns/include/dns/ecdb.h	Wed Jul 25 16:21:35 2012 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2009  Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2009, 2012  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
@@ -39,6 +39,8 @@
  *** Functions
  ***/
 
+ISC_LANG_BEGINDECLS
+
 /* TBD: describe those */
 
 isc_result_t
--- a/head/contrib/bind9/lib/dns/include/dns/rpz.h	Wed Jul 25 16:20:13 2012 +0300
+++ b/head/contrib/bind9/lib/dns/include/dns/rpz.h	Wed Jul 25 16:21:35 2012 +0300
@@ -194,5 +194,7 @@
 dns_rpz_policy_t
 dns_rpz_decode_cname(dns_rdataset_t *, dns_name_t *selfname);
 
+ISC_LANG_ENDDECLS
+
 #endif /* DNS_RPZ_H */
 
--- a/head/contrib/bind9/lib/dns/include/dns/sdb.h	Wed Jul 25 16:20:13 2012 +0300
+++ b/head/contrib/bind9/lib/dns/include/dns/sdb.h	Wed Jul 25 16:21:35 2012 +0300
@@ -59,6 +59,9 @@
 typedef isc_result_t
 (*dns_sdblookupfunc_t)(const char *zone, const char *name, void *dbdata,
 		       dns_sdblookup_t *);
+typedef isc_result_t
+(*dns_sdblookup2func_t)(const dns_name_t *zone, const dns_name_t *name,
+			void *dbdata, dns_sdblookup_t *lookup);
 
 typedef isc_result_t
 (*dns_sdbauthorityfunc_t)(const char *zone, void *dbdata, dns_sdblookup_t *);
@@ -81,6 +84,7 @@
 	dns_sdballnodesfunc_t	allnodes;
 	dns_sdbcreatefunc_t	create;
 	dns_sdbdestroyfunc_t	destroy;
+	dns_sdblookup2func_t	lookup2;
 } dns_sdbmethods_t;
 
 /***
@@ -92,6 +96,7 @@
 #define DNS_SDBFLAG_RELATIVEOWNER 0x00000001U
 #define DNS_SDBFLAG_RELATIVERDATA 0x00000002U
 #define DNS_SDBFLAG_THREADSAFE 0x00000004U
+#define DNS_SDBFLAG_DNS64 0x00000008U
 
 isc_result_t
 dns_sdb_register(const char *drivername, const dns_sdbmethods_t *methods,
--- a/head/contrib/bind9/lib/dns/include/dns/stats.h	Wed Jul 25 16:20:13 2012 +0300
+++ b/head/contrib/bind9/lib/dns/include/dns/stats.h	Wed Jul 25 16:21:35 2012 +0300
@@ -147,6 +147,8 @@
 					    void *);
 typedef void (*dns_opcodestats_dumper_t)(dns_opcode_t, isc_uint64_t, void *);
 
+ISC_LANG_BEGINDECLS
+
 isc_result_t
 dns_generalstats_create(isc_mem_t *mctx, dns_stats_t **statsp, int ncounters);
 /*%<
--- a/head/contrib/bind9/lib/dns/include/dns/tsec.h	Wed Jul 25 16:20:13 2012 +0300
+++ b/head/contrib/bind9/lib/dns/include/dns/tsec.h	Wed Jul 25 16:21:35 2012 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2009, 2010  Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2009, 2010, 2012  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
@@ -132,4 +132,6 @@
  *\li	*tsecp points to a valid key structure depending on the TSEC type.
  */
 
+ISC_LANG_ENDDECLS
+
 #endif /* DNS_TSEC_H */
--- a/head/contrib/bind9/lib/dns/include/dns/view.h	Wed Jul 25 16:20:13 2012 +0300
+++ b/head/contrib/bind9/lib/dns/include/dns/view.h	Wed Jul 25 16:21:35 2012 +0300
@@ -1075,4 +1075,6 @@
 void
 dns_view_restorekeyring(dns_view_t *view);
 
+ISC_LANG_ENDDECLS
+
 #endif /* DNS_VIEW_H */
--- a/head/contrib/bind9/lib/dns/rbtdb.c	Wed Jul 25 16:20:13 2012 +0300
+++ b/head/contrib/bind9/lib/dns/rbtdb.c	Wed Jul 25 16:21:35 2012 +0300
@@ -7814,7 +7814,7 @@
 		for (i = 0 ; i < (int)rbtdb->node_lock_count ; i++)
 			if (rbtdb->heaps[i] != NULL)
 				isc_heap_destroy(&rbtdb->heaps[i]);
-		isc_mem_put(mctx, rbtdb->heaps,
+		isc_mem_put(hmctx, rbtdb->heaps,
 			    rbtdb->node_lock_count * sizeof(isc_heap_t *));
 	}
 
--- a/head/contrib/bind9/lib/dns/rdata.c	Wed Jul 25 16:20:13 2012 +0300
+++ b/head/contrib/bind9/lib/dns/rdata.c	Wed Jul 25 16:21:35 2012 +0300
@@ -329,8 +329,8 @@
 
 	REQUIRE(rdata1 != NULL);
 	REQUIRE(rdata2 != NULL);
-	REQUIRE(rdata1->data != NULL);
-	REQUIRE(rdata2->data != NULL);
+	REQUIRE(rdata1->length == 0 || rdata1->data != NULL);
+	REQUIRE(rdata2->length == 0 || rdata2->data != NULL);
 	REQUIRE(DNS_RDATA_VALIDFLAGS(rdata1));
 	REQUIRE(DNS_RDATA_VALIDFLAGS(rdata2));
 
@@ -360,8 +360,8 @@
 
 	REQUIRE(rdata1 != NULL);
 	REQUIRE(rdata2 != NULL);
-	REQUIRE(rdata1->data != NULL);
-	REQUIRE(rdata2->data != NULL);
+	REQUIRE(rdata1->length == 0 || rdata1->data != NULL);
+	REQUIRE(rdata2->length == 0 || rdata2->data != NULL);
 	REQUIRE(DNS_RDATA_VALIDFLAGS(rdata1));
 	REQUIRE(DNS_RDATA_VALIDFLAGS(rdata2));
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/head/contrib/bind9/lib/dns/rdata/generic/tlsa_52.c	Wed Jul 25 16:21:35 2012 +0300
@@ -0,0 +1,290 @@
+/*
+ * Copyright (C) 2012  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.
+ */
+
+/* $Id$ */
+
+/* draft-ietf-dane-protocol-19.txt */
+
+#ifndef RDATA_GENERIC_TLSA_52_C
+#define RDATA_GENERIC_TLSA_52_C
+
+#define RRTYPE_TLSA_ATTRIBUTES 0
+
+static inline isc_result_t
+fromtext_tlsa(ARGS_FROMTEXT) {
+	isc_token_t token;
+
+	REQUIRE(type == 52);
+
+	UNUSED(type);
+	UNUSED(rdclass);
+	UNUSED(origin);
+	UNUSED(options);
+	UNUSED(callbacks);
+
+	/*
+	 * Certificate Usage.
+	 */
+	RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
+				      ISC_FALSE));
+	if (token.value.as_ulong > 0xffU)
+		RETTOK(ISC_R_RANGE);
+	RETERR(uint8_tobuffer(token.value.as_ulong, target));
+
+	/*
+	 * Selector.
+	 */
+	RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
+				      ISC_FALSE));
+	if (token.value.as_ulong > 0xffU)
+		RETTOK(ISC_R_RANGE);
+	RETERR(uint8_tobuffer(token.value.as_ulong, target));
+
+	/*
+	 * Matching type.
+	 */
+	RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
+				      ISC_FALSE));
+	if (token.value.as_ulong > 0xffU)
+		RETTOK(ISC_R_RANGE);
+	RETERR(uint8_tobuffer(token.value.as_ulong, target));
+
+	/*
+	 * Certificate Association Data.
+	 */
+	return (isc_hex_tobuffer(lexer, target, -1));
+}
+
+static inline isc_result_t
+totext_tlsa(ARGS_TOTEXT) {
+	isc_region_t sr;
+	char buf[sizeof("64000 ")];
+	unsigned int n;
+
+	REQUIRE(rdata->type == 52);
+	REQUIRE(rdata->length != 0);
+
+	UNUSED(tctx);
+
+	dns_rdata_toregion(rdata, &sr);
+
+	/*
+	 * Certificate Usage.
+	 */
+	n = uint8_fromregion(&sr);
+	isc_region_consume(&sr, 1);
+	sprintf(buf, "%u ", n);
+	RETERR(str_totext(buf, target));
+
+	/*
+	 * Selector.
+	 */
+	n = uint8_fromregion(&sr);
+	isc_region_consume(&sr, 1);
+	sprintf(buf, "%u ", n);
+	RETERR(str_totext(buf, target));
+
+	/*
+	 * Matching type.
+	 */
+	n = uint8_fromregion(&sr);
+	isc_region_consume(&sr, 1);
+	sprintf(buf, "%u", n);
+	RETERR(str_totext(buf, target));
+
+	/*
+	 * Certificate Association Data.
+	 */
+	if ((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0)
+		RETERR(str_totext(" (", target));
+	RETERR(str_totext(tctx->linebreak, target));
+	if (tctx->width == 0) /* No splitting */
+		RETERR(isc_hex_totext(&sr, 0, "", target));
+	else
+		RETERR(isc_hex_totext(&sr, tctx->width - 2,
+				      tctx->linebreak, target));
+	if ((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0)
+		RETERR(str_totext(" )", target));
+	return (ISC_R_SUCCESS);
+}
+
+static inline isc_result_t
+fromwire_tlsa(ARGS_FROMWIRE) {
+	isc_region_t sr;
+
+	REQUIRE(type == 52);
+
+	UNUSED(type);
+	UNUSED(rdclass);
+	UNUSED(dctx);
+	UNUSED(options);
+
+	isc_buffer_activeregion(source, &sr);
+
+	if (sr.length < 3)
+		return (ISC_R_UNEXPECTEDEND);
+
+	isc_buffer_forward(source, sr.length);
+	return (mem_tobuffer(target, sr.base, sr.length));
+}
+
+static inline isc_result_t
+towire_tlsa(ARGS_TOWIRE) {
+	isc_region_t sr;
+
+	REQUIRE(rdata->type == 52);
+	REQUIRE(rdata->length != 0);
+
+	UNUSED(cctx);
+
+	dns_rdata_toregion(rdata, &sr);
+	return (mem_tobuffer(target, sr.base, sr.length));
+}
+
+static inline int
+compare_tlsa(ARGS_COMPARE) {
+	isc_region_t r1;
+	isc_region_t r2;
+
+	REQUIRE(rdata1->type == rdata2->type);
+	REQUIRE(rdata1->rdclass == rdata2->rdclass);
+	REQUIRE(rdata1->type == 52);
+	REQUIRE(rdata1->length != 0);
+	REQUIRE(rdata2->length != 0);
+
+	dns_rdata_toregion(rdata1, &r1);
+	dns_rdata_toregion(rdata2, &r2);
+	return (isc_region_compare(&r1, &r2));
+}
+
+static inline isc_result_t
+fromstruct_tlsa(ARGS_FROMSTRUCT) {
+	dns_rdata_tlsa_t *tlsa = source;
+
+	REQUIRE(type == 52);
+	REQUIRE(source != NULL);
+	REQUIRE(tlsa->common.rdtype == type);
+	REQUIRE(tlsa->common.rdclass == rdclass);
+
+	UNUSED(type);
+	UNUSED(rdclass);
+
+	RETERR(uint8_tobuffer(tlsa->usage, target));
+	RETERR(uint8_tobuffer(tlsa->selector, target));
+	RETERR(uint8_tobuffer(tlsa->match, target));
+
+	return (mem_tobuffer(target, tlsa->data, tlsa->length));
+}
+
+static inline isc_result_t
+tostruct_tlsa(ARGS_TOSTRUCT) {
+	dns_rdata_tlsa_t *tlsa = target;
+	isc_region_t region;
+
+	REQUIRE(rdata->type == 52);
+	REQUIRE(target != NULL);
+	REQUIRE(rdata->length != 0);
+
+	tlsa->common.rdclass = rdata->rdclass;
+	tlsa->common.rdtype = rdata->type;
+	ISC_LINK_INIT(&tlsa->common, link);
+
+	dns_rdata_toregion(rdata, &region);
+
+	tlsa->usage = uint8_fromregion(&region);
+	isc_region_consume(&region, 1);
+	tlsa->selector = uint8_fromregion(&region);
+	isc_region_consume(&region, 1);
+	tlsa->match = uint8_fromregion(&region);
+	isc_region_consume(&region, 1);
+	tlsa->length = region.length;
+
+	tlsa->data = mem_maybedup(mctx, region.base, region.length);
+	if (tlsa->data == NULL)
+		return (ISC_R_NOMEMORY);
+
+	tlsa->mctx = mctx;
+	return (ISC_R_SUCCESS);
+}
+
+static inline void
+freestruct_tlsa(ARGS_FREESTRUCT) {
+	dns_rdata_tlsa_t *tlsa = source;
+
+	REQUIRE(tlsa != NULL);
+	REQUIRE(tlsa->common.rdtype == 52);
+
+	if (tlsa->mctx == NULL)
+		return;
+
+	if (tlsa->data != NULL)
+		isc_mem_free(tlsa->mctx, tlsa->data);
+	tlsa->mctx = NULL;
+}
+
+static inline isc_result_t
+additionaldata_tlsa(ARGS_ADDLDATA) {
+	REQUIRE(rdata->type == 52);
+
+	UNUSED(rdata);
+	UNUSED(add);
+	UNUSED(arg);
+
+	return (ISC_R_SUCCESS);
+}
+
+static inline isc_result_t
+digest_tlsa(ARGS_DIGEST) {
+	isc_region_t r;
+
+	REQUIRE(rdata->type == 52);
+
+	dns_rdata_toregion(rdata, &r);
+
+	return ((digest)(arg, &r));
+}
+
+static inline isc_boolean_t
+checkowner_tlsa(ARGS_CHECKOWNER) {
+
+	REQUIRE(type == 52);
+
+	UNUSED(name);
+	UNUSED(type);
+	UNUSED(rdclass);
+	UNUSED(wildcard);
+
+	return (ISC_TRUE);
+}
+
+static inline isc_boolean_t
+checknames_tlsa(ARGS_CHECKNAMES) {
+
+	REQUIRE(rdata->type == 52);
+
+	UNUSED(rdata);
+	UNUSED(owner);
+	UNUSED(bad);
+
+	return (ISC_TRUE);
+}
+
+static inline int
+casecompare_tlsa(ARGS_COMPARE) {
+	return (compare_tlsa(rdata1, rdata2));
+}
+
+#endif	/* RDATA_GENERIC_TLSA_52_C */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/head/contrib/bind9/lib/dns/rdata/generic/tlsa_52.h	Wed Jul 25 16:21:35 2012 +0300
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2012  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.
+ */
+
+/* $Id$ */
+
+#ifndef GENERIC_TLSA_52_H
+#define GENERIC_TLSA_52_H 1
+
+/*!
+ *  \brief per draft-ietf-dane-protocol-19.txt
+ */
+typedef struct dns_rdata_tlsa {
+	dns_rdatacommon_t	common;
+	isc_mem_t		*mctx;
+	isc_uint8_t		usage;
+	isc_uint8_t		selector;
+	isc_uint8_t		match;
+	isc_uint16_t		length;
+	unsigned char		*data;
+} dns_rdata_tlsa_t;
+
+#endif /* GENERIC_TLSA_52_H */
--- a/head/contrib/bind9/lib/dns/rdataslab.c	Wed Jul 25 16:20:13 2012 +0300
+++ b/head/contrib/bind9/lib/dns/rdataslab.c	Wed Jul 25 16:21:35 2012 +0300
@@ -126,6 +126,11 @@
 dns_rdataslab_fromrdataset(dns_rdataset_t *rdataset, isc_mem_t *mctx,
 			   isc_region_t *region, unsigned int reservelen)
 {
+	/*
+	 * Use &removed as a sentinal pointer for duplicate
+	 * rdata as rdata.data == NULL is valid.
+	 */
+	static unsigned char removed;
 	struct xrdata  *x;
 	unsigned char  *rawbuf;
 #if DNS_RDATASET_FIXED
@@ -169,6 +174,7 @@
 		INSIST(result == ISC_R_SUCCESS);
 		dns_rdata_init(&x[i].rdata);
 		dns_rdataset_current(rdataset, &x[i].rdata);
+		INSIST(x[i].rdata.data != &removed);
 #if DNS_RDATASET_FIXED
 		x[i].order = i;
 #endif
@@ -201,8 +207,7 @@
 	 */
 	for (i = 1; i < nalloc; i++) {
 		if (compare_rdata(&x[i-1].rdata, &x[i].rdata) == 0) {
-			x[i-1].rdata.data = NULL;
-			x[i-1].rdata.length = 0;
+			x[i-1].rdata.data = &removed;
 #if DNS_RDATASET_FIXED
 			/*
 			 * Preserve the least order so A, B, A -> A, B
@@ -292,7 +297,7 @@
 #endif
 
 	for (i = 0; i < nalloc; i++) {
-		if (x[i].rdata.data == NULL)
+		if (x[i].rdata.data == &removed)
 			continue;
 #if DNS_RDATASET_FIXED
 		offsettable[x[i].order] = rawbuf - offsetbase;
--- a/head/contrib/bind9/lib/dns/resolver.c	Wed Jul 25 16:20:13 2012 +0300
+++ b/head/contrib/bind9/lib/dns/resolver.c	Wed Jul 25 16:21:35 2012 +0300
@@ -180,7 +180,9 @@
 	dns_rdatatype_t			type;
 	unsigned int			options;
 	unsigned int			bucketnum;
-	char *			info;
+	char *				info;
+	isc_mem_t *			mctx;
+
 	/*% Locked by appropriate bucket lock. */
 	fetchstate			state;
 	isc_boolean_t			want_shutdown;
@@ -446,7 +448,8 @@
 static void resquery_connected(isc_task_t *task, isc_event_t *event);
 static void fctx_try(fetchctx_t *fctx, isc_boolean_t retrying,
 		     isc_boolean_t badcache);
-static isc_boolean_t fctx_destroy(fetchctx_t *fctx);
+static void fctx_destroy(fetchctx_t *fctx);
+static isc_boolean_t fctx_unlink(fetchctx_t *fctx);
 static isc_result_t ncache_adderesult(dns_message_t *message,
 				      dns_db_t *cache, dns_dbnode_t *node,
 				      dns_rdatatype_t covers,
@@ -478,8 +481,7 @@
 	dns_valarg_t *valarg;
 	isc_result_t result;
 
-	valarg = isc_mem_get(fctx->res->buckets[fctx->bucketnum].mctx,
-			     sizeof(*valarg));
+	valarg = isc_mem_get(fctx->mctx, sizeof(*valarg));
 	if (valarg == NULL)
 		return (ISC_R_NOMEMORY);
 
@@ -501,8 +503,7 @@
 		}
 		ISC_LIST_APPEND(fctx->validators, validator, link);
 	} else
-		isc_mem_put(fctx->res->buckets[fctx->bucketnum].mctx,
-			    valarg, sizeof(*valarg));
+		isc_mem_put(fctx->mctx, valarg, sizeof(*valarg));
 	return (result);
 }
 
@@ -1386,13 +1387,12 @@
 
 	dns_message_reset(fctx->rmessage, DNS_MESSAGE_INTENTPARSE);
 
-	query = isc_mem_get(res->buckets[fctx->bucketnum].mctx,
-			    sizeof(*query));
+	query = isc_mem_get(fctx->mctx, sizeof(*query));
 	if (query == NULL) {
 		result = ISC_R_NOMEMORY;
 		goto stop_idle_timer;
 	}
-	query->mctx = res->buckets[fctx->bucketnum].mctx;
+	query->mctx = fctx->mctx;
 	query->options = options;
 	query->attributes = 0;
 	query->sends = 0;
@@ -1569,8 +1569,7 @@
  cleanup_query:
 	if (query->connects == 0) {
 		query->magic = 0;
-		isc_mem_put(res->buckets[fctx->bucketnum].mctx,
-			    query, sizeof(*query));
+		isc_mem_put(fctx->mctx, query, sizeof(*query));
 	}
 
  stop_idle_timer:
@@ -1600,8 +1599,7 @@
 	if (bad_edns(fctx, address))
 		return;
 
-	sa = isc_mem_get(fctx->res->buckets[fctx->bucketnum].mctx,
-			 sizeof(*sa));
+	sa = isc_mem_get(fctx->mctx, sizeof(*sa));
 	if (sa == NULL)
 		return;
 
@@ -1630,8 +1628,7 @@
 	if (triededns(fctx, address))
 		return;
 
-	sa = isc_mem_get(fctx->res->buckets[fctx->bucketnum].mctx,
-			 sizeof(*sa));
+	sa = isc_mem_get(fctx->mctx, sizeof(*sa));
 	if (sa == NULL)
 		return;
 
@@ -1660,8 +1657,7 @@
 	if (triededns512(fctx, address))
 		return;
 
-	sa = isc_mem_get(fctx->res->buckets[fctx->bucketnum].mctx,
-			 sizeof(*sa));
+	sa = isc_mem_get(fctx->mctx, sizeof(*sa));
 	if (sa == NULL)
 		return;
 
@@ -2166,8 +2162,8 @@
 	isc_boolean_t want_try = ISC_FALSE;
 	isc_boolean_t want_done = ISC_FALSE;
 	isc_boolean_t bucket_empty = ISC_FALSE;
+	unsigned int bucketnum;
 	isc_boolean_t destroy = ISC_FALSE;
-	unsigned int bucketnum;
 
 	find = event->ev_sender;
 	fctx = event->ev_arg;
@@ -2205,17 +2201,14 @@
 		}
 	} else if (SHUTTINGDOWN(fctx) && fctx->pending == 0 &&
 		   fctx->nqueries == 0 && ISC_LIST_EMPTY(fctx->validators)) {
-		/*
-		 * Note that we had to wait until we had the lock before
-		 * looking at fctx->references.
-		 */
-		if (fctx->references == 0)
+
+		if (fctx->references == 0) {
+			bucket_empty = fctx_unlink(fctx);
 			destroy = ISC_TRUE;
+		}
 	}
 	UNLOCK(&res->buckets[bucketnum].lock);
 
-	if (destroy)
-		bucket_empty = fctx_destroy(fctx);
 	isc_event_free(&event);
 	dns_adb_destroyfind(&find);
 
@@ -2223,8 +2216,11 @@
 		fctx_try(fctx, ISC_TRUE, ISC_FALSE);
 	else if (want_done)
 		fctx_done(fctx, ISC_R_FAILURE, __LINE__);
-	else if (bucket_empty)
-		empty_bucket(res);
+	else if (destroy) {
+			fctx_destroy(fctx);
+		if (bucket_empty)
+			empty_bucket(res);
+	}
 }
 
 
@@ -2347,8 +2343,7 @@
 
 	FCTXTRACE("add_bad");
 
-	sa = isc_mem_get(fctx->res->buckets[fctx->bucketnum].mctx,
-			 sizeof(*sa));
+	sa = isc_mem_get(fctx->mctx, sizeof(*sa));
 	if (sa == NULL)
 		return;
 	*sa = *address;
@@ -2631,12 +2626,9 @@
 			fctx->fwdpolicy = forwarders->fwdpolicy;
 			if (fctx->fwdpolicy == dns_fwdpolicy_only &&
 			    isstrictsubdomain(domain, &fctx->domain)) {
-				isc_mem_t *mctx;
-
-				mctx = res->buckets[fctx->bucketnum].mctx;
-				dns_name_free(&fctx->domain, mctx);
+				dns_name_free(&fctx->domain, fctx->mctx);
 				dns_name_init(&fctx->domain, NULL);
-				result = dns_name_dup(domain, mctx,
+				result = dns_name_dup(domain, fctx->mctx,
 						      &fctx->domain);
 				if (result != ISC_R_SUCCESS)
 					return (result);
@@ -3075,10 +3067,9 @@
 }
 
 static isc_boolean_t
-fctx_destroy(fetchctx_t *fctx) {
+fctx_unlink(fetchctx_t *fctx) {
 	dns_resolver_t *res;
 	unsigned int bucketnum;
-	isc_sockaddr_t *sa, *next_sa;
 
 	/*
 	 * Caller must be holding the bucket lock.
@@ -3095,61 +3086,13 @@
 	REQUIRE(fctx->references == 0);
 	REQUIRE(ISC_LIST_EMPTY(fctx->validators));
 
-	FCTXTRACE("destroy");
+	FCTXTRACE("unlink");
 
 	res = fctx->res;
 	bucketnum = fctx->bucketnum;
 
 	ISC_LIST_UNLINK(res->buckets[bucketnum].fctxs, fctx, link);
 
-	/*
-	 * Free bad.
-	 */
-	for (sa = ISC_LIST_HEAD(fctx->bad);
-	     sa != NULL;
-	     sa = next_sa) {
-		next_sa = ISC_LIST_NEXT(sa, link);
-		ISC_LIST_UNLINK(fctx->bad, sa, link);
-		isc_mem_put(res->buckets[bucketnum].mctx, sa, sizeof(*sa));
-	}
-
-	for (sa = ISC_LIST_HEAD(fctx->edns);
-	     sa != NULL;
-	     sa = next_sa) {
-		next_sa = ISC_LIST_NEXT(sa, link);
-		ISC_LIST_UNLINK(fctx->edns, sa, link);
-		isc_mem_put(res->buckets[bucketnum].mctx, sa, sizeof(*sa));
-	}
-
-	for (sa = ISC_LIST_HEAD(fctx->edns512);
-	     sa != NULL;
-	     sa = next_sa) {
-		next_sa = ISC_LIST_NEXT(sa, link);
-		ISC_LIST_UNLINK(fctx->edns512, sa, link);
-		isc_mem_put(res->buckets[bucketnum].mctx, sa, sizeof(*sa));
-	}
-
-	for (sa = ISC_LIST_HEAD(fctx->bad_edns);
-	     sa != NULL;
-	     sa = next_sa) {
-		next_sa = ISC_LIST_NEXT(sa, link);
-		ISC_LIST_UNLINK(fctx->bad_edns, sa, link);
-		isc_mem_put(res->buckets[bucketnum].mctx, sa, sizeof(*sa));
-	}
-
-	isc_timer_detach(&fctx->timer);
-	dns_message_destroy(&fctx->rmessage);
-	dns_message_destroy(&fctx->qmessage);
-	if (dns_name_countlabels(&fctx->domain) > 0)
-		dns_name_free(&fctx->domain, res->buckets[bucketnum].mctx);
-	if (dns_rdataset_isassociated(&fctx->nameservers))
-		dns_rdataset_disassociate(&fctx->nameservers);
-	dns_name_free(&fctx->name, res->buckets[bucketnum].mctx);
-	dns_db_detach(&fctx->cache);
-	dns_adb_detach(&fctx->adb);
-	isc_mem_free(res->buckets[bucketnum].mctx, fctx->info);
-	isc_mem_put(res->buckets[bucketnum].mctx, fctx, sizeof(*fctx));
-
 	LOCK(&res->nlock);
 	res->nfctx--;
 	UNLOCK(&res->nlock);
@@ -3161,6 +3104,73 @@
 	return (ISC_FALSE);
 }
 
+static void
+fctx_destroy(fetchctx_t *fctx) {
+	isc_sockaddr_t *sa, *next_sa;
+
+	REQUIRE(VALID_FCTX(fctx));
+	REQUIRE(fctx->state == fetchstate_done ||
+		fctx->state == fetchstate_init);
+	REQUIRE(ISC_LIST_EMPTY(fctx->events));
+	REQUIRE(ISC_LIST_EMPTY(fctx->queries));
+	REQUIRE(ISC_LIST_EMPTY(fctx->finds));
+	REQUIRE(ISC_LIST_EMPTY(fctx->altfinds));
+	REQUIRE(fctx->pending == 0);
+	REQUIRE(fctx->references == 0);
+	REQUIRE(ISC_LIST_EMPTY(fctx->validators));
+	REQUIRE(!ISC_LINK_LINKED(fctx, link));
+
+	FCTXTRACE("destroy");
+
+	/*
+	 * Free bad.
+	 */
+	for (sa = ISC_LIST_HEAD(fctx->bad);
+	     sa != NULL;
+	     sa = next_sa) {
+		next_sa = ISC_LIST_NEXT(sa, link);
+		ISC_LIST_UNLINK(fctx->bad, sa, link);
+		isc_mem_put(fctx->mctx, sa, sizeof(*sa));
+	}
+
+	for (sa = ISC_LIST_HEAD(fctx->edns);
+	     sa != NULL;
+	     sa = next_sa) {
+		next_sa = ISC_LIST_NEXT(sa, link);
+		ISC_LIST_UNLINK(fctx->edns, sa, link);
+		isc_mem_put(fctx->mctx, sa, sizeof(*sa));
+	}
+
+	for (sa = ISC_LIST_HEAD(fctx->edns512);
+	     sa != NULL;
+	     sa = next_sa) {
+		next_sa = ISC_LIST_NEXT(sa, link);
+		ISC_LIST_UNLINK(fctx->edns512, sa, link);
+		isc_mem_put(fctx->mctx, sa, sizeof(*sa));
+	}
+
+	for (sa = ISC_LIST_HEAD(fctx->bad_edns);
+	     sa != NULL;
+	     sa = next_sa) {
+		next_sa = ISC_LIST_NEXT(sa, link);
+		ISC_LIST_UNLINK(fctx->bad_edns, sa, link);
+		isc_mem_put(fctx->mctx, sa, sizeof(*sa));
+	}
+
+	isc_timer_detach(&fctx->timer);
+	dns_message_destroy(&fctx->rmessage);
+	dns_message_destroy(&fctx->qmessage);
+	if (dns_name_countlabels(&fctx->domain) > 0)
+		dns_name_free(&fctx->domain, fctx->mctx);
+	if (dns_rdataset_isassociated(&fctx->nameservers))
+		dns_rdataset_disassociate(&fctx->nameservers);
+	dns_name_free(&fctx->name, fctx->mctx);
+	dns_db_detach(&fctx->cache);
+	dns_adb_detach(&fctx->adb);
+	isc_mem_free(fctx->mctx, fctx->info);
+	isc_mem_putanddetach(&fctx->mctx, fctx, sizeof(*fctx));
+}
+
 /*
  * Fetch event handlers.
  */
@@ -3258,6 +3268,7 @@
 	dns_resolver_t *res;
 	unsigned int bucketnum;
 	dns_validator_t *validator;
+	isc_boolean_t destroy = ISC_FALSE;
 
 	REQUIRE(VALID_FCTX(fctx));
 
@@ -3307,13 +3318,18 @@
 	}
 
 	if (fctx->references == 0 && fctx->pending == 0 &&
-	    fctx->nqueries == 0 && ISC_LIST_EMPTY(fctx->validators))
-		bucket_empty = fctx_destroy(fctx);
+	    fctx->nqueries == 0 && ISC_LIST_EMPTY(fctx->validators)) {
+		bucket_empty = fctx_unlink(fctx);
+		destroy = ISC_TRUE;
+	}
 
 	UNLOCK(&res->buckets[bucketnum].lock);
 
-	if (bucket_empty)
-		empty_bucket(res);
+	if (destroy) {
+		fctx_destroy(fctx);
+		if (bucket_empty)
+			empty_bucket(res);
+	}
 }
 
 static void
@@ -3322,6 +3338,7 @@
 	isc_boolean_t done = ISC_FALSE, bucket_empty = ISC_FALSE;
 	dns_resolver_t *res;
 	unsigned int bucketnum;
+	isc_boolean_t destroy = ISC_FALSE;
 
 	REQUIRE(VALID_FCTX(fctx));
 
@@ -3354,7 +3371,8 @@
 			/*
 			 * It's now safe to destroy this fctx.
 			 */
-			bucket_empty = fctx_destroy(fctx);
+			bucket_empty = fctx_unlink(fctx);
+			destroy = ISC_TRUE;
 		}
 		done = ISC_TRUE;
 	} else {
@@ -3376,6 +3394,8 @@
 	if (!done) {
 		isc_result_t result;
 
+		INSIST(!destroy);
+
 		/*
 		 * All is well.  Start working on the fetch.
 		 */
@@ -3384,8 +3404,11 @@
 			fctx_done(fctx, result, __LINE__);
 		else
 			fctx_try(fctx, ISC_FALSE, ISC_FALSE);
-	} else if (bucket_empty)
-		empty_bucket(res);
+	} else if (destroy) {
+			fctx_destroy(fctx);
+		if (bucket_empty)
+			empty_bucket(res);
+	}
 }
 
 /*
@@ -3473,27 +3496,29 @@
 	char buf[DNS_NAME_FORMATSIZE + DNS_RDATATYPE_FORMATSIZE];
 	char typebuf[DNS_RDATATYPE_FORMATSIZE];
 	dns_name_t suffix;
+	isc_mem_t *mctx;
 
 	/*
 	 * Caller must be holding the lock for bucket number 'bucketnum'.
 	 */
 	REQUIRE(fctxp != NULL && *fctxp == NULL);
 
-	fctx = isc_mem_get(res->buckets[bucketnum].mctx, sizeof(*fctx));
+	mctx = res->buckets[bucketnum].mctx;
+	fctx = isc_mem_get(mctx, sizeof(*fctx));
 	if (fctx == NULL)
 		return (ISC_R_NOMEMORY);
 	dns_name_format(name, buf, sizeof(buf));
 	dns_rdatatype_format(type, typebuf, sizeof(typebuf));
 	strcat(buf, "/");       /* checked */
 	strcat(buf, typebuf);   /* checked */
-	fctx->info = isc_mem_strdup(res->buckets[bucketnum].mctx, buf);
+	fctx->info = isc_mem_strdup(mctx, buf);
 	if (fctx->info == NULL) {
 		result = ISC_R_NOMEMORY;
 		goto cleanup_fetch;
 	}
 	FCTXTRACE("create");
 	dns_name_init(&fctx->name, NULL);
-	result = dns_name_dup(name, res->buckets[bucketnum].mctx, &fctx->name);
+	result = dns_name_dup(name, mctx, &fctx->name);
 	if (result != ISC_R_SUCCESS)
 		goto cleanup_info;
 	dns_name_init(&fctx->domain, NULL);
@@ -3596,9 +3621,7 @@
 						      NULL);
 			if (result != ISC_R_SUCCESS)
 				goto cleanup_name;
-			result = dns_name_dup(domain,
-					      res->buckets[bucketnum].mctx,
-					      &fctx->domain);
+			result = dns_name_dup(domain, mctx, &fctx->domain);
 			if (result != ISC_R_SUCCESS) {
 				dns_rdataset_disassociate(&fctx->nameservers);
 				goto cleanup_name;
@@ -3609,16 +3632,12 @@
 			/*
 			 * We're in forward-only mode.  Set the query domain.
 			 */
-			result = dns_name_dup(domain,
-					      res->buckets[bucketnum].mctx,
-					      &fctx->domain);
+			result = dns_name_dup(domain, mctx, &fctx->domain);
 			if (result != ISC_R_SUCCESS)
 				goto cleanup_name;
 		}
 	} else {
-		result = dns_name_dup(domain,
-				      res->buckets[bucketnum].mctx,
-				      &fctx->domain);
+		result = dns_name_dup(domain, mctx, &fctx->domain);
 		if (result != ISC_R_SUCCESS)
 			goto cleanup_name;
 		dns_rdataset_clone(nameservers, &fctx->nameservers);
@@ -3631,16 +3650,14 @@
 	INSIST(dns_name_issubdomain(&fctx->name, &fctx->domain));
 
 	fctx->qmessage = NULL;
-	result = dns_message_create(res->buckets[bucketnum].mctx,
-				    DNS_MESSAGE_INTENTRENDER,
+	result = dns_message_create(mctx, DNS_MESSAGE_INTENTRENDER,
 				    &fctx->qmessage);
 
 	if (result != ISC_R_SUCCESS)
 		goto cleanup_domain;
 
 	fctx->rmessage = NULL;
-	result = dns_message_create(res->buckets[bucketnum].mctx,
-				    DNS_MESSAGE_INTENTPARSE,
+	result = dns_message_create(mctx, DNS_MESSAGE_INTENTPARSE,
 				    &fctx->rmessage);
 
 	if (result != ISC_R_SUCCESS)
@@ -3690,6 +3707,8 @@
 	dns_db_attach(res->view->cachedb, &fctx->cache);
 	fctx->adb = NULL;
 	dns_adb_attach(res->view->adb, &fctx->adb);
+	fctx->mctx = NULL;
+	isc_mem_attach(mctx, &fctx->mctx);
 
 	ISC_LIST_INIT(fctx->events);
 	ISC_LINK_INIT(fctx, link);
@@ -3713,18 +3732,18 @@
 
  cleanup_domain:
 	if (dns_name_countlabels(&fctx->domain) > 0)
-		dns_name_free(&fctx->domain, res->buckets[bucketnum].mctx);
+		dns_name_free(&fctx->domain, mctx);
 	if (dns_rdataset_isassociated(&fctx->nameservers))
 		dns_rdataset_disassociate(&fctx->nameservers);
 
  cleanup_name:
-	dns_name_free(&fctx->name, res->buckets[bucketnum].mctx);
+	dns_name_free(&fctx->name, mctx);
 
  cleanup_info:
-	isc_mem_free(res->buckets[bucketnum].mctx, fctx->info);
+	isc_mem_free(mctx, fctx->info);
 
  cleanup_fetch:
-	isc_mem_put(res->buckets[bucketnum].mctx, fctx, sizeof(*fctx));
+	isc_mem_put(mctx, fctx, sizeof(*fctx));
 
 	return (result);
 }
@@ -3934,6 +3953,7 @@
 	isc_boolean_t bucket_empty = ISC_FALSE;
 	dns_resolver_t *res = fctx->res;
 	dns_validator_t *validator, *next_validator;
+	isc_boolean_t destroy = ISC_FALSE;
 
 	REQUIRE(SHUTTINGDOWN(fctx));
 
@@ -3949,11 +3969,15 @@
 		dns_validator_cancel(validator);
 	}
 
-	if (fctx->references == 0 && ISC_LIST_EMPTY(fctx->validators))
-		bucket_empty = fctx_destroy(fctx);
+	if (fctx->references == 0 && ISC_LIST_EMPTY(fctx->validators)) {
+		bucket_empty = fctx_unlink(fctx);
+		destroy = ISC_TRUE;
+	}
  unlock:
 	if (!locked)
 		UNLOCK(&res->buckets[bucketnum].lock);
+	if (destroy)
+		fctx_destroy(fctx);
 	return (bucket_empty);
 }
 
@@ -4008,8 +4032,7 @@
 	 * destroy the fctx if necessary.
 	 */
 	dns_validator_destroy(&vevent->validator);
-	isc_mem_put(res->buckets[fctx->bucketnum].mctx,
-		    valarg, sizeof(*valarg));
+	isc_mem_put(fctx->mctx, valarg, sizeof(*valarg));
 
 	negative = ISC_TF(vevent->rdataset == NULL);
 
@@ -5723,14 +5746,11 @@
 		 *		if so we should bail out.
 		 */
 		INSIST(dns_name_countlabels(&fctx->domain) > 0);
-		dns_name_free(&fctx->domain,
-			      fctx->res->buckets[fctx->bucketnum].mctx);
+		dns_name_free(&fctx->domain, fctx->mctx);
 		if (dns_rdataset_isassociated(&fctx->nameservers))
 			dns_rdataset_disassociate(&fctx->nameservers);
 		dns_name_init(&fctx->domain, NULL);
-		result = dns_name_dup(ns_name,
-				      fctx->res->buckets[fctx->bucketnum].mctx,
-				      &fctx->domain);
+		result = dns_name_dup(ns_name, fctx->mctx, &fctx->domain);
 		if (result != ISC_R_SUCCESS)
 			return (result);
 		fctx->attributes |= FCTX_ATTR_WANTCACHE;
@@ -6232,7 +6252,8 @@
 			 * This fctx is already shutdown; we were just
 			 * waiting for the last reference to go away.
 			 */
-			bucket_empty = fctx_destroy(fctx);
+			bucket_empty = fctx_unlink(fctx);
+			fctx_destroy(fctx);
 		} else {
 			/*
 			 * Initiate shutdown.
@@ -6287,12 +6308,9 @@
 		fctx->ns_ttl = fctx->nameservers.ttl;
 		fctx->ns_ttl_ok = ISC_TRUE;
 		log_ns_ttl(fctx, "resume_dslookup");
-		dns_name_free(&fctx->domain,
-			      fctx->res->buckets[bucketnum].mctx);
+		dns_name_free(&fctx->domain, fctx->mctx);
 		dns_name_init(&fctx->domain, NULL);
-		result = dns_name_dup(&fctx->nsname,
-				      fctx->res->buckets[bucketnum].mctx,
-				      &fctx->domain);
+		result = dns_name_dup(&fctx->nsname, fctx->mctx, &fctx->domain);
 		if (result != ISC_R_SUCCESS) {
 			fctx_done(fctx, DNS_R_SERVFAIL, __LINE__);
 			goto cleanup;
@@ -7210,12 +7228,9 @@
 				fctx_done(fctx, DNS_R_SERVFAIL, __LINE__);
 				return;
 			}
-			dns_name_free(&fctx->domain,
-				      fctx->res->buckets[fctx->bucketnum].mctx);
+			dns_name_free(&fctx->domain, fctx->mctx);
 			dns_name_init(&fctx->domain, NULL);
-			result = dns_name_dup(fname,
-					      fctx->res->buckets[fctx->bucketnum].mctx,
-					      &fctx->domain);
+			result = dns_name_dup(fname, fctx->mctx, &fctx->domain);
 			if (result != ISC_R_SUCCESS) {
 				fctx_done(fctx, DNS_R_SERVFAIL, __LINE__);
 				return;
@@ -7955,6 +7970,7 @@
 	unsigned int count = 0;
 	unsigned int spillat;
 	unsigned int spillatmin;
+	isc_boolean_t destroy = ISC_FALSE;
 
 	UNUSED(forwarders);
 
@@ -8052,16 +8068,20 @@
 			isc_task_send(res->buckets[bucketnum].task, &event);
 		} else {
 			/*
-			 * We don't care about the result of fctx_destroy()
+			 * We don't care about the result of fctx_unlink()
 			 * since we know we're not exiting.
 			 */
-			(void)fctx_destroy(fctx);
+			(void)fctx_unlink(fctx);
+			destroy = ISC_TRUE;
 		}
 	}
 
  unlock:
 	UNLOCK(&res->buckets[bucketnum].lock);
 
+	if (destroy)
+		fctx_destroy(fctx);
+
 	if (result == ISC_R_SUCCESS) {
 		FTRACE("created");
 		*fetchp = fetch;
@@ -8428,6 +8448,7 @@
 			goto cleanup;
 		bad->type = type;
 		bad->hashval = hashval;
+		bad->expire = *expire;
 		isc_buffer_init(&buffer, bad + 1, name->length);
 		dns_name_init(&bad->name, NULL);
 		dns_name_copy(name, &bad->name, &buffer);
@@ -8439,8 +8460,8 @@
 		if (resolver->badcount < resolver->badhash * 2 &&
 		    resolver->badhash > DNS_BADCACHE_SIZE)
 			resizehash(resolver, &now, ISC_FALSE);
-	}
-	bad->expire = *expire;
+	} else
+		bad->expire = *expire;
  cleanup:
 	UNLOCK(&resolver->lock);
 }
--- a/head/contrib/bind9/lib/dns/sdb.c	Wed Jul 25 16:20:13 2012 +0300
+++ b/head/contrib/bind9/lib/dns/sdb.c	Wed Jul 25 16:21:35 2012 +0300
@@ -216,12 +216,13 @@
 
 	REQUIRE(drivername != NULL);
 	REQUIRE(methods != NULL);
-	REQUIRE(methods->lookup != NULL);
+	REQUIRE(methods->lookup != NULL || methods->lookup2 != NULL);
 	REQUIRE(mctx != NULL);
 	REQUIRE(sdbimp != NULL && *sdbimp == NULL);
 	REQUIRE((flags & ~(DNS_SDBFLAG_RELATIVEOWNER |
 			   DNS_SDBFLAG_RELATIVERDATA |
-			   DNS_SDBFLAG_THREADSAFE)) == 0);
+			   DNS_SDBFLAG_THREADSAFE|
+			   DNS_SDBFLAG_DNS64)) == 0);
 
 	imp = isc_mem_get(mctx, sizeof(dns_sdbimplementation_t));
 	if (imp == NULL)
@@ -280,8 +281,9 @@
 }
 
 isc_result_t
-dns_sdb_putrdata(dns_sdblookup_t *lookup, dns_rdatatype_t typeval, dns_ttl_t ttl,
-		 const unsigned char *rdatap, unsigned int rdlen)
+dns_sdb_putrdata(dns_sdblookup_t *lookup, dns_rdatatype_t typeval,
+		 dns_ttl_t ttl, const unsigned char *rdatap,
+		 unsigned int rdlen)
 {
 	dns_rdatalist_t *rdatalist;
 	dns_rdata_t *rdata;
@@ -338,7 +340,6 @@
 	return (result);
 }
 
-
 isc_result_t
 dns_sdb_putrr(dns_sdblookup_t *lookup, const char *type, dns_ttl_t ttl,
 	      const char *data)
@@ -737,6 +738,8 @@
 	char namestr[DNS_NAME_MAXTEXT + 1];
 	isc_boolean_t isorigin;
 	dns_sdbimplementation_t *imp;
+	dns_name_t relname;
+	unsigned int labels;
 
 	REQUIRE(VALID_SDB(sdb));
 	REQUIRE(create == ISC_FALSE);
@@ -747,33 +750,46 @@
 
 	imp = sdb->implementation;
 
-	isc_buffer_init(&b, namestr, sizeof(namestr));
-	if ((imp->flags & DNS_SDBFLAG_RELATIVEOWNER) != 0) {
-		dns_name_t relname;
-		unsigned int labels;
+	isorigin = dns_name_equal(name, &sdb->common.origin);
+
+	if (imp->methods->lookup2 != NULL) {
+		if ((imp->flags & DNS_SDBFLAG_RELATIVEOWNER) != 0) {
+			labels = dns_name_countlabels(name) -
+				 dns_name_countlabels(&db->origin);
+			dns_name_init(&relname, NULL);
+			dns_name_getlabelsequence(name, 0, labels, &relname);
+			name = &relname;
+		}
+	} else {
+		isc_buffer_init(&b, namestr, sizeof(namestr));
+		if ((imp->flags & DNS_SDBFLAG_RELATIVEOWNER) != 0) {
 
-		labels = dns_name_countlabels(name) -
-			 dns_name_countlabels(&db->origin);
-		dns_name_init(&relname, NULL);
-		dns_name_getlabelsequence(name, 0, labels, &relname);
-		result = dns_name_totext(&relname, ISC_TRUE, &b);
-		if (result != ISC_R_SUCCESS)
-			return (result);
-	} else {
-		result = dns_name_totext(name, ISC_TRUE, &b);
-		if (result != ISC_R_SUCCESS)
-			return (result);
+			labels = dns_name_countlabels(name) -
+				 dns_name_countlabels(&db->origin);
+			dns_name_init(&relname, NULL);
+			dns_name_getlabelsequence(name, 0, labels, &relname);
+			result = dns_name_totext(&relname, ISC_TRUE, &b);
+			if (result != ISC_R_SUCCESS)
+				return (result);
+		} else {
+			result = dns_name_totext(name, ISC_TRUE, &b);
+			if (result != ISC_R_SUCCESS)
+				return (result);
+		}
+		isc_buffer_putuint8(&b, 0);
 	}
-	isc_buffer_putuint8(&b, 0);
 
 	result = createnode(sdb, &node);
 	if (result != ISC_R_SUCCESS)
 		return (result);
 
-	isorigin = dns_name_equal(name, &sdb->common.origin);
-
 	MAYBE_LOCK(sdb);
-	result = imp->methods->lookup(sdb->zone, namestr, sdb->dbdata, node);
+	if (imp->methods->lookup2 != NULL)
+		result = imp->methods->lookup2(&sdb->common.origin, name,
+					       sdb->dbdata, node);
+	else
+		result = imp->methods->lookup(sdb->zone, namestr, sdb->dbdata,
+					      node);
 	MAYBE_UNLOCK(sdb);
 	if (result != ISC_R_SUCCESS &&
 	    !(result == ISC_R_NOTFOUND &&
@@ -811,13 +827,13 @@
 	unsigned int nlabels, olabels;
 	isc_result_t result;
 	unsigned int i;
+	unsigned int flags;
 
 	REQUIRE(VALID_SDB(sdb));
 	REQUIRE(nodep == NULL || *nodep == NULL);
 	REQUIRE(version == NULL || version == (void *) &dummy);
 
 	UNUSED(options);
-	UNUSED(sdb);
 
 	if (!dns_name_issubdomain(name, &db->origin))
 		return (DNS_R_NXDOMAIN);
@@ -834,17 +850,37 @@
 	}
 
 	result = DNS_R_NXDOMAIN;
-
-	for (i = olabels; i <= nlabels; i++) {
+	flags = sdb->implementation->flags;
+	i = (flags & DNS_SDBFLAG_DNS64) != 0 ? nlabels : olabels;
+	for (; i <= nlabels; i++) {
 		/*
 		 * Look up the next label.
 		 */
 		dns_name_getlabelsequence(name, nlabels - i, i, xname);
 		result = findnode(db, xname, ISC_FALSE, &node);
-		if (result != ISC_R_SUCCESS) {
+		if (result == ISC_R_NOTFOUND) {
+			/*
+			 * No data at zone apex?
+			 */
+			if (i == olabels)
+				return (DNS_R_BADDB);
 			result = DNS_R_NXDOMAIN;
 			continue;
 		}
+		if (result != ISC_R_SUCCESS)
+			return (result);
+
+		/*
+		 * DNS64 zone's don't have DNAME or NS records.
+		 */
+		if ((flags & DNS_SDBFLAG_DNS64) != 0)
+			goto skip;
+
+		/*
+		 * DNS64 zone's don't have DNAME or NS records.
+		 */
+		if ((flags & DNS_SDBFLAG_DNS64) != 0)
+			goto skip;
 
 		/*
 		 * Look for a DNAME at the current label, unless this is
@@ -895,6 +931,7 @@
 			continue;
 		}
 
+ skip:
 		/*
 		 * If we're looking for ANY, we're done.
 		 */
--- a/head/contrib/bind9/lib/dns/tkey.c	Wed Jul 25 16:20:13 2012 +0300
+++ b/head/contrib/bind9/lib/dns/tkey.c	Wed Jul 25 16:21:35 2012 +0300
@@ -485,9 +485,9 @@
 		tkeyout->error = dns_tsigerror_badkey;
 		tkey_log("process_gsstkey(): dns_tsigerror_badkey");    /* XXXSRA */
 		return (ISC_R_SUCCESS);
-	} else if (result == ISC_R_FAILURE)
+	}
+	if (result != DNS_R_CONTINUE && result != ISC_R_SUCCESS)
 		goto failure;
-	ENSURE(result == DNS_R_CONTINUE || result == ISC_R_SUCCESS);
 	/*
 	 * XXXDCL Section 4.1.3: Limit GSS_S_CONTINUE_NEEDED to 10 times.
 	 */
--- a/head/contrib/bind9/lib/dns/zone.c	Wed Jul 25 16:20:13 2012 +0300
+++ b/head/contrib/bind9/lib/dns/zone.c	Wed Jul 25 16:21:35 2012 +0300
@@ -429,6 +429,7 @@
 	isc_ratelimiter_t *	rl;
 	isc_rwlock_t		rwlock;
 	isc_mutex_t		iolock;
+	isc_rwlock_t		urlock;
 
 	/* Locked by rwlock. */
 	dns_zonelist_t		zones;
@@ -446,7 +447,7 @@
 	dns_iolist_t		high;
 	dns_iolist_t		low;
 
-	/* Locked by rwlock. */
+	/* Locked by urlock. */
 	/* LRU cache */
 	struct dns_unreachable	unreachable[UNREACH_CHACHE_SIZE];
 };
@@ -1676,12 +1677,16 @@
 
 	LOCK_ZONE(zone);
 	ZONEDB_LOCK(&zone->dblock, isc_rwlocktype_read);
-	dns_db_currentversion(zone->db, &version);
-	result = dns_master_dumpinc2(zone->mctx, zone->db, version,
-				     &dns_master_style_default,
-				     zone->masterfile, zone->task, dump_done,
-				     zone, &zone->dctx, zone->masterformat);
-	dns_db_closeversion(zone->db, &version, ISC_FALSE);
+	if (zone->db != NULL) {
+		dns_db_currentversion(zone->db, &version);
+		result = dns_master_dumpinc2(zone->mctx, zone->db, version,
+					     &dns_master_style_default,
+					     zone->masterfile, zone->task,
+					     dump_done, zone, &zone->dctx,
+					     zone->masterformat);
+		dns_db_closeversion(zone->db, &version, ISC_FALSE);
+	} else
+		result = ISC_R_CANCELED;
 	ZONEDB_UNLOCK(&zone->dblock, isc_rwlocktype_read);
 	UNLOCK_ZONE(zone);
 	if (result != DNS_R_CONTINUE)
@@ -2695,7 +2700,8 @@
  */
 static void
 set_refreshkeytimer(dns_zone_t *zone, dns_rdata_keydata_t *key,
-		    isc_stdtime_t now) {
+		    isc_stdtime_t now)
+{
 	const char me[] = "set_refreshkeytimer";
 	isc_stdtime_t then;
 	isc_time_t timenow, timethen;
@@ -4443,6 +4449,7 @@
 	/*
 	 * Everything is ok so attach to the zone.
 	 */
+	zone->curmaster = 0;
 	zone->masters = new;
 	zone->mastersok = newok;
 	zone->masterkeynames = newname;
@@ -8020,13 +8027,14 @@
 	case dns_zone_master:
 	case dns_zone_slave:
 	case dns_zone_key:
+	case dns_zone_stub:
 		LOCK_ZONE(zone);
 		if (zone->masterfile != NULL &&
 		    isc_time_compare(&now, &zone->dumptime) >= 0 &&
 		    DNS_ZONE_FLAG(zone, DNS_ZONEFLG_LOADED) &&
 		    DNS_ZONE_FLAG(zone, DNS_ZONEFLG_NEEDDUMP)) {
 			dumping = was_dumping(zone);
-		} else
+		} else 
 			dumping = ISC_TRUE;
 		UNLOCK_ZONE(zone);
 		if (!dumping) {
@@ -8379,7 +8387,7 @@
 		goto fail;
 	}
 
-	if (compact) {
+	if (compact && zone->type != dns_zone_stub) {
 		dns_zone_t *dummy = NULL;
 		LOCK_ZONE(zone);
 		zone_iattach(zone, &dummy);
@@ -8531,6 +8539,14 @@
 
 	REQUIRE(LOCKED_ZONE(zone));
 
+	if (!DNS_ZONE_FLAG(zone, DNS_ZONEFLG_FLUSH) ||
+	    !DNS_ZONE_FLAG(zone, DNS_ZONEFLG_DUMPING)) {
+		if (zone->writeio != NULL)
+			zonemgr_cancelio(zone->writeio);
+
+		if (zone->dctx != NULL)
+			dns_dumpctx_cancel(zone->dctx);
+	}
 	ZONEDB_LOCK(&zone->dblock, isc_rwlocktype_write);
 	zone_detachdb(zone);
 	ZONEDB_UNLOCK(&zone->dblock, isc_rwlocktype_write);
@@ -9227,7 +9243,7 @@
 	dns_zone_t *zone = NULL;
 	char master[ISC_SOCKADDR_FORMATSIZE];
 	char source[ISC_SOCKADDR_FORMATSIZE];
-	isc_uint32_t nscnt, cnamecnt;
+	isc_uint32_t nscnt, cnamecnt, refresh, retry, expire;
 	isc_result_t result;
 	isc_time_t now;
 	isc_boolean_t exiting = ISC_FALSE;
@@ -9245,6 +9261,8 @@
 
 	TIME_NOW(&now);
 
+	LOCK_ZONE(zone);
+
 	if (DNS_ZONE_FLAG(zone, DNS_ZONEFLG_EXITING)) {
 		zone_debuglog(zone, me, 1, "exiting");
 		exiting = ISC_TRUE;
@@ -9257,9 +9275,7 @@
 	if (revent->result != ISC_R_SUCCESS) {
 		if (revent->result == ISC_R_TIMEDOUT &&
 		    !DNS_ZONE_FLAG(zone, DNS_ZONEFLG_NOEDNS)) {
-			LOCK_ZONE(zone);
 			DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_NOEDNS);
-			UNLOCK_ZONE(zone);
 			dns_zone_log(zone, ISC_LOG_DEBUG(1),
 				     "refreshing stub: timeout retrying "
 				     " without EDNS master %s (source %s)",
@@ -9301,9 +9317,7 @@
 				     "refreshing stub: rcode (%.*s) retrying "
 				     "without EDNS master %s (source %s)",
 				     (int)rb.used, rcode, master, source);
-			LOCK_ZONE(zone);
 			DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_NOEDNS);
-			UNLOCK_ZONE(zone);
 			goto same_master;
 		}
 
@@ -9325,9 +9339,7 @@
 				     master, source);
 			goto next_master;
 		}
-		LOCK_ZONE(zone);
 		DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_USEVC);
-		UNLOCK_ZONE(zone);
 		goto same_master;
 	}
 
@@ -9379,24 +9391,33 @@
 	ZONEDB_LOCK(&zone->dblock, isc_rwlocktype_write);
 	if (zone->db == NULL)
 		zone_attachdb(zone, stub->db);
+	result = zone_get_from_db(zone, zone->db, NULL, NULL, NULL, &refresh,
+				  &retry, &expire, NULL, NULL);
+	if (result == ISC_R_SUCCESS) {
+		zone->refresh = RANGE(refresh, zone->minrefresh,
+				      zone->maxrefresh);
+		zone->retry = RANGE(retry, zone->minretry, zone->maxretry);
+		zone->expire = RANGE(expire, zone->refresh + zone->retry,
+				     DNS_MAX_EXPIRE);
+		DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_HAVETIMERS);
+	}
 	ZONEDB_UNLOCK(&zone->dblock, isc_rwlocktype_write);
 	dns_db_detach(&stub->db);
 
-	if (zone->masterfile != NULL) {
-		dns_zone_dump(zone);
-		TIME_NOW(&zone->loadtime);
-	}
-
 	dns_message_destroy(&msg);
 	isc_event_free(&event);
-	LOCK_ZONE(zone);
 	dns_request_destroy(&zone->request);
+
 	DNS_ZONE_CLRFLAG(zone, DNS_ZONEFLG_REFRESH);
+	DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_LOADED);
 	DNS_ZONE_JITTER_ADD(&now, zone->refresh, &zone->refreshtime);
 	isc_interval_set(&i, zone->expire, 0);
 	DNS_ZONE_TIME_ADD(&now, zone->expire, &zone->expiretime);
+
+	if (zone->masterfile != NULL)
+		zone_needdump(zone, 0);
+
 	zone_settimer(zone, &now);
-	UNLOCK_ZONE(zone);
 	goto free_stub;
 
  next_master:
@@ -9407,7 +9428,6 @@
 	if (msg != NULL)
 		dns_message_destroy(&msg);
 	isc_event_free(&event);
-	LOCK_ZONE(zone);
 	dns_request_destroy(&zone->request);
 	/*
 	 * Skip to next failed / untried master.
@@ -9445,25 +9465,23 @@
 			DNS_ZONE_CLRFLAG(zone, DNS_ZONEFLG_REFRESH);
 
 			zone_settimer(zone, &now);
-			UNLOCK_ZONE(zone);
 			goto free_stub;
 		}
 	}
 	queue_soa_query(zone);
-	UNLOCK_ZONE(zone);
 	goto free_stub;
 
  same_master:
 	if (msg != NULL)
 		dns_message_destroy(&msg);
 	isc_event_free(&event);
-	LOCK_ZONE(zone);
 	dns_request_destroy(&zone->request);
-	UNLOCK_ZONE(zone);
 	ns_query(zone, NULL, stub);
+	UNLOCK_ZONE(zone);
 	goto done;
 
  free_stub:
+	UNLOCK_ZONE(zone);
 	stub->magic = 0;
 	dns_zone_idetach(&stub->zone);
 	INSIST(stub->db == NULL);
@@ -9494,6 +9512,7 @@
 	isc_result_t result;
 	isc_uint32_t serial, oldserial = 0;
 	unsigned int j;
+	isc_boolean_t do_queue_xfrin = ISC_FALSE;
 
 	zone = revent->ev_arg;
 	INSIST(DNS_ZONE_VALID(zone));
@@ -9502,6 +9521,10 @@
 
 	ENTER;
 
+	TIME_NOW(&now);
+
+	LOCK_ZONE(zone);
+
 	/*
 	 * if timeout log and next master;
 	 */
@@ -9509,14 +9532,10 @@
 	isc_sockaddr_format(&zone->masteraddr, master, sizeof(master));
 	isc_sockaddr_format(&zone->sourceaddr, source, sizeof(source));
 
-	TIME_NOW(&now);
-
 	if (revent->result != ISC_R_SUCCESS) {
 		if (revent->result == ISC_R_TIMEDOUT &&
 		    !DNS_ZONE_FLAG(zone, DNS_ZONEFLG_NOEDNS)) {
-			LOCK_ZONE(zone);
 			DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_NOEDNS);
-			UNLOCK_ZONE(zone);
 			dns_zone_log(zone, ISC_LOG_DEBUG(1),
 				     "refresh: timeout retrying without EDNS "
 				     "master %s (source %s)", master, source);
@@ -9536,10 +9555,8 @@
 							     &zone->sourceaddr,
 							     &now))
 				{
-					LOCK_ZONE(zone);
 					DNS_ZONE_SETFLAG(zone,
 						     DNS_ZONEFLG_SOABEFOREAXFR);
-					UNLOCK_ZONE(zone);
 					goto tcp_transfer;
 				}
 				dns_zone_log(zone, ISC_LOG_DEBUG(1),
@@ -9586,9 +9603,7 @@
 				     "refresh: rcode (%.*s) retrying without "
 				     "EDNS master %s (source %s)",
 				     (int)rb.used, rcode, master, source);
-			LOCK_ZONE(zone);
 			DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_NOEDNS);
-			UNLOCK_ZONE(zone);
 			goto same_master;
 		}
 		dns_zone_log(zone, ISC_LOG_INFO,
@@ -9614,9 +9629,7 @@
 				     "initiating TCP zone xfer "
 				     "for master %s (source %s)",
 				     master, source);
-			LOCK_ZONE(zone);
 			DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_SOABEFOREAXFR);
-			UNLOCK_ZONE(zone);
 			goto tcp_transfer;
 		} else {
 			INSIST(zone->type == dns_zone_stub);
@@ -9627,9 +9640,7 @@
 					     master, source);
 				goto next_master;
 			}
-			LOCK_ZONE(zone);
 			DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_USEVC);
-			UNLOCK_ZONE(zone);
 			goto same_master;
 		}
 	}
@@ -9690,6 +9701,7 @@
 			     soacnt, master, source);
 		goto next_master;
 	}
+
 	/*
 	 * Extract serial
 	 */
@@ -9717,7 +9729,9 @@
 
 	serial = soa.serial;
 	if (DNS_ZONE_FLAG(zone, DNS_ZONEFLG_LOADED)) {
-		result = dns_zone_getserial2(zone, &oldserial);
+		result = zone_get_from_db(zone, zone->db, NULL, NULL,
+					  &oldserial, NULL, NULL, NULL, NULL,
+					  NULL);
 		RUNTIME_CHECK(result == ISC_R_SUCCESS);
 		zone_debuglog(zone, me, 1, "serial: new %u, old %u",
 			      serial, oldserial);
@@ -9741,11 +9755,9 @@
 		}
  tcp_transfer:
 		isc_event_free(&event);
-		LOCK_ZONE(zone);
 		dns_request_destroy(&zone->request);
-		UNLOCK_ZONE(zone);
 		if (zone->type == dns_zone_slave) {
-			queue_xfrin(zone);
+			do_queue_xfrin = ISC_TRUE;
 		} else {
 			INSIST(zone->type == dns_zone_stub);
 			ns_query(zone, rdataset, NULL);
@@ -9767,9 +9779,7 @@
 							  &now);
 			/* Someone removed the file from underneath us! */
 			if (result == ISC_R_FILENOTFOUND) {
-				LOCK_ZONE(zone);
 				zone_needdump(zone, DNS_DUMP_DELAY);
-				UNLOCK_ZONE(zone);
 			} else if (result != ISC_R_SUCCESS)
 				dns_zone_log(zone, ISC_LOG_ERROR,
 					     "refresh: could not set file "
@@ -9799,7 +9809,6 @@
 	if (msg != NULL)
 		dns_message_destroy(&msg);
 	isc_event_free(&event);
-	LOCK_ZONE(zone);
 	dns_request_destroy(&zone->request);
 	/*
 	 * Skip to next failed / untried master.
@@ -9841,25 +9850,24 @@
 		}
 		DNS_ZONE_CLRFLAG(zone, DNS_ZONEFLG_USEALTXFRSRC);
 		zone_settimer(zone, &now);
-		UNLOCK_ZONE(zone);
 		goto detach;
 	}
 
  requeue:
 	queue_soa_query(zone);
-	UNLOCK_ZONE(zone);
 	goto detach;
 
  same_master:
 	if (msg != NULL)
 		dns_message_destroy(&msg);
 	isc_event_free(&event);
-	LOCK_ZONE(zone);
 	dns_request_destroy(&zone->request);
 	queue_soa_query(zone);
-	UNLOCK_ZONE(zone);
 
  detach:
+	UNLOCK_ZONE(zone);
+	if (do_queue_xfrin)
+		queue_xfrin(zone);
 	dns_zone_idetach(&zone);
 	return;
 }
@@ -10217,13 +10225,13 @@
 	isc_uint16_t udpsize = SEND_BUFFER_SIZE;
 
 	REQUIRE(DNS_ZONE_VALID(zone));
+	REQUIRE(LOCKED_ZONE(zone));
 	REQUIRE((soardataset != NULL && stub == NULL) ||
 		(soardataset == NULL && stub != NULL));
 	REQUIRE(stub == NULL || DNS_STUB_VALID(stub));
 
 	ENTER;
 
-	LOCK_ZONE(zone);
 	if (stub == NULL) {
 		stub = isc_mem_get(zone->mctx, sizeof(*stub));
 		if (stub == NULL)
@@ -10414,10 +10422,9 @@
 	}
 	if (message != NULL)
 		dns_message_destroy(&message);
-  unlock:
+ unlock:
 	if (key != NULL)
 		dns_tsigkey_detach(&key);
-	UNLOCK_ZONE(zone);
 	return;
 }
 
@@ -12597,15 +12604,22 @@
 	zmgr->transfersin = 10;
 	zmgr->transfersperns = 2;
 
+	/* Unreachable lock. */
+	result = isc_rwlock_init(&zmgr->urlock, 0, 0);
+	if (result != ISC_R_SUCCESS)
+		goto free_rwlock;
+
 	/* Create a single task for queueing of SOA queries. */
 	result = isc_task_create(taskmgr, 1, &zmgr->task);
 	if (result != ISC_R_SUCCESS)
-		goto free_rwlock;
+		goto free_urlock;
+
 	isc_task_setname(zmgr->task, "zmgr", zmgr);
 	result = isc_ratelimiter_create(mctx, timermgr, zmgr->task,
 					&zmgr->rl);
 	if (result != ISC_R_SUCCESS)
 		goto free_task;
+
 	/* default to 20 refresh queries / notifies per second. */
 	isc_interval_set(&interval, 0, 1000000000/2);
 	result = isc_ratelimiter_setinterval(zmgr->rl, &interval);
@@ -12634,6 +12648,8 @@
 	isc_ratelimiter_detach(&zmgr->rl);
  free_task:
 	isc_task_detach(&zmgr->task);
+ free_urlock:
+	isc_rwlock_destroy(&zmgr->urlock);
  free_rwlock:
 	isc_rwlock_destroy(&zmgr->rwlock);
  free_mem:
@@ -12814,7 +12830,6 @@
 		UNLOCK_ZONE(zone);
 	}
 	RWUNLOCK(&zmgr->rwlock, isc_rwlocktype_read);
-
 }
 
 isc_result_t
@@ -12858,6 +12873,7 @@
 	DESTROYLOCK(&zmgr->iolock);
 	isc_ratelimiter_detach(&zmgr->rl);
 
+	isc_rwlock_destroy(&zmgr->urlock);
 	isc_rwlock_destroy(&zmgr->rwlock);
 	mctx = zmgr->mctx;
 	isc_mem_put(zmgr->mctx, zmgr, sizeof(*zmgr));
@@ -13270,12 +13286,12 @@
 	REQUIRE(DNS_ZONEMGR_VALID(zmgr));
 
 	locktype = isc_rwlocktype_read;
-	RWLOCK(&zmgr->rwlock, locktype);
+	RWLOCK(&zmgr->urlock, locktype);
 	for (i = 0; i < UNREACH_CHACHE_SIZE; i++) {
 		if (zmgr->unreachable[i].expire >= seconds &&
 		    isc_sockaddr_equal(&zmgr->unreachable[i].remote, remote) &&
 		    isc_sockaddr_equal(&zmgr->unreachable[i].local, local)) {
-			result = isc_rwlock_tryupgrade(&zmgr->rwlock);
+			result = isc_rwlock_tryupgrade(&zmgr->urlock);
 			if (result == ISC_R_SUCCESS) {
 				locktype = isc_rwlocktype_write;
 				zmgr->unreachable[i].last = seconds;
@@ -13283,7 +13299,7 @@
 			break;
 		}
 	}
-	RWUNLOCK(&zmgr->rwlock, locktype);
+	RWUNLOCK(&zmgr->urlock, locktype);
 	return (ISC_TF(i < UNREACH_CHACHE_SIZE));
 }
 
@@ -13304,11 +13320,11 @@
 	REQUIRE(DNS_ZONEMGR_VALID(zmgr));
 
 	locktype = isc_rwlocktype_read;
-	RWLOCK(&zmgr->rwlock, locktype);
+	RWLOCK(&zmgr->urlock, locktype);
 	for (i = 0; i < UNREACH_CHACHE_SIZE; i++) {
 		if (isc_sockaddr_equal(&zmgr->unreachable[i].remote, remote) &&
 		    isc_sockaddr_equal(&zmgr->unreachable[i].local, local)) {
-			result = isc_rwlock_tryupgrade(&zmgr->rwlock);
+			result = isc_rwlock_tryupgrade(&zmgr->urlock);
 			if (result == ISC_R_SUCCESS) {
 				locktype = isc_rwlocktype_write;
 				zmgr->unreachable[i].expire = 0;
@@ -13321,7 +13337,7 @@
 			break;
 		}
 	}
-	RWUNLOCK(&zmgr->rwlock, locktype);
+	RWUNLOCK(&zmgr->urlock, locktype);
 }
 
 void
@@ -13334,7 +13350,7 @@
 
 	REQUIRE(DNS_ZONEMGR_VALID(zmgr));
 
-	RWLOCK(&zmgr->rwlock, isc_rwlocktype_write);
+	RWLOCK(&zmgr->urlock, isc_rwlocktype_write);
 	for (i = 0; i < UNREACH_CHACHE_SIZE; i++) {
 		/* Existing entry? */
 		if (isc_sockaddr_equal(&zmgr->unreachable[i].remote, remote) &&
@@ -13373,7 +13389,7 @@
 		zmgr->unreachable[oldest].remote = *remote;
 		zmgr->unreachable[oldest].local = *local;
 	}
-	RWUNLOCK(&zmgr->rwlock, isc_rwlocktype_write);
+	RWUNLOCK(&zmgr->urlock, isc_rwlocktype_write);
 }
 
 void
--- a/head/contrib/bind9/lib/isc/pthreads/mutex.c	Wed Jul 25 16:20:13 2012 +0300
+++ b/head/contrib/bind9/lib/isc/pthreads/mutex.c	Wed Jul 25 16:21:35 2012 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2004, 2005, 2007, 2008, 2011  Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005, 2007, 2008, 2011, 2012  Internet Systems Consortium, Inc. ("ISC")
  * Copyright (C) 2000-2002  Internet Software Consortium.
  *
  * Permission to use, copy, modify, and/or distribute this software for any
@@ -78,7 +78,7 @@
 };
 
 #ifndef ISC_MUTEX_PROFTABLESIZE
-#define ISC_MUTEX_PROFTABLESIZE (16 * 1024)
+#define ISC_MUTEX_PROFTABLESIZE (1024 * 1024)
 #endif
 static isc_mutexstats_t stats[ISC_MUTEX_PROFTABLESIZE];
 static int stats_next = 0;
@@ -200,24 +200,24 @@
 
 	fprintf(fp, "Mutex stats (in us)\n");
 	for (i = 0; i < stats_next; i++) {
-		fprintf(fp, "%-12s %4d: %10u  %lu.%06lu %lu.%06lu\n",
+		fprintf(fp, "%-12s %4d: %10u  %lu.%06lu %lu.%06lu %5d\n",
 			stats[i].file, stats[i].line, stats[i].count,
 			stats[i].locked_total.tv_sec,
 			stats[i].locked_total.tv_usec,
 			stats[i].wait_total.tv_sec,
-			stats[i].wait_total.tv_usec
-			);
+			stats[i].wait_total.tv_usec,
+			i);
 		for (j = 0; j < ISC_MUTEX_MAX_LOCKERS; j++) {
 			locker = &stats[i].lockers[j];
 			if (locker->file == NULL)
 				continue;
-			fprintf(fp, " %-11s %4d: %10u  %lu.%06lu %lu.%06lu\n",
+			fprintf(fp, " %-11s %4d: %10u  %lu.%06lu %lu.%06lu %5d\n",
 				locker->file, locker->line, locker->count,
 				locker->locked_total.tv_sec,
 				locker->locked_total.tv_usec,
 				locker->wait_total.tv_sec,
-				locker->wait_total.tv_usec
-				);
+				locker->wait_total.tv_usec,
+				i);
 		}
 	}
 }
--- a/head/contrib/bind9/lib/isccfg/api	Wed Jul 25 16:20:13 2012 +0300
+++ b/head/contrib/bind9/lib/isccfg/api	Wed Jul 25 16:21:35 2012 +0300
@@ -4,5 +4,5 @@
 # 9.8: 80-89
 # 9.9: 90-109
 LIBINTERFACE = 82
-LIBREVISION = 1
+LIBREVISION = 2
 LIBAGE = 0
--- a/head/contrib/bind9/lib/isccfg/parser.c	Wed Jul 25 16:20:13 2012 +0300
+++ b/head/contrib/bind9/lib/isccfg/parser.c	Wed Jul 25 16:21:35 2012 +0300
@@ -2232,16 +2232,30 @@
 
 #define MAX_LOG_TOKEN 30 /* How much of a token to quote in log messages. */
 
+static isc_boolean_t
+have_current_file(cfg_parser_t *pctx) {
+	cfg_listelt_t *elt;
+	if (pctx->open_files == NULL)
+		return (ISC_FALSE);
+
+	elt = ISC_LIST_TAIL(pctx->open_files->value.list);
+	if (elt == NULL)
+	      return (ISC_FALSE);
+
+	return (ISC_TRUE);
+}
+
 static char *
 current_file(cfg_parser_t *pctx) {
 	static char none[] = "none";
 	cfg_listelt_t *elt;
 	cfg_obj_t *fileobj;
 
-	if (pctx->open_files == NULL)
+	if (!have_current_file(pctx))
 		return (none);
+
 	elt = ISC_LIST_TAIL(pctx->open_files->value.list);
-	if (elt == NULL)
+	if (elt == NULL)	/* shouldn't be possible, but... */
 	      return (none);
 
 	fileobj = elt->obj;
@@ -2264,8 +2278,10 @@
 	if (is_warning)
 		level = ISC_LOG_WARNING;
 
-	snprintf(where, sizeof(where), "%s:%u: ",
-		 current_file(pctx), pctx->line);
+	where[0] = '\0';
+	if (have_current_file(pctx))
+		snprintf(where, sizeof(where), "%s:%u: ",
+			 current_file(pctx), pctx->line);
 
 	len = vsnprintf(message, sizeof(message), format, args);
 	if (len >= sizeof(message))
--- a/head/contrib/bind9/version	Wed Jul 25 16:20:13 2012 +0300
+++ b/head/contrib/bind9/version	Wed Jul 25 16:21:35 2012 +0300
@@ -5,6 +5,6 @@
 #
 MAJORVER=9
 MINORVER=8
-PATCHVER=2
-RELEASETYPE=
-RELEASEVER=
+PATCHVER=3
+RELEASETYPE=-P
+RELEASEVER=2
--- a/head/contrib/binutils/gas/config/tc-i386.c	Wed Jul 25 16:20:13 2012 +0300
+++ b/head/contrib/binutils/gas/config/tc-i386.c	Wed Jul 25 16:21:35 2012 +0300
@@ -517,7 +517,9 @@
   {".sse4a", PROCESSOR_UNKNOWN,
    CpuMMX|CpuMMX2|CpuSSE|CpuSSE2|CpuSSE3|CpuSSE4a},
   {".abm", PROCESSOR_UNKNOWN,
-   CpuABM}
+   CpuABM},
+  {".xsave", PROCESSOR_UNKNOWN,
+   CpuXSAVE}
 };
 
 const pseudo_typeS md_pseudo_table[] =
@@ -3988,6 +3990,16 @@
 	      goto check_prefix;
 	    }
 	}
+      else if (i.tm.base_opcode == 0x660f3880 || i.tm.base_opcode == 0x660f3881)
+	{
+	  /* invept and invvpid are 3 byte instructions with a
+	     mandatory prefix. */
+	  if (i.tm.base_opcode & 0xff000000)
+	    {
+	      prefix = (i.tm.base_opcode >> 24) & 0xff;
+	      add_prefix (prefix);
+	    }
+	}
       else if ((i.tm.base_opcode & 0xff0000) != 0)
 	{
 	  prefix = (i.tm.base_opcode >> 16) & 0xff;
@@ -4027,6 +4039,12 @@
 	      p = frag_more (3);
 	      *p++ = (i.tm.base_opcode >> 16) & 0xff;
 	    }
+	  else if (i.tm.base_opcode == 0x660f3880 ||
+		   i.tm.base_opcode == 0x660f3881)
+	    {
+	      p = frag_more (3);
+	      *p++ = (i.tm.base_opcode >> 16) & 0xff;
+	    }
 	  else
 	    p = frag_more (2);
 
--- a/head/contrib/binutils/ld/emultempl/ppc32elf.em	Wed Jul 25 16:20:13 2012 +0300
+++ b/head/contrib/binutils/ld/emultempl/ppc32elf.em	Wed Jul 25 16:21:35 2012 +0300
@@ -119,7 +119,40 @@
 	    }
 	}
     }
+
   gld${EMULATION_NAME}_before_allocation ();
+
+  /* Turn on relaxation if executable sections have addresses that
+     might make branches overflow.  */
+  if (!command_line.relax)
+    {
+      bfd_vma low = (bfd_vma) -1;
+      bfd_vma high = 0;
+      asection *o;
+
+      /* Run lang_size_sections (if not already done).  */
+      if (expld.phase != lang_mark_phase_enum)
+	{
+	  expld.phase = lang_mark_phase_enum;
+	  expld.dataseg.phase = exp_dataseg_none;
+	  one_lang_size_sections_pass (NULL, FALSE);
+	  lang_reset_memory_regions ();
+	}
+
+      for (o = output_bfd->sections; o != NULL; o = o->next)
+	{
+	  if ((o->flags & (SEC_ALLOC | SEC_CODE)) != (SEC_ALLOC | SEC_CODE))
+	    continue;
+	  if (o->rawsize == 0)
+	    continue;
+	  if (low > o->vma)
+	    low = o->vma;
+	  if (high < o->vma + o->rawsize - 1)
+	    high = o->vma + o->rawsize - 1;
+	}
+      if (high > low && high - low > (1 << 25) - 1)
+	command_line.relax = TRUE;
+    }
 }
 
 EOF
--- a/head/contrib/binutils/opcodes/i386-dis.c	Wed Jul 25 16:20:13 2012 +0300
+++ b/head/contrib/binutils/opcodes/i386-dis.c	Wed Jul 25 16:21:35 2012 +0300
@@ -93,6 +93,7 @@
 static void OP_SIMD_Suffix (int, int);
 static void SIMD_Fixup (int, int);
 static void PNI_Fixup (int, int);
+static void XCR_Fixup (int, int);
 static void SVME_Fixup (int, int);
 static void INVLPG_Fixup (int, int);
 static void BadOp (void);
@@ -212,6 +213,7 @@
 #define Ew { OP_E, w_mode }
 #define M { OP_M, 0 }		/* lea, lgdt, etc. */
 #define Ma { OP_M, v_mode }
+#define Mo { OP_M, o_mode }
 #define Mp { OP_M, f_mode }		/* 32 or 48 bit memory operand for LDS, LES etc */
 #define Mq { OP_M, q_mode }
 #define Gb { OP_G, b_mode }
@@ -539,6 +541,8 @@
 #define PREGRP95  NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 95 } }
 #define PREGRP96  NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 96 } }
 #define PREGRP97  NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 97 } }
+#define PREGRP98  NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 98 } }
+#define PREGRP99  NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 99 } }
 
 
 #define X86_64_0  NULL, { { NULL, X86_64_SPECIAL }, { NULL, 0 } }
@@ -1693,7 +1697,7 @@
   {
     { "sgdt{Q|IQ||}", { { VMX_Fixup, 0 } } },
     { "sidt{Q|IQ||}", { { PNI_Fixup, 0 } } },
-    { "lgdt{Q|Q||}",	 { M } },
+    { "lgdt{Q|Q||}",	 { { XCR_Fixup, 0 }  } },
     { "lidt{Q|Q||}",	 { { SVME_Fixup, 0 } } },
     { "smswD",	{ Sv } },
     { "(bad)",	{ XX } },
@@ -1783,9 +1787,9 @@
     { "fxrstor",	{ Ev } },
     { "ldmxcsr",	{ Ev } },
     { "stmxcsr",	{ Ev } },
-    { "(bad)",		{ XX } },
-    { "lfence",		{ { OP_0fae, 0 } } },
-    { "mfence",		{ { OP_0fae, 0 } } },
+    { "xsave",		{ Ev } },
+    { "xrstor",		{ { OP_0fae, v_mode } } },
+    { "xsaveopt",	{ { OP_0fae, v_mode } } },
     { "clflush",	{ { OP_0fae, 0 } } },
   },
   /* GRP16 */
@@ -2585,6 +2589,22 @@
     { "punpckldq",{ MX, EMq } },
     { "(bad)",	{ XX } },
   },
+
+  /* PREGRP98 */
+  {
+    { "(bad)",	{ XX } },
+    { "(bad)",	{ XX } },
+    { "invept",	{ Gm, Mo } },
+    { "(bad)",	{ XX } },
+  },
+
+  /* PREGRP99 */
+  {
+    { "(bad)",	{ XX } },
+    { "(bad)",	{ XX } },
+    { "invvpid",{ Gm, Mo } },
+    { "(bad)",	{ XX } },
+  },
 };
 
 static const struct dis386 x86_64_table[][2] = {
@@ -2754,8 +2774,8 @@
     { "(bad)", { XX } },
     { "(bad)", { XX } },
     /* 80 */
-    { "(bad)", { XX } },
-    { "(bad)", { XX } },
+    { PREGRP98 },
+    { PREGRP99 },
     { "(bad)", { XX } },
     { "(bad)", { XX } },
     { "(bad)", { XX } },
@@ -5883,7 +5903,7 @@
 OP_M (int bytemode, int sizeflag)
 {
   if (modrm.mod == 3)
-    /* bad bound,lea,lds,les,lfs,lgs,lss,cmpxchg8b,vmptrst modrm */
+    /* bad bound,lea,lds,les,lfs,lgs,lss,cmpxchg8b,vmptrst,invept,invvpid modrm */
     BadOp ();
   else
     OP_E (bytemode, sizeflag);
@@ -5905,17 +5925,17 @@
     {
       if (modrm.reg == 7)
 	strcpy (obuf + strlen (obuf) - sizeof ("clflush") + 1, "sfence");
+      else if (modrm.reg == 6)
+	strcpy (obuf + strlen (obuf) - sizeof ("xsaveopt") + 1, "mfence");
+      else if (modrm.reg == 5)
+	strcpy (obuf + strlen (obuf) - sizeof ("xrstor") + 1, "lfence");
 
       if (modrm.reg < 5 || modrm.rm != 0)
 	{
 	  BadOp ();	/* bad sfence, mfence, or lfence */
 	  return;
 	}
-    }
-  else if (modrm.reg != 7)
-    {
-      BadOp ();		/* bad clflush */
-      return;
+      bytemode = 0;
     }
 
   OP_E (bytemode, sizeflag);
@@ -6170,6 +6190,43 @@
 }
 
 static void
+XCR_Fixup (int extrachar ATTRIBUTE_UNUSED, int sizeflag)
+{
+  if (modrm.mod == 3 && modrm.reg == 2 && modrm.rm <= 1)
+    {
+      /* Override "lgdt".  */
+      size_t olen = strlen (obuf);
+      char *p = obuf + olen - 4;
+
+      /* We might have a suffix when disassembling with -Msuffix.  */
+      if (*p == 'i')
+	--p;
+
+      /* Remove "addr16/addr32" if we aren't in Intel mode.  */
+      if (!intel_syntax
+	  && (prefixes & PREFIX_ADDR)
+	  && olen >= (4 + 7)
+	  && *(p - 1) == ' '
+	  && CONST_STRNEQ (p - 7, "addr")
+	  && (CONST_STRNEQ (p - 3, "16")
+	      || CONST_STRNEQ (p - 3, "32")))
+	p -= 7;
+
+      if (modrm.rm)
+	{
+	  strcpy (p, "xsetbv");
+	}
+      else
+	{
+	  strcpy (p, "xgetbv");
+	}
+
+      codep++;
+    }
+  else
+    OP_M (0, sizeflag);
+}
+static void
 SVME_Fixup (int bytemode, int sizeflag)
 {
   const char *alt;
--- a/head/contrib/binutils/opcodes/i386-opc.h	Wed Jul 25 16:20:13 2012 +0300
+++ b/head/contrib/binutils/opcodes/i386-opc.h	Wed Jul 25 16:21:35 2012 +0300
@@ -71,6 +71,7 @@
 #define CpuABM       0x200000   /* ABM New Instructions required */
 #define CpuSSE4_1    0x400000	/* SSE4.1 Instructions required */
 #define CpuSSE4_2    0x800000	/* SSE4.2 Instructions required */
+#define CpuXSAVE    0x1000000	/* XSAVE Instructions required */
 
 /* SSE4.1/4.2 Instructions required */
 #define CpuSSE4	     (CpuSSE4_1|CpuSSE4_2)
@@ -83,7 +84,7 @@
 #define CpuUnknownFlags (Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686 \
 	|CpuP4|CpuSledgehammer|CpuMMX|CpuMMX2|CpuSSE|CpuSSE2|CpuSSE3|CpuVMX \
 	|Cpu3dnow|Cpu3dnowA|CpuK6|CpuPadLock|CpuSVME|CpuSSSE3|CpuSSE4_1 \
-	|CpuSSE4_2|CpuABM|CpuSSE4a)
+	|CpuSSE4_2|CpuABM|CpuSSE4a|CpuXSAVE)
 
   /* the bits in opcode_modifier are used to generate the final opcode from
      the base_opcode.  These bits also are used to detect alternate forms of
--- a/head/contrib/binutils/opcodes/i386-opc.tbl	Wed Jul 25 16:20:13 2012 +0300
+++ b/head/contrib/binutils/opcodes/i386-opc.tbl	Wed Jul 25 16:21:35 2012 +0300
@@ -1289,6 +1289,10 @@
 mwait, 2, 0xf01, 0xc9, CpuSSE3|Cpu64, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt|NoRex64, { Reg64, Reg64 }
 
 // VMX instructions.
+invept, 2, 0x660f3880, None, CpuVMX|CpuNo64, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_qSuf|No_xSuf|NoRex64, { BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg32 }
+invept, 2, 0x660f3880, None, CpuVMX|Cpu64, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_qSuf|No_xSuf|NoRex64, { BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg64 }
+invvpid, 2, 0x660f3881, None, CpuVMX|CpuNo64, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_qSuf|No_xSuf|NoRex64, { BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg32 }
+invvpid, 2, 0x660f3881, None, CpuVMX|Cpu64, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_qSuf|No_xSuf|NoRex64, { BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg64 }
 vmcall, 0, 0xf01, 0xc1, CpuVMX, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { 0 }
 vmclear, 1, 0x660fc7, 0x6, CpuVMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|NoRex64, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
 vmlaunch, 0, 0xf01, 0xc2, CpuVMX, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { 0 }
@@ -1487,3 +1491,10 @@
 xcryptofb, 0, 0xf30fa7, 0xe8, Cpu686|CpuPadLock, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsString|ImmExt, { 0 }
 // Alias for xstore-rng.
 xstore, 0, 0xfa7, 0xc0, Cpu686|CpuPadLock, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsString|ImmExt, { 0 }
+
+// XSAVE/XRSTOR related instructions
+xgetbv, 0, 0xf01, 0xd0, CpuXSAVE, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { 0 }
+xsetbv, 0, 0xf01, 0xd1, CpuXSAVE, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { 0 }
+xsave, 1, 0xfae, 0x4, CpuXSAVE, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+xsaveopt, 1, 0xfae, 0x6, CpuXSAVE, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+xrstor, 1, 0xfae, 0x5, CpuXSAVE, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
--- a/head/contrib/binutils/opcodes/i386-tbl.h	Wed Jul 25 16:20:13 2012 +0300
+++ b/head/contrib/binutils/opcodes/i386-tbl.h	Wed Jul 25 16:21:35 2012 +0300
@@ -3625,6 +3625,22 @@
     No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt|NoRex64,
     { Reg64,
       Reg64 } },
+  { "invept", 2, 0x660f3880, None, CpuVMX|CpuNo64,
+    Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_qSuf|No_xSuf|NoRex64,
+    { BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+      Reg32 } },
+  { "invept", 2, 0x660f3880, None, CpuVMX|Cpu64,
+    Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_qSuf|No_xSuf|NoRex64,
+    { BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+      Reg64 } },
+  { "invvpid", 2, 0x660f3881, None, CpuVMX|CpuNo64,
+    Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_qSuf|No_xSuf|NoRex64,
+    { BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+      Reg32 } },
+  { "invvpid", 2, 0x660f3881, None, CpuVMX|Cpu64,
+    Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_qSuf|No_xSuf|NoRex64,
+    { BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+      Reg64 } },
   { "vmcall", 0, 0xf01, 0xc1, CpuVMX,
     No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
     { 0 } },
@@ -4288,6 +4304,21 @@
   { "xstore", 0, 0xfa7, 0xc0, Cpu686|CpuPadLock,
     No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsString|ImmExt,
     { 0 } },
+  { "xgetbv", 0, 0xf01, 0xd0, CpuXSAVE,
+    No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+    { 0 } },
+  { "xsetbv", 0, 0xf01, 0xd1, CpuXSAVE,
+    No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+    { 0 } },
+  { "xsave", 1, 0xfae, 0x4, CpuXSAVE,
+    Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf,
+    { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+  { "xsaveopt", 1, 0xfae, 0x6, CpuXSAVE,
+    Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf,
+    { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+  { "xrstor", 1, 0xfae, 0x5, CpuXSAVE,
+    Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf,
+    { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
   { NULL, 0, 0, 0, 0, 0, { 0 } }
 };
 
--- a/head/contrib/bsnmp/lib/bsnmpclient.3	Wed Jul 25 16:20:13 2012 +0300
+++ b/head/contrib/bsnmp/lib/bsnmpclient.3	Wed Jul 25 16:21:35 2012 +0300
@@ -368,7 +368,7 @@
 and appends the length of the string (as computed by
 .Xr strlen 3 )
 and each of the characters in the string to the OID.
-.It Li ( Va N Ns Li )
+.It ( Va N Ns )
 This format expects no argument.
 .Va N
 must be a decimal number and is stored into an internal variable
--- a/head/contrib/bsnmp/lib/bsnmplib.3	Wed Jul 25 16:20:13 2012 +0300
+++ b/head/contrib/bsnmp/lib/bsnmplib.3	Wed Jul 25 16:21:35 2012 +0300
@@ -161,7 +161,6 @@
 .Fa v.octetstring.octets
 points to a string allocated by
 .Xr malloc 3 .
-.Pp
 .Bd -literal -offset indent
 #define	SNMP_ENGINE_ID_SIZ		32
 
@@ -176,7 +175,6 @@
 .Pp
 This structure represents an SNMP engine as specified by the SNMP Management
 Architecture described in RFC 3411.
-.Pp
 .Bd -literal -offset indent
 #define	SNMP_ADM_STR32_SIZ		(32 + 1)
 #define	SNMP_AUTH_KEY_SIZ		40
@@ -225,7 +223,6 @@
 and
 .Fa priv_key
 contain the authentication and privacy keys for the user.
-.Pp
 .Bd -literal -offset indent
 #define SNMP_COMMUNITY_MAXLEN		128
 #define SNMP_MAX_BINDINGS		100
@@ -389,7 +386,7 @@
 The function
 .Fn snmp_pdu_init_secparams
 calculates the initialization vector for the privacy protocol in use before
-the PDU pointed to by 
+the PDU pointed to by
 .Fa pdu
 may be encrypted or decrypted.
 .Pp
@@ -504,7 +501,7 @@
 The library may optionally be built without references to the
 .Xr crypto 3
 library. In such case only plain text SNMPv3 PDUs without message digests
-may be proccessed correctly. 
+may be proccessed correctly.
 .Sh STANDARDS
 This implementation conforms to the applicable IETF RFCs and ITU-T
 recommendations.
--- a/head/contrib/bsnmp/snmp_mibII/mibII_tcp.c	Wed Jul 25 16:20:13 2012 +0300
+++ b/head/contrib/bsnmp/snmp_mibII/mibII_tcp.c	Wed Jul 25 16:21:35 2012 +0300
@@ -109,10 +109,12 @@
              ptr = (struct xinpgen *)(void *)((char *)ptr + ptr->xig_len)) {
 		tp = (struct xtcpcb *)ptr;
 		if (tp->xt_inp.inp_gencnt > xinpgen->xig_gen ||
-		    (tp->xt_inp.inp_vflag & INP_IPV4) == 0)
+		    (tp->xt_inp.inp_vflag & (INP_IPV4|INP_IPV6)) == 0)
 			continue;
 
-		tcp_total++;
+		if (tp->xt_inp.inp_vflag & INP_IPV4)
+			tcp_total++;
+
 		if (tp->xt_tp.t_state == TCPS_ESTABLISHED ||
 		    tp->xt_tp.t_state == TCPS_CLOSE_WAIT)
 			tcp_count++;
--- a/head/contrib/bsnmp/snmp_target/snmp_target.3	Wed Jul 25 16:20:13 2012 +0300
+++ b/head/contrib/bsnmp/snmp_target/snmp_target.3	Wed Jul 25 16:21:35 2012 +0300
@@ -26,14 +26,14 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD$
+.\" $FreeBSD: head/contrib/bsnmp/snmp_target/snmp_target.3 237193 2012-06-17 11:33:55Z joel $
 .\"
 .Dd December 16, 2010
 .Dt SNMP_TARGET 3
 .Os
 .Sh NAME
 .Nm snmp_target
-.Nd "Target addresses and notifications module for
+.Nd "Target addresses and notifications module for"
 .Xr bsnmpd 1
 .Sh LIBRARY
 .Pq begemotSnmpdModulePath."target" = "/usr/lib/snmp_target.so"
--- a/head/contrib/bsnmp/snmp_usm/snmp_usm.3	Wed Jul 25 16:20:13 2012 +0300
+++ b/head/contrib/bsnmp/snmp_usm/snmp_usm.3	Wed Jul 25 16:21:35 2012 +0300
@@ -26,14 +26,14 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD: head/contrib/bsnmp/snmp_usm/snmp_usm.3 224584 2011-08-01 22:21:18Z uqs $
+.\" $FreeBSD: head/contrib/bsnmp/snmp_usm/snmp_usm.3 237194 2012-06-17 11:36:28Z joel $
 .\"
 .Dd September 9, 2010
 .Dt SNMP_USM 3
 .Os
 .Sh NAME
 .Nm snmp_usm
-.Nd "user-based security module for
+.Nd "user-based security module for"
 .Xr bsnmpd 1
 .Sh LIBRARY
 .Pq begemotSnmpdModulePath."usm" = "/usr/lib/snmp_usm.so"
@@ -57,7 +57,7 @@
 altering the SNMP USM users.
 .It Va usmUserTable
 The table contains all SNMP USM users configured in
-.Nm bsnmpd.
+.Nm bsnmpd .
 The table contains the following objects
 .Bl -tag -width ".It Va usmUserEngineID"
 .It Va usmUserEngineID
@@ -79,7 +79,7 @@
 .It Va usmUserAuthProtocol
 The value of this column contains the OID corresponding to the authentication
 protocol used by the USM user. The following protocols and their OIDs are known to
-.Nm 
+.Nm
 module
 .Bl -tag -width ".It Va NoAuthProtocol"
 .It NoAuthProtocol 1.3.6.1.6.3.10.1.1.1
@@ -91,7 +91,7 @@
 .It Va usmUserPrivProtocol
 The value of this column contains the OID corresponding to the privacy
 protocol used by the USM user. The following protocols and their OIDs are known to
-.Nm 
+.Nm
 module
 .Bl -tag -width ".It Va NoPrivProtocol"
 .It NoPrivProtocol 1.3.6.1.6.3.10.1.2.1
@@ -102,7 +102,7 @@
 These columns may be used to change the user's privacy key.
 .It Va usmUserPublic
 An arbitrary octet string that may be modified to confirm a SET operation on any
-of the columns was successfull.
+of the columns was successful.
 .It Va usmUserStorageType
 This column always has either of two values. Entries created via
 .Nm bsnmpd's
--- a/head/contrib/bsnmp/snmp_vacm/snmp_vacm.3	Wed Jul 25 16:20:13 2012 +0300
+++ b/head/contrib/bsnmp/snmp_vacm/snmp_vacm.3	Wed Jul 25 16:21:35 2012 +0300
@@ -26,14 +26,14 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD$
+.\" $FreeBSD: head/contrib/bsnmp/snmp_vacm/snmp_vacm.3 237193 2012-06-17 11:33:55Z joel $
 .\"
 .Dd October 7, 2010
 .Dt SNMP_VACM 3
 .Os
 .Sh NAME
 .Nm snmp_vacm
-.Nd "View-based Access Control module for
+.Nd "View-based Access Control module for"
 .Xr bsnmpd 1
 .Sh LIBRARY
 .Pq begemotSnmpdModulePath."vacm" = "/usr/lib/snmp_vacm.so"
@@ -76,7 +76,7 @@
 .It Va vacmViewTreeFamilyTable
 The table contains a list of SNMP views, i.e. entries specifying the OID of a
 MIB subtree and whether access to the objects under this subtree is to be
-allowed or forbiden.
+allowed or forbidden.
 .El
 .Sh FILES
 .Bl -tag -width "XXXXXXXXX"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/head/contrib/byacc/ACKNOWLEDGEMENTS	Wed Jul 25 16:21:35 2012 +0300
@@ -0,0 +1,25 @@
+     Berkeley Yacc owes much to the unflagging efforts of Keith Bostic.
+His badgering kept me working on it long after I was ready to quit.
+
+     Berkeley Yacc is based on the excellent algorithm for computing LALR(1)
+lookaheads developed by Tom Pennello and Frank DeRemer.  The algorithm is
+described in their almost impenetrable article in TOPLAS 4,4.
+
+     Finally, much of the credit for the latest version must go to those
+who pointed out deficiencies of my earlier releases.  Among the most
+prolific contributors were
+
+	  Benson I. Margulies
+	  Dave Gentzel
+	  Antoine Verheijen
+	  Peter S. Housel
+	  Dale Smith
+	  Ozan Yigit
+	  John Campbell
+	  Bill Sommerfeld
+	  Paul Hilfinger
+	  Gary Bridgewater
+	  Dave Bakken
+	  Dan Lanciani
+	  Richard Sargent
+	  Parag Patel
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/head/contrib/byacc/AUTHORS	Wed Jul 25 16:21:35 2012 +0300
@@ -0,0 +1,7 @@
+-- $Id: AUTHORS,v 1.1 2010/06/06 20:31:51 tom Exp $
+-- vile:txtmode
+-- This file is used by a script that collects contributor information and
+-- resolves nicknames vs fullnames.
+dickey	Thomas Dickey
+schmitz	Sylvain Schmitz
+unknown	Robert Corbett
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/head/contrib/byacc/CHANGES	Wed Jul 25 16:21:35 2012 +0300
@@ -0,0 +1,1156 @@
+2012-01-15  Thomas E. Dickey  <[email protected]>
+
+	* package/debian/copyright: bump
+
+	* test/run_make.sh: workaround for breakage due to GNU make 3.82
+
+	* test/run_make.sh:
+	tested with Solaris 10 (bison 1.875) and added scripting to exercise
+	the /usr/ccs/bin/yacc executable
+
+	* test/grammar.tab.c: regen
+
+	* test/grammar.y: modify to also build with Solaris yacc
+
+	* VERSION, package/debian/changelog, package/byacc.spec: bump
+
+	* test/calc1.output, test/calc1.tab.c: regen
+
+	* test/calc1.y:
+	undo the change made to appease bison, since it was only a warning.
+
+	* test/pure_calc.tab.c, test/pure_error.tab.c: regen
+
+	* test/run_make.sh: another fix for running from top-level directory
+
+	* makefile.in:
+	ensure that check_make rule depends on having byacc built.
+
+	* test/run_make.sh: fixes for building from parent directory
+
+	* test/pure_error.y, test/pure_calc.y: bison-fixes
+
+	* test/calc2.tab.c, test/calc3.tab.c, test/code_error.code.c, test/ftp.tab.c, test/pure_calc.tab.c, test/pure_error.tab.c:
+	regen
+
+	* test/calc2.y, test/calc3.y, test/code_error.y, test/ftp.y:
+	byacc already declares yyerror
+
+	* test/pure_error.y, test/pure_calc.y:
+	modified to help make the files build with bison
+
+	* test/run_make.sh:
+	supply a "%pure-parser" directive when bison needs it.
+
+	* test/code_calc.code.c: regen
+
+	* test/code_calc.y: modified to help make the files build with bison
+
+	* yacc.1:
+	in testing, found that %expect did not work as documented for bison.
+	do not recommend it for portable code.
+
+	* test/run_make.sh: workaround breakage in bison's %expect directive
+
+	* test/grammar.y: modified to help make the files build with bison
+
+	* test/calc1.output, test/calc1.tab.c, test/grammar.tab.c: regen
+
+	* test/calc1.y: quiet a spurious warning from bison 2.3
+
+	* test/calc1.tab.c: regen
+
+	* test/calc1.y: modified to help make the files build with bison
+
+	* yacc.1: comment on "-y" and "-P" options.
+
+	* yacc.1: comment on portability
+
+	* test/ftp.tab.c, test/quote_calc-s.tab.c, test/quote_calc.tab.c, test/quote_calc2-s.tab.c, test/quote_calc3-s.tab.c:
+	regen
+
+	* test/ftp.y: modified to help make the files build with bison
+	(bison's "-y" option is of no use in providing "yacc" compatibility)
+
+	* test/quote_calc2.tab.c, test/quote_calc3.tab.c, test/quote_calc4-s.tab.c, test/quote_calc4.tab.c:
+	regen
+
+	* test/code_calc.y, test/quote_calc2.y, test/quote_calc.y, test/quote_calc4.y, test/quote_calc3.y:
+	modified to help make the files build with bison
+
+	* test/calc.tab.c: regen
+
+	* test/calc.y: modified to help make the files build with bison
+
+	* test/error.tab.c: regen
+
+	* test/error.y: modified to help make the files build with bison
+
+	* test/calc2.tab.c, test/calc3.tab.c, test/code_error.code.c: regen
+
+	* test/run_make.sh:
+	check for older bisons which (2.3 for instance) do not support pure parsers
+
+	* test/code_error.y, test/calc3.y, test/calc2.y:
+	modified to help make the files build with bison
+
+	* test/run_test.sh: use $opt2 in filenames of the generated files
+
+	* test/quote_calc2-s.tab.c, test/quote_calc3-s.tab.c, test/quote_calc4-s.tab.c, test/quote_calc-s.tab.c, test/quote_calc.tab.c, test/quote_calc2.tab.c, test/quote_calc3.tab.c, test/quote_calc4.tab.c:
+	regen
+
+2012-01-14  Thomas E. Dickey  <[email protected]>
+
+	* test/calc2.tab.c, test/code_calc.code.c, test/code_error.code.c, test/error.tab.c, test/ftp.tab.c, test/grammar.tab.c, test/calc.tab.c, test/calc1.tab.c:
+	regen
+
+	* output.c: Several changes:
+		a) add YYLEX_PARAM_TYPE, like YYPARSE_PARAM_TYPE, but for yylex.
+		b) modify definitions for YYLEX_DECL to be more like YYPARSE_DECL,
+		   using YYLEX_PARAM_TYPE and YYLEX_PARAM.
+		c) add ifdef's around #define's for YYERROR_DECL and YYERROR_CALL,
+		   to help with redefinitions.
+
+	* test/pure_calc.tab.c:
+	modified to help make the files build with bison
+
+	* test/run_make.sh:
+	start work on followup, to check if the generated files build with bison.
+
+	* test/pure_calc.y, test/pure_error.tab.c:
+	modified to help make the files build with bison
+
+	* test/calc3.tab.c: regen
+
+	* test/quote_calc-s.output, test/quote_calc-s.tab.c, test/quote_calc-s.tab.h, test/quote_calc2-s.output, test/quote_calc2-s.tab.c, test/quote_calc2-s.tab.h, test/quote_calc3-s.output, test/quote_calc3-s.tab.c, test/quote_calc3-s.tab.h, test/quote_calc4-s.output, test/quote_calc4-s.tab.c, test/quote_calc4-s.tab.h:
+	RCS_BASE
+
+	* test/run_test.sh: generate/test with "-s" option applied.
+
+2012-01-13  Thomas E. Dickey  <[email protected]>
+
+	* package/debian/changelog, package/byacc.spec, VERSION: bump
+
+	* yacc.1: improve documentation of -s option
+
+	* yacc.1: note that yacc ignores -y
+
+	* main.c: add -s option to usage message.
+
+	* test/quote_calc3.output, test/quote_calc3.tab.c, test/quote_calc4.output, test/quote_calc4.tab.c, test/quote_calc4.tab.h, test/quote_calc3.y, test/quote_calc.tab.h, test/quote_calc.output, test/quote_calc.tab.c, test/quote_calc2.output, test/quote_calc2.tab.c, test/quote_calc2.tab.h, test/quote_calc3.tab.h, test/quote_calc4.y, test/quote_calc.y, test/quote_calc2.y:
+	RCS_BASE
+
+	* configure: regen
+
+	* aclocal.m4: resync with my-autoconf, i.e., fixes for CF_XOPEN_SOURCE
+
+2011-12-19  Thomas E. Dickey  <[email protected]>
+
+	* package/debian/changelog, package/byacc.spec, VERSION: bump
+
+	* yacc.1, output.c, main.c, defs.h:
+	add "-s" option to suppress generating #define's based on string contents
+	in a %token statement.  For instance
+		%token EQLS "Equals"
+	would generate
+		#define EQLS 256
+		#define Equals 257
+	Simply suppressing the second #define makes the behavior closer to yacc.
+	(report by Paulo Andrade).
+
+2011-09-08  Thomas E. Dickey  <[email protected]>
+
+	* package/debian/changelog, package/byacc.spec, VERSION: bump
+
+	* output.c:
+	fix some more interaction between -i and -d flags to ensure YYERRCODE
+	and YYSTYPE are declared, tested with cproto.
+
+2011-09-07  Thomas E. Dickey  <[email protected]>
+
+	* yacc.1: document "-i" option.
+
+	* package/debian/changelog, package/byacc.spec, VERSION: bump
+
+	* output.c: fix an interaction between -i and -d
+
+	* test/code_error.code.c, test/error.tab.c, test/ftp.tab.c, test/grammar.tab.c, test/pure_calc.tab.c, test/pure_error.tab.c, test/calc.tab.c, test/calc1.tab.c, test/calc2.tab.c, test/calc3.tab.c, test/code_calc.code.c:
+	regen - changes for "-i" option move the global/impure variables near the
+	macros that may add a prefix, etc.
+
+	* skeleton.c, output.c, defs.h: changes to support "-i" option.
+
+2011-09-06  Thomas E. Dickey  <[email protected]>
+
+	* reader.c: pass explicit file-pointer to write_section()
+
+	* main.c:
+	add "-i" option, to generate interface-file (suggested by Denis M. Wilson)
+
+2011-09-05  Thomas E. Dickey  <[email protected]>
+
+	* configure: regen
+
+	* aclocal.m4:
+	resync with my-autoconf: CF_ANSI_CC_CHECK (check for $CFLAGS in $CC)
+	and CF_XOPEN_SOURCE (update aix, cygwin and netbsd checks)
+
+	* defs.h, error.c, reader.c:
+	add check for missing "}" on %parse-param and %lex-param lines (report by Denis M Wilson)
+
+2011-04-01  Thomas E. Dickey  <[email protected]>
+
+	* config.sub: 2011-04-01
+
+2011-02-02  Thomas E. Dickey  <[email protected]>
+
+	* config.guess: 2011-01-01
+
+2010-12-29  Thomas E. Dickey  <[email protected]>
+
+	* defs.h, skeleton.c:
+	add const qualifier to skeleton data, per NetBSD changes (report by Christos Zoulas)
+
+	* defs.h:
+	mark all of the error-functions as non-returning (report by Christos Zoulas)
+
+	* test/grammar.tab.c, test/pure_calc.tab.c, test/pure_error.tab.c, test/calc.tab.c, test/calc1.tab.c, test/calc2.tab.c, test/calc3.tab.c, test/code_calc.code.c, test/code_error.code.c, test/error.tab.c, test/ftp.tab.c:
+	regen
+
+	* skeleton.c:
+	use only realloc() rather than realloc+malloc, agree that systems needing this
+	are very rare (prompted by NetBSD change).
+
+	* test/ftp.tab.c: regen
+
+2010-12-29  Christos.Zoulas
+
+	* test/ftp.y:
+	improve example, which was stuck in 19XX and assumed file sizes were longs.
+
+2010-12-29  Thomas E. Dickey  <[email protected]>
+
+	* test/ftp.tab.c, test/grammar.tab.c, test/pure_calc.tab.c, test/pure_error.tab.c, test/calc.tab.c, test/calc1.tab.c, test/calc2.tab.c, test/calc3.tab.c, test/code_calc.code.c, test/code_error.code.c, test/error.tab.c:
+	regen
+
+	* test/pure_error.y, test/pure_calc.y, test/ftp.y, test/error.y, test/code_error.y, test/code_calc.y, test/calc.y, test/calc3.y, test/calc2.y, test/calc1.y:
+	use byacc's YYLEX_DECL/YYERROR_DECL symbols to prototype yylex/yyerror
+
+	* skeleton.c:
+	remove explicit prototype for yylex() via YYLEX_DECL() macro, since that
+	would prevent declaring yylex() static (request by Christos Zoulas).
+
+	* test/calc2.tab.c, test/calc3.tab.c: regen
+
+2010-12-29  Christos.Zoulas
+
+	* output.c: correct definition for YYERROR_DECL()
+
+2010-12-29  Thomas E. Dickey  <[email protected]>
+
+	* package/debian/changelog, package/byacc.spec, VERSION: bump
+
+2010-12-26  Thomas E. Dickey  <[email protected]>
+
+	* defs.h, main.c:
+	change return-type of allocate() to avoid warnings of alignment problems
+
+	* main.c: Solaris declares chmod() in <sys/stat.h>
+
+	* configure: regen
+
+	* main.c: ifdef'd use of fcntl.h
+
+	* configure.in: add configure checks for fcntl.h, atexit and mkstemp
+
+	* main.c: for cases where mkstemp() is not available, use tempnam/open
+
+	* aclocal.m4: add CF_MKSTEMP
+
+	* aclocal.m4:
+	improve quoting, deprecate ${name-value} in favor of standard ${name:-value}
+
+2010-12-25  Thomas E. Dickey  <[email protected]>
+
+	* main.c:
+	start revising use of tmpfile(), to make this work with MinGW.  Start by
+	implementing a mkstemp() alternative - noting that mkstemp() also is broken
+	for MinGW.
+
+	* package/debian/changelog, package/byacc.spec, VERSION: bump
+
+2010-11-27  Thomas E. Dickey  <[email protected]>
+
+	* package/byacc.spec, package/debian/changelog, VERSION: bump
+
+	* test/calc2.tab.c, test/calc3.tab.c: regen
+
+	* output.c:
+	corrected use of %parse-param value in yyerror(); it doesn't use &yylval
+	(report by Clifford Yapp)
+
+2010-11-26  Thomas E. Dickey  <[email protected]>
+
+	* skeleton.c: typo
+
+	* output.c:
+	correct line-numbering when "-r" option is used; the 'outline' variable
+	should only be incremented when writing to the code-file.
+
+	* test/code_calc.code.c, test/code_error.code.c: regen
+
+	* yacc.1: bump date
+
+	* yacc.1: comment on -b option vs -r
+
+	* test/calc2.tab.c, test/calc2.y, test/calc3.tab.c, test/calc3.y, test/ftp.tab.c, test/grammar.tab.c, test/pure_calc.tab.c, test/pure_error.tab.c, test/calc.tab.c, test/calc1.tab.c, test/code_calc.code.c, test/code_error.code.c, test/error.tab.c:
+	regen
+
+	* output.c:
+	improve on YYERROR_DECL(), adding dummy params which can be used for the
+	actual function declaration.  Also add YYERROR_CALL().  The two macros
+	simplify maintaining sets of grammars which may/may not be pure.
+
+	* test/calc1.y, test/ftp.tab.c, test/grammar.tab.c, test/pure_calc.tab.c, test/pure_error.tab.c, test/calc.tab.c, test/calc1.tab.c, test/calc2.tab.c, test/calc3.tab.c, test/code_calc.code.c, test/code_error.code.c, test/error.tab.c:
+	regen
+
+	* output.c: generate yyerror() calls in output.c
+	This is for compatibility with bison, which passes the yylval to yyerror
+	when the %parse-param feature is used.
+
+	* skeleton.c, defs.h: generate yyerror() calls in output.c
+
+	* output.c: simplified a little, using putc_code() and putl_code()
+
+	* test/calc1.tab.h: regen
+
+	* reader.c:
+	improve ifdef for YYSTYPE union declaration (report by Clifford Yapp)
+
+	* reader.c:
+	accept underscore as a replacement for dash in command names, e.g.,
+	"%pure_parser" vs "%pure-parser".
+
+	* test/calc1.tab.c: regen
+
+	* output.c, reader.c:
+	also ifdef YYSTYPE declaration in the generated code (report by Clifford Yapp)
+
+	* package/debian/changelog, package/byacc.spec, VERSION: bump
+
+2010-11-24  Thomas E. Dickey  <[email protected]>
+
+	* main.c, defs.h, symtab.c, error.c: reduce global variables
+
+	* package/debian/changelog, package/byacc.spec, VERSION: bump
+
+	* reader.c:
+	amend fix for Redhat #112617 to still call default_action_warning() for
+	empty rules (report by Bruce Cran).
+
+2010-11-22  Thomas E. Dickey  <[email protected]>
+
+	* output.c:
+	add ifdef to guard against redefinition of YYSTYPE union (request by Clifford Yapp).
+
+	* test/calc1.tab.c: regen
+
+	* test/calc1.y: cleanup compiler warnings
+
+	* test/grammar.y: add "%expect"
+
+	* test/calc1.tab.h: regen
+
+	* test/calc1.output, test/calc1.tab.c, test/calc1.tab.h: RCS_BASE
+
+	* test/calc2.tab.c, test/calc3.tab.c: regen
+
+	* test/calc1.y:
+	advanced example from Steve Johnson's paper, uses unions
+
+	* test/calc3.y, test/calc2.y: init 'base', so examples can run
+
+	* test/ftp.tab.c, test/ftp.y: tweaks to compile with g++
+
+	* output.c: compensate for fix in reader.c
+
+	* reader.c:
+	add/use putc_both() and puts_both(), incidentally fixing a place where
+	a union copied to the union_file may be missing the end of the last line.
+
+	* package/debian/changelog, package/byacc.spec, VERSION: bump
+
+2010-09-28  Thomas E. Dickey  <[email protected]>
+
+	* config.guess: 2010-09-24
+
+2010-09-10  Thomas E. Dickey  <[email protected]>
+
+	* config.sub: 2010-09-11
+
+2010-06-10  Thomas E. Dickey  <[email protected]>
+
+	* yacc.1, package/debian/changelog, package/byacc.spec, VERSION:
+	bump to 2010/06/10
+
+2010-06-09  Thomas E. Dickey  <[email protected]>
+
+	* reader.c: free declarations in leak-testing code.
+
+	* main.c: close code_file if -r option used, for leak-testing
+
+	* defs.h, reader.c:
+	improve %lex-param / %parse-param implementation by allowing for arrays to
+	be passed as parameters, e.g., "int regs[26]".
+
+	* test/calc3.tab.c, test/calc3.y, test/calc3.output, test/calc3.tab.h, test/calc2.tab.c, test/calc2.y, test/calc2.tab.h, test/calc2.output:
+	RCS_BASE
+
+	* output.c:
+	improve %lex-param / %parse-param implementation by allowing for arrays to
+	be passed as parameters, e.g., "int regs[26]".
+
+	* test/calc.tab.c, test/calc.y:
+	test-cases and reference files for %lex-param / %parse-param
+
+	* makefile.in: add docs-rule, for html/pdf/txt form of manpage
+
+	* configure: regen
+
+	* aclocal.m4: add CF_XOPEN_SOURCE, etc.
+
+	* configure.in:
+	use CF_XOPEN_SOURCE check to ensure that strdup is in scope, e.g., for c89
+
+	* test/ftp.tab.c, test/ftp.y, reader.c, symtab.c, verbose.c, lr0.c, main.c, mkpar.c, output.c, defs.h, closure.c:
+	fix warnings from clang --analyze
+
+2010-06-08  Thomas E. Dickey  <[email protected]>
+
+	* output.c: fix to build with c89, etc.
+
+	* reader.c: gcc warning
+
+	* test/ftp.tab.c, test/ftp.y, test/calc.tab.c, test/code_calc.code.c, test/code_error.code.c, test/code_error.y, test/code_calc.y, test/calc.y, test/pure_error.tab.c, test/error.tab.c, test/error.y, test/pure_error.y, test/pure_calc.tab.c, test/pure_calc.y:
+	modified test-cases to allow them to compile, to validate pure-parser changes.
+	updated reference files to match.
+
+	* output.c:
+	move call for output_stype() earlier since it is used in pure-parser declarations
+
+	* test/grammar.tab.c, test/grammar.y:
+	modified test-cases to allow them to compile, to validate pure-parser changes.
+	updated reference files to match.
+
+	* test/calc.tab.c, test/error.tab.c, test/ftp.tab.c, test/grammar.tab.c:
+	regen
+
+	* yacc.1: document %lex-param and %parse-param
+
+	* test/run_lint.sh, test/run_make.sh: RCS_BASE
+
+	* test/run_test.sh:
+	further modify to allow build-directory to be in a different location by
+	passing this directory's location as a parameter to the script.
+
+	* makefile.in:
+	add check_make and check_lint rules to help validate the generated files
+	in the test-directory
+
+2010-06-07  Thomas E. Dickey  <[email protected]>
+
+	* test/pure_calc.tab.c, test/pure_error.tab.c: RCS_BASE
+
+	* test/run_test.sh:
+	provide for testing -r and -P options by checking if the ".y" filename
+	begins with "code_" or "pure_", respectively.
+
+	* test/code_error.code.c, test/code_error.tab.c, test/code_error.tab.h, test/code_calc.code.c, test/code_calc.tab.c, test/code_calc.tab.h, test/pure_calc.output, test/pure_calc.tab.h, test/pure_error.output, test/pure_error.tab.h, test/code_calc.output, test/code_error.output:
+	RCS_BASE
+
+	* test/error.tab.c, test/ftp.tab.c, test/grammar.tab.c: regen
+
+	* test/run_test.sh:
+	changes to support running "make check" in a separate build-tree
+
+	* main.c: add "-P" to usage message
+
+	* reader.c: use UCH() macro to hide casts.
+
+2010-06-07  Andres.Mejia
+
+	* main.c, output.c, reader.c, defs.h, skeleton.c:
+	Fix the output order of the generated parse code file.  This allows for
+	the use of YYPARSE_PARAM, by having the output that checks for
+	YYPARSE_PARAM to be defined come after the C code block in the
+	definitions section of a yacc file.
+
+	Implement support for YYLEX_PARAM, similar to bison.  This is useful for
+	support for building reentrant lexers with flex.
+
+	Fix a compatibility issue with bison's pure-parser option.  Bison
+	defines yylex as sending at least one parameter, &yylval, as the first
+	parameter and doesn't seem to have an easy way to remove that parameter.
+	This on the other hand is rather convenient to support saving to yylval
+	from flex when building reentrant lexers and parsers.
+
+	Add support for the %parse-param and %lex-param directives used in
+	bison.  This change bears some similarity to NetBSD's changes to byacc
+	at http://www.mail-archive.com/[email protected]/msg08143.html
+
+	Bison allows for POSIX yacc emulation via a yacc directive in the yacc
+	file, and also via a command line switch.  Implement this feature as a
+	no-op for byacc, since byacc is designed to be POSIX yacc compatible
+	anyway.  This allows for better compatibility with yacc sources written
+	for bison.
+
+2010-06-07  Thomas E. Dickey  <[email protected]>
+
+	* VERSION: bump to 2010/06/07
+
+2010-06-06  Thomas E. Dickey  <[email protected]>
+
+	* test/calc.tab.c, configure: regen
+
+	* skeleton.c:
+	move #include's down into the generated code, to allow user-defined code
+	to override feature definitions, particularly with stdlib.h (request by
+	Marcus Kool).
+
+	* lr0.c, error.c, reader.c, defs.h:
+	strict gcc 3.4.6 warnings on 64-bit platform
+
+	* aclocal.m4, configure.in: add check for lint
+
+	* makefile.in: add lint rule
+
+	* defs.h, closure.c, lr0.c, warshall.c, main.c:
+	fix gcc warnings, mostly for 64-bit platform
+
+	* aclocal.m4:
+	add macros for checking ctags/etags, e.g., to work with NetBSD pkgsrc
+
+	* makefile.in: add etags/TAGS if available
+
+	* configure.in: add configure check for actual ctags and etags programs
+
+	* package/debian/copyright: add copyright notices for non-PD files
+
+	* package/debian/changelog:
+	incorporated scripts in upstream to use for test-builds
+
+	* makefile.in: drop mkdirs.sh, just use "mkdir -p"
+
+	* AUTHORS: nicknames for some contributors (see CHANGES for details)
+
+	* package/byacc.spec: RPM file for byacc
+
+	* VERSION: bump to 2010/06/06
+
+	* aclocal.m4: add copyright notice, from "my-autoconf" macros
+		http://invisible-island.net/autoconf/autoconf.html
+
+	* package/RCS, package/debian/RCS, package/debian/source/RCS, package/pkgsrc/RCS:
+	PERMIT FILE
+
+	* aclocal.m4: resync with my-autoconf.  summary of changes:
+		a) CF_ADD_CFLAGS, etc., improve quoting of ifelse() parameter
+		b) CF_DISABLE_ECHO, change indent-convention for substituted makefile
+		c) CF_GCC_VERSION, ignore stderr
+		d) CF_GCC_WARNINGS, adjust options to work with c89 wrapper of gcc
+
+2010-04-20  Thomas E. Dickey  <[email protected]>
+
+	* package/debian/changelog, package/debian/compat, package/debian/control, package/debian/copyright, package/debian/docs, package/debian/postinst, package/debian/prerm, package/debian/rules, package/debian/watch:
+	scripts from Debian package
+
+2010-02-16  Thomas E. Dickey  <[email protected]>
+
+	* yacc.1: document -P and bison-extensions
+
+	* test/ftp.tab.c, test/grammar.tab.c, test/calc.tab.c, test/error.tab.c:
+	regen
+
+	* output.c: implement %pure-parser
+
+	* skeleton.c:
+	implement %pure-parser, like bison.  To help with this, changed the stack
+	variables, putting them into a struct.
+
+	* reader.c: implement %pure-parser
+
+	* defs.h: modified skeleton to support %pure-parser feature
+
+	* main.c: add -P option to set %pure-parser
+
+	* output.c:
+	make -r and -p options work together.  The -r option splits the generated
+	parser into code/table files; for this case we cannot use static data.
+	Also, we have to repeat the #define's used for prefix (-p) as well as the
+	redeclaration of yyparse().  Finally, allow any of the prefixed names to
+	be overridden, e.g., by passing a -D option to the compiler.  Make that
+	a little more readable by putting a blank line before each chunk.
+
+	* defs.h: add definitions for %pure-parser
+
+	* skeleton.c:
+	put blank line before/after the redeclaration of yyparse()
+
+	* output.c: allow for other program redefining yylex()
+
+	* skeleton.c:
+	split-off xdecls[] array, to move declaration of yyparse() after #define's
+
+	* defs.h: split-out xdecls[]
+
+	* VERSION: bump
+
+	* configure: regen
+
+	* aclocal.m4: add CF_REMOVE_DEFINE, needed by CF_ADD_CFLAGS
+
+	* aclocal.m4:
+	resync with my-autoconf CF_ADD_CFLAGS and CF_DISABLE_ECHO changes.
+
+2010-02-16  Ostap.Cherkashi
+
+	* skeleton.c: fix a memory leak in the generated skeleton
+
+2010-01-01  Thomas E. Dickey  <[email protected]>
+
+	* package/debian/source/format: scripts from Debian package
+
+2009-12-31  Thomas E. Dickey  <[email protected]>
+
+	* config.guess: 2009-12-30
+
+	* config.sub: 2009-12-31
+
+2009-10-27  Thomas E. Dickey  <[email protected]>
+
+	* VERSION: 20091027
+
+	* output.c, mkpar.c, defs.h, lalr.c, closure.c, graph.c, lr0.c, verbose.c, main.c, reader.c:
+	strict compiler warnings
+
+2009-10-26  Thomas E. Dickey  <[email protected]>
+
+	* test/ftp.tab.c, test/grammar.tab.c, test/calc.tab.c, test/error.tab.c:
+	resync
+
+	* main.c, defs.h: introduce some typedefs for portability, etc.
+
+	* makefile.in:
+	don't remove "*.log" in mostlyclean rule since it interferes with regression
+	script.
+
+	* configure: regen
+
+	* aclocal.m4: resync with my-autoconf
+
+2009-08-25  Thomas E. Dickey  <[email protected]>
+
+	* config.guess, config.sub: 2009-08-19
+
+2009-02-21  Thomas E. Dickey  <[email protected]>
+
+	* VERSION: bump
+
+	* output.c: restore "yylval" symbol, omitted in cleanup on 2008/8/25
+
+2008-12-26  Thomas E. Dickey  <[email protected]>
+
+	* configure: regen with autoconf-2.52 (patched)
+
+2008-12-25  Thomas E. Dickey  <[email protected]>
+
+	* test/error.tab.c, test/ftp.tab.c, test/grammar.tab.c, test/calc.tab.c:
+	regenerated
+
+2008-12-24  Thomas E. Dickey  <[email protected]>
+
+	* VERSION: bump
+
+	* skeleton.c:
+	remove ifdef-lint from goto yyerrlab, to quiet gcc warning
+
+2008-11-26  Thomas E. Dickey  <[email protected]>
+
+	* verbose.c, main.c, defs.h, mkpar.c, reader.c:
+	completed implementation of "%expect" (report by Perry E. Metzger).
+	add "%expect-rr", which is (unlike bison) allowable in LALR parsers.
+
+2008-11-24  Thomas E. Dickey  <[email protected]>
+
+	* closure.c, defs.h, error.c, graph.c, lalr.c, lr0.c, main.c, mkpar.c, output.c, reader.c, skeleton.c, symtab.c, verbose.c, warshall.c:
+	change indent-style (request by Perry E. Metzger)
+
+2008-08-27  Thomas E. Dickey  <[email protected]>
+
+	* test/calc.tab.c, test/error.tab.c, test/ftp.tab.c, test/grammar.tab.c:
+	better implementation of YYPARSE_PARAM, using YYPARSE_DECL() macro
+
+	* VERSION: bump
+
+	* skeleton.c:
+	better implementation of YYPARSE_PARAM, using YYPARSE_DECL() macro
+
+	* test/calc.tab.c, test/error.tab.c, test/ftp.tab.c, test/grammar.tab.c, skeleton.c:
+	change YYRECOVERING to YYRECOVERING(), for compatibility with other yacc's.
+
+	* configure: regen'd
+
+	* configure.in: add -Wwrite-strings to warnings
+
+	* test/ftp.tab.c, test/grammar.tab.c, test/calc.tab.c, test/error.tab.c:
+	add YYPARSE_PARAM and YYPARSE_PARAM_TYPE
+
+	* skeleton.c:
+	add YYPARSE_PARAM (bison) and YYPARSE_PARAM_TYPE (FreeBSD) features.
+
+	* main.c, defs.h, output.c, skeleton.c, symtab.c, error.c, reader.c:
+	fixes for gcc -Wwrite-strings
+
+	* test/calc.tab.c, test/error.tab.c, test/ftp.tab.c, test/grammar.tab.c:
+	generate the tables as static-const (this is an interface change)
+
+	* output.c: realign columns in start_table()
+
+	* output.c:
+	generate the tables as static-const (this is an interface change)
+
+	* output.c: reorder functions to eliminate forward-references
+
+	* test/calc.tab.c, test/error.tab.c, test/ftp.tab.c, test/grammar.tab.c:
+	remove 'register' keywords
+
+2008-08-26  Thomas E. Dickey  <[email protected]>
+
+	* warshall.c, verbose.c, symtab.c, skeleton.c, reader.c, output.c, mkpar.c, main.c, lr0.c, lalr.c, graph.c, error.c, closure.c:
+	remove 'register' keywords
+
+2008-08-25  Thomas E. Dickey  <[email protected]>
+
+	* test/ftp.tab.c: regen'd
+
+	* reader.c:
+	improve the left-curly fix by testing after blanks, to avoid having a
+	" {" at the beginning of a line.
+
+	* test/error.tab.c, test/grammar.tab.c: regen'd
+
+	* output.c:
+	move the remaining newline-counting into write_XXX functions.
+
+	* test/calc.tab.c: regen'd
+
+	* output.c:
+	simplify part of the output_file formatting using new functions, e.g.,
+	start_int_table(), output_newline().
+
+	* reader.c:
+	modify copy_action() to indent the first character, it if is is left-curly
+	brace.  That makes the output look more like the original, as well as makes
+	it simpler to edit (not confuse editors which look for a left-curly in the
+	first column as if it were the beginning of a function).
+
+	* skeleton.c: minor fixes to avoid gcc -Wconversion warnings
+
+	* output.c: align the #define's produced for "-p" option
+
+	* test/run_test.sh: use the "-p" option for better coverage.
+
+	* output.c: simplify output_prefix() with new define_prefixed()
+
+	* skeleton.c: include string.h, for memset()
+	change stack size to unsigned to fix gcc -Wconversion warnings.
+
+	* VERSION: bump to 2008/8/25
+
+	* makefile.in: add dependency on VERSION file.
+
+2008-08-24  Thomas E. Dickey  <[email protected]>
+
+	* VERSION: bump
+
+	* lalr.c: improved memory-leak checking by freeing data in includes[]
+
+	* test/error.tab.c, test/ftp.tab.c, test/grammar.tab.c, test/calc.tab.c:
+	update to match skeleton-change
+
+	* configure: regen'd
+
+	* skeleton.c: Add fix for stack discussed
+		http://undeadly.org/cgi?action=article&sid=20080708155228
+	and applied
+		http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/yacc/skeleton.c.diff?r1=1.28&r2=1.29
+
+	* aclocal.m4: resync with my-autoconf (no major changes)
+
+2008-07-24  Thomas E. Dickey  <[email protected]>
+
+	* package/pkgsrc/Makefile, package/pkgsrc/distinfo:
+	scripts from NetBSD pkgsrc, for test-builds
+
+2008-03-14  Thomas E. Dickey  <[email protected]>
+
+	* config.sub: update to 2008-03-08
+
+	* config.guess: update to 2008-03-12
+
+2007-05-09  Thomas E. Dickey  <[email protected]>
+
+	* main.c: close graph, verbose files if opened, on exit.
+
+	* main.c:
+	audit memory leaks - valgrind reported some memory still in use on exit.
+
+	* lalr.c, output.c, reader.c, mkpar.c, lr0.c:
+	add hook for auditing memory leaks
+
+	* defs.h: add hooks for auditing memory leaks
+
+	* configure: regen'd
+
+	* configure.in:
+	use CF_DISABLE_LEAKS, which combines --disable-leaks, --with-valgrind,
+	--with-dbmalloc and --with-dmalloc
+
+	* aclocal.m4: add CF_DISABLE_LEAKS and CF_WITH_VALGRIND
+
+	* aclocal.m4: improve version-checking in CF_GCC_VERSION
+	rework dbmalloc/dmalloc options using CF_NO_LEAKS_OPTION macro
+
+	* VERSION: 2007/5/9
+
+	* main.c: file_prefix did not always have a trailing null.
+
+2007-03-25  Thomas E. Dickey  <[email protected]>
+
+	* mkdirs.sh: improved version for "make -j"
+
+2006-12-22  Thomas E. Dickey  <[email protected]>
+
+	* config.guess: 2006/12/22
+
+2006-12-08  Thomas E. Dickey  <[email protected]>
+
+	* config.sub: 2006/12/08
+
+2005-08-13  Thomas E. Dickey  <[email protected]>
+
+	* main.c: add -V to usage message
+
+	* makefile.in: remove -t option from ctags
+
+	* VERSION: 2005/8/13
+
+2005-08-13  schmitz
+
+	* main.c: Sylvain Schmitz:
+	modify the '-o' option to work like bison's, which sets the file-prefix.
+
+2005-08-13  Matt.Kraai
+
+	* output.c:
+	Debian #322858 (don't close union_file, which contained data).
+	This feature is used in groff.
+
+2005-08-13  Thomas E. Dickey  <[email protected]>
+
+	* configure: regenerated
+
+	* aclocal.m4: improve checks for Intel compiler warnings
+
+2005-06-25  Thomas E. Dickey  <[email protected]>
+
+	* config.sub: 2005/6/2
+
+	* config.guess: 2005/5/27
+
+2005-05-05  Thomas E. Dickey  <[email protected]>
+
+	* defs.h: add a fallback for GCC_UNUSED
+
+2005-05-04  Thomas E. Dickey  <[email protected]>
+
+	* makefile.in: add "." to include-path to pickup config.h
+
+	* reader.c:
+	apply fix suggested by Steve Dum for end_rule() in Redhat Bugzilla #112617.
+
+	* output.c:
+	correct a limit check in pack_vector() - report/analysis by William Evans
+
+	* main.c:
+	exit after printing version.  Otherwise "yacc -V" will exit with an erro
+	after printing the usage message.
+
+	* test/calc.tab.c, test/error.tab.c, test/ftp.tab.c, test/grammar.tab.c:
+	regenerated after skeleton-changes
+
+	* skeleton.c: replace a few -1's with YYEMPTY
+
+	* skeleton.c:
+	delete yynewerror (no one uses it any more, and it just makes compiler warnings)
+
+	* skeleton.c: adapt yygrowstack() and related definitions from FreeBSD
+
+	* test/run_test.sh:
+	filter out lines with YYPATCH, since that will change with each update
+
+	* yacc.1: add -V option
+
+	* main.c: add -V option to print the version.
+	simplify option-parsing by moving the duplicate logic for setting flags into
+	new function setflag().
+
+	* skeleton.c:
+	move the actual definition of YYMAJOR and YYMINOR to defs.h (as numbers).
+	add YYPATCH here so it can be tested by applications.
+
+	* defs.h:
+	add macros to define VERSION in terms of the (numeric) YYMAJOR, YYMINOR and
+	YYPATCH symbols.
+
+	* lalr.c, lr0.c, mkpar.c, defs.h, closure.c, warshall.c, output.c, verbose.c, graph.c, reader.c, main.c, symtab.c:
+	reduce externs by making static the procedures that are not referenced outside
+	the module in which they are defined.
+
+	* makefile.in:
+	the VERSION file holds the patch-date.  Define YYPATCH, so this will be
+	compiled into the skeleton.
+
+	* VERSION: patch-level for byacc
+
+	* main.c:
+	add "-o" to usage message.  It is too long for a single line; rewrite usage()
+	to show one option per line.
+
+2005-05-03  Thomas E. Dickey  <[email protected]>
+
+	* main.c: add -o option, to work with scripts that assume bison.
+	simplify create_file_names() with a macro.
+	simplify done() with a macro.
+	adapt fix from FreeBSD for signal race, e.g., if done() is interrupted by
+	onintr(), do not flush output via exit(), but use _exit() instead.
+
+	* defs.h: remove unnecessary externs for main.c
+
+	* yacc.1: add -o option
+
+	* graph.c: remove unused parameter
+
+	* mkpar.c, defs.h, reader.c:
+	add support for "%expect", a bison feature from FreeBSD sources
+
+	* lr0.c, reader.c, main.c, skeleton.c, graph.c, symtab.c, closure.c, mkpar.c, lalr.c, error.c, warshall.c, verbose.c, output.c:
+	indent'd
+
+	* configure: regenerated for 2005/5/5
+
+	* aclocal.m4: miscellaneous updates (adds CF_INTEL_COMPILER)
+
+2005-04-27  schmitz
+
+	* defs.h, graph.c, lr0.c, main.c, makefile.in, reader.c, yacc.1:
+	Sylvain Schmitz <[email protected]>:
+	add graphical output of the LALR(1) automaton for graphviz,
+	associated with command-line option `-g'
+
+2005-04-16  Thomas E. Dickey  <[email protected]>
+
+	* config.sub: 2005/2/10
+
+	* config.guess: 2005/3/24
+
+2005-04-13  Thomas E. Dickey  <[email protected]>
+
+	* package/pkgsrc/PLIST: scripts from NetBSD pkgsrc, for test-builds
+
+2005-03-21  Thomas E. Dickey  <[email protected]>
+
+	* package/pkgsrc/DESCR: scripts from NetBSD pkgsrc, for test-builds
+
+2004-03-28  Thomas E. Dickey  <[email protected]>
+
+	* test/calc.tab.c, test/error.tab.c, test/ftp.tab.c, test/grammar.tab.c:
+	updates due to adding yyparse() prototype
+
+	* configure: RCS_BASE
+
+	* configure.in:
+	add AC_ARG_PROGRAM to make --program-prefix, etc., work.
+
+	* makefile.in: first cut of script to support --program-prefix
+
+	* configure.in:
+	reorder AC_INIT/AC_CONFIG_HEADER to make this "work" with autoconf 2.52
+
+	* makefile.in: modify so DESTDIR works
+
+	* makefile.in: use EXEEXT and OBJEXT
+
+	* configure.in: use CF_PROG_EXT
+	generate a config.h
+
+	* defs.h: make this use the generated config.h
+
+	* skeleton.c: add a forward-reference for yyparse()
+
+	* aclocal.m4: add CF_CHECK_CACHE, needed for CF_PROG_EXT
+
+	* yacc.1: remove the discussion of TMPDIR since it is obsolete
+
+	* skeleton.c: fix a couple of minor compiler-warnings in the skeleton
+
+	* defs.h: remove action_file_name, etc., since we use tmpfile() now.
+
+	* main.c:
+	use tmpfile() for opening the working files.  This quiets a warning
+	advising the use of mkstemp().
+
+	* output.c:
+	Do not close temporary-files here, since they are opened with tmpfile().
+	Just rewind them, and they're ready to read back the data stored in them.
+
+	* test/grammar.output, test/grammar.tab.c, test/grammar.tab.h: RCS_BASE
+
+	* makefile.in: turn on "make check" rule
+
+	* test/calc.output, test/run_test.sh, test/calc.tab.h: RCS_BASE
+
+	* test/ftp.tab.c: yyparse() is now yyparse(void)
+
+	* test/calc.tab.c: RCS_BASE
+
+	* test/error.tab.c: yyparse() is now yyparse(void)
+
+	* test/README: RCS_BASE
+
+	* yacc.1: various typography fixes prompted by Debian #100947
+
+	* aclocal.m4, makefile.in, configure.in: RCS_BASE
+
+	* README: updated to note that this is not the original
+
+2004-03-24  Thomas E. Dickey  <[email protected]>
+
+	* test/grammar.y: RCS_BASE
+
+2004-02-23  Thomas E. Dickey  <[email protected]>
+
+	* config.sub: RCS_BASE
+
+2004-02-17  Thomas E. Dickey  <[email protected]>
+
+	* config.guess: RCS_BASE
+
+2003-11-29  Thomas E. Dickey  <[email protected]>
+
+	* install-sh: improved quoting
+
+2002-06-29  Thomas E. Dickey  <[email protected]>
+
+	* mkdirs.sh:
+	don't use character range, since some locales don't work as expected
+
+2001-06-22  Thomas E. Dickey  <[email protected]>
+
+	* install-sh: RCS_BASE
+
+2000-11-20  Thomas E. Dickey  <[email protected]>
+
+	* test/calc.y: RCS_BASE
+
+	* test/code_calc.y, test/pure_calc.y: copy of calc.y
+
+	* vmsbuild.com: original version
+
+2000-02-23  Thomas E. Dickey  <[email protected]>
+
+	* test/RCS, RCS: PERMIT FILE
+
+2000-02-14  Thomas E. Dickey  <[email protected]>
+
+	* main.c: fix for VMS port - making pathname for temp-file
+
+	* descrip.mms: original version
+
+2000-02-13  Thomas E. Dickey  <[email protected]>
+
+	* defs.h, verbose.c, reader.c, main.c, skeleton.c, warshall.c, symtab.c, closure.c, mkpar.c, lalr.c, lr0.c, output.c, error.c:
+	ansify
+
+1999-11-30  Thomas E. Dickey  <[email protected]>
+
+	* mkdirs.sh: RCS_BASE
+
+1995-01-01  Thomas E. Dickey  <[email protected]>
+
+	* config_h.in: RCS_BASE
+
+1993-12-23  unknown
+
+	* README.DOS, main.c: MSDOS-port
+
+1993-12-22  unknown
+
+	* reader.c, defs.h: MSDOS-port
+
+1993-03-02  unknown
+
+	* README: original version
+
+1993-02-22  unknown
+
+	* test/ftp.output, test/ftp.tab.c, test/ftp.tab.h, test/error.output, test/error.tab.c, test/error.tab.h:
+	RCS_BASE
+
+	* skeleton.c, warshall.c, main.c, output.c, reader.c, closure.c, NOTES:
+	original version
+
+1992-10-12  unknown
+
+	* yacc.1: original version
+
+1992-10-11  unknown
+
+	* defs.h: original version
+
+1991-01-20  unknown
+
+	* mkpar.c, verbose.c: original version
+
+1991-01-14  unknown
+
+	* lr0.c, Makefile, Makefile.old: original version
+
+1990-07-16  unknown
+
+	* NEW_FEATURES: original version
+
+1990-06-03  unknown
+
+	* ACKNOWLEDGEMENTS: original version
+
+1990-02-05  unknown
+
+	* symtab.c, lalr.c, error.c: original version
+
+1990-01-16  Thomas E. Dickey  <[email protected]>
+
+	* test/code_error.y, test/pure_error.y: RCS_BASE
+
+1990-01-16  unknown
+
+	* test/error.y: RCS_BASE
+
+1989-11-22  unknown
+
+	* NO_WARRANTY: original version
+
+1989-09-23  unknown
+
+	* test/ftp.y: RCS_BASE
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/head/contrib/byacc/Makefile.old	Wed Jul 25 16:21:35 2012 +0300
@@ -0,0 +1,84 @@
+DEST	      = .
+
+HDRS	      = defs.h
+
+CFLAGS	      = -O -DNDEBUG
+
+LDFLAGS	      =
+
+LIBS	      =
+
+LINKER	      = cc
+
+MAKEFILE      = Makefile
+
+OBJS	      = closure.o \
+		error.o \
+		lalr.o \
+		lr0.o \
+		main.o \
+		mkpar.o \
+		output.o \
+		reader.o \
+		skeleton.o \
+		symtab.o \
+		verbose.o \
+		warshall.o
+
+PRINT	      = pr -f -l88
+
+PROGRAM	      = yacc
+
+SRCS	      = closure.c \
+		error.c \
+		lalr.c \
+		lr0.c \
+		main.c \
+		mkpar.c \
+		output.c \
+		reader.c \
+		skeleton.c \
+		symtab.c \
+		verbose.c \
+		warshall.c
+
+all:		$(PROGRAM)
+
+$(PROGRAM):     $(OBJS) $(LIBS)
+		@echo -n "Loading $(PROGRAM) ... "
+		@$(LINKER) $(LDFLAGS) -o $(PROGRAM) $(OBJS) $(LIBS)
+		@echo "done"
+
+clean:;		@rm -f $(OBJS)
+
+clobber:;	@rm -f $(OBJS) $(PROGRAM)
+
+depend:;	@mkmf -f $(MAKEFILE) PROGRAM=$(PROGRAM) DEST=$(DEST)
+
+index:;		@ctags -wx $(HDRS) $(SRCS)
+
+install:	$(PROGRAM)
+		@echo Installing $(PROGRAM) in $(DEST)
+		@install -s $(PROGRAM) $(DEST)
+
+listing:;	@$(PRINT) Makefile $(HDRS) $(SRCS) | lpr
+
+lint:;		@lint $(SRCS)
+
+program:        $(PROGRAM)
+
+tags:           $(HDRS) $(SRCS); @ctags $(HDRS) $(SRCS)
+
+###
+closure.o: defs.h
+error.o: defs.h
+lalr.o: defs.h
+lr0.o: defs.h
+main.o: defs.h
+mkpar.o: defs.h
+output.o: defs.h
+reader.o: defs.h
+skeleton.o: defs.h
+symtab.o: defs.h
+verbose.o: defs.h
+warshall.o: defs.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/head/contrib/byacc/NEW_FEATURES	Wed Jul 25 16:21:35 2012 +0300
@@ -0,0 +1,46 @@
+     The -r option has been implemented.  The -r option tells Yacc to
+put the read-only tables in y.tab.c and the code and variables in
+y.code.c.  Keith Bostic asked for this option so that :yyfix could be
+eliminated.
+
+     The -l and -t options have been implemented.  The -l option tells
+Yacc not to include #line directives in the code it produces.  The -t
+option causes debugging code to be included in the compiled parser.
+
+     The code for error recovery has been changed to implement the same
+algorithm as AT&T Yacc.  There will still be differences in the way
+error recovery works because AT&T Yacc uses more default reductions
+than Berkeley Yacc.
+
+     The environment variable TMPDIR determines the directory where
+temporary files will be created.  If TMPDIR is defined, temporary files
+will be created in the directory whose pathname is the value of TMPDIR.
+By default, temporary files are created in /tmp.
+
+     The keywords are now case-insensitive.  For example, %nonassoc,
+%NONASSOC, %NonAssoc, and %nOnAsSoC are all equivalent.
+
+     Commas and semicolons that are not part of C code are treated as
+commentary.
+
+     Line-end comments, as in BCPL, are permitted.  Line-end comments
+begin with // and end at the next end-of-line.  Line-end comments are
+permitted in C code; they are converted to C comments on output.
+
+     The form of y.output files has been changed to look more like
+those produced by AT&T Yacc.
+
+     A new kind of declaration has been added.  The form of the declaration
+is
+
+	  %ident string
+
+where string is a sequence of characters begining with a double quote
+and ending with either a double quote or the next end-of-line, whichever
+comes first.  The declaration will cause a #ident directive to be written
+near the start of the output file.
+
+     If a parser has been compiled with debugging code, that code can be
+enabled by setting an environment variable.  If the environment variable
+YYDEBUG is set to 0, debugging output is suppressed.  If it is set to 1,
+debugging output is written to standard output.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/head/contrib/byacc/NOTES	Wed Jul 25 16:21:35 2012 +0300
@@ -0,0 +1,9 @@
+Berkeley Yacc reflects its origins.  The reason so many routines
+use exactly six register variables is that Berkeley Yacc was
+developed on a VAX using PCC.  PCC placed at most six variables
+in registers.  I went to considerable effort to find which six
+variables most belonged in registers.  Changes in machines and
+compilers make that effort worthless, perhaps even harmful.
+
+The code contains many instances where address calculations are
+performed in particular ways to optimize the code for the VAX.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/head/contrib/byacc/NO_WARRANTY	Wed Jul 25 16:21:35 2012 +0300
@@ -0,0 +1,3 @@
+     Berkeley Yacc is distributed with no warranty whatever.  The author
+and any other contributors take no responsibility for the consequences of
+its use.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/head/contrib/byacc/README	Wed Jul 25 16:21:35 2012 +0300
@@ -0,0 +1,29 @@
+-- $Id: README,v 1.2 2004/03/28 17:24:53 tom Exp $
+
+The original README is below.  I've updated this version of Berkeley Yacc
+to make it ANSI C compliant - Thomas Dickey
+
+-------------------------------------------------------------------------------
+    Berkeley Yacc is an LALR(1) parser generator.  Berkeley Yacc has been made
+as compatible as possible with AT&T Yacc.  Berkeley Yacc can accept any input
+specification that conforms to the AT&T Yacc documentation.  Specifications
+that take advantage of undocumented features of AT&T Yacc will probably be
+rejected.
+
+    Berkeley Yacc is distributed with no warranty whatever.  The code is certain
+to contain errors.  Neither the author nor any contributor takes responsibility
+for any consequences of its use.
+
+    Berkeley Yacc is in the public domain.  The data structures and algorithms
+used in Berkeley Yacc are all either taken from documents available to the
+general public or are inventions of the author.  Anyone may freely distribute
+source or binary forms of Berkeley Yacc whether unchanged or modified.
+Distributers may charge whatever fees they can obtain for Berkeley Yacc.
+Programs generated by Berkeley Yacc may be distributed freely.
+
+    Please report bugs to
+
+			[email protected]
+
+Include a small example if possible.  Please include the banner string from
+skeleton.c with the bug report.  Do not expect rapid responses.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/head/contrib/byacc/VERSION	Wed Jul 25 16:21:35 2012 +0300
@@ -0,0 +1,1 @@
+20120115
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/head/contrib/byacc/aclocal.m4	Wed Jul 25 16:21:35 2012 +0300
@@ -0,0 +1,1144 @@
+dnl $Id: aclocal.m4,v 1.19 2012/01/13 14:10:56 tom Exp $
+dnl Macros for byacc configure script (Thomas E. Dickey)
+dnl ---------------------------------------------------------------------------
+dnl Copyright 2004-2011,2012 Thomas E. Dickey
+dnl 
+dnl Permission is hereby granted, free of charge, to any person obtaining a
+dnl copy of this software and associated documentation files (the
+dnl "Software"), to deal in the Software without restriction, including
+dnl without limitation the rights to use, copy, modify, merge, publish,
+dnl distribute, distribute with modifications, sublicense, and/or sell
+dnl copies of the Software, and to permit persons to whom the Software is
+dnl furnished to do so, subject to the following conditions:
+dnl 
+dnl The above copyright notice and this permission notice shall be included
+dnl in all copies or portions of the Software.
+dnl 
+dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+dnl IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+dnl DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+dnl OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
+dnl THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+dnl 
+dnl Except as contained in this notice, the name(s) of the above copyright
+dnl holders shall not be used in advertising or otherwise to promote the
+dnl sale, use or other dealings in this Software without prior written
+dnl authorization.
+dnl ---------------------------------------------------------------------------
+dnl ---------------------------------------------------------------------------
+dnl CF_ADD_CFLAGS version: 10 updated: 2010/05/26 05:38:42
+dnl -------------
+dnl Copy non-preprocessor flags to $CFLAGS, preprocessor flags to $CPPFLAGS
+dnl The second parameter if given makes this macro verbose.
+dnl
+dnl Put any preprocessor definitions that use quoted strings in $EXTRA_CPPFLAGS,
+dnl to simplify use of $CPPFLAGS in compiler checks, etc., that are easily
+dnl confused by the quotes (which require backslashes to keep them usable).
+AC_DEFUN([CF_ADD_CFLAGS],
+[
+cf_fix_cppflags=no
+cf_new_cflags=
+cf_new_cppflags=
+cf_new_extra_cppflags=
+
+for cf_add_cflags in $1
+do
+case $cf_fix_cppflags in
+no)
+	case $cf_add_cflags in #(vi
+	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
+		case $cf_add_cflags in
+		-D*)
+			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[[^=]]*='\''\"[[^"]]*//'`
+
+			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+				&& test -z "${cf_tst_cflags}" \
+				&& cf_fix_cppflags=yes
+
+			if test $cf_fix_cppflags = yes ; then
+				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+				continue
+			elif test "${cf_tst_cflags}" = "\"'" ; then
+				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+				continue
+			fi
+			;;
+		esac
+		case "$CPPFLAGS" in
+		*$cf_add_cflags) #(vi
+			;;
+		*) #(vi
+			case $cf_add_cflags in #(vi
+			-D*)
+				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
+				CF_REMOVE_DEFINE(CPPFLAGS,$CPPFLAGS,$cf_tst_cppflags)
+				;;
+			esac
+			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
+			;;
+		esac
+		;;
+	*)
+		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
+		;;
+	esac
+	;;
+yes)
+	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+
+	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[[^"]]*"'\''//'`
+
+	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+		&& test -z "${cf_tst_cflags}" \
+		&& cf_fix_cppflags=no
+	;;
+esac
+done
+
+if test -n "$cf_new_cflags" ; then
+	ifelse([$2],,,[CF_VERBOSE(add to \$CFLAGS $cf_new_cflags)])
+	CFLAGS="$CFLAGS $cf_new_cflags"
+fi
+
+if test -n "$cf_new_cppflags" ; then
+	ifelse([$2],,,[CF_VERBOSE(add to \$CPPFLAGS $cf_new_cppflags)])
+	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
+fi
+
+if test -n "$cf_new_extra_cppflags" ; then
+	ifelse([$2],,,[CF_VERBOSE(add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags)])
+	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
+fi
+
+AC_SUBST(EXTRA_CPPFLAGS)
+
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_ANSI_CC_CHECK version: 11 updated: 2011/07/01 19:47:45
+dnl ----------------
+dnl This was originally adapted from the macros 'fp_PROG_CC_STDC' and
+dnl 'fp_C_PROTOTYPES' in the sharutils 4.2 distribution.
+AC_DEFUN([CF_ANSI_CC_CHECK],
+[
+# This should have been defined by AC_PROG_CC
+: ${CC:=cc}
+
+# Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content
+# into CC.  This will not help with broken scripts that wrap the compiler with
+# options, but eliminates a more common category of user confusion.
+AC_MSG_CHECKING(\$CC variable)
+case "$CC" in #(vi
+*[[\ \	]]-[[IUD]]*)
+	AC_MSG_RESULT(broken)
+	AC_MSG_WARN(your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options)
+	# humor him...
+	cf_flags=`echo "$CC" | sed -e 's/^[[^ 	]]*[[ 	]]//'`
+	CC=`echo "$CC" | sed -e 's/[[ 	]].*//'`
+	CF_ADD_CFLAGS($cf_flags)
+	;;
+*)
+	AC_MSG_RESULT(ok)
+	;;
+esac
+
+AC_CACHE_CHECK(for ${CC:-cc} option to accept ANSI C, cf_cv_ansi_cc,[
+cf_cv_ansi_cc=no
+cf_save_CFLAGS="$CFLAGS"
+cf_save_CPPFLAGS="$CPPFLAGS"
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX			-qlanglvl=ansi
+# Ultrix and OSF/1	-std1
+# HP-UX			-Aa -D_HPUX_SOURCE
+# SVR4			-Xc
+# UnixWare 1.2		(cannot use -Xc, since ANSI/POSIX clashes)
+for cf_arg in "-DCC_HAS_PROTOS" \
+	"" \
+	-qlanglvl=ansi \
+	-std1 \
+	-Ae \
+	"-Aa -D_HPUX_SOURCE" \
+	-Xc
+do
+	CF_ADD_CFLAGS($cf_arg)
+	AC_TRY_COMPILE(
+[
+#ifndef CC_HAS_PROTOS
+#if !defined(__STDC__) || (__STDC__ != 1)
+choke me
+#endif
+#endif
+],[
+	int test (int i, double x);
+	struct s1 {int (*f) (int a);};
+	struct s2 {int (*f) (double a);};],
+	[cf_cv_ansi_cc="$cf_arg"; break])
+done
+CFLAGS="$cf_save_CFLAGS"
+CPPFLAGS="$cf_save_CPPFLAGS"
+])
+
+if test "$cf_cv_ansi_cc" != "no"; then
+if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
+	CF_ADD_CFLAGS($cf_cv_ansi_cc)
+else
+	AC_DEFINE(CC_HAS_PROTOS)
+fi
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_ANSI_CC_REQD version: 4 updated: 2008/03/23 14:48:54
+dnl ---------------
+dnl For programs that must use an ANSI compiler, obtain compiler options that
+dnl will make it recognize prototypes.  We'll do preprocessor checks in other
+dnl macros, since tools such as unproto can fake prototypes, but only part of
+dnl the preprocessor.
+AC_DEFUN([CF_ANSI_CC_REQD],
+[AC_REQUIRE([CF_ANSI_CC_CHECK])
+if test "$cf_cv_ansi_cc" = "no"; then
+	AC_MSG_ERROR(
+[Your compiler does not appear to recognize prototypes.
+You have the following choices:
+	a. adjust your compiler options
+	b. get an up-to-date compiler
+	c. use a wrapper such as unproto])
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_ARG_DISABLE version: 3 updated: 1999/03/30 17:24:31
+dnl --------------
+dnl Allow user to disable a normally-on option.
+AC_DEFUN([CF_ARG_DISABLE],
+[CF_ARG_OPTION($1,[$2],[$3],[$4],yes)])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_ARG_OPTION version: 4 updated: 2010/05/26 05:38:42
+dnl -------------
+dnl Restricted form of AC_ARG_ENABLE that ensures user doesn't give bogus
+dnl values.
+dnl
+dnl Parameters:
+dnl $1 = option name
+dnl $2 = help-string
+dnl $3 = action to perform if option is not default
+dnl $4 = action if perform if option is default
+dnl $5 = default option value (either 'yes' or 'no')
+AC_DEFUN([CF_ARG_OPTION],
+[AC_ARG_ENABLE([$1],[$2],[test "$enableval" != ifelse([$5],no,yes,no) && enableval=ifelse([$5],no,no,yes)
+  if test "$enableval" != "$5" ; then
+ifelse([$3],,[    :]dnl
+,[    $3]) ifelse([$4],,,[
+  else
+    $4])
+  fi],[enableval=$5 ifelse([$4],,,[
+  $4
+])dnl
+  ])])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_CHECK_CACHE version: 11 updated: 2008/03/23 14:45:59
+dnl --------------
+dnl Check if we're accidentally using a cache from a different machine.
+dnl Derive the system name, as a check for reusing the autoconf cache.
+dnl
+dnl If we've packaged config.guess and config.sub, run that (since it does a
+dnl better job than uname).  Normally we'll use AC_CANONICAL_HOST, but allow
+dnl an extra parameter that we may override, e.g., for AC_CANONICAL_SYSTEM
+dnl which is useful in cross-compiles.
+dnl
+dnl Note: we would use $ac_config_sub, but that is one of the places where
+dnl autoconf 2.5x broke compatibility with autoconf 2.13
+AC_DEFUN([CF_CHECK_CACHE],
+[
+if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
+	ifelse([$1],,[AC_CANONICAL_HOST],[$1])
+	system_name="$host_os"
+else
+	system_name="`(uname -s -r) 2>/dev/null`"
+	if test -z "$system_name" ; then
+		system_name="`(hostname) 2>/dev/null`"
+	fi
+fi
+test -n "$system_name" && AC_DEFINE_UNQUOTED(SYSTEM_NAME,"$system_name")
+AC_CACHE_VAL(cf_cv_system_name,[cf_cv_system_name="$system_name"])
+
+test -z "$system_name" && system_name="$cf_cv_system_name"
+test -n "$cf_cv_system_name" && AC_MSG_RESULT(Configuring for $cf_cv_system_name)
+
+if test ".$system_name" != ".$cf_cv_system_name" ; then
+	AC_MSG_RESULT(Cached system name ($system_name) does not agree with actual ($cf_cv_system_name))
+	AC_MSG_ERROR("Please remove config.cache and try again.")
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_DISABLE_ECHO version: 11 updated: 2009/12/13 13:16:57
+dnl ---------------
+dnl You can always use "make -n" to see the actual options, but it's hard to
+dnl pick out/analyze warning messages when the compile-line is long.
+dnl
+dnl Sets:
+dnl	ECHO_LT - symbol to control if libtool is verbose
+dnl	ECHO_LD - symbol to prefix "cc -o" lines
+dnl	RULE_CC - symbol to put before implicit "cc -c" lines (e.g., .c.o)
+dnl	SHOW_CC - symbol to put before explicit "cc -c" lines
+dnl	ECHO_CC - symbol to put before any "cc" line
+dnl
+AC_DEFUN([CF_DISABLE_ECHO],[
+AC_MSG_CHECKING(if you want to see long compiling messages)
+CF_ARG_DISABLE(echo,
+	[  --disable-echo          display "compiling" commands],
+	[
+    ECHO_LT='--silent'
+    ECHO_LD='@echo linking [$]@;'
+    RULE_CC='@echo compiling [$]<'
+    SHOW_CC='@echo compiling [$]@'
+    ECHO_CC='@'
+],[
+    ECHO_LT=''
+    ECHO_LD=''
+    RULE_CC=''
+    SHOW_CC=''
+    ECHO_CC=''
+])
+AC_MSG_RESULT($enableval)
+AC_SUBST(ECHO_LT)
+AC_SUBST(ECHO_LD)
+AC_SUBST(RULE_CC)
+AC_SUBST(SHOW_CC)
+AC_SUBST(ECHO_CC)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_DISABLE_LEAKS version: 6 updated: 2010/07/23 04:14:32
+dnl ----------------
+dnl Combine no-leak checks with the libraries or tools that are used for the
+dnl checks.
+AC_DEFUN([CF_DISABLE_LEAKS],[
+
+AC_REQUIRE([CF_WITH_DMALLOC])
+AC_REQUIRE([CF_WITH_DBMALLOC])
+AC_REQUIRE([CF_WITH_VALGRIND])
+
+AC_MSG_CHECKING(if you want to perform memory-leak testing)
+AC_ARG_ENABLE(leaks,
+	[  --disable-leaks         test: free permanent memory, analyze leaks],
+	[if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi],
+	: ${with_no_leaks:=no})
+AC_MSG_RESULT($with_no_leaks)
+
+if test "$with_no_leaks" = yes ; then
+	AC_DEFINE(NO_LEAKS)
+	AC_DEFINE(YY_NO_LEAKS)
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_GCC_ATTRIBUTES version: 14 updated: 2010/10/23 15:52:32
+dnl -----------------
+dnl Test for availability of useful gcc __attribute__ directives to quiet
+dnl compiler warnings.  Though useful, not all are supported -- and contrary
+dnl to documentation, unrecognized directives cause older compilers to barf.
+AC_DEFUN([CF_GCC_ATTRIBUTES],
+[
+if test "$GCC" = yes
+then
+cat > conftest.i <<EOF
+#ifndef GCC_PRINTF
+#define GCC_PRINTF 0
+#endif
+#ifndef GCC_SCANF
+#define GCC_SCANF 0
+#endif
+#ifndef GCC_NORETURN
+#define GCC_NORETURN /* nothing */
+#endif
+#ifndef GCC_UNUSED
+#define GCC_UNUSED /* nothing */
+#endif
+EOF
+if test "$GCC" = yes
+then
+	AC_CHECKING([for $CC __attribute__ directives])
+cat > conftest.$ac_ext <<EOF
+#line __oline__ "${as_me:-configure}"
+#include "confdefs.h"
+#include "conftest.h"
+#include "conftest.i"
+#if	GCC_PRINTF
+#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
+#else
+#define GCC_PRINTFLIKE(fmt,var) /*nothing*/
+#endif
+#if	GCC_SCANF
+#define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
+#else
+#define GCC_SCANFLIKE(fmt,var)  /*nothing*/
+#endif
+extern void wow(char *,...) GCC_SCANFLIKE(1,2);
+extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
+extern void foo(void) GCC_NORETURN;
+int main(int argc GCC_UNUSED, char *argv[[]] GCC_UNUSED) { return 0; }
+EOF
+	cf_printf_attribute=no
+	cf_scanf_attribute=no
+	for cf_attribute in scanf printf unused noreturn
+	do
+		CF_UPPER(cf_ATTRIBUTE,$cf_attribute)
+		cf_directive="__attribute__(($cf_attribute))"
+		echo "checking for $CC $cf_directive" 1>&AC_FD_CC
+
+		case $cf_attribute in #(vi
+		printf) #(vi
+			cf_printf_attribute=yes
+			cat >conftest.h <<EOF
+#define GCC_$cf_ATTRIBUTE 1
+EOF
+			;;
+		scanf) #(vi
+			cf_scanf_attribute=yes
+			cat >conftest.h <<EOF
+#define GCC_$cf_ATTRIBUTE 1
+EOF
+			;;
+		*) #(vi
+			cat >conftest.h <<EOF
+#define GCC_$cf_ATTRIBUTE $cf_directive
+EOF
+			;;
+		esac
+
+		if AC_TRY_EVAL(ac_compile); then
+			test -n "$verbose" && AC_MSG_RESULT(... $cf_attribute)
+			cat conftest.h >>confdefs.h
+			case $cf_attribute in #(vi
+			printf) #(vi
+				if test "$cf_printf_attribute" = no ; then
+					cat >>confdefs.h <<EOF
+#define GCC_PRINTFLIKE(fmt,var) /* nothing */
+EOF
+				else
+					cat >>confdefs.h <<EOF
+#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
+EOF
+				fi
+				;;
+			scanf) #(vi
+				if test "$cf_scanf_attribute" = no ; then
+					cat >>confdefs.h <<EOF
+#define GCC_SCANFLIKE(fmt,var) /* nothing */
+EOF
+				else
+					cat >>confdefs.h <<EOF
+#define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
+EOF
+				fi
+				;;
+			esac
+		fi
+	done
+else
+	fgrep define conftest.i >>confdefs.h
+fi
+rm -rf conftest*
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_GCC_VERSION version: 5 updated: 2010/04/24 11:02:31
+dnl --------------
+dnl Find version of gcc
+AC_DEFUN([CF_GCC_VERSION],[
+AC_REQUIRE([AC_PROG_CC])
+GCC_VERSION=none
+if test "$GCC" = yes ; then
+	AC_MSG_CHECKING(version of $CC)
+	GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[[^0-9.]]*//' -e 's/[[^0-9.]].*//'`"
+	test -z "$GCC_VERSION" && GCC_VERSION=unknown
+	AC_MSG_RESULT($GCC_VERSION)
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_GCC_WARNINGS version: 27 updated: 2010/10/23 15:52:32
+dnl ---------------
+dnl Check if the compiler supports useful warning options.  There's a few that
+dnl we don't use, simply because they're too noisy:
+dnl
+dnl	-Wconversion (useful in older versions of gcc, but not in gcc 2.7.x)
+dnl	-Wredundant-decls (system headers make this too noisy)
+dnl	-Wtraditional (combines too many unrelated messages, only a few useful)
+dnl	-Wwrite-strings (too noisy, but should review occasionally).  This
+dnl		is enabled for ncurses using "--enable-const".
+dnl	-pedantic
+dnl
+dnl Parameter:
+dnl	$1 is an optional list of gcc warning flags that a particular
+dnl		application might want to use, e.g., "no-unused" for
+dnl		-Wno-unused
+dnl Special:
+dnl	If $with_ext_const is "yes", add a check for -Wwrite-strings
+dnl
+AC_DEFUN([CF_GCC_WARNINGS],
+[
+AC_REQUIRE([CF_GCC_VERSION])
+CF_INTEL_COMPILER(GCC,INTEL_COMPILER,CFLAGS)
+
+cat > conftest.$ac_ext <<EOF
+#line __oline__ "${as_me:-configure}"
+int main(int argc, char *argv[[]]) { return (argv[[argc-1]] == 0) ; }
+EOF
+
+if test "$INTEL_COMPILER" = yes
+then
+# The "-wdXXX" options suppress warnings:
+# remark #1419: external declaration in primary source file
+# remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
+# remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
+# remark #193: zero used for undefined preprocessing identifier
+# remark #593: variable "curs_sb_left_arrow" was set but never used
+# remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
+# remark #869: parameter "tw" was never referenced
+# remark #981: operands are evaluated in unspecified order
+# warning #279: controlling expression is constant
+
+	AC_CHECKING([for $CC warning options])
+	cf_save_CFLAGS="$CFLAGS"
+	EXTRA_CFLAGS="-Wall"
+	for cf_opt in \
+		wd1419 \
+		wd1683 \
+		wd1684 \
+		wd193 \
+		wd593 \
+		wd279 \
+		wd810 \
+		wd869 \
+		wd981
+	do
+		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
+		if AC_TRY_EVAL(ac_compile); then
+			test -n "$verbose" && AC_MSG_RESULT(... -$cf_opt)
+			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
+		fi
+	done
+	CFLAGS="$cf_save_CFLAGS"
+
+elif test "$GCC" = yes
+then
+	AC_CHECKING([for $CC warning options])
+	cf_save_CFLAGS="$CFLAGS"
+	EXTRA_CFLAGS=
+	cf_warn_CONST=""
+	test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
+	for cf_opt in W Wall \
+		Wbad-function-cast \
+		Wcast-align \
+		Wcast-qual \
+		Winline \
+		Wmissing-declarations \
+		Wmissing-prototypes \
+		Wnested-externs \
+		Wpointer-arith \
+		Wshadow \
+		Wstrict-prototypes \
+		Wundef $cf_warn_CONST $1
+	do
+		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
+		if AC_TRY_EVAL(ac_compile); then
+			test -n "$verbose" && AC_MSG_RESULT(... -$cf_opt)
+			case $cf_opt in #(vi
+			Wcast-qual) #(vi
+				CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
+				;;
+			Winline) #(vi
+				case $GCC_VERSION in
+				[[34]].*)
+					CF_VERBOSE(feature is broken in gcc $GCC_VERSION)
+					continue;;
+				esac
+				;;
+			esac
+			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
+		fi
+	done
+	CFLAGS="$cf_save_CFLAGS"
+fi
+rm -rf conftest*
+
+AC_SUBST(EXTRA_CFLAGS)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_GNU_SOURCE version: 6 updated: 2005/07/09 13:23:07
+dnl -------------
+dnl Check if we must define _GNU_SOURCE to get a reasonable value for
+dnl _XOPEN_SOURCE, upon which many POSIX definitions depend.  This is a defect
+dnl (or misfeature) of glibc2, which breaks portability of many applications,
+dnl since it is interwoven with GNU extensions.
+dnl
+dnl Well, yes we could work around it...
+AC_DEFUN([CF_GNU_SOURCE],
+[
+AC_CACHE_CHECK(if we must define _GNU_SOURCE,cf_cv_gnu_source,[
+AC_TRY_COMPILE([#include <sys/types.h>],[
+#ifndef _XOPEN_SOURCE
+make an error
+#endif],
+	[cf_cv_gnu_source=no],
+	[cf_save="$CPPFLAGS"
+	 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
+	 AC_TRY_COMPILE([#include <sys/types.h>],[
+#ifdef _XOPEN_SOURCE
+make an error
+#endif],
+	[cf_cv_gnu_source=no],
+	[cf_cv_gnu_source=yes])
+	CPPFLAGS="$cf_save"
+	])
+])
+test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_INTEL_COMPILER version: 4 updated: 2010/05/26 05:38:42
+dnl -----------------
+dnl Check if the given compiler is really the Intel compiler for Linux.  It
+dnl tries to imitate gcc, but does not return an error when it finds a mismatch
+dnl between prototypes, e.g., as exercised by CF_MISSING_CHECK.
+dnl
+dnl This macro should be run "soon" after AC_PROG_CC or AC_PROG_CPLUSPLUS, to
+dnl ensure that it is not mistaken for gcc/g++.  It is normally invoked from
+dnl the wrappers for gcc and g++ warnings.
+dnl
+dnl $1 = GCC (default) or GXX
+dnl $2 = INTEL_COMPILER (default) or INTEL_CPLUSPLUS
+dnl $3 = CFLAGS (default) or CXXFLAGS
+AC_DEFUN([CF_INTEL_COMPILER],[
+ifelse([$2],,INTEL_COMPILER,[$2])=no
+
+if test "$ifelse([$1],,[$1],GCC)" = yes ; then
+	case $host_os in
+	linux*|gnu*)
+		AC_MSG_CHECKING(if this is really Intel ifelse([$1],GXX,C++,C) compiler)
+		cf_save_CFLAGS="$ifelse([$3],,CFLAGS,[$3])"
+		ifelse([$3],,CFLAGS,[$3])="$ifelse([$3],,CFLAGS,[$3]) -no-gcc"
+		AC_TRY_COMPILE([],[
+#ifdef __INTEL_COMPILER
+#else
+make an error
+#endif
+],[ifelse([$2],,INTEL_COMPILER,[$2])=yes
+cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
+],[])
+		ifelse([$3],,CFLAGS,[$3])="$cf_save_CFLAGS"
+		AC_MSG_RESULT($ifelse([$2],,INTEL_COMPILER,[$2]))
+		;;
+	esac
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_MAKE_TAGS version: 6 updated: 2010/10/23 15:52:32
+dnl ------------
+dnl Generate tags/TAGS targets for makefiles.  Do not generate TAGS if we have
+dnl a monocase filesystem.
+AC_DEFUN([CF_MAKE_TAGS],[
+AC_REQUIRE([CF_MIXEDCASE_FILENAMES])
+
+AC_CHECK_PROGS(CTAGS, exctags ctags)
+AC_CHECK_PROGS(ETAGS, exetags etags)
+
+AC_CHECK_PROG(MAKE_LOWER_TAGS, ${CTAGS:-ctags}, yes, no)
+
+if test "$cf_cv_mixedcase" = yes ; then
+	AC_CHECK_PROG(MAKE_UPPER_TAGS, ${ETAGS:-etags}, yes, no)
+else
+	MAKE_UPPER_TAGS=no
+fi
+
+if test "$MAKE_UPPER_TAGS" = yes ; then
+	MAKE_UPPER_TAGS=
+else
+	MAKE_UPPER_TAGS="#"
+fi
+
+if test "$MAKE_LOWER_TAGS" = yes ; then
+	MAKE_LOWER_TAGS=
+else
+	MAKE_LOWER_TAGS="#"
+fi
+
+AC_SUBST(CTAGS)
+AC_SUBST(ETAGS)
+
+AC_SUBST(MAKE_UPPER_TAGS)
+AC_SUBST(MAKE_LOWER_TAGS)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_MIXEDCASE_FILENAMES version: 3 updated: 2003/09/20 17:07:55
+dnl ----------------------
+dnl Check if the file-system supports mixed-case filenames.  If we're able to
+dnl create a lowercase name and see it as uppercase, it doesn't support that.
+AC_DEFUN([CF_MIXEDCASE_FILENAMES],
+[
+AC_CACHE_CHECK(if filesystem supports mixed-case filenames,cf_cv_mixedcase,[
+if test "$cross_compiling" = yes ; then
+	case $target_alias in #(vi
+	*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
+		cf_cv_mixedcase=no
+		;;
+	*)
+		cf_cv_mixedcase=yes
+		;;
+	esac
+else
+	rm -f conftest CONFTEST
+	echo test >conftest
+	if test -f CONFTEST ; then
+		cf_cv_mixedcase=no
+	else
+		cf_cv_mixedcase=yes
+	fi
+	rm -f conftest CONFTEST
+fi
+])
+test "$cf_cv_mixedcase" = yes && AC_DEFINE(MIXEDCASE_FILENAMES)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_MKSTEMP version: 7 updated: 2010/08/14 18:25:37
+dnl ----------
+dnl Check for a working mkstemp.  This creates two files, checks that they are
+dnl successfully created and distinct (AmigaOS apparently fails on the last).
+AC_DEFUN([CF_MKSTEMP],[
+AC_CACHE_CHECK(for working mkstemp, cf_cv_func_mkstemp,[
+rm -rf conftest*
+AC_TRY_RUN([
+#include <sys/types.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/stat.h>
+int main()
+{
+	char *tmpl = "conftestXXXXXX";
+	char name[2][80];
+	int n;
+	int result = 0;
+	int fd;
+	struct stat sb;
+
+	umask(077);
+	for (n = 0; n < 2; ++n) {
+		strcpy(name[n], tmpl);
+		if ((fd = mkstemp(name[n])) >= 0) {
+			if (!strcmp(name[n], tmpl)
+			 || stat(name[n], &sb) != 0
+			 || (sb.st_mode & S_IFMT) != S_IFREG
+			 || (sb.st_mode & 077) != 0) {
+				result = 1;
+			}
+			close(fd);
+		}
+	}
+	if (result == 0
+	 && !strcmp(name[0], name[1]))
+		result = 1;
+	${cf_cv_main_return:-return}(result);
+}
+],[cf_cv_func_mkstemp=yes
+],[cf_cv_func_mkstemp=no
+],[AC_CHECK_FUNC(mkstemp)
+])
+])
+if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
+	AC_DEFINE(HAVE_MKSTEMP)
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_MSG_LOG version: 5 updated: 2010/10/23 15:52:32
+dnl ----------
+dnl Write a debug message to config.log, along with the line number in the
+dnl configure script.
+AC_DEFUN([CF_MSG_LOG],[
+echo "${as_me:-configure}:__oline__: testing $* ..." 1>&AC_FD_CC
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_NO_LEAKS_OPTION version: 4 updated: 2006/12/16 14:24:05
+dnl ------------------
+dnl see CF_WITH_NO_LEAKS
+AC_DEFUN([CF_NO_LEAKS_OPTION],[
+AC_MSG_CHECKING(if you want to use $1 for testing)
+AC_ARG_WITH($1,
+	[$2],
+	[AC_DEFINE($3)ifelse([$4],,[
+	 $4
+])
+	: ${with_cflags:=-g}
+	: ${with_no_leaks:=yes}
+	 with_$1=yes],
+	[with_$1=])
+AC_MSG_RESULT(${with_$1:-no})
+
+case .$with_cflags in #(vi
+.*-g*)
+	case .$CFLAGS in #(vi
+	.*-g*) #(vi
+		;;
+	*)
+		CF_ADD_CFLAGS([-g])
+		;;
+	esac
+	;;
+esac
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_POSIX_C_SOURCE version: 8 updated: 2010/05/26 05:38:42
+dnl -----------------
+dnl Define _POSIX_C_SOURCE to the given level, and _POSIX_SOURCE if needed.
+dnl
+dnl	POSIX.1-1990				_POSIX_SOURCE
+dnl	POSIX.1-1990 and			_POSIX_SOURCE and
+dnl		POSIX.2-1992 C-Language			_POSIX_C_SOURCE=2
+dnl		Bindings Option
+dnl	POSIX.1b-1993				_POSIX_C_SOURCE=199309L
+dnl	POSIX.1c-1996				_POSIX_C_SOURCE=199506L
+dnl	X/Open 2000				_POSIX_C_SOURCE=200112L
+dnl
+dnl Parameters:
+dnl	$1 is the nominal value for _POSIX_C_SOURCE
+AC_DEFUN([CF_POSIX_C_SOURCE],
+[
+cf_POSIX_C_SOURCE=ifelse([$1],,199506L,[$1])
+
+cf_save_CFLAGS="$CFLAGS"
+cf_save_CPPFLAGS="$CPPFLAGS"
+
+CF_REMOVE_DEFINE(cf_trim_CFLAGS,$cf_save_CFLAGS,_POSIX_C_SOURCE)
+CF_REMOVE_DEFINE(cf_trim_CPPFLAGS,$cf_save_CPPFLAGS,_POSIX_C_SOURCE)
+
+AC_CACHE_CHECK(if we should define _POSIX_C_SOURCE,cf_cv_posix_c_source,[
+	CF_MSG_LOG(if the symbol is already defined go no further)
+	AC_TRY_COMPILE([#include <sys/types.h>],[
+#ifndef _POSIX_C_SOURCE
+make an error
+#endif],
+	[cf_cv_posix_c_source=no],
+	[cf_want_posix_source=no
+	 case .$cf_POSIX_C_SOURCE in #(vi
+	 .[[12]]??*) #(vi
+		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
+		;;
+	 .2) #(vi
+		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
+		cf_want_posix_source=yes
+		;;
+	 .*)
+		cf_want_posix_source=yes
+		;;
+	 esac
+	 if test "$cf_want_posix_source" = yes ; then
+		AC_TRY_COMPILE([#include <sys/types.h>],[
+#ifdef _POSIX_SOURCE
+make an error
+#endif],[],
+		cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE")
+	 fi
+	 CF_MSG_LOG(ifdef from value $cf_POSIX_C_SOURCE)
+	 CFLAGS="$cf_trim_CFLAGS"
+	 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
+	 CF_MSG_LOG(if the second compile does not leave our definition intact error)
+	 AC_TRY_COMPILE([#include <sys/types.h>],[
+#ifndef _POSIX_C_SOURCE
+make an error
+#endif],,
+	 [cf_cv_posix_c_source=no])
+	 CFLAGS="$cf_save_CFLAGS"
+	 CPPFLAGS="$cf_save_CPPFLAGS"
+	])
+])
+
+if test "$cf_cv_posix_c_source" != no ; then
+	CFLAGS="$cf_trim_CFLAGS"
+	CPPFLAGS="$cf_trim_CPPFLAGS"
+	CF_ADD_CFLAGS($cf_cv_posix_c_source)
+fi
+
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_PROG_EXT version: 10 updated: 2004/01/03 19:28:18
+dnl -----------
+dnl Compute $PROG_EXT, used for non-Unix ports, such as OS/2 EMX.
+AC_DEFUN([CF_PROG_EXT],
+[
+AC_REQUIRE([CF_CHECK_CACHE])
+case $cf_cv_system_name in
+os2*)
+    CFLAGS="$CFLAGS -Zmt"
+    CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
+    CXXFLAGS="$CXXFLAGS -Zmt"
+    # autoconf's macro sets -Zexe and suffix both, which conflict:w
+    LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
+    ac_cv_exeext=.exe
+    ;;
+esac
+
+AC_EXEEXT
+AC_OBJEXT
+
+PROG_EXT="$EXEEXT"
+AC_SUBST(PROG_EXT)
+test -n "$PROG_EXT" && AC_DEFINE_UNQUOTED(PROG_EXT,"$PROG_EXT")
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_PROG_LINT version: 2 updated: 2009/08/12 04:43:14
+dnl ------------
+AC_DEFUN([CF_PROG_LINT],
+[
+AC_CHECK_PROGS(LINT, tdlint lint alint splint lclint)
+AC_SUBST(LINT_OPTS)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_REMOVE_DEFINE version: 3 updated: 2010/01/09 11:05:50
+dnl ----------------
+dnl Remove all -U and -D options that refer to the given symbol from a list
+dnl of C compiler options.  This works around the problem that not all
+dnl compilers process -U and -D options from left-to-right, so a -U option
+dnl cannot be used to cancel the effect of a preceding -D option.
+dnl
+dnl $1 = target (which could be the same as the source variable)
+dnl $2 = source (including '$')
+dnl $3 = symbol to remove
+define([CF_REMOVE_DEFINE],
+[
+$1=`echo "$2" | \
+	sed	-e 's/-[[UD]]'"$3"'\(=[[^ 	]]*\)\?[[ 	]]/ /g' \
+		-e 's/-[[UD]]'"$3"'\(=[[^ 	]]*\)\?[$]//g'`
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_TRY_XOPEN_SOURCE version: 1 updated: 2011/10/30 17:09:50
+dnl -------------------
+dnl If _XOPEN_SOURCE is not defined in the compile environment, check if we
+dnl can define it successfully.
+AC_DEFUN([CF_TRY_XOPEN_SOURCE],[
+AC_CACHE_CHECK(if we should define _XOPEN_SOURCE,cf_cv_xopen_source,[
+	AC_TRY_COMPILE([
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+],[
+#ifndef _XOPEN_SOURCE
+make an error
+#endif],
+	[cf_cv_xopen_source=no],
+	[cf_save="$CPPFLAGS"
+	 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
+	 AC_TRY_COMPILE([
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+],[
+#ifdef _XOPEN_SOURCE
+make an error
+#endif],
+	[cf_cv_xopen_source=no],
+	[cf_cv_xopen_source=$cf_XOPEN_SOURCE])
+	CPPFLAGS="$cf_save"
+	])
+])
+
+if test "$cf_cv_xopen_source" != no ; then
+	CF_REMOVE_DEFINE(CFLAGS,$CFLAGS,_XOPEN_SOURCE)
+	CF_REMOVE_DEFINE(CPPFLAGS,$CPPFLAGS,_XOPEN_SOURCE)
+	cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
+	CF_ADD_CFLAGS($cf_temp_xopen_source)
+fi
+])
+dnl ---------------------------------------------------------------------------
+dnl CF_UPPER version: 5 updated: 2001/01/29 23:40:59
+dnl --------
+dnl Make an uppercase version of a variable
+dnl $1=uppercase($2)
+AC_DEFUN([CF_UPPER],
+[
+$1=`echo "$2" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_VERBOSE version: 3 updated: 2007/07/29 09:55:12
+dnl ----------
+dnl Use AC_VERBOSE w/o the warnings
+AC_DEFUN([CF_VERBOSE],
+[test -n "$verbose" && echo "	$1" 1>&AC_FD_MSG
+CF_MSG_LOG([$1])
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_WITH_DBMALLOC version: 7 updated: 2010/06/21 17:26:47
+dnl ----------------
+dnl Configure-option for dbmalloc.  The optional parameter is used to override
+dnl the updating of $LIBS, e.g., to avoid conflict with subsequent tests.
+AC_DEFUN([CF_WITH_DBMALLOC],[
+CF_NO_LEAKS_OPTION(dbmalloc,
+	[  --with-dbmalloc         test: use Conor Cahill's dbmalloc library],
+	[USE_DBMALLOC])
+
+if test "$with_dbmalloc" = yes ; then
+	AC_CHECK_HEADER(dbmalloc.h,
+		[AC_CHECK_LIB(dbmalloc,[debug_malloc]ifelse([$1],,[],[,$1]))])
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_WITH_DMALLOC version: 7 updated: 2010/06/21 17:26:47
+dnl ---------------
+dnl Configure-option for dmalloc.  The optional parameter is used to override
+dnl the updating of $LIBS, e.g., to avoid conflict with subsequent tests.
+AC_DEFUN([CF_WITH_DMALLOC],[
+CF_NO_LEAKS_OPTION(dmalloc,
+	[  --with-dmalloc          test: use Gray Watson's dmalloc library],
+	[USE_DMALLOC])
+
+if test "$with_dmalloc" = yes ; then
+	AC_CHECK_HEADER(dmalloc.h,
+		[AC_CHECK_LIB(dmalloc,[dmalloc_debug]ifelse([$1],,[],[,$1]))])
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_WITH_VALGRIND version: 1 updated: 2006/12/14 18:00:21
+dnl ----------------
+AC_DEFUN([CF_WITH_VALGRIND],[
+CF_NO_LEAKS_OPTION(valgrind,
+	[  --with-valgrind         test: use valgrind],
+	[USE_VALGRIND])
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_WITH_WARNINGS version: 5 updated: 2004/07/23 14:40:34
+dnl ----------------
+dnl Combine the checks for gcc features into a configure-script option
+dnl
+dnl Parameters:
+dnl	$1 - see CF_GCC_WARNINGS
+AC_DEFUN([CF_WITH_WARNINGS],
+[
+if ( test "$GCC" = yes || test "$GXX" = yes )
+then
+AC_MSG_CHECKING(if you want to check for gcc warnings)
+AC_ARG_WITH(warnings,
+	[  --with-warnings         test: turn on gcc warnings],
+	[cf_opt_with_warnings=$withval],
+	[cf_opt_with_warnings=no])
+AC_MSG_RESULT($cf_opt_with_warnings)
+if test "$cf_opt_with_warnings" != no ; then
+	CF_GCC_ATTRIBUTES
+	CF_GCC_WARNINGS([$1])
+fi
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_XOPEN_SOURCE version: 42 updated: 2012/01/07 08:26:49
+dnl ---------------
+dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions,
+dnl or adapt to the vendor's definitions to get equivalent functionality,
+dnl without losing the common non-POSIX features.
+dnl
+dnl Parameters:
+dnl	$1 is the nominal value for _XOPEN_SOURCE
+dnl	$2 is the nominal value for _POSIX_C_SOURCE
+AC_DEFUN([CF_XOPEN_SOURCE],[
+
+cf_XOPEN_SOURCE=ifelse([$1],,500,[$1])
+cf_POSIX_C_SOURCE=ifelse([$2],,199506L,[$2])
+cf_xopen_source=
+
+case $host_os in #(vi
+aix[[4-7]]*) #(vi
+	cf_xopen_source="-D_ALL_SOURCE"
+	;;
+cygwin) #(vi
+	cf_XOPEN_SOURCE=600
+	;;
+darwin[[0-8]].*) #(vi
+	cf_xopen_source="-D_APPLE_C_SOURCE"
+	;;
+darwin*) #(vi
+	cf_xopen_source="-D_DARWIN_C_SOURCE"
+	cf_XOPEN_SOURCE=
+	;;
+freebsd*|dragonfly*) #(vi
+	# 5.x headers associate
+	#	_XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
+	#	_XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
+	cf_POSIX_C_SOURCE=200112L
+	cf_XOPEN_SOURCE=600
+	cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
+	;;
+hpux11*) #(vi
+	cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
+	;;
+hpux*) #(vi
+	cf_xopen_source="-D_HPUX_SOURCE"
+	;;
+irix[[56]].*) #(vi
+	cf_xopen_source="-D_SGI_SOURCE"
+	cf_XOPEN_SOURCE=
+	;;
+linux*|gnu*|mint*|k*bsd*-gnu) #(vi
+	CF_GNU_SOURCE
+	;;
+mirbsd*) #(vi
+	# setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
+	cf_XOPEN_SOURCE=
+	CF_POSIX_C_SOURCE($cf_POSIX_C_SOURCE)
+	;;
+netbsd*) #(vi
+	cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
+	;;
+openbsd[[4-9]]*) #(vi
+	# setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
+	cf_xopen_source="-D_BSD_SOURCE"
+	cf_XOPEN_SOURCE=600
+	;;
+openbsd*) #(vi
+	# setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
+	;;
+osf[[45]]*) #(vi
+	cf_xopen_source="-D_OSF_SOURCE"
+	;;
+nto-qnx*) #(vi
+	cf_xopen_source="-D_QNX_SOURCE"
+	;;
+sco*) #(vi
+	# setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
+	;;
+solaris2.*) #(vi
+	cf_xopen_source="-D__EXTENSIONS__"
+	;;
+*)
+	CF_TRY_XOPEN_SOURCE
+	CF_POSIX_C_SOURCE($cf_POSIX_C_SOURCE)
+	;;
+esac
+
+if test -n "$cf_xopen_source" ; then
+	CF_ADD_CFLAGS($cf_xopen_source)
+fi
+
+dnl In anything but the default case, we may have system-specific setting
+dnl which is still not guaranteed to provide all of the entrypoints that
+dnl _XOPEN_SOURCE would yield.
+if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
+	AC_MSG_CHECKING(if _XOPEN_SOURCE really is set)
+	AC_TRY_COMPILE([#include <stdlib.h>],[
+#ifndef _XOPEN_SOURCE
+make an error
+#endif],
+	[cf_XOPEN_SOURCE_set=yes],
+	[cf_XOPEN_SOURCE_set=no])
+	AC_MSG_RESULT($cf_XOPEN_SOURCE_set)
+	if test $cf_XOPEN_SOURCE_set = yes
+	then
+		AC_TRY_COMPILE([#include <stdlib.h>],[
+#if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
+make an error
+#endif],
+		[cf_XOPEN_SOURCE_set_ok=yes],
+		[cf_XOPEN_SOURCE_set_ok=no])
+		if test $cf_XOPEN_SOURCE_set_ok = no
+		then
+			AC_MSG_WARN(_XOPEN_SOURCE is lower than requested)
+		fi
+	else
+		CF_TRY_XOPEN_SOURCE
+	fi
+fi
+])
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/head/contrib/byacc/closure.c	Wed Jul 25 16:21:35 2012 +0300
@@ -0,0 +1,251 @@
+/* $Id: closure.c,v 1.9 2010/06/09 08:21:47 tom Exp $ */
+
+#include "defs.h"
+
+Value_t *itemset;
+Value_t *itemsetend;
+unsigned *ruleset;
+
+static unsigned *first_derives;
+static unsigned *EFF;
+
+static void
+set_EFF(void)
+{
+    unsigned *row;
+    int symbol;
+    short *sp;
+    int rowsize;
+    int i;
+    int rule;
+
+    rowsize = WORDSIZE(nvars);
+    EFF = NEW2(nvars * rowsize, unsigned);
+
+    row = EFF;
+    for (i = start_symbol; i < nsyms; i++)
+    {
+	sp = derives[i];
+	for (rule = *sp; rule > 0; rule = *++sp)
+	{
+	    symbol = ritem[rrhs[rule]];
+	    if (ISVAR(symbol))
+	    {
+		symbol -= start_symbol;
+		SETBIT(row, symbol);
+	    }
+	}
+	row += rowsize;
+    }
+
+    reflexive_transitive_closure(EFF, nvars);
+
+#ifdef	DEBUG
+    print_EFF();
+#endif
+}
+
+void
+set_first_derives(void)
+{
+    unsigned *rrow;
+    unsigned *vrow;
+    int j;
+    unsigned k;
+    unsigned cword = 0;
+    short *rp;
+
+    int rule;
+    int i;
+    int rulesetsize;
+    int varsetsize;
+
+    rulesetsize = WORDSIZE(nrules);
+    varsetsize = WORDSIZE(nvars);
+    first_derives = NEW2(nvars * rulesetsize, unsigned) - ntokens * rulesetsize;
+
+    set_EFF();
+
+    rrow = first_derives + ntokens * rulesetsize;
+    for (i = start_symbol; i < nsyms; i++)
+    {
+	vrow = EFF + ((i - ntokens) * varsetsize);
+	k = BITS_PER_WORD;
+	for (j = start_symbol; j < nsyms; k++, j++)
+	{
+	    if (k >= BITS_PER_WORD)
+	    {
+		cword = *vrow++;
+		k = 0;
+	    }
+
+	    if (cword & (unsigned)(1 << k))
+	    {
+		rp = derives[j];
+		while ((rule = *rp++) >= 0)
+		{
+		    SETBIT(rrow, rule);
+		}
+	    }
+	}
+
+	rrow += rulesetsize;
+    }
+
+#ifdef	DEBUG
+    print_first_derives();
+#endif
+
+    FREE(EFF);
+}
+
+void
+closure(short *nucleus, int n)
+{
+    unsigned ruleno;
+    unsigned word;
+    unsigned i;
+    Value_t *csp;
+    unsigned *dsp;
+    unsigned *rsp;
+    int rulesetsize;
+
+    Value_t *csend;
+    unsigned *rsend;
+    int symbol;
+    Value_t itemno;
+
+    rulesetsize = WORDSIZE(nrules);
+    rsend = ruleset + rulesetsize;
+    for (rsp = ruleset; rsp < rsend; rsp++)
+	*rsp = 0;
+
+    csend = nucleus + n;
+    for (csp = nucleus; csp < csend; ++csp)
+    {
+	symbol = ritem[*csp];
+	if (ISVAR(symbol))
+	{
+	    dsp = first_derives + symbol * rulesetsize;
+	    rsp = ruleset;
+	    while (rsp < rsend)
+		*rsp++ |= *dsp++;
+	}
+    }
+
+    ruleno = 0;
+    itemsetend = itemset;
+    csp = nucleus;
+    for (rsp = ruleset; rsp < rsend; ++rsp)
+    {
+	word = *rsp;
+	if (word)
+	{
+	    for (i = 0; i < BITS_PER_WORD; ++i)
+	    {
+		if (word & (unsigned)(1 << i))
+		{
+		    itemno = rrhs[ruleno + i];
+		    while (csp < csend && *csp < itemno)
+			*itemsetend++ = *csp++;
+		    *itemsetend++ = itemno;
+		    while (csp < csend && *csp == itemno)
+			++csp;
+		}
+	    }
+	}
+	ruleno += BITS_PER_WORD;
+    }
+
+    while (csp < csend)
+	*itemsetend++ = *csp++;
+
+#ifdef	DEBUG
+    print_closure(n);
+#endif
+}
+
+void
+finalize_closure(void)
+{
+    FREE(itemset);
+    FREE(ruleset);
+    FREE(first_derives + ntokens * WORDSIZE(nrules));
+}
+
+#ifdef	DEBUG
+
+void
+print_closure(int n)
+{
+    short *isp;
+
+    printf("\n\nn = %d\n\n", n);
+    for (isp = itemset; isp < itemsetend; isp++)
+	printf("   %d\n", *isp);
+}
+
+void
+print_EFF(void)
+{
+    int i, j;
+    unsigned *rowp;
+    unsigned word;
+    unsigned k;
+
+    printf("\n\nEpsilon Free Firsts\n");
+
+    for (i = start_symbol; i < nsyms; i++)
+    {
+	printf("\n%s", symbol_name[i]);
+	rowp = EFF + ((i - start_symbol) * WORDSIZE(nvars));
+	word = *rowp++;
+
+	k = BITS_PER_WORD;
+	for (j = 0; j < nvars; k++, j++)
+	{
+	    if (k >= BITS_PER_WORD)
+	    {
+		word = *rowp++;
+		k = 0;
+	    }
+
+	    if (word & (1 << k))
+		printf("  %s", symbol_name[start_symbol + j]);
+	}
+    }
+}
+
+void
+print_first_derives(void)
+{
+    int i;
+    int j;
+    unsigned *rp;
+    unsigned cword = 0;
+    unsigned k;
+
+    printf("\n\n\nFirst Derives\n");
+
+    for (i = start_symbol; i < nsyms; i++)
+    {
+	printf("\n%s derives\n", symbol_name[i]);
+	rp = first_derives + i * WORDSIZE(nrules);
+	k = BITS_PER_WORD;
+	for (j = 0; j <= nrules; k++, j++)
+	{
+	    if (k >= BITS_PER_WORD)
+	    {
+		cword = *rp++;
+		k = 0;
+	    }
+
+	    if (cword & (1 << k))
+		printf("   %d\n", j);
+	}
+    }
+
+    fflush(stdout);
+}
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/head/contrib/byacc/config.guess	Wed Jul 25 16:21:35 2012 +0300
@@ -0,0 +1,1511 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+#   2911 Free Software Foundation, Inc.
+
+timestamp='2011-01-01'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Originally written by Per Bothner.  Please send patches (context
+# diff format) to <[email protected]> and include a ChangeLog
+# entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub.  If it succeeds, it prints the system name on stdout, and
+# exits with 0.  Otherwise, it exits with 1.
+#
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <[email protected]>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help" >&2
+       exit 1 ;;
+    * )
+       break ;;
+  esac
+done
+
+if test $# != 0; then
+  echo "$me: too many arguments$help" >&2
+  exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,)    echo "int x;" > $dummy.c ;
+	for c in cc gcc c89 c99 ; do
+	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+	     CC_FOR_BUILD="$c"; break ;
+	  fi ;
+	done ;
+	if test x"$CC_FOR_BUILD" = x ; then
+	  CC_FOR_BUILD=no_compiler_found ;
+	fi
+	;;
+ ,,*)   CC_FOR_BUILD=$CC ;;
+ ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# ([email protected] 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+	PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+    *:NetBSD:*:*)
+	# NetBSD (nbsd) targets should (where applicable) match one or
+	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
+	# switched to ELF, *-*-netbsd* would select the old
+	# object file format.  This provides both forward
+	# compatibility and a consistent mechanism for selecting the
+	# object file format.
+	#
+	# Note: NetBSD doesn't particularly care about the vendor
+	# portion of the name.  We always set it to "unknown".
+	sysctl="sysctl -n hw.machine_arch"
+	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+	case "${UNAME_MACHINE_ARCH}" in
+	    armeb) machine=armeb-unknown ;;
+	    arm*) machine=arm-unknown ;;
+	    sh3el) machine=shl-unknown ;;
+	    sh3eb) machine=sh-unknown ;;
+	    sh5el) machine=sh5le-unknown ;;
+	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+	esac
+	# The Operating System including object format, if it has switched
+	# to ELF recently, or will in the future.
+	case "${UNAME_MACHINE_ARCH}" in
+	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+		eval $set_cc_for_build
+		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+			| grep -q __ELF__
+		then
+		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+		    # Return netbsd for either.  FIX?
+		    os=netbsd
+		else
+		    os=netbsdelf
+		fi
+		;;
+	    *)
+		os=netbsd
+		;;
+	esac
+	# The OS release
+	# Debian GNU/NetBSD machines have a different userland, and
+	# thus, need a distinct triplet. However, they do not need
+	# kernel version information, so it can be replaced with a
+	# suitable tag, in the style of linux-gnu.
+	case "${UNAME_VERSION}" in
+	    Debian*)
+		release='-gnu'