Sync with HEAD pgoyette-compat
authorpgoyette <pgoyette@NetBSD.org>
Sun, 22 Apr 2018 07:20:06 +0000
branchpgoyette-compat
changeset 318414 9b1772b079af
parent 318311 da6ccb158338
child 318417 6cb8448533f9
Sync with HEAD
UPDATING
bin/sh/arithmetic.c
bin/sh/parser.c
crypto/external/bsd/netpgp/dist/src/lib/libnetpgp.3
crypto/external/bsd/openssl/dist/crypto/rsa/rsa_gen.c
distrib/sets/lists/base/shl.mi
distrib/sets/lists/comp/mi
distrib/sets/lists/comp/shl.mi
distrib/sets/lists/debug/shl.mi
doc/3RDPARTY
doc/CHANGES
doc/CHANGES.prev
etc/defaults/rc.conf
external/bsd/am-utils/dist/fixmount/fixmount.8
external/bsd/file/dist/ChangeLog
external/bsd/file/dist/Makefile.in
external/bsd/file/dist/README
external/bsd/file/dist/TODO
external/bsd/file/dist/aclocal.m4
external/bsd/file/dist/compile
external/bsd/file/dist/config.guess
external/bsd/file/dist/config.h.in
external/bsd/file/dist/config.sub
external/bsd/file/dist/configure
external/bsd/file/dist/configure.ac
external/bsd/file/dist/depcomp
external/bsd/file/dist/doc/Makefile.in
external/bsd/file/dist/doc/file.1
external/bsd/file/dist/doc/magic.5
external/bsd/file/dist/install-sh
external/bsd/file/dist/ltmain.sh
external/bsd/file/dist/magic/Makefile.am
external/bsd/file/dist/magic/Makefile.in
external/bsd/file/dist/magic/magdir/acorn
external/bsd/file/dist/magic/magdir/animation
external/bsd/file/dist/magic/magdir/apple
external/bsd/file/dist/magic/magdir/archive
external/bsd/file/dist/magic/magdir/audio
external/bsd/file/dist/magic/magdir/beetle
external/bsd/file/dist/magic/magdir/c64
external/bsd/file/dist/magic/magdir/compress
external/bsd/file/dist/magic/magdir/console
external/bsd/file/dist/magic/magdir/dbpf
external/bsd/file/dist/magic/magdir/elf
external/bsd/file/dist/magic/magdir/filesystems
external/bsd/file/dist/magic/magdir/fonts
external/bsd/file/dist/magic/magdir/games
external/bsd/file/dist/magic/magdir/geo
external/bsd/file/dist/magic/magdir/gnu
external/bsd/file/dist/magic/magdir/images
external/bsd/file/dist/magic/magdir/intel
external/bsd/file/dist/magic/magdir/macintosh
external/bsd/file/dist/magic/magdir/measure
external/bsd/file/dist/magic/magdir/mozilla
external/bsd/file/dist/magic/magdir/msdos
external/bsd/file/dist/magic/magdir/msooxml
external/bsd/file/dist/magic/magdir/netbsd
external/bsd/file/dist/magic/magdir/ole2compounddocs
external/bsd/file/dist/magic/magdir/pgp
external/bsd/file/dist/magic/magdir/revision
external/bsd/file/dist/magic/magdir/riff
external/bsd/file/dist/magic/magdir/rpi
external/bsd/file/dist/magic/magdir/sgml
external/bsd/file/dist/magic/magdir/spectrum
external/bsd/file/dist/magic/magdir/ssl
external/bsd/file/dist/magic/magdir/terminfo
external/bsd/file/dist/magic/magdir/tplink
external/bsd/file/dist/magic/magdir/vorbis
external/bsd/file/dist/magic/magdir/windows
external/bsd/file/dist/magic/magdir/zip
external/bsd/file/dist/missing
external/bsd/file/dist/python/Makefile.in
external/bsd/file/dist/src/Makefile.am
external/bsd/file/dist/src/Makefile.in
external/bsd/file/dist/src/apprentice.c
external/bsd/file/dist/src/ascmagic.c
external/bsd/file/dist/src/buffer.c
external/bsd/file/dist/src/cdf.c
external/bsd/file/dist/src/compress.c
external/bsd/file/dist/src/encoding.c
external/bsd/file/dist/src/file.c
external/bsd/file/dist/src/file.h
external/bsd/file/dist/src/file_opts.h
external/bsd/file/dist/src/funcs.c
external/bsd/file/dist/src/is_tar.c
external/bsd/file/dist/src/readcdf.c
external/bsd/file/dist/src/readelf.c
external/bsd/file/dist/src/seccomp.c
external/bsd/file/dist/src/softmagic.c
external/bsd/file/dist/tests/Makefile.in
external/bsd/file/include/config.h
external/bsd/file/lib/Makefile
external/bsd/file/lib/shlib_version
external/gpl2/gmake/dist/glob/glob.c
external/gpl3/binutils/dist/bfd/ChangeLog
external/gpl3/binutils/dist/bfd/Makefile.am
external/gpl3/binutils/dist/bfd/Makefile.in
external/gpl3/binutils/dist/bfd/aoutx.h
external/gpl3/binutils/dist/bfd/archive.c
external/gpl3/binutils/dist/bfd/archures.c
external/gpl3/binutils/dist/bfd/bfd-in2.h
external/gpl3/binutils/dist/bfd/bfd.c
external/gpl3/binutils/dist/bfd/coff-alpha.c
external/gpl3/binutils/dist/bfd/coffcode.h
external/gpl3/binutils/dist/bfd/config.bfd
external/gpl3/binutils/dist/bfd/configure
external/gpl3/binutils/dist/bfd/configure.ac
external/gpl3/binutils/dist/bfd/configure.host
external/gpl3/binutils/dist/bfd/cpu-mips.c
external/gpl3/binutils/dist/bfd/cpu-or1k.c
external/gpl3/binutils/dist/bfd/cpu-riscv.c
external/gpl3/binutils/dist/bfd/doc/Makefile.in
external/gpl3/binutils/dist/bfd/doc/bfdt.texi
external/gpl3/binutils/dist/bfd/doc/bfdver.texi
external/gpl3/binutils/dist/bfd/doc/reloc.texi
external/gpl3/binutils/dist/bfd/dwarf2.c
external/gpl3/binutils/dist/bfd/elf-bfd.h
external/gpl3/binutils/dist/bfd/elf-eh-frame.c
external/gpl3/binutils/dist/bfd/elf.c
external/gpl3/binutils/dist/bfd/elf32-arm.c
external/gpl3/binutils/dist/bfd/elf32-avr.c
external/gpl3/binutils/dist/bfd/elf32-hppa.c
external/gpl3/binutils/dist/bfd/elf32-i386.c
external/gpl3/binutils/dist/bfd/elf32-m68k.c
external/gpl3/binutils/dist/bfd/elf32-or1k.c
external/gpl3/binutils/dist/bfd/elf32-ppc.c
external/gpl3/binutils/dist/bfd/elf32-sh.c
external/gpl3/binutils/dist/bfd/elf32-vax.c
external/gpl3/binutils/dist/bfd/elf64-alpha.c
external/gpl3/binutils/dist/bfd/elf64-mips.c
external/gpl3/binutils/dist/bfd/elf64-ppc.c
external/gpl3/binutils/dist/bfd/elf64-x86-64.c
external/gpl3/binutils/dist/bfd/elflink.c
external/gpl3/binutils/dist/bfd/elfn32-mips.c
external/gpl3/binutils/dist/bfd/elfnn-riscv.c
external/gpl3/binutils/dist/bfd/elfxx-mips.c
external/gpl3/binutils/dist/bfd/elfxx-riscv.c
external/gpl3/binutils/dist/bfd/elfxx-riscv.h
external/gpl3/binutils/dist/bfd/elfxx-sparc.c
external/gpl3/binutils/dist/bfd/libbfd.h
external/gpl3/binutils/dist/bfd/linker.c
external/gpl3/binutils/dist/bfd/reloc.c
external/gpl3/binutils/dist/bfd/syms.c
external/gpl3/binutils/dist/bfd/targets.c
external/gpl3/binutils/dist/bfd/version.h
external/gpl3/binutils/dist/binutils/ChangeLog
external/gpl3/binutils/dist/binutils/Makefile.in
external/gpl3/binutils/dist/binutils/NEWS
external/gpl3/binutils/dist/binutils/ar.c
external/gpl3/binutils/dist/binutils/arsup.c
external/gpl3/binutils/dist/binutils/bucomm.c
external/gpl3/binutils/dist/binutils/configure
external/gpl3/binutils/dist/binutils/doc/Makefile.am
external/gpl3/binutils/dist/binutils/doc/Makefile.in
external/gpl3/binutils/dist/binutils/doc/addr2line.1
external/gpl3/binutils/dist/binutils/doc/ar.1
external/gpl3/binutils/dist/binutils/doc/binutils.info
external/gpl3/binutils/dist/binutils/doc/binutils.texi
external/gpl3/binutils/dist/binutils/doc/cxxfilt.man
external/gpl3/binutils/dist/binutils/doc/dlltool.1
external/gpl3/binutils/dist/binutils/doc/elfedit.1
external/gpl3/binutils/dist/binutils/doc/nlmconv.1
external/gpl3/binutils/dist/binutils/doc/nm.1
external/gpl3/binutils/dist/binutils/doc/objcopy.1
external/gpl3/binutils/dist/binutils/doc/objdump.1
external/gpl3/binutils/dist/binutils/doc/ranlib.1
external/gpl3/binutils/dist/binutils/doc/readelf.1
external/gpl3/binutils/dist/binutils/doc/size.1
external/gpl3/binutils/dist/binutils/doc/strings.1
external/gpl3/binutils/dist/binutils/doc/strip.1
external/gpl3/binutils/dist/binutils/doc/windmc.1
external/gpl3/binutils/dist/binutils/doc/windres.1
external/gpl3/binutils/dist/binutils/objcopy.c
external/gpl3/binutils/dist/binutils/readelf.c
external/gpl3/binutils/dist/binutils/strings.c
external/gpl3/binutils/dist/config.guess
external/gpl3/binutils/dist/config.sub
external/gpl3/binutils/dist/configure
external/gpl3/binutils/dist/configure.ac
external/gpl3/binutils/dist/cpu/or1kcommon.cpu
external/gpl3/binutils/dist/gas/ChangeLog
external/gpl3/binutils/dist/gas/Makefile.am
external/gpl3/binutils/dist/gas/Makefile.in
external/gpl3/binutils/dist/gas/atof-generic.c
external/gpl3/binutils/dist/gas/config/atof-vax.c
external/gpl3/binutils/dist/gas/config/obj-elf.c
external/gpl3/binutils/dist/gas/config/tc-alpha.c
external/gpl3/binutils/dist/gas/config/tc-arm.c
external/gpl3/binutils/dist/gas/config/tc-m68k.c
external/gpl3/binutils/dist/gas/config/tc-mips.c
external/gpl3/binutils/dist/gas/config/tc-mips.h
external/gpl3/binutils/dist/gas/config/tc-or1k.c
external/gpl3/binutils/dist/gas/config/tc-or1k.h
external/gpl3/binutils/dist/gas/config/tc-ppc.c
external/gpl3/binutils/dist/gas/config/tc-riscv.c
external/gpl3/binutils/dist/gas/config/tc-riscv.h
external/gpl3/binutils/dist/gas/config/tc-sparc.c
external/gpl3/binutils/dist/gas/config/tc-vax.c
external/gpl3/binutils/dist/gas/config/tc-vax.h
external/gpl3/binutils/dist/gas/config/vax-inst.h
external/gpl3/binutils/dist/gas/configure
external/gpl3/binutils/dist/gas/configure.ac
external/gpl3/binutils/dist/gas/configure.tgt
external/gpl3/binutils/dist/gas/doc/Makefile.am
external/gpl3/binutils/dist/gas/doc/Makefile.in
external/gpl3/binutils/dist/gas/doc/as.1
external/gpl3/binutils/dist/gas/doc/as.info
external/gpl3/binutils/dist/gas/doc/as.texinfo
external/gpl3/binutils/dist/gas/doc/c-mips.texi
external/gpl3/binutils/dist/gas/doc/c-ppc.texi
external/gpl3/binutils/dist/gas/remap.c
external/gpl3/binutils/dist/gas/write.c
external/gpl3/binutils/dist/gold/Makefile.am
external/gpl3/binutils/dist/gprof/corefile.c
external/gpl3/binutils/dist/gprof/gprof.1
external/gpl3/binutils/dist/gprof/gprof.c
external/gpl3/binutils/dist/gprof/gprof.info
external/gpl3/binutils/dist/include/bfdlink.h
external/gpl3/binutils/dist/include/dis-asm.h
external/gpl3/binutils/dist/include/elf/common.h
external/gpl3/binutils/dist/include/elf/internal.h
external/gpl3/binutils/dist/include/elf/mips.h
external/gpl3/binutils/dist/include/elf/or1k.h
external/gpl3/binutils/dist/include/elf/ppc.h
external/gpl3/binutils/dist/include/elf/riscv.h
external/gpl3/binutils/dist/include/objalloc.h
external/gpl3/binutils/dist/include/opcode/hppa.h
external/gpl3/binutils/dist/include/opcode/mips.h
external/gpl3/binutils/dist/include/opcode/ppc.h
external/gpl3/binutils/dist/include/opcode/riscv-opc.h
external/gpl3/binutils/dist/include/opcode/riscv.h
external/gpl3/binutils/dist/ld/ChangeLog
external/gpl3/binutils/dist/ld/Makefile.am
external/gpl3/binutils/dist/ld/Makefile.in
external/gpl3/binutils/dist/ld/configure
external/gpl3/binutils/dist/ld/configure.ac
external/gpl3/binutils/dist/ld/configure.host
external/gpl3/binutils/dist/ld/configure.tgt
external/gpl3/binutils/dist/ld/emulparams/elf32bmipn32-defs.sh
external/gpl3/binutils/dist/ld/emulparams/elf32lriscv-defs.sh
external/gpl3/binutils/dist/ld/emulparams/elf64lriscv-defs.sh
external/gpl3/binutils/dist/ld/emulparams/elf_i386.sh
external/gpl3/binutils/dist/ld/emulparams/hppalinux.sh
external/gpl3/binutils/dist/ld/emulparams/shelf_nbsd.sh
external/gpl3/binutils/dist/ld/emultempl/aarch64elf.em
external/gpl3/binutils/dist/ld/emultempl/armelf.em
external/gpl3/binutils/dist/ld/emultempl/beos.em
external/gpl3/binutils/dist/ld/emultempl/elf32.em
external/gpl3/binutils/dist/ld/emultempl/genelf.em
external/gpl3/binutils/dist/ld/emultempl/mmo.em
external/gpl3/binutils/dist/ld/emultempl/pe.em
external/gpl3/binutils/dist/ld/emultempl/pep.em
external/gpl3/binutils/dist/ld/emultempl/riscvelf.em
external/gpl3/binutils/dist/ld/emultempl/spuelf.em
external/gpl3/binutils/dist/ld/emultempl/xtensaelf.em
external/gpl3/binutils/dist/ld/genscripts.sh
external/gpl3/binutils/dist/ld/ld.texinfo
external/gpl3/binutils/dist/ld/ldctor.c
external/gpl3/binutils/dist/ld/ldemul.c
external/gpl3/binutils/dist/ld/ldemul.h
external/gpl3/binutils/dist/ld/ldexp.c
external/gpl3/binutils/dist/ld/ldgram.c
external/gpl3/binutils/dist/ld/ldgram.h
external/gpl3/binutils/dist/ld/ldlang.c
external/gpl3/binutils/dist/ld/ldlang.h
external/gpl3/binutils/dist/ld/ldlex.c
external/gpl3/binutils/dist/ld/ldlex.h
external/gpl3/binutils/dist/ld/ldlex.l
external/gpl3/binutils/dist/ld/ldmain.c
external/gpl3/binutils/dist/ld/ldmain.h
external/gpl3/binutils/dist/ld/lexsup.c
external/gpl3/binutils/dist/ld/scripttempl/avrtiny.sc
external/gpl3/binutils/dist/ld/scripttempl/elf.sc
external/gpl3/binutils/dist/ld/scripttempl/sh.sc
external/gpl3/binutils/dist/libiberty/Makefile.in
external/gpl3/binutils/dist/libiberty/configure
external/gpl3/binutils/dist/libiberty/configure.ac
external/gpl3/binutils/dist/libiberty/floatformat.c
external/gpl3/binutils/dist/libiberty/make-temp-file.c
external/gpl3/binutils/dist/libiberty/objalloc.c
external/gpl3/binutils/dist/opcodes/ChangeLog
external/gpl3/binutils/dist/opcodes/Makefile.am
external/gpl3/binutils/dist/opcodes/Makefile.in
external/gpl3/binutils/dist/opcodes/cgen.sh
external/gpl3/binutils/dist/opcodes/configure
external/gpl3/binutils/dist/opcodes/disassemble.c
external/gpl3/binutils/dist/opcodes/mips-dis.c
external/gpl3/binutils/dist/opcodes/mips-opc.c
external/gpl3/binutils/dist/opcodes/or1k-asm.c
external/gpl3/binutils/dist/opcodes/or1k-desc.c
external/gpl3/binutils/dist/opcodes/or1k-desc.h
external/gpl3/binutils/dist/opcodes/or1k-dis.c
external/gpl3/binutils/dist/opcodes/or1k-ibld.c
external/gpl3/binutils/dist/opcodes/or1k-opc.c
external/gpl3/binutils/dist/opcodes/or1k-opc.h
external/gpl3/binutils/dist/opcodes/or1k-opinst.c
external/gpl3/binutils/dist/opcodes/ppc-dis.c
external/gpl3/binutils/dist/opcodes/ppc-opc.c
external/gpl3/binutils/dist/opcodes/riscv-dis.c
external/gpl3/binutils/dist/opcodes/riscv-opc.c
external/gpl3/binutils/dist/opcodes/sparc-dis.c
external/gpl3/binutils/dist/zlib/as400/bndsrc
external/gpl3/binutils/dist/zlib/as400/compile.clp
external/gpl3/binutils/dist/zlib/as400/readme.txt
external/gpl3/binutils/dist/zlib/as400/zlib.inc
external/gpl3/binutils/lib/libbfd/Makefile
external/gpl3/binutils/lib/libbfd/arch/i386/bfd.h
external/gpl3/binutils/lib/libbfd/arch/i386/bfd_stdint.h
external/gpl3/binutils/lib/libbfd/arch/i386/bfdver.h
external/gpl3/binutils/lib/libbfd/arch/i386/config.h
external/gpl3/binutils/lib/libbfd/arch/i386/defs.mk
external/gpl3/binutils/lib/libbfd/arch/x86_64/bfd.h
external/gpl3/binutils/lib/libbfd/arch/x86_64/bfd_stdint.h
external/gpl3/binutils/lib/libbfd/arch/x86_64/bfdver.h
external/gpl3/binutils/lib/libbfd/arch/x86_64/config.h
external/gpl3/binutils/lib/libbfd/arch/x86_64/defs.mk
external/gpl3/binutils/lib/libiberty/arch/i386/config.h
external/gpl3/binutils/lib/libiberty/arch/i386/defs.mk
external/gpl3/binutils/lib/libiberty/arch/x86_64/config.h
external/gpl3/binutils/lib/libiberty/arch/x86_64/defs.mk
external/gpl3/binutils/lib/libopcodes/Makefile
external/gpl3/binutils/lib/libopcodes/arch/i386/config.h
external/gpl3/binutils/lib/libopcodes/arch/x86_64/config.h
external/gpl3/binutils/lib/libopcodes/arch/x86_64/defs.mk
external/gpl3/binutils/usr.bin/common/arch/i386/config.h
external/gpl3/binutils/usr.bin/common/arch/i386/defs.mk
external/gpl3/binutils/usr.bin/common/arch/x86_64/config.h
external/gpl3/binutils/usr.bin/common/arch/x86_64/defs.mk
external/gpl3/binutils/usr.bin/gas/arch/i386/config.h
external/gpl3/binutils/usr.bin/gas/arch/x86_64/config.h
external/gpl3/binutils/usr.bin/gas/arch/x86_64/defs.mk
external/gpl3/binutils/usr.bin/gprof/arch/i386/gconfig.h
external/gpl3/binutils/usr.bin/gprof/arch/x86_64/defs.mk
external/gpl3/binutils/usr.bin/gprof/arch/x86_64/gconfig.h
external/gpl3/binutils/usr.bin/ld/arch/i386/config.h
external/gpl3/binutils/usr.bin/ld/arch/x86_64/config.h
external/gpl3/binutils/usr.bin/ld/arch/x86_64/defs.mk
external/gpl3/gcc/dist/gcc/genattrtab.c
external/gpl3/gcc/usr.bin/backend/Makefile
sbin/nvmectl/Makefile
sbin/nvmectl/devlist.c
sbin/nvmectl/firmware.c
sbin/nvmectl/identify.c
sbin/nvmectl/logpage.c
sbin/nvmectl/nvme.h
sbin/nvmectl/nvmectl.8
sbin/nvmectl/nvmectl.c
sbin/nvmectl/nvmectl.h
sbin/nvmectl/perftest.c
sbin/nvmectl/power.c
sbin/nvmectl/reset.c
sbin/nvmectl/util.c
sbin/nvmectl/wdc.c
share/dict/web2
share/man/man7/sysctl.7
share/man/man9/fork1.9
share/mk/bsd.own.mk
sys/altq/altq_classq.h
sys/arch/alpha/include/alpha.h
sys/arch/amd64/amd64/locore.S
sys/arch/amd64/conf/Makefile.amd64
sys/arch/arm/sunxi/sun4i_dma.c
sys/arch/arm/sunxi/sunxi_codec.c
sys/arch/arm/sunxi/sunxi_mmc.c
sys/arch/evbcf/include/intr.h
sys/arch/i386/conf/Makefile.i386
sys/arch/macppc/conf/POWERMAC_G5_11_2
sys/arch/macppc/conf/files.macppc
sys/arch/macppc/dev/smu.c
sys/arch/macppc/dev/smuiic.c
sys/arch/macppc/dev/smusat.c
sys/arch/mips/cavium/dev/octeon_fpavar.h
sys/arch/mips/cavium/dev/octeon_gmxvar.h
sys/arch/mips/cavium/dev/octeon_pkovar.h
sys/arch/mips/cavium/dev/octeon_powvar.h
sys/arch/mips/cavium/octeonvar.h
sys/arch/mmeye/include/intr.h
sys/arch/mvme68k/include/intr.h
sys/arch/news68k/include/intr.h
sys/arch/next68k/include/intr.h
sys/arch/or1k/include/cpu.h
sys/arch/or1k/include/db_machdep.h
sys/arch/or1k/include/intr.h
sys/arch/pmax/include/float.h
sys/arch/pmax/include/pcb.h
sys/arch/pmax/include/proc.h
sys/arch/pmax/include/profile.h
sys/arch/pmax/include/reg.h
sys/arch/pmax/include/setjmp.h
sys/arch/powerpc/include/altivec.h
sys/arch/powerpc/include/booke/cpuvar.h
sys/arch/powerpc/include/booke/intr.h
sys/arch/powerpc/include/booke/pmap.h
sys/arch/powerpc/include/booke/pte.h
sys/arch/powerpc/include/fenv.h
sys/arch/powerpc/include/fpu.h
sys/arch/powerpc/include/ibm4xx/cpu.h
sys/arch/powerpc/include/ibm4xx/pmap.h
sys/arch/powerpc/include/ibm4xx/tlb.h
sys/arch/powerpc/include/intr.h
sys/arch/powerpc/include/oea/pmap.h
sys/arch/powerpc/include/pci_machdep.h
sys/arch/powerpc/include/spr.h
sys/arch/powerpc/pic/ipivar.h
sys/arch/x86/pci/if_vmx.c
sys/coda/coda.h
sys/compat/freebsd/freebsd_fork.c
sys/compat/linux/common/linux_sched.c
sys/compat/netbsd32/netbsd32_conv.h
sys/compat/netinet6/in6_var.h
sys/compat/sys/ipc.h
sys/compat/sys/sockio.h
sys/crypto/nist_ctr_drbg/nist_ctr_aes_rijndael.h
sys/crypto/nist_ctr_drbg/nist_ctr_drbg.h
sys/dev/acpi/acpica/acpi_func.h
sys/dev/ata/atavar.h
sys/dev/clock_subr.h
sys/dev/dtv/dtvif.h
sys/dev/flash/flash.h
sys/dev/hdaudio/hdaudiovar.h
sys/dev/ic/aic7xxx_inline.h
sys/dev/ic/atwvar.h
sys/dev/ic/dm9000var.h
sys/dev/ic/ld_nvme.c
sys/dev/ic/nvme.c
sys/dev/ic/nvmeio.h
sys/dev/ic/nvmereg.h
sys/dev/ic/nvmevar.h
sys/dev/ic/rtwvar.h
sys/dev/isa/pcdisplay.c
sys/dev/marvell/if_mvxpevar.h
sys/dev/nand/nand.h
sys/dev/nor/cfi.h
sys/dev/nor/nor.h
sys/dev/pci/cxgb/cxgb_adapter.h
sys/dev/pci/cxgb/cxgb_common.h
sys/dev/pci/cxgb/cxgb_jhash.h
sys/dev/pci/cxgb/cxgb_l2t.h
sys/dev/pci/cxgb/cxgb_mvec.h
sys/dev/pci/cxgb/cxgb_offload.h
sys/dev/pci/cxgb/cxgb_osdep.h
sys/dev/pci/cxgb/cxgb_toedev.h
sys/dev/pci/if_iwmreg.h
sys/dev/pci/if_wm.c
sys/dev/pci/ixgbe/ix_txrx.c
sys/dev/pci/ixgbe/ixgbe.c
sys/dev/pci/ixgbe/ixgbe.h
sys/dev/pci/ixgbe/ixv.c
sys/dev/pci/nvme_pci.c
sys/dev/pci/pcidevs
sys/dev/pci/pcidevs.h
sys/dev/pci/pcidevs_data.h
sys/dev/pci/pciidevar.h
sys/dev/pci/pcivar.h
sys/dev/pci/voyagervar.h
sys/dev/raidframe/raidframevar.h
sys/dev/sdmmc/sbt.c
sys/dev/sdmmc/sdmmcreg.h
sys/dev/usb/if_axe.c
sys/dev/usb/ubt.c
sys/dev/usb/usbdivar.h
sys/dev/usb/xhci.c
sys/fs/tmpfs/tmpfs.h
sys/kern/init_main.c
sys/kern/kern_fork.c
sys/kern/subr_pserialize.c
sys/kern/sys_pipe.c
sys/kern/uipc_mbuf.c
sys/lib/libkern/milieu.h
sys/miscfs/procfs/procfs_subr.c
sys/modules/examples/Makefile
sys/modules/examples/README
sys/modules/examples/readhappy_mpsafe/Makefile
sys/modules/examples/readhappy_mpsafe/readhappy_mpsafe.c
sys/modules/examples/readhappy_mpsafe/test_readhappy.c
sys/net/bpf.h
sys/net/if.h
sys/net/if_arp.h
sys/net/if_bridge.c
sys/net/if_bridgevar.h
sys/net/if_ether.h
sys/net/if_gif.h
sys/net/if_ipsec.h
sys/net/if_l2tp.h
sys/net/if_llatbl.h
sys/net/if_pppoe.c
sys/net/if_sl.c
sys/net/if_strip.c
sys/net/npf/npf.h
sys/net/route.h
sys/net80211/ieee80211_node.h
sys/netatalk/at_var.h
sys/netinet/in.c
sys/netinet/in.h
sys/netinet/in_var.h
sys/netinet/ip_output.c
sys/netinet/tcp_subr.c
sys/netinet/tcp_vtw.h
sys/netinet6/in6.h
sys/netinet6/in6_var.h
sys/netinet6/ip6_forward.c
sys/netinet6/ip6_output.c
sys/netinet6/udp6_usrreq.c
sys/netipsec/ah.h
sys/netipsec/ah_var.h
sys/netipsec/esp.h
sys/netipsec/esp_var.h
sys/netipsec/ipcomp.h
sys/netipsec/ipcomp_var.h
sys/netipsec/ipip_var.h
sys/netipsec/ipsec.c
sys/netipsec/ipsec.h
sys/netipsec/ipsec6.h
sys/netipsec/ipsec_input.c
sys/netipsec/ipsec_mbuf.c
sys/netipsec/ipsec_netbsd.c
sys/netipsec/ipsec_output.c
sys/netipsec/ipsec_var.h
sys/netipsec/key.c
sys/netipsec/key.h
sys/netipsec/key_debug.c
sys/netipsec/key_debug.h
sys/netipsec/key_var.h
sys/netipsec/keydb.h
sys/netipsec/keysock.c
sys/netipsec/keysock.h
sys/netipsec/xform.h
sys/netipsec/xform_ah.c
sys/netipsec/xform_esp.c
sys/netipsec/xform_ipcomp.c
sys/netipsec/xform_ipip.c
sys/netipsec/xform_tcp.c
sys/netisdn/i4b_ipr.c
sys/rump/include/machine/intr.h
sys/rump/include/rump/rumperr.h
sys/rump/include/rump/rumperrno2host.h
sys/rump/librump/rumpkern/rump_curlwp___thread.h
sys/rump/librump/rumpkern/rump_curlwp_hypercall.h
sys/sys/Makefile
sys/sys/bus.h
sys/sys/clock.h
sys/sys/cprng.h
sys/sys/cpu.h
sys/sys/dtrace_bsd.h
sys/sys/gcq.h
sys/sys/kernhist.h
sys/sys/ktrace.h
sys/sys/lwp.h
sys/sys/mbuf.h
sys/sys/msgbuf.h
sys/sys/pmf.h
sys/sys/proc.h
sys/sys/pslist.h
sys/sys/rndsource.h
sys/sys/signalvar.h
sys/sys/sleepq.h
sys/sys/socket.h
sys/sys/socketvar.h
sys/sys/syscallvar.h
sys/sys/timevar.h
sys/sys/vnode.h
sys/ufs/chfs/chfs.h
sys/ufs/lfs/ulfs_bswap.h
sys/ufs/ufs/ufs_bswap.h
sys/uvm/pmap/vmpagemd.h
sys/uvm/uvm_bio.c
sys/uvm/uvm_emap.c
sys/uvm/uvm_extern.h
sys/uvm/uvm_fault_i.h
tests/bin/sh/t_expand.sh
tests/net/if_bridge/t_rtable.sh
tools/Makefile.gnuhost
tools/gcc/mknative.common
usr.sbin/rtadvd/config.c
usr.sbin/rtadvd/config.h
usr.sbin/rtadvd/dump.c
usr.sbin/rtadvd/dump.h
usr.sbin/rtadvd/if.c
usr.sbin/rtadvd/if.h
usr.sbin/rtadvd/rrenum.c
usr.sbin/rtadvd/rrenum.h
usr.sbin/rtadvd/rtadvd.c
usr.sbin/rtadvd/rtadvd.conf.5
usr.sbin/rtadvd/rtadvd.h
usr.sbin/rtadvd/timer.c
usr.sbin/rtadvd/timer.h
--- a/UPDATING	Wed Apr 18 01:39:14 2018 +0000
+++ b/UPDATING	Sun Apr 22 07:20:06 2018 +0000
@@ -1,4 +1,4 @@
-$NetBSD: UPDATING,v 1.291.2.1 2018/03/15 09:11:52 pgoyette Exp $
+$NetBSD: UPDATING,v 1.291.2.2 2018/04/22 07:20:06 pgoyette Exp $
 
 This file (UPDATING) is intended to be a brief reference to recent
 changes that might cause problems in the build process, and a guide for
@@ -19,6 +19,11 @@
 Recent changes:
 ^^^^^^^^^^^^^^^
 
+20180414:
+	Existing binutils was migrated to binutils.old.  Manual
+	removal of tools/binutils objects directory may be required
+	to fix tools build failure.
+
 20180311:
 	bdftopcf was updated and may need cleaning in the
 	src/external/mit/xorg/tools/bdftopcf subdirectory if there are
--- a/bin/sh/arithmetic.c	Wed Apr 18 01:39:14 2018 +0000
+++ b/bin/sh/arithmetic.c	Sun Apr 22 07:20:06 2018 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: arithmetic.c,v 1.4 2017/07/24 13:21:14 kre Exp $	*/
+/*	$NetBSD: arithmetic.c,v 1.4.2.1 2018/04/22 07:20:06 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 1993
@@ -39,7 +39,7 @@
 #include <sys/cdefs.h>
 
 #ifndef lint
-__RCSID("$NetBSD: arithmetic.c,v 1.4 2017/07/24 13:21:14 kre Exp $");
+__RCSID("$NetBSD: arithmetic.c,v 1.4.2.1 2018/04/22 07:20:06 pgoyette Exp $");
 #endif /* not lint */
 
 #include <limits.h>
@@ -59,6 +59,7 @@
 #include "options.h"
 #include "var.h"
 #include "show.h"
+#include "syntax.h"
 
 #if ARITH_BOR + ARITH_ASS_GAP != ARITH_BORASS || \
 	ARITH_ASS + ARITH_ASS_GAP != ARITH_EQ
@@ -127,8 +128,15 @@
 		str = "0";
 	errno = 0;
 	result = strtoimax(str, &p, 0);
-	if (errno != 0 || *p != '\0')
+	if (errno != 0 || *p != '\0') {
+		if (errno == 0) {
+			while (*p != '\0' && is_space(*p))
+				p++;
+			if (*p == '\0')
+				return result;
+		}
 		arith_err("variable contains non-numeric value");
+	}
 	return result;
 }
 
--- a/bin/sh/parser.c	Wed Apr 18 01:39:14 2018 +0000
+++ b/bin/sh/parser.c	Sun Apr 22 07:20:06 2018 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: parser.c,v 1.145 2017/11/10 17:31:12 kre Exp $	*/
+/*	$NetBSD: parser.c,v 1.145.2.1 2018/04/22 07:20:06 pgoyette Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)parser.c	8.7 (Berkeley) 5/16/95";
 #else
-__RCSID("$NetBSD: parser.c,v 1.145 2017/11/10 17:31:12 kre Exp $");
+__RCSID("$NetBSD: parser.c,v 1.145.2.1 2018/04/22 07:20:06 pgoyette Exp $");
 #endif
 #endif /* not lint */
 
@@ -1773,7 +1773,7 @@
 		CHECKSTRSPACE(4, out);	/* permit 4 calls to USTPUTC */
 		switch (syntax[c]) {
 		case CNL:	/* '\n' */
-			if (syntax == BASESYNTAX)
+			if (syntax == BASESYNTAX && varnest == 0)
 				break;	/* exit loop */
 			USTPUTC(c, out);
 			plinno++;
--- a/crypto/external/bsd/netpgp/dist/src/lib/libnetpgp.3	Wed Apr 18 01:39:14 2018 +0000
+++ b/crypto/external/bsd/netpgp/dist/src/lib/libnetpgp.3	Sun Apr 22 07:20:06 2018 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: libnetpgp.3,v 1.16.24.1 2018/04/07 04:11:47 pgoyette Exp $
+.\" $NetBSD: libnetpgp.3,v 1.16.24.2 2018/04/22 07:20:07 pgoyette Exp $
 .\"
 .\" Copyright (c) 2009,2010 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd April 3, 2018
+.Dd April 15, 2018
 .Dt LIBNETPGP 3
 .Os
 .Sh NAME
@@ -172,12 +172,13 @@
 .Nm
 process be initialised using the
 .Fn netpgp_init
-function, which will set up the public and private keyrings, and set the
-user identity to the
+function, which will set up the public and private keyrings, as well as set the
+user identity in the
 .Ar userid
-argument passed stored in the
+member of the
 .Dv netpgp_t
-structure, and set using the
+structure.
+These are set using the
 .Fn netpgp_setvar
 function.
 If no public key ring file is set, initial values will be taken from those
@@ -189,6 +190,13 @@
 in the
 .Pa .gnupg/secring.gpg
 file in the user's home directory.
+The user identity is obtained from the
+.Ev userid
+environment variable, or failing that, the value of the
+.Dq default-key
+setting from
+.Pa .gnupg/gpg.conf
+file in the user's home directory is used.
 The
 .Fn netpgp_init
 function returns 1 on success, 0 on failure.
--- a/crypto/external/bsd/openssl/dist/crypto/rsa/rsa_gen.c	Wed Apr 18 01:39:14 2018 +0000
+++ b/crypto/external/bsd/openssl/dist/crypto/rsa/rsa_gen.c	Sun Apr 22 07:20:06 2018 +0000
@@ -89,6 +89,8 @@
     if (BN_copy(rsa->e, e_value) == NULL)
         goto err;
 
+    BN_set_flags(rsa->p, BN_FLG_CONSTTIME);
+    BN_set_flags(rsa->q, BN_FLG_CONSTTIME);
     BN_set_flags(r2, BN_FLG_CONSTTIME);
     /* generate p and q */
     for (;;) {
--- a/distrib/sets/lists/base/shl.mi	Wed Apr 18 01:39:14 2018 +0000
+++ b/distrib/sets/lists/base/shl.mi	Sun Apr 22 07:20:06 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.832.2.1 2018/04/07 04:11:56 pgoyette Exp $
+# $NetBSD: shl.mi,v 1.832.2.2 2018/04/22 07:20:07 pgoyette Exp $
 #
 # Note:	Don't delete entries from here - mark them as "obsolete" instead,
 #	unless otherwise stated below.
@@ -194,10 +194,10 @@
 ./usr/lib/libavl.so				base-zfs-shlib		compatfile,zfs
 ./usr/lib/libavl.so.0				base-zfs-shlib		compatfile,zfs
 ./usr/lib/libavl.so.0.0          		base-zfs-shlib		compatfile,zfs
-./usr/lib/libbfd.so.14				base-sys-shlib		compatfile,binutils=226
-./usr/lib/libbfd.so.14.0			base-sys-shlib		compatfile,binutils=226
 ./usr/lib/libbfd.so.15				base-sys-shlib		compatfile,binutils=227
 ./usr/lib/libbfd.so.15.0			base-sys-shlib		compatfile,binutils=227
+./usr/lib/libbfd.so.16				base-sys-shlib		compatfile,binutils=230
+./usr/lib/libbfd.so.16.0			base-sys-shlib		compatfile,binutils=230
 ./usr/lib/libbind9.so				base-bind-shlib		compatfile
 ./usr/lib/libbind9.so.8				base-bind-shlib		compatfile
 ./usr/lib/libbind9.so.8.5			base-bind-shlib		compatfile
@@ -399,8 +399,8 @@
 ./usr/lib/libm.so.0				base-sys-shlib		compatfile
 ./usr/lib/libm.so.0.12				base-sys-shlib		compatfile
 ./usr/lib/libmagic.so				base-sys-shlib		compatfile
-./usr/lib/libmagic.so.5				base-sys-shlib		compatfile
-./usr/lib/libmagic.so.5.2			base-sys-shlib		compatfile
+./usr/lib/libmagic.so.6				base-sys-shlib		compatfile
+./usr/lib/libmagic.so.6.0			base-sys-shlib		compatfile
 ./usr/lib/libmenu.so				base-sys-shlib		compatfile
 ./usr/lib/libmenu.so.6				base-sys-shlib		compatfile
 ./usr/lib/libmenu.so.6.0			base-sys-shlib		compatfile
--- a/distrib/sets/lists/comp/mi	Wed Apr 18 01:39:14 2018 +0000
+++ b/distrib/sets/lists/comp/mi	Sun Apr 22 07:20:06 2018 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.2185.2.2 2018/04/16 01:57:32 pgoyette Exp $
+#	$NetBSD: mi,v 1.2185.2.3 2018/04/22 07:20:07 pgoyette Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 ./etc/mtree/set.comp				comp-sys-root
@@ -3002,7 +3002,7 @@
 ./usr/include/sys/pcu.h				comp-c-include
 ./usr/include/sys/pipe.h			comp-c-include
 ./usr/include/sys/pmc.h				comp-c-include
-./usr/include/sys/pmf.h				comp-obsolete		obsolete
+./usr/include/sys/pmf.h				comp-c-include
 ./usr/include/sys/poll.h			comp-c-include
 ./usr/include/sys/pool.h			comp-c-include
 ./usr/include/sys/power.h			comp-c-include
--- a/distrib/sets/lists/comp/shl.mi	Wed Apr 18 01:39:14 2018 +0000
+++ b/distrib/sets/lists/comp/shl.mi	Sun Apr 22 07:20:06 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.313 2018/02/13 10:02:12 mrg Exp $
+# $NetBSD: shl.mi,v 1.313.2.1 2018/04/22 07:20:07 pgoyette Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -113,10 +113,12 @@
 ./usr/lib/libntp_pic.a				comp-obsolete		obsolete
 ./usr/lib/libnvpair_pic.a			comp-zfs-piclib		compatfile,picinstall,zfs
 ./usr/lib/libobjc_pic.a				comp-objc-piclib	compatfile,picinstall,gcccmds
-./usr/lib/libopcodes.so.7			comp-c-shlib		compatfile,binutils=226
-./usr/lib/libopcodes.so.7.0			comp-c-shlib		compatfile,binutils=226
 ./usr/lib/libopcodes.so.8			comp-c-shlib		compatfile,binutils=227
 ./usr/lib/libopcodes.so.8.0			comp-c-shlib		compatfile,binutils=227
+./usr/lib/libopcodes.so.9			comp-c-shlib		compatfile,binutils=230
+./usr/lib/libopcodes.so.9.0			comp-c-shlib		compatfile,binutils=230
+./usr/lib/libopenpgpsdk_pic.a			comp-obsolete		obsolete
+./usr/lib/libossaudio_pic.a			comp-c-piclib		compatfile,picinstall
 ./usr/lib/libopenpgpsdk_pic.a			comp-obsolete		obsolete
 ./usr/lib/libossaudio_pic.a			comp-c-piclib		compatfile,picinstall
 ./usr/lib/libp2k_pic.a				comp-puffs-piclib	compatfile,picinstall,rump
--- a/distrib/sets/lists/debug/shl.mi	Wed Apr 18 01:39:14 2018 +0000
+++ b/distrib/sets/lists/debug/shl.mi	Sun Apr 22 07:20:06 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.193.2.1 2018/04/07 04:11:57 pgoyette Exp $
+# $NetBSD: shl.mi,v 1.193.2.2 2018/04/22 07:20:07 pgoyette Exp $
 ./usr/lib/libbfd_g.a						comp-c-debuglib	debuglib,compatfile,binutils
 ./usr/libdata/debug/lib						base-sys-usr	debug,dynamicroot,compatdir
 ./usr/libdata/debug/lib/libblacklist.so.0.0.debug		comp-sys-debug	debug,dynamicroot
@@ -63,8 +63,8 @@
 ./usr/libdata/debug/usr/lib/libatf-c++.so.2.0.debug		comp-atf-debug	debug,compatfile,atf
 ./usr/libdata/debug/usr/lib/libatf-c.so.0.0.debug		comp-atf-debug	debug,compatfile,atf
 ./usr/libdata/debug/usr/lib/libavl.so.0.0.debug			comp-zfs-debug	debug,compatfile,zfs
-./usr/libdata/debug/usr/lib/libbfd.so.14.0.debug		comp-sys-debug	debug,compatfile,binutils=226
 ./usr/libdata/debug/usr/lib/libbfd.so.15.0.debug		comp-sys-debug	debug,compatfile,binutils=227
+./usr/libdata/debug/usr/lib/libbfd.so.16.0.debug		comp-sys-debug	debug,compatfile,binutils=230
 ./usr/libdata/debug/usr/lib/libbind9.so.8.5.debug		comp-bind-debug	debug,compatfile
 ./usr/libdata/debug/usr/lib/libblacklist.so.0.0.debug		comp-sys-debug	debug,compatfile
 ./usr/libdata/debug/usr/lib/libbluetooth.so.4.2.debug		comp-sys-debug	debug,compatfile
@@ -138,7 +138,7 @@
 ./usr/libdata/debug/usr/lib/liblzf.so.1.0.debug			comp-sys-debug	debug,compatfile
 ./usr/libdata/debug/usr/lib/liblzma.so.2.0.debug		comp-sys-debug	debug,compatfile
 ./usr/libdata/debug/usr/lib/libm.so.0.12.debug			comp-sys-debug	debug,compatfile
-./usr/libdata/debug/usr/lib/libmagic.so.5.2.debug		comp-sys-debug	debug,compatfile
+./usr/libdata/debug/usr/lib/libmagic.so.6.0.debug		comp-sys-debug	debug,compatfile
 ./usr/libdata/debug/usr/lib/libmenu.so.6.0.debug		comp-sys-debug	debug,compatfile
 ./usr/libdata/debug/usr/lib/libmj.so.1.0.debug			comp-crypto-debug	debug,compatfile
 ./usr/libdata/debug/usr/lib/libmpc.so.2.0.debug			comp-obsolete	debug,compatfile,obsolete
@@ -148,8 +148,8 @@
 ./usr/libdata/debug/usr/lib/libnpf.so.0.1.debug			comp-npf-debug	debug,compatfile,npf
 ./usr/libdata/debug/usr/lib/libnvpair.so.0.0.debug		comp-zfs-debug	debug,compatfile,zfs
 ./usr/libdata/debug/usr/lib/libobjc.so.4.0.debug		comp-sys-debug	debug,compatfile,gcc
-./usr/libdata/debug/usr/lib/libopcodes.so.7.0.debug		comp-c-debug	debug,compatfile,binutils=226
 ./usr/libdata/debug/usr/lib/libopcodes.so.8.0.debug		comp-c-debug	debug,compatfile,binutils=227
+./usr/libdata/debug/usr/lib/libopcodes.so.9.0.debug		comp-c-debug	debug,compatfile,binutils=230
 ./usr/libdata/debug/usr/lib/libossaudio.so.1.1.debug		comp-sys-debug	debug,compatfile
 ./usr/libdata/debug/usr/lib/libp2k.so.2.0.debug			comp-puffs-debug	debug,compatfile,rump
 ./usr/libdata/debug/usr/lib/libpam.so.4.1.debug			comp-sys-debug	debug,compatfile,pam
--- a/doc/3RDPARTY	Wed Apr 18 01:39:14 2018 +0000
+++ b/doc/3RDPARTY	Sun Apr 22 07:20:06 2018 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1504.2.4 2018/04/16 01:57:32 pgoyette Exp $
+#	$NetBSD: 3RDPARTY,v 1.1504.2.5 2018/04/22 07:20:07 pgoyette Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -425,8 +425,8 @@
 Please use "expat" as the vendor tag for CVS imports.
 
 Package:	file
-Version:	5.32
-Current Vers:	5.32
+Version:	5.33
+Current Vers:	5.33
 Maintainer:	Christos Zoulas <christos@zoulas.com>
 Archive Site:	ftp://ftp.astron.com/pub/file/
 Home Page:	http://www.darwinsys.com/file/
--- a/doc/CHANGES	Wed Apr 18 01:39:14 2018 +0000
+++ b/doc/CHANGES	Sun Apr 22 07:20:06 2018 +0000
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2363.2.5 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2363.2.6 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -122,6 +122,7 @@
 	mdnsd(8), dns-sd(1), libdns_sd: import mDNSResponder 878.30.4
 		[christos 20180225]
 	macppc: Remove macofcons(4). [sevan 20180226]
+	amd64: Add SVS (Meltdown mitigation). [maxv 20180226]
 	imcsmb(4): For amd64 and i386 on Intel {Ivy,Sandy}bridge and
 		{Broad,Has}well CPUs, enable access to Integrated Memory
 		Controller-based SMBus [pgoyette 20170228]
@@ -132,6 +133,8 @@
 	tzdata: updated to 2017d [kre 20180324]
 	dhcpcd: Import 7.0.2. [roy 20180327]
 	aarch64: Add initial support for aarch64. [ryo 20180401]
+	amd64: Add SpectreV2 mitigations, based on IBRS and the DIS_IND
+		bit. [maxv 20180404]
 	dhcpcd: Import 7.0.3. [roy 20180406]
 	OpenSSH: Imported 7.7. [christos 20180406]
 	OpenSSL: Imported 1.1.0h. [christos 20180406]
@@ -139,6 +142,8 @@
 	acpi(4): Updated ACPICA to 20180313. [christos 20180407]
 	dhcp: Import version 4.4.1 (move to MPL). [christos 20180407]
 	bind: Import version 9.10.7. [christos 20180407]
+	x86: Enable retpoline by default (SpectreV2 mitigation). [mrg 20180408]
 	ichsmb(4): Add Intel 300 series chipset support. [msaitoh 20180409]
 	wm(4): Enable I219 support. [msaitoh 20180413]
 	puc(4): Add Intel 300 series chipset support. [msaitoh 20180413]
+	file(1): Upgraded to 5.33. [christos 20180415]
--- a/doc/CHANGES.prev	Wed Apr 18 01:39:14 2018 +0000
+++ b/doc/CHANGES.prev	Sun Apr 22 07:20:06 2018 +0000
@@ -1,4 +1,4 @@
-LIST OF CHANGES FROM PREVIOUS RELEASES:			<$Revision: 1.138 $>
+LIST OF CHANGES FROM PREVIOUS RELEASES:			<$Revision: 1.138.2.1 $>
 
 
 Changes from 386bsd 0.1 + patchkit 0.2.2 to NetBSD 0.8:
@@ -12226,3 +12226,6 @@
 	opencrypto(9): Complete MP-ification [knakahara 20170731]
 	ipsec(4): Make it MP-safe [ozaki-r 20170809]
 	evbmips: Merge sbmips port into evbmips. [mrg 20170815]
+	amd64: Backport SVS (Meltdown mitigation). [maxv 20180404]
+	x86: Backport retpoline (SpectreV2 mitigation). [mrg 20180411]
+	amd64: Backport SMAP. [maxv 20180414]
--- a/etc/defaults/rc.conf	Wed Apr 18 01:39:14 2018 +0000
+++ b/etc/defaults/rc.conf	Sun Apr 22 07:20:06 2018 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: rc.conf,v 1.141 2018/01/09 03:31:14 christos Exp $
+#	$NetBSD: rc.conf,v 1.141.2.1 2018/04/22 07:20:08 pgoyette Exp $
 #
 # /etc/defaults/rc.conf --
 #	default configuration of /etc/rc.conf
@@ -125,7 +125,7 @@
 per_user_tmp_dir="/private/tmp"			# real storage for /tmp
 clear_tmp=YES					# clear /tmp after reboot
 update_motd=YES					# updates /etc/motd
-dmesg=YES		dmesg_flags=""		# write /var/run/dmesg.boot
+dmesg=YES		dmesg_flags="-t"	# write /var/run/dmesg.boot
 accounting=NO					# uses /var/account/acct
 newsyslog=NO		newsyslog_flags=""	# trim log files
 quota=YES					# check and enable quotas
--- a/external/bsd/am-utils/dist/fixmount/fixmount.8	Wed Apr 18 01:39:14 2018 +0000
+++ b/external/bsd/am-utils/dist/fixmount/fixmount.8	Sun Apr 22 07:20:06 2018 +0000
@@ -1,4 +1,4 @@
-.\"	$NetBSD: fixmount.8,v 1.3 2015/01/17 17:46:31 christos Exp $
+.\"	$NetBSD: fixmount.8,v 1.3.14.1 2018/04/22 07:20:08 pgoyette Exp $
 .\"
 .\"
 .\" Copyright (c) 1997-2014 Erez Zadok
@@ -37,7 +37,7 @@
 .\"
 .\" File: am-utils/fixmount/fixmount.8
 .\"
-.TH FIXMOUNT 8 "26 Feb 1993"
+.TH FIXMOUNT 8 "21 Apr 2018"
 .SH NAME
 fixmount \- fix remote mount entries
 .SH SYNOPSIS
@@ -73,8 +73,8 @@
 .I host
 that do not correspond to current mounts, i.e., which are left-over
 from a crash or are the result of improper mount protocol.
-The actuality of mounts is verified using the entries in
-.BR /etc/mtab .
+.\" The actuality of mounts is verified using the entries in
+.\" .BR /etc/mtab .
 .TP
 .B \-v
 Verify remote mounts.  Similar to
@@ -96,26 +96,26 @@
 .BI \-h \ name
 Pretend the local hostname is
 .IR name .
-This is useful after the local hostname has been changed and rmtab entries
-using the old name remain on a remote machine.
-Unfortunately, most mountd's won't be able to successfully handle removal
-of such entries, so this option is useful in combination with
-.B \-v
-only.
-.br
+.\" This is useful after the local hostname has been changed and rmtab entries
+.\" using the old name remain on a remote machine.
+.\" Unfortunately, most mountd's won't be able to successfully handle removal
+.\" of such entries, so this option is useful in combination with
+.\" .B \-v
+.\" only.
+.\" .br
 This option also saves time as comparisons of remotely recorded and local
 hostnames by address are avoided.
-.SH FILES
-.TP 20
-.B /etc/mtab
-List of current mounts.
-.TP
-.B /etc/rmtab
-Backup file for remote mount entries on NFS server.
+.\" .SH FILES
+.\" .TP 20
+.\" .B /etc/mtab
+.\" List of current mounts.
+.\" .TP
+.\" .B /etc/rmtab
+.\" Backup file for remote mount entries on NFS server.
 .SH "SEE ALSO"
 .BR showmount (8),
-.BR mtab (5),
-.BR rmtab (5),
+.\" .BR mtab (5),
+.\" .BR rmtab (5),
 .BR mountd (8C).
 .LP
 ``am-utils''
@@ -129,35 +129,35 @@
 .LP
 .I "Amd \- The 4.4 BSD Automounter"
 .SH BUGS
-No attempt is made to verify the information in
-.B /etc/mtab
-itself.
-.PP
-Since swap file mounts are not recorded in
-.BR /etc/mtab ,
-a heuristic specific to SunOS is used to determine whether such a mount
-is actual (replacing the string "swap" with "root" and verifying the resulting
-path).
-.PP
-Symbolic links on the server will cause the path in the remote entry to differ
-from the one in
-.BR /etc/mtab .
-To catch those cases, a filesystem is also deemed mounted if its
-.I local
-mount point is identical to the remote entry.
-I.e., on a SunOS diskless client,
-.B server:/export/share/sunos.4.1.1
-is actually
-.BR /usr/share .
-Since the local mount point is
-.B /usr/share
-as well this will be handled correctly.
-.PP
-There is no way to clear a stale entry in a remote mountd after the
-local hostname (or whatever reverse name resolution returns for it)
-has been changed.  To take care of these cases,
-the remote /etc/rmtab file has to be edited and mountd restarted.
-.PP
+.\" No attempt is made to verify the information in
+.\" .B /etc/mtab
+.\" itself.
+.\" .PP
+.\" Since swap file mounts are not recorded in
+.\" .BR /etc/mtab ,
+.\" a heuristic specific to SunOS is used to determine whether such a mount
+.\" is actual (replacing the string "swap" with "root" and verifying the resulting
+.\" path).
+.\" .PP
+.\" Symbolic links on the server will cause the path in the remote entry to differ
+.\" from the one in
+.\" .BR /etc/mtab .
+.\" To catch those cases, a filesystem is also deemed mounted if its
+.\" .I local
+.\" mount point is identical to the remote entry.
+.\" I.e., on a SunOS diskless client,
+.\" .B server:/export/share/sunos.4.1.1
+.\" is actually
+.\" .BR /usr/share .
+.\" Since the local mount point is
+.\" .B /usr/share
+.\" as well this will be handled correctly.
+.\" .PP
+.\" There is no way to clear a stale entry in a remote mountd after the
+.\" local hostname (or whatever reverse name resolution returns for it)
+.\" has been changed.  To take care of these cases,
+.\" the remote /etc/rmtab file has to be edited and mountd restarted.
+.\" .PP
 The RPC timeouts for mountd calls can only be changed by recompiling.
 The defaults are 2 seconds for client handle creation and 5 seconds for
 RPC calls.
--- a/external/bsd/file/dist/ChangeLog	Wed Apr 18 01:39:14 2018 +0000
+++ b/external/bsd/file/dist/ChangeLog	Sun Apr 22 07:20:06 2018 +0000
@@ -1,3 +1,28 @@
+2018-04-15  14:52  Christos Zoulas <christos@zoulas.com>
+
+	* release 5.33
+
+2018-02-24  14:50  Christos Zoulas <christos@zoulas.com> 
+
+	* extend the support for ${x?:} expansions for magic descriptions
+
+2018-02-21  16:25  Christos Zoulas <christos@zoulas.com> 
+
+	* add support for ${x?:} in mime types to handle
+	  pie binaries.
+
+2017-11-03   9:23  Christos Zoulas <christos@zoulas.com>
+
+	* add support for negative offsets (offsets from the end of file)
+
+2017-09-26   8:22  Christos Zoulas <christos@zoulas.com>
+
+	* close the file on error when writing magic (Steve Grubb)
+
+2017-09-24  12:02  Christos Zoulas <christos@zoulas.com>
+
+	* seccomp support (Paul Moore)
+
 2017-09-02  11:53  Christos Zoulas <christos@zoulas.com>
 
 	* release 5.32
--- a/external/bsd/file/dist/Makefile.in	Wed Apr 18 01:39:14 2018 +0000
+++ b/external/bsd/file/dist/Makefile.in	Sun Apr 22 07:20:06 2018 +0000
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.13.1 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -14,61 +14,23 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
-am__is_gnu_make = { \
-  if test -z '$(MAKELEVEL)'; then \
-    false; \
-  elif test -n '$(MAKE_HOST)'; then \
-    true; \
-  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
-    true; \
-  else \
-    false; \
-  fi; \
-}
-am__make_running_with_option = \
-  case $${target_option-} in \
-      ?) ;; \
-      *) echo "am__make_running_with_option: internal error: invalid" \
-              "target option '$${target_option-}' specified" >&2; \
-         exit 1;; \
-  esac; \
-  has_opt=no; \
-  sane_makeflags=$$MAKEFLAGS; \
-  if $(am__is_gnu_make); then \
-    sane_makeflags=$$MFLAGS; \
-  else \
+am__make_dryrun = \
+  { \
+    am__dry=no; \
     case $$MAKEFLAGS in \
       *\\[\ \	]*) \
-        bs=\\; \
-        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
-          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
     esac; \
-  fi; \
-  skip_next=no; \
-  strip_trailopt () \
-  { \
-    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
-  }; \
-  for flg in $$sane_makeflags; do \
-    test $$skip_next = yes && { skip_next=no; continue; }; \
-    case $$flg in \
-      *=*|--*) continue;; \
-        -*I) strip_trailopt 'I'; skip_next=yes;; \
-      -*I?*) strip_trailopt 'I';; \
-        -*O) strip_trailopt 'O'; skip_next=yes;; \
-      -*O?*) strip_trailopt 'O';; \
-        -*l) strip_trailopt 'l'; skip_next=yes;; \
-      -*l?*) strip_trailopt 'l';; \
-      -[dEDm]) skip_next=yes;; \
-      -[JT]) skip_next=yes;; \
-    esac; \
-    case $$flg in \
-      *$$target_option*) has_opt=yes; break;; \
-    esac; \
-  done; \
-  test $$has_opt = yes
-am__make_dryrun = (target_option=n; $(am__make_running_with_option))
-am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+    test $$am__dry = yes; \
+  }
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
 pkglibexecdir = $(libexecdir)/@PACKAGE@
@@ -87,6 +49,11 @@
 build_triplet = @build@
 host_triplet = @host@
 subdir = .
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+	$(top_srcdir)/configure $(am__configure_deps) \
+	$(srcdir)/config.h.in AUTHORS COPYING ChangeLog INSTALL NEWS \
+	README TODO compile config.guess config.sub depcomp install-sh \
+	missing ltmain.sh
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
 	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
@@ -94,8 +61,6 @@
 	$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
-DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
-	$(am__configure_deps) $(am__DIST_COMMON)
 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
  configure.lineno config.status.lineno
 mkinstalldirs = $(install_sh) -d
@@ -159,9 +124,6 @@
 CTAGS = ctags
 CSCOPE = cscope
 DIST_SUBDIRS = $(SUBDIRS)
-am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in AUTHORS \
-	COPYING ChangeLog INSTALL NEWS README TODO compile \
-	config.guess config.sub depcomp install-sh ltmain.sh missing
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 distdir = $(PACKAGE)-$(VERSION)
 top_distdir = $(distdir)
@@ -216,7 +178,6 @@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
-CFLAG_VISIBILITY = @CFLAG_VISIBILITY@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
@@ -232,7 +193,6 @@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
 GREP = @GREP@
-HAVE_VISIBILITY = @HAVE_VISIBILITY@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -347,6 +307,7 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --foreign Makefile
+.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -367,8 +328,8 @@
 $(am__aclocal_m4_deps):
 
 config.h: stamp-h1
-	@test -f $@ || rm -f stamp-h1
-	@test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
+	@if test ! -f $@; then rm -f stamp-h1; else :; fi
+	@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
 
 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
 	@rm -f stamp-h1
@@ -397,12 +358,13 @@
 #     (which will cause the Makefiles to be regenerated when you run 'make');
 # (2) otherwise, pass the desired values on the 'make' command line.
 $(am__recursive_targets):
-	@fail=; \
-	if $(am__make_keepgoing); then \
-	  failcom='fail=yes'; \
-	else \
-	  failcom='exit 1'; \
-	fi; \
+	@fail= failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
 	dot_seen=no; \
 	target=`echo $@ | sed s/-recursive//`; \
 	case "$@" in \
@@ -577,16 +539,10 @@
 	$(am__post_remove_distdir)
 
 dist-tarZ: distdir
-	@echo WARNING: "Support for distribution archives compressed with" \
-		       "legacy program 'compress' is deprecated." >&2
-	@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
 	tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
 	$(am__post_remove_distdir)
 
 dist-shar: distdir
-	@echo WARNING: "Support for shar distribution archives is" \
-	               "deprecated." >&2
-	@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
 	shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
 	$(am__post_remove_distdir)
 
@@ -621,17 +577,16 @@
 	esac
 	chmod -R a-w $(distdir)
 	chmod u+w $(distdir)
-	mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
+	mkdir $(distdir)/_build $(distdir)/_inst
 	chmod a-w $(distdir)
 	test -d $(distdir)/_build || exit 0; \
 	dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
 	  && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
 	  && am__cwd=`pwd` \
-	  && $(am__cd) $(distdir)/_build/sub \
-	  && ../../configure \
+	  && $(am__cd) $(distdir)/_build \
+	  && ../configure --srcdir=.. --prefix="$$dc_install_base" \
 	    $(AM_DISTCHECK_CONFIGURE_FLAGS) \
 	    $(DISTCHECK_CONFIGURE_FLAGS) \
-	    --srcdir=../.. --prefix="$$dc_install_base" \
 	  && $(MAKE) $(AM_MAKEFLAGS) \
 	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
 	  && $(MAKE) $(AM_MAKEFLAGS) check \
@@ -808,8 +763,6 @@
 	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
 	uninstall-am
 
-.PRECIOUS: Makefile
-
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
--- a/external/bsd/file/dist/README	Wed Apr 18 01:39:14 2018 +0000
+++ b/external/bsd/file/dist/README	Sun Apr 22 07:20:06 2018 +0000
@@ -1,13 +1,12 @@
 ## README for file(1) Command ##
 
-    @(#) $File: README,v 1.50 2016/04/16 22:40:54 christos Exp $
+    @(#) $File: README,v 1.53 2018/03/11 13:06:47 glen Exp $
 
-Mailing List: file@mx.gw.com  
-Mailing List archives: http://mx.gw.com/pipermail/file/  
-Bug tracker: http://bugs.gw.com/  
+Mailing List: file@mx.gw.com  [currently down]
+Mailing List archives: http://mx.gw.com/pipermail/file/  [currently down]
+Bug tracker: http://bugs.gw.com/  [currently down]
 E-mail: christos@astron.com
-
-[![Build Status](https://travis-ci.org/file/file.png?branch=master)](https://travis-ci.org/file/file)
+Build Status: https://travis-ci.org/file/file
 
 Phone: Do not even think of telephoning me about this program. Send cash first!
 
@@ -67,28 +66,6 @@
 COPYING - read this first.  
 README - read this second (you are currently reading this file).  
 INSTALL - read on how to install
-src/localtime_r.c
-src/magic.c
-src/magic.h
-src/mygetopt.h
-src/newtest2.c
-src/newtest3.c
-src/pread.c
-src/print.c
-src/readcdf.c
-src/readelf.c
-src/readelf.h
-src/regex.c
-src/regex2.c
-src/softmagic.c
-src/strcasestr.c
-src/strlcat.c
-src/strlcpy.c
-src/strndup.c
-src/tar.h
-src/teststrchr.c
-src/vasprintf.c
-src/x.c
 src/apprentice.c - parses /etc/magic to learn magic  
 src/apptype.c - used for OS/2 specific application type magic  
 src/ascmagic.c - third & last set of tests, based on hardwired assumptions.  
@@ -96,6 +73,7 @@
 src/asprintf.c - replacement for OS's that don't have it.  
 src/asctime_r.c - replacement for OS's that don't have it.  
 src/asprintf.c - replacement for OS's that don't have it.  
+src/buffer.c - buffer handling functions.
 src/cdf.[ch] - parser for Microsoft Compound Document Files  
 src/cdf_time.c - time converter for CDF.  
 src/compress.c - handles decompressing files to look inside.  
@@ -128,6 +106,7 @@
 src/strcasestr.c - replacement for OS's that don't have it.  
 src/strlcat.c - replacement for OS's that don't have it.  
 src/strlcpy.c - replacement for OS's that don't have it.  
+src/strndup.c - replacement for OS's that don't have it.  
 src/tar.h - tar file definitions
 src/vasprintf.c - for systems that don't have it.  
 doc/file.man - man page for the command  
@@ -156,6 +135,19 @@
 
 ------------------------------------------------------------------------------
 
+gpg for dummies:
+
+$ gpg --verify file-X.YY.tar.gz.asc file-X.YY.tar.gz
+gpg: assuming signed data in `file-X.YY.tar.gz'
+gpg: Signature made WWW MMM DD HH:MM:SS YYYY ZZZ using DSA key ID KKKKKKKK
+
+To download the key:
+
+$ gpg --keyserver hkp://keys.gnupg.net --recv-keys KKKKKKKK
+
+------------------------------------------------------------------------------
+
+
 Parts of this software were developed at SoftQuad Inc., developers
 of SGML/HTML/XML publishing software, in Toronto, Canada.
 SoftQuad was swallowed up by Corel in 2002 and does not exist any longer.
--- a/external/bsd/file/dist/TODO	Wed Apr 18 01:39:14 2018 +0000
+++ b/external/bsd/file/dist/TODO	Sun Apr 22 07:20:06 2018 +0000
@@ -31,6 +31,19 @@
 # rule 2
 >0	....
 ...
+---
+- Merge the stat code dance in one place and keep it in one place
+  (perhaps struct buffer).
+- Enable seeking around if offset > nbytes if possible (the fd
+  is seekable).
+- We could use file_pipe2file more (for EOF offsets, CDF documents),
+  but that is expensive; perhaps we should provide a way to disable it
+- The implementation of struct buffer needs re-thinking and more work.
+  For example we don't always pass the fd in the child. This is not
+  important yet as we don't have yet cases where use/indirect magic
+  needs negative offsets.
+- Really the whole thing just needs here's an (offset, buffer, size)
+  you have (filebuffer, filebuffersize &&|| fd), fill the buffer with
+  data from offset. The buffer API should be changed to just do that.
 
 christos
-
--- a/external/bsd/file/dist/aclocal.m4	Wed Apr 18 01:39:14 2018 +0000
+++ b/external/bsd/file/dist/aclocal.m4	Sun Apr 22 07:20:06 2018 +0000
@@ -1,6 +1,6 @@
-# generated automatically by aclocal 1.15 -*- Autoconf -*-
+# generated automatically by aclocal 1.13.1 -*- Autoconf -*-
 
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Copyright (C) 1996-2012 Free Software Foundation, Inc.
 
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -20,85 +20,7 @@
 If you have problems, you may need to regenerate the build system entirely.
 To do so, use the procedure documented by the package, typically 'autoreconf'.])])
 
-# visibility.m4 serial 5 (gettext-0.18.2)
-dnl Copyright (C) 2005, 2008, 2010-2016 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-
-dnl Tests whether the compiler supports the command-line option
-dnl -fvisibility=hidden and the function and variable attributes
-dnl __attribute__((__visibility__("hidden"))) and
-dnl __attribute__((__visibility__("default"))).
-dnl Does *not* test for __visibility__("protected") - which has tricky
-dnl semantics (see the 'vismain' test in glibc) and does not exist e.g. on
-dnl Mac OS X.
-dnl Does *not* test for __visibility__("internal") - which has processor
-dnl dependent semantics.
-dnl Does *not* test for #pragma GCC visibility push(hidden) - which is
-dnl "really only recommended for legacy code".
-dnl Set the variable CFLAG_VISIBILITY.
-dnl Defines and sets the variable HAVE_VISIBILITY.
-
-AC_DEFUN([gl_VISIBILITY],
-[
-  AC_REQUIRE([AC_PROG_CC])
-  CFLAG_VISIBILITY=
-  HAVE_VISIBILITY=0
-  if test -n "$GCC"; then
-    dnl First, check whether -Werror can be added to the command line, or
-    dnl whether it leads to an error because of some other option that the
-    dnl user has put into $CC $CFLAGS $CPPFLAGS.
-    AC_MSG_CHECKING([whether the -Werror option is usable])
-    AC_CACHE_VAL([gl_cv_cc_vis_werror], [
-      gl_save_CFLAGS="$CFLAGS"
-      CFLAGS="$CFLAGS -Werror"
-      AC_COMPILE_IFELSE(
-        [AC_LANG_PROGRAM([[]], [[]])],
-        [gl_cv_cc_vis_werror=yes],
-        [gl_cv_cc_vis_werror=no])
-      CFLAGS="$gl_save_CFLAGS"])
-    AC_MSG_RESULT([$gl_cv_cc_vis_werror])
-    dnl Now check whether visibility declarations are supported.
-    AC_MSG_CHECKING([for simple visibility declarations])
-    AC_CACHE_VAL([gl_cv_cc_visibility], [
-      gl_save_CFLAGS="$CFLAGS"
-      CFLAGS="$CFLAGS -fvisibility=hidden"
-      dnl We use the option -Werror and a function dummyfunc, because on some
-      dnl platforms (Cygwin 1.7) the use of -fvisibility triggers a warning
-      dnl "visibility attribute not supported in this configuration; ignored"
-      dnl at the first function definition in every compilation unit, and we
-      dnl don't want to use the option in this case.
-      if test $gl_cv_cc_vis_werror = yes; then
-        CFLAGS="$CFLAGS -Werror"
-      fi
-      AC_COMPILE_IFELSE(
-        [AC_LANG_PROGRAM(
-           [[extern __attribute__((__visibility__("hidden"))) int hiddenvar;
-             extern __attribute__((__visibility__("default"))) int exportedvar;
-             extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
-             extern __attribute__((__visibility__("default"))) int exportedfunc (void);
-             void dummyfunc (void) {}
-           ]],
-           [[]])],
-        [gl_cv_cc_visibility=yes],
-        [gl_cv_cc_visibility=no])
-      CFLAGS="$gl_save_CFLAGS"])
-    AC_MSG_RESULT([$gl_cv_cc_visibility])
-    if test $gl_cv_cc_visibility = yes; then
-      CFLAG_VISIBILITY="-fvisibility=hidden"
-      HAVE_VISIBILITY=1
-    fi
-  fi
-  AC_SUBST([CFLAG_VISIBILITY])
-  AC_SUBST([HAVE_VISIBILITY])
-  AC_DEFINE_UNQUOTED([HAVE_VISIBILITY], [$HAVE_VISIBILITY],
-    [Define to 1 or 0, depending whether the compiler supports simple visibility declarations.])
-])
-
-# Copyright (C) 2002-2014 Free Software Foundation, Inc.
+# Copyright (C) 2002-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -110,10 +32,10 @@
 # generated from the m4 files accompanying Automake X.Y.
 # (This private macro should not be called outside this file.)
 AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.15'
+[am__api_version='1.13'
 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.15], [],
+m4_if([$1], [1.13.1], [],
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 ])
 
@@ -129,14 +51,14 @@
 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.15])dnl
+[AM_AUTOMAKE_VERSION([1.13.1])dnl
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -181,14 +103,15 @@
 # configured tree to be moved without reconfiguration.
 
 AC_DEFUN([AM_AUX_DIR_EXPAND],
-[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
-# Expand $ac_aux_dir to an absolute path.
-am_aux_dir=`cd "$ac_aux_dir" && pwd`
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
 ])
 
 # AM_CONDITIONAL                                            -*- Autoconf -*-
 
-# Copyright (C) 1997-2014 Free Software Foundation, Inc.
+# Copyright (C) 1997-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -219,7 +142,7 @@
 Usually this means the macro was only invoked conditionally.]])
 fi])])
 
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Copyright (C) 1999-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -410,7 +333,7 @@
 
 # Generate code to set up dependency tracking.              -*- Autoconf -*-
 
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Copyright (C) 1999-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -450,7 +373,7 @@
     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
     test -z "$DEPDIR" && continue
     am__include=`sed -n 's/^am__include = //p' < "$mf"`
-    test -z "$am__include" && continue
+    test -z "am__include" && continue
     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
     # Find all dependency output files, they are included files with
     # $(DEPDIR) in their names.  We invoke sed twice because it is the
@@ -486,7 +409,7 @@
 
 # Do all the work for Automake.                             -*- Autoconf -*-
 
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -495,12 +418,6 @@
 # This macro actually does too much.  Some checks are only needed if
 # your package does certain things.  But this isn't really a big deal.
 
-dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
-m4_define([AC_PROG_CC],
-m4_defn([AC_PROG_CC])
-[_AM_PROG_CC_C_O
-])
-
 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
 # AM_INIT_AUTOMAKE([OPTIONS])
 # -----------------------------------------------
@@ -576,8 +493,8 @@
 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
-# We need awk for the "check" target (and possibly the TAP driver).  The
-# system "awk" is bad on some platforms.
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
 AC_REQUIRE([AC_PROG_AWK])dnl
 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
@@ -609,51 +526,6 @@
 AC_CONFIG_COMMANDS_PRE(dnl
 [m4_provide_if([_AM_COMPILER_EXEEXT],
   [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
-
-# POSIX will say in a future version that running "rm -f" with no argument
-# is OK; and we want to be able to make that assumption in our Makefile
-# recipes.  So use an aggressive probe to check that the usage we want is
-# actually supported "in the wild" to an acceptable degree.
-# See automake bug#10828.
-# To make any issue more visible, cause the running configure to be aborted
-# by default if the 'rm' program in use doesn't match our expectations; the
-# user can still override this though.
-if rm -f && rm -fr && rm -rf; then : OK; else
-  cat >&2 <<'END'
-Oops!
-
-Your 'rm' program seems unable to run without file operands specified
-on the command line, even when the '-f' option is present.  This is contrary
-to the behaviour of most rm programs out there, and not conforming with
-the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
-
-Please tell bug-automake@gnu.org about your system, including the value
-of your $PATH and any error possibly output before this message.  This
-can help us improve future automake versions.
-
-END
-  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
-    echo 'Configuration will proceed anyway, since you have set the' >&2
-    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
-    echo >&2
-  else
-    cat >&2 <<'END'
-Aborting the configuration process, to ensure you take notice of the issue.
-
-You can download and install GNU coreutils to get an 'rm' implementation
-that behaves properly: <http://www.gnu.org/software/coreutils/>.
-
-If you want to complete the configuration process using your problematic
-'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
-to "yes", and re-run configure.
-
-END
-    AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
-  fi
-fi
-dnl The trailing newline in this macro's definition is deliberate, for
-dnl backward compatibility and to allow trailing 'dnl'-style comments
-dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
 ])
 
 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
@@ -662,6 +534,7 @@
 m4_define([_AC_COMPILER_EXEEXT],
 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
 
+
 # When config.status generates a header, we must update the stamp-h file.
 # This file resides in the same directory as the config header
 # that is generated.  The stamp files are numbered to have different names.
@@ -683,7 +556,7 @@
 done
 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -694,7 +567,7 @@
 # Define $install_sh.
 AC_DEFUN([AM_PROG_INSTALL_SH],
 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-if test x"${install_sh+set}" != xset; then
+if test x"${install_sh}" != xset; then
   case $am_aux_dir in
   *\ * | *\	*)
     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
@@ -704,7 +577,7 @@
 fi
 AC_SUBST([install_sh])])
 
-# Copyright (C) 2003-2014 Free Software Foundation, Inc.
+# Copyright (C) 2003-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -761,7 +634,7 @@
 
 # Check to see how 'make' treats includes.	            -*- Autoconf -*-
 
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -809,9 +682,41 @@
 rm -f confinc confmf
 ])
 
+# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_CC_C_O
+# --------------
+# Like AC_PROG_CC_C_O, but changed for automake.
+AC_DEFUN([AM_PROG_CC_C_O],
+[AC_REQUIRE([AC_PROG_CC_C_O])dnl
+AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([compile])dnl
+# FIXME: we rely on the cache variable name because
+# there is no other way.
+set dummy $CC
+am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
+eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
+if test "$am_t" != yes; then
+   # Losing compiler, so override with the script.
+   # FIXME: It is wrong to rewrite CC.
+   # But if we don't then we get into trouble of one sort or another.
+   # A longer-term fix would be to have automake use am__CC in this case,
+   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+   CC="$am_aux_dir/compile $CC"
+fi
+dnl Make sure AC_PROG_CC is never called again, or it will override our
+dnl setting of CC.
+m4_define([AC_PROG_CC],
+          [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
+])
+
 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
-# Copyright (C) 1997-2014 Free Software Foundation, Inc.
+# Copyright (C) 1997-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -850,7 +755,7 @@
 
 # Helper functions for option handling.                     -*- Autoconf -*-
 
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -879,73 +784,9 @@
 AC_DEFUN([_AM_IF_OPTION],
 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# _AM_PROG_CC_C_O
-# ---------------
-# Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
-# to automatically call this.
-AC_DEFUN([_AM_PROG_CC_C_O],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-AC_REQUIRE_AUX_FILE([compile])dnl
-AC_LANG_PUSH([C])dnl
-AC_CACHE_CHECK(
-  [whether $CC understands -c and -o together],
-  [am_cv_prog_cc_c_o],
-  [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
-  # Make sure it works both with $CC and with simple cc.
-  # Following AC_PROG_CC_C_O, we do the test twice because some
-  # compilers refuse to overwrite an existing .o file with -o,
-  # though they will create one.
-  am_cv_prog_cc_c_o=yes
-  for am_i in 1 2; do
-    if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
-         && test -f conftest2.$ac_objext; then
-      : OK
-    else
-      am_cv_prog_cc_c_o=no
-      break
-    fi
-  done
-  rm -f core conftest*
-  unset am_i])
-if test "$am_cv_prog_cc_c_o" != yes; then
-   # Losing compiler, so override with the script.
-   # FIXME: It is wrong to rewrite CC.
-   # But if we don't then we get into trouble of one sort or another.
-   # A longer-term fix would be to have automake use am__CC in this case,
-   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
-   CC="$am_aux_dir/compile $CC"
-fi
-AC_LANG_POP([C])])
-
-# For backward compatibility.
-AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
-
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_RUN_LOG(COMMAND)
-# -------------------
-# Run COMMAND, save the exit status in ac_status, and log it.
-# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
-AC_DEFUN([AM_RUN_LOG],
-[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
-   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
-   ac_status=$?
-   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
-   (exit $ac_status); }])
-
 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1026,7 +867,7 @@
 rm -f conftest.file
 ])
 
-# Copyright (C) 2009-2014 Free Software Foundation, Inc.
+# Copyright (C) 2009-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1086,7 +927,7 @@
 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
 ])
 
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1114,7 +955,7 @@
 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
-# Copyright (C) 2006-2014 Free Software Foundation, Inc.
+# Copyright (C) 2006-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1133,7 +974,7 @@
 
 # Check how to create a tarball.                            -*- Autoconf -*-
 
-# Copyright (C) 2004-2014 Free Software Foundation, Inc.
+# Copyright (C) 2004-2013 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1152,114 +993,76 @@
 # Substitute a variable $(am__untar) that extract such
 # a tarball read from stdin.
 #     $(am__untar) < result.tar
-#
 AC_DEFUN([_AM_PROG_TAR],
 [# Always define AMTAR for backward compatibility.  Yes, it's still used
 # in the wild :-(  We should find a proper way to deprecate it ...
 AC_SUBST([AMTAR], ['$${TAR-tar}'])
-
-# We'll loop over all known methods to create a tar archive until one works.
+m4_if([$1], [v7],
+     [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
+     [m4_case([$1], [ustar],, [pax],,
+              [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
-
-m4_if([$1], [v7],
-  [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
-
-  [m4_case([$1],
-    [ustar],
-     [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
-      # There is notably a 21 bits limit for the UID and the GID.  In fact,
-      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
-      # and bug#13588).
-      am_max_uid=2097151 # 2^21 - 1
-      am_max_gid=$am_max_uid
-      # The $UID and $GID variables are not portable, so we need to resort
-      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
-      # below are definitely unexpected, so allow the users to see them
-      # (that is, avoid stderr redirection).
-      am_uid=`id -u || echo unknown`
-      am_gid=`id -g || echo unknown`
-      AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
-      if test $am_uid -le $am_max_uid; then
-         AC_MSG_RESULT([yes])
-      else
-         AC_MSG_RESULT([no])
-         _am_tools=none
-      fi
-      AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
-      if test $am_gid -le $am_max_gid; then
-         AC_MSG_RESULT([yes])
-      else
-        AC_MSG_RESULT([no])
-        _am_tools=none
-      fi],
-
-  [pax],
-    [],
-
-  [m4_fatal([Unknown tar format])])
-
-  AC_MSG_CHECKING([how to create a $1 tar archive])
-
-  # Go ahead even if we have the value already cached.  We do so because we
-  # need to set the values for the 'am__tar' and 'am__untar' variables.
-  _am_tools=${am_cv_prog_tar_$1-$_am_tools}
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of '-'.
+for _am_tool in $_am_tools
+do
+  case $_am_tool in
+  gnutar)
+    for _am_tar in tar gnutar gtar;
+    do
+      AM_RUN_LOG([$_am_tar --version]) && break
+    done
+    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+    am__untar="$_am_tar -xf -"
+    ;;
+  plaintar)
+    # Must skip GNU tar: if it does not support --format= it doesn't create
+    # ustar tarball either.
+    (tar --version) >/dev/null 2>&1 && continue
+    am__tar='tar chf - "$$tardir"'
+    am__tar_='tar chf - "$tardir"'
+    am__untar='tar xf -'
+    ;;
+  pax)
+    am__tar='pax -L -x $1 -w "$$tardir"'
+    am__tar_='pax -L -x $1 -w "$tardir"'
+    am__untar='pax -r'
+    ;;
+  cpio)
+    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+    am__untar='cpio -i -H $1 -d'
+    ;;
+  none)
+    am__tar=false
+    am__tar_=false
+    am__untar=false
+    ;;
+  esac
 
-  for _am_tool in $_am_tools; do
-    case $_am_tool in
-    gnutar)
-      for _am_tar in tar gnutar gtar; do
-        AM_RUN_LOG([$_am_tar --version]) && break
-      done
-      am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
-      am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
-      am__untar="$_am_tar -xf -"
-      ;;
-    plaintar)
-      # Must skip GNU tar: if it does not support --format= it doesn't create
-      # ustar tarball either.
-      (tar --version) >/dev/null 2>&1 && continue
-      am__tar='tar chf - "$$tardir"'
-      am__tar_='tar chf - "$tardir"'
-      am__untar='tar xf -'
-      ;;
-    pax)
-      am__tar='pax -L -x $1 -w "$$tardir"'
-      am__tar_='pax -L -x $1 -w "$tardir"'
-      am__untar='pax -r'
-      ;;
-    cpio)
-      am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
-      am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
-      am__untar='cpio -i -H $1 -d'
-      ;;
-    none)
-      am__tar=false
-      am__tar_=false
-      am__untar=false
-      ;;
-    esac
+  # If the value was cached, stop now.  We just wanted to have am__tar
+  # and am__untar set.
+  test -n "${am_cv_prog_tar_$1}" && break
 
-    # If the value was cached, stop now.  We just wanted to have am__tar
-    # and am__untar set.
-    test -n "${am_cv_prog_tar_$1}" && break
+  # tar/untar a dummy directory, and stop if the command works
+  rm -rf conftest.dir
+  mkdir conftest.dir
+  echo GrepMe > conftest.dir/file
+  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+  rm -rf conftest.dir
+  if test -s conftest.tar; then
+    AM_RUN_LOG([$am__untar <conftest.tar])
+    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+  fi
+done
+rm -rf conftest.dir
 
-    # tar/untar a dummy directory, and stop if the command works.
-    rm -rf conftest.dir
-    mkdir conftest.dir
-    echo GrepMe > conftest.dir/file
-    AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
-    rm -rf conftest.dir
-    if test -s conftest.tar; then
-      AM_RUN_LOG([$am__untar <conftest.tar])
-      AM_RUN_LOG([cat conftest.dir/file])
-      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
-    fi
-  done
-  rm -rf conftest.dir
-
-  AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
-  AC_MSG_RESULT([$am_cv_prog_tar_$1])])
-
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
 AC_SUBST([am__tar])
 AC_SUBST([am__untar])
 ]) # _AM_PROG_TAR
--- a/external/bsd/file/dist/compile	Wed Apr 18 01:39:14 2018 +0000
+++ b/external/bsd/file/dist/compile	Sun Apr 22 07:20:06 2018 +0000
@@ -3,7 +3,7 @@
 
 scriptversion=2012-10-14.11; # UTC
 
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Copyright (C) 1999-2013 Free Software Foundation, Inc.
 # Written by Tom Tromey <tromey@cygnus.com>.
 #
 # This program is free software; you can redistribute it and/or modify
--- a/external/bsd/file/dist/config.guess	Wed Apr 18 01:39:14 2018 +0000
+++ b/external/bsd/file/dist/config.guess	Sun Apr 22 07:20:06 2018 +0000
@@ -1,8 +1,10 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
-#   Copyright 1992-2017 Free Software Foundation, Inc.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+#   2011, 2012, 2013 Free Software Foundation, Inc.
 
-timestamp='2017-01-01'
+timestamp='2012-12-29'
 
 # 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
@@ -24,12 +26,12 @@
 # program.  This Exception is an additional permission under section 7
 # of the GNU General Public License, version 3 ("GPLv3").
 #
-# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
+# Originally written by Per Bothner. 
 #
 # 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
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
 #
-# Please send patches to <config-patches@gnu.org>.
+# Please send patches with a ChangeLog entry to config-patches@gnu.org.
 
 
 me=`echo "$0" | sed -e 's,.*/,,'`
@@ -50,7 +52,9 @@
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright 1992-2017 Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
+2012, 2013 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."
@@ -132,27 +136,6 @@
 UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
 
-case "${UNAME_SYSTEM}" in
-Linux|GNU|GNU/*)
-	# If the system lacks a compiler, then just pick glibc.
-	# We could probably try harder.
-	LIBC=gnu
-
-	eval $set_cc_for_build
-	cat <<-EOF > $dummy.c
-	#include <features.h>
-	#if defined(__UCLIBC__)
-	LIBC=uclibc
-	#elif defined(__dietlibc__)
-	LIBC=dietlibc
-	#else
-	LIBC=gnu
-	#endif
-	EOF
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
-	;;
-esac
-
 # Note: order is significant - the case branches are not exclusive.
 
 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
@@ -168,29 +151,19 @@
 	# 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=`(uname -p 2>/dev/null || \
-	    /sbin/$sysctl 2>/dev/null || \
-	    /usr/sbin/$sysctl 2>/dev/null || \
-	    echo unknown)`
+	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 ;;
-	    earmv*)
-		arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
-		endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
-		machine=${arch}${endian}-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) and ABI.
+	# to ELF recently, or will in the future.
 	case "${UNAME_MACHINE_ARCH}" in
-	    earm*)
-		os=netbsdelf
-		;;
 	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
 		eval $set_cc_for_build
 		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
@@ -207,13 +180,6 @@
 		os=netbsd
 		;;
 	esac
-	# Determine ABI tags.
-	case "${UNAME_MACHINE_ARCH}" in
-	    earm*)
-		expr='s/^earmv[0-9]/-eabi/;s/eb$//'
-		abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
-		;;
-	esac
 	# The OS release
 	# Debian GNU/NetBSD machines have a different userland, and
 	# thus, need a distinct triplet. However, they do not need
@@ -224,13 +190,13 @@
 		release='-gnu'
 		;;
 	    *)
-		release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
+		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
 		;;
 	esac
 	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
 	# contains redundant information, the shorter form:
 	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
-	echo "${machine}-${os}${release}${abi}"
+	echo "${machine}-${os}${release}"
 	exit ;;
     *:Bitrig:*:*)
 	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
@@ -240,10 +206,6 @@
 	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
 	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
 	exit ;;
-    *:LibertyBSD:*:*)
-	UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
-	echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE}
-	exit ;;
     *:ekkoBSD:*:*)
 	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
 	exit ;;
@@ -256,9 +218,6 @@
     *:MirBSD:*:*)
 	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
 	exit ;;
-    *:Sortix:*:*)
-	echo ${UNAME_MACHINE}-unknown-sortix
-	exit ;;
     alpha:OSF1:*:*)
 	case $UNAME_RELEASE in
 	*4.0)
@@ -275,42 +234,42 @@
 	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
 	case "$ALPHA_CPU_TYPE" in
 	    "EV4 (21064)")
-		UNAME_MACHINE=alpha ;;
+		UNAME_MACHINE="alpha" ;;
 	    "EV4.5 (21064)")
-		UNAME_MACHINE=alpha ;;
+		UNAME_MACHINE="alpha" ;;
 	    "LCA4 (21066/21068)")
-		UNAME_MACHINE=alpha ;;
+		UNAME_MACHINE="alpha" ;;
 	    "EV5 (21164)")
-		UNAME_MACHINE=alphaev5 ;;
+		UNAME_MACHINE="alphaev5" ;;
 	    "EV5.6 (21164A)")
-		UNAME_MACHINE=alphaev56 ;;
+		UNAME_MACHINE="alphaev56" ;;
 	    "EV5.6 (21164PC)")
-		UNAME_MACHINE=alphapca56 ;;
+		UNAME_MACHINE="alphapca56" ;;
 	    "EV5.7 (21164PC)")
-		UNAME_MACHINE=alphapca57 ;;
+		UNAME_MACHINE="alphapca57" ;;
 	    "EV6 (21264)")
-		UNAME_MACHINE=alphaev6 ;;
+		UNAME_MACHINE="alphaev6" ;;
 	    "EV6.7 (21264A)")
-		UNAME_MACHINE=alphaev67 ;;
+		UNAME_MACHINE="alphaev67" ;;
 	    "EV6.8CB (21264C)")
-		UNAME_MACHINE=alphaev68 ;;
+		UNAME_MACHINE="alphaev68" ;;
 	    "EV6.8AL (21264B)")
-		UNAME_MACHINE=alphaev68 ;;
+		UNAME_MACHINE="alphaev68" ;;
 	    "EV6.8CX (21264D)")
-		UNAME_MACHINE=alphaev68 ;;
+		UNAME_MACHINE="alphaev68" ;;
 	    "EV6.9A (21264/EV69A)")
-		UNAME_MACHINE=alphaev69 ;;
+		UNAME_MACHINE="alphaev69" ;;
 	    "EV7 (21364)")
-		UNAME_MACHINE=alphaev7 ;;
+		UNAME_MACHINE="alphaev7" ;;
 	    "EV7.9 (21364A)")
-		UNAME_MACHINE=alphaev79 ;;
+		UNAME_MACHINE="alphaev79" ;;
 	esac
 	# A Pn.n version is a patched version.
 	# A Vn.n version is a released version.
 	# A Tn.n version is a released field test version.
 	# A Xn.n version is an unreleased experimental baselevel.
 	# 1.2 uses "1.2" for uname -r.
-	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
 	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
 	exitcode=$?
 	trap '' 0
@@ -383,16 +342,16 @@
 	exit ;;
     i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
 	eval $set_cc_for_build
-	SUN_ARCH=i386
+	SUN_ARCH="i386"
 	# If there is a compiler, see if it is configured for 64-bit objects.
 	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
 	# This test works for both compilers.
-	if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
+	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
 	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
-		(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
 		grep IS_64BIT_ARCH >/dev/null
 	    then
-		SUN_ARCH=x86_64
+		SUN_ARCH="x86_64"
 	    fi
 	fi
 	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
@@ -417,7 +376,7 @@
 	exit ;;
     sun*:*:4.2BSD:*)
 	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
-	test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3
+	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
 	case "`/bin/arch`" in
 	    sun3)
 		echo m68k-sun-sunos${UNAME_RELEASE}
@@ -603,9 +562,8 @@
 	else
 		IBM_ARCH=powerpc
 	fi
-	if [ -x /usr/bin/lslpp ] ; then
-		IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
-			   awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
+	if [ -x /usr/bin/oslevel ] ; then
+		IBM_REV=`/usr/bin/oslevel`
 	else
 		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
 	fi
@@ -642,13 +600,13 @@
 		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
 		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
 		    case "${sc_cpu_version}" in
-		      523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
-		      528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
+		      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+		      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
 		      532)                      # CPU_PA_RISC2_0
 			case "${sc_kernel_bits}" in
-			  32) HP_ARCH=hppa2.0n ;;
-			  64) HP_ARCH=hppa2.0w ;;
-			  '') HP_ARCH=hppa2.0 ;;   # HP-UX 10.20
+			  32) HP_ARCH="hppa2.0n" ;;
+			  64) HP_ARCH="hppa2.0w" ;;
+			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
 			esac ;;
 		    esac
 		fi
@@ -687,11 +645,11 @@
 		    exit (0);
 		}
 EOF
-		    (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
 		    test -z "$HP_ARCH" && HP_ARCH=hppa
 		fi ;;
 	esac
-	if [ ${HP_ARCH} = hppa2.0w ]
+	if [ ${HP_ARCH} = "hppa2.0w" ]
 	then
 	    eval $set_cc_for_build
 
@@ -704,12 +662,12 @@
 	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
 	    # => hppa64-hp-hpux11.23
 
-	    if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
+	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
 		grep -q __LP64__
 	    then
-		HP_ARCH=hppa2.0w
+		HP_ARCH="hppa2.0w"
 	    else
-		HP_ARCH=hppa64
+		HP_ARCH="hppa64"
 	    fi
 	fi
 	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
@@ -814,14 +772,14 @@
 	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
 	exit ;;
     F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
-	FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
-	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
+	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
 	FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
 	echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
 	exit ;;
     5000:UNIX_System_V:4.*:*)
-	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
-	FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
+	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+	FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
 	echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
 	exit ;;
     i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
@@ -851,7 +809,7 @@
     *:MINGW*:*)
 	echo ${UNAME_MACHINE}-pc-mingw32
 	exit ;;
-    *:MSYS*:*)
+    i*:MSYS*:*)
 	echo ${UNAME_MACHINE}-pc-msys
 	exit ;;
     i*:windows32*:*)
@@ -899,21 +857,21 @@
 	exit ;;
     *:GNU:*:*)
 	# the GNU system
-	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
 	exit ;;
     *:GNU/*:*:*)
 	# other systems with GNU libc and userland
-	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
+	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
 	exit ;;
     i*86:Minix:*:*)
 	echo ${UNAME_MACHINE}-pc-minix
 	exit ;;
     aarch64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
     aarch64_be:Linux:*:*)
 	UNAME_MACHINE=aarch64_be
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
     alpha:Linux:*:*)
 	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
@@ -926,60 +884,59 @@
 	  EV68*) UNAME_MACHINE=alphaev68 ;;
 	esac
 	objdump --private-headers /bin/sh | grep -q ld.so.1
-	if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
-	exit ;;
-    arc:Linux:*:* | arceb:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
 	exit ;;
     arm*:Linux:*:*)
 	eval $set_cc_for_build
 	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
 	    | grep -q __ARM_EABI__
 	then
-	    echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	    echo ${UNAME_MACHINE}-unknown-linux-gnu
 	else
 	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
 		| grep -q __ARM_PCS_VFP
 	    then
-		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
+		echo ${UNAME_MACHINE}-unknown-linux-gnueabi
 	    else
-		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
+		echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
 	    fi
 	fi
 	exit ;;
     avr32*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
     cris:Linux:*:*)
-	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+	echo ${UNAME_MACHINE}-axis-linux-gnu
 	exit ;;
     crisv32:Linux:*:*)
-	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
-	exit ;;
-    e2k:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo ${UNAME_MACHINE}-axis-linux-gnu
 	exit ;;
     frv:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
     hexagon:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
     i*86:Linux:*:*)
-	echo ${UNAME_MACHINE}-pc-linux-${LIBC}
+	LIBC=gnu
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#ifdef __dietlibc__
+	LIBC=dietlibc
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+	echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
 	exit ;;
     ia64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
-	exit ;;
-    k1om:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
     m32r*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
     m68*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
     mips:Linux:*:* | mips64:Linux:*:*)
 	eval $set_cc_for_build
@@ -998,69 +955,54 @@
 	#endif
 EOF
 	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
-	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
+	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
 	;;
-    mips64el:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
-	exit ;;
-    openrisc*:Linux:*:*)
-	echo or1k-unknown-linux-${LIBC}
-	exit ;;
-    or32:Linux:*:* | or1k*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+    or32:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
     padre:Linux:*:*)
-	echo sparc-unknown-linux-${LIBC}
+	echo sparc-unknown-linux-gnu
 	exit ;;
     parisc64:Linux:*:* | hppa64:Linux:*:*)
-	echo hppa64-unknown-linux-${LIBC}
+	echo hppa64-unknown-linux-gnu
 	exit ;;
     parisc:Linux:*:* | hppa:Linux:*:*)
 	# Look for CPU level
 	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
-	  PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
-	  PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
-	  *)    echo hppa-unknown-linux-${LIBC} ;;
+	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
+	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
+	  *)    echo hppa-unknown-linux-gnu ;;
 	esac
 	exit ;;
     ppc64:Linux:*:*)
-	echo powerpc64-unknown-linux-${LIBC}
+	echo powerpc64-unknown-linux-gnu
 	exit ;;
     ppc:Linux:*:*)
-	echo powerpc-unknown-linux-${LIBC}
-	exit ;;
-    ppc64le:Linux:*:*)
-	echo powerpc64le-unknown-linux-${LIBC}
-	exit ;;
-    ppcle:Linux:*:*)
-	echo powerpcle-unknown-linux-${LIBC}
-	exit ;;
-    riscv32:Linux:*:* | riscv64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo powerpc-unknown-linux-gnu
 	exit ;;
     s390:Linux:*:* | s390x:Linux:*:*)
-	echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
+	echo ${UNAME_MACHINE}-ibm-linux
 	exit ;;
     sh64*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
     sh*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
     sparc:Linux:*:* | sparc64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
     tile*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
     vax:Linux:*:*)
-	echo ${UNAME_MACHINE}-dec-linux-${LIBC}
+	echo ${UNAME_MACHINE}-dec-linux-gnu
 	exit ;;
     x86_64:Linux:*:*)
-	echo ${UNAME_MACHINE}-pc-linux-${LIBC}
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
     xtensa*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
 	exit ;;
     i*86:DYNIX/ptx:4*:*)
 	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
@@ -1136,7 +1078,7 @@
 	# uname -m prints for DJGPP always 'pc', but it prints nothing about
 	# the processor, so we play safe by assuming i586.
 	# Note: whatever this is, it MUST be the same as what config.sub
-	# prints for the "djgpp" host, or else GDB configure will decide that
+	# prints for the "djgpp" host, or else GDB configury will decide that
 	# this is a cross-build.
 	echo i586-pc-msdosdjgpp
 	exit ;;
@@ -1285,9 +1227,6 @@
     SX-8R:SUPER-UX:*:*)
 	echo sx8r-nec-superux${UNAME_RELEASE}
 	exit ;;
-    SX-ACE:SUPER-UX:*:*)
-	echo sxace-nec-superux${UNAME_RELEASE}
-	exit ;;
     Power*:Rhapsody:*:*)
 	echo powerpc-apple-rhapsody${UNAME_RELEASE}
 	exit ;;
@@ -1296,36 +1235,24 @@
 	exit ;;
     *:Darwin:*:*)
 	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
-	eval $set_cc_for_build
-	if test "$UNAME_PROCESSOR" = unknown ; then
-	    UNAME_PROCESSOR=powerpc
-	fi
-	if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
-	    if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
-		if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
-		    (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
-		    grep IS_64BIT_ARCH >/dev/null
-		then
-		    case $UNAME_PROCESSOR in
-			i386) UNAME_PROCESSOR=x86_64 ;;
-			powerpc) UNAME_PROCESSOR=powerpc64 ;;
-		    esac
-		fi
-	    fi
-	elif test "$UNAME_PROCESSOR" = i386 ; then
-	    # Avoid executing cc on OS X 10.9, as it ships with a stub
-	    # that puts up a graphical alert prompting to install
-	    # developer tools.  Any system running Mac OS X 10.7 or
-	    # later (Darwin 11 and later) is required to have a 64-bit
-	    # processor. This is not true of the ARM version of Darwin
-	    # that Apple uses in portable devices.
-	    UNAME_PROCESSOR=x86_64
-	fi
+	case $UNAME_PROCESSOR in
+	    i386)
+		eval $set_cc_for_build
+		if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+		  if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+		      (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+		      grep IS_64BIT_ARCH >/dev/null
+		  then
+		      UNAME_PROCESSOR="x86_64"
+		  fi
+		fi ;;
+	    unknown) UNAME_PROCESSOR=powerpc ;;
+	esac
 	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
 	exit ;;
     *:procnto*:*:* | *:QNX:[0123456789]*:*)
 	UNAME_PROCESSOR=`uname -p`
-	if test "$UNAME_PROCESSOR" = x86; then
+	if test "$UNAME_PROCESSOR" = "x86"; then
 		UNAME_PROCESSOR=i386
 		UNAME_MACHINE=pc
 	fi
@@ -1356,7 +1283,7 @@
 	# "uname -m" is not consistent, so use $cputype instead. 386
 	# is converted to i386 for consistency with other x86
 	# operating systems.
-	if test "$cputype" = 386; then
+	if test "$cputype" = "386"; then
 	    UNAME_MACHINE=i386
 	else
 	    UNAME_MACHINE="$cputype"
@@ -1398,7 +1325,7 @@
 	echo i386-pc-xenix
 	exit ;;
     i*86:skyos:*:*)
-	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'`
+	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
 	exit ;;
     i*86:rdos:*:*)
 	echo ${UNAME_MACHINE}-pc-rdos
@@ -1409,25 +1336,171 @@
     x86_64:VMkernel:*:*)
 	echo ${UNAME_MACHINE}-unknown-esx
 	exit ;;
-    amd64:Isilon\ OneFS:*:*)
-	echo x86_64-unknown-onefs
+esac
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
+     I don't know....  */
+  printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+  printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+	"4"
+#else
+	""
+#endif
+	); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+  printf ("arm-acorn-riscix\n"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+  printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+  int version;
+  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+  if (version < 4)
+    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+  else
+    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+  exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+  printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+  printf ("ns32k-encore-mach\n"); exit (0);
+#else
+  printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+  printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+  printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+  printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+    struct utsname un;
+
+    uname(&un);
+
+    if (strncmp(un.version, "V2", 2) == 0) {
+	printf ("i386-sequent-ptx2\n"); exit (0);
+    }
+    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+	printf ("i386-sequent-ptx1\n"); exit (0);
+    }
+    printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+#  include <sys/param.h>
+#  if defined (BSD)
+#   if BSD == 43
+      printf ("vax-dec-bsd4.3\n"); exit (0);
+#   else
+#    if BSD == 199006
+      printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#    else
+      printf ("vax-dec-bsd\n"); exit (0);
+#    endif
+#   endif
+#  else
+    printf ("vax-dec-bsd\n"); exit (0);
+#  endif
+# else
+    printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+  printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+  exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+	{ echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+    case `getsysinfo -f cpu_type` in
+    c1*)
+	echo c1-convex-bsd
 	exit ;;
-esac
+    c2*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+	exit ;;
+    c34*)
+	echo c34-convex-bsd
+	exit ;;
+    c38*)
+	echo c38-convex-bsd
+	exit ;;
+    c4*)
+	echo c4-convex-bsd
+	exit ;;
+    esac
+fi
 
 cat >&2 <<EOF
 $0: unable to guess system type
 
-This script (version $timestamp), has failed to recognize the
-operating system you are using. If your script is old, overwrite
-config.guess and config.sub with the latest versions from:
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
 
-  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
 and
-  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
 
-If $0 has already been updated, send the following data and any
-information you think might be pertinent to config-patches@gnu.org to
-provide the necessary information to handle your system.
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+information to handle your system.
 
 config.guess timestamp = $timestamp
 
--- a/external/bsd/file/dist/config.h.in	Wed Apr 18 01:39:14 2018 +0000
+++ b/external/bsd/file/dist/config.h.in	Sun Apr 22 07:20:06 2018 +0000
@@ -77,6 +77,9 @@
 /* Define to 1 if you have the `gnurx' library (-lgnurx). */
 #undef HAVE_LIBGNURX
 
+/* Define to 1 if you have the `seccomp' library (-lseccomp). */
+#undef HAVE_LIBSECCOMP
+
 /* Define to 1 if you have the `z' library (-lz). */
 #undef HAVE_LIBZ
 
@@ -227,10 +230,6 @@
 /* Define to 1 if you have the <vfork.h> header file. */
 #undef HAVE_VFORK_H
 
-/* Define to 1 or 0, depending whether the compiler supports simple visibility
-   declarations. */
-#undef HAVE_VISIBILITY
-
 /* Define to 1 if you have the <wchar.h> header file. */
 #undef HAVE_WCHAR_H
 
@@ -264,6 +263,9 @@
    <sysmacros.h>. */
 #undef MAJOR_IN_SYSMACROS
 
+/* Define to 1 if your C compiler doesn't accept -c and -o together. */
+#undef NO_MINUS_C_MINUS_O
+
 /* Name of package */
 #undef PACKAGE
 
--- a/external/bsd/file/dist/config.sub	Wed Apr 18 01:39:14 2018 +0000
+++ b/external/bsd/file/dist/config.sub	Sun Apr 22 07:20:06 2018 +0000
@@ -1,8 +1,10 @@
 #! /bin/sh
 # Configuration validation subroutine script.
-#   Copyright 1992-2017 Free Software Foundation, Inc.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+#   2011, 2012, 2013 Free Software Foundation, Inc.
 
-timestamp='2017-01-01'
+timestamp='2012-12-29'
 
 # 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
@@ -25,7 +27,7 @@
 # of the GNU General Public License, version 3 ("GPLv3").
 
 
-# Please send patches to <config-patches@gnu.org>.
+# Please send patches with a ChangeLog entry to config-patches@gnu.org.
 #
 # Configuration subroutine to validate and canonicalize a configuration type.
 # Supply the specified configuration type as an argument.
@@ -33,7 +35,7 @@
 # Otherwise, we print the canonical config type on stdout and succeed.
 
 # You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
 
 # This file is supposed to be the same for all GNU packages
 # and recognize all the CPU types, system types and aliases
@@ -53,7 +55,8 @@
 me=`echo "$0" | sed -e 's,.*/,,'`
 
 usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+       $0 [OPTION] ALIAS
 
 Canonicalize a configuration name.
 
@@ -67,7 +70,9 @@
 version="\
 GNU config.sub ($timestamp)
 
-Copyright 1992-2017 Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
+2012, 2013 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."
@@ -116,8 +121,8 @@
 case $maybe_os in
   nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
   linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
-  knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
-  kopensolaris*-gnu* | cloudabi*-eabi* | \
+  knetbsd*-gnu* | netbsd*-gnu* | \
+  kopensolaris*-gnu* | \
   storm-chaos* | os2-emx* | rtmk-nova*)
     os=-$maybe_os
     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
@@ -251,21 +256,19 @@
 	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
 	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
 	| am33_2.0 \
-	| arc | arceb \
+	| arc \
 	| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
 	| avr | avr32 \
-	| ba \
 	| be32 | be64 \
 	| bfin \
-	| c4x | c8051 | clipper \
+	| c4x | clipper \
 	| d10v | d30v | dlx | dsp16xx \
-	| e2k | epiphany \
-	| fido | fr30 | frv | ft32 \
+	| epiphany \
+	| fido | fr30 | frv \
 	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
 	| hexagon \
 	| i370 | i860 | i960 | ia64 \
 	| ip2k | iq2000 \
-	| k1om \
 	| le32 | le64 \
 	| lm32 \
 	| m32c | m32r | m32rle | m68000 | m68k | m88k \
@@ -283,30 +286,26 @@
 	| mips64vr5900 | mips64vr5900el \
 	| mipsisa32 | mipsisa32el \
 	| mipsisa32r2 | mipsisa32r2el \
-	| mipsisa32r6 | mipsisa32r6el \
 	| mipsisa64 | mipsisa64el \
 	| mipsisa64r2 | mipsisa64r2el \
-	| mipsisa64r6 | mipsisa64r6el \
 	| mipsisa64sb1 | mipsisa64sb1el \
 	| mipsisa64sr71k | mipsisa64sr71kel \
-	| mipsr5900 | mipsr5900el \
 	| mipstx39 | mipstx39el \
 	| mn10200 | mn10300 \
 	| moxie \
 	| mt \
 	| msp430 \
 	| nds32 | nds32le | nds32be \
-	| nios | nios2 | nios2eb | nios2el \
+	| nios | nios2 \
 	| ns16k | ns32k \
-	| open8 | or1k | or1knd | or32 \
+	| open8 \
+	| or32 \
 	| pdp10 | pdp11 | pj | pjl \
 	| powerpc | powerpc64 | powerpc64le | powerpcle \
-	| pru \
 	| pyramid \
-	| riscv32 | riscv64 \
 	| rl78 | rx \
 	| score \
-	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
 	| sh64 | sh64le \
 	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
 	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
@@ -314,7 +313,6 @@
 	| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
 	| ubicom32 \
 	| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
-	| visium \
 	| we32k \
 	| x86 | xc16x | xstormy16 | xtensa \
 	| z8k | z80)
@@ -329,10 +327,7 @@
 	c6x)
 		basic_machine=tic6x-unknown
 		;;
-	leon|leon[3-9])
-		basic_machine=sparc-$basic_machine
-		;;
-	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
+	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
 		basic_machine=$basic_machine-unknown
 		os=-none
 		;;
@@ -374,23 +369,21 @@
 	| aarch64-* | aarch64_be-* \
 	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
 	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
-	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
+	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
 	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
 	| avr-* | avr32-* \
-	| ba-* \
 	| be32-* | be64-* \
 	| bfin-* | bs2000-* \
 	| c[123]* | c30-* | [cjt]90-* | c4x-* \
-	| c8051-* | clipper-* | craynv-* | cydra-* \
+	| clipper-* | craynv-* | cydra-* \
 	| d10v-* | d30v-* | dlx-* \
-	| e2k-* | elxsi-* \
+	| elxsi-* \
 	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
 	| h8300-* | h8500-* \
 	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
 	| hexagon-* \
 	| i*86-* | i860-* | i960-* | ia64-* \
 	| ip2k-* | iq2000-* \
-	| k1om-* \
 	| le32-* | le64-* \
 	| lm32-* \
 	| m32c-* | m32r-* | m32rle-* \
@@ -410,34 +403,28 @@
 	| mips64vr5900-* | mips64vr5900el-* \
 	| mipsisa32-* | mipsisa32el-* \
 	| mipsisa32r2-* | mipsisa32r2el-* \
-	| mipsisa32r6-* | mipsisa32r6el-* \
 	| mipsisa64-* | mipsisa64el-* \
 	| mipsisa64r2-* | mipsisa64r2el-* \
-	| mipsisa64r6-* | mipsisa64r6el-* \
 	| mipsisa64sb1-* | mipsisa64sb1el-* \
 	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
-	| mipsr5900-* | mipsr5900el-* \
 	| mipstx39-* | mipstx39el-* \
 	| mmix-* \
 	| mt-* \
 	| msp430-* \
 	| nds32-* | nds32le-* | nds32be-* \
-	| nios-* | nios2-* | nios2eb-* | nios2el-* \
+	| nios-* | nios2-* \
 	| none-* | np1-* | ns16k-* | ns32k-* \
 	| open8-* \
-	| or1k*-* \
 	| orion-* \
 	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
 	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
-	| pru-* \
 	| pyramid-* \
-	| riscv32-* | riscv64-* \
 	| rl78-* | romp-* | rs6000-* | rx-* \
 	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
 	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
 	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
 	| sparclite-* \
-	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
+	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
 	| tahoe-* \
 	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
 	| tile*-* \
@@ -445,7 +432,6 @@
 	| ubicom32-* \
 	| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
 	| vax-* \
-	| visium-* \
 	| we32k-* \
 	| x86-* | x86_64-* | xc16x-* | xps100-* \
 	| xstormy16-* | xtensa*-* \
@@ -522,9 +508,6 @@
 		basic_machine=i386-pc
 		os=-aros
 		;;
-	asmjs)
-		basic_machine=asmjs-unknown
-		;;
 	aux)
 		basic_machine=m68k-apple
 		os=-aux
@@ -645,14 +628,6 @@
 		basic_machine=m68k-bull
 		os=-sysv3
 		;;
-	e500v[12])
-		basic_machine=powerpc-unknown
-		os=$os"spe"
-		;;
-	e500v[12]-*)
-		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
-		os=$os"spe"
-		;;
 	ebmon29k)
 		basic_machine=a29k-amd
 		os=-ebmon
@@ -794,9 +769,6 @@
 		basic_machine=m68k-isi
 		os=-sysv
 		;;
-	leon-*|leon[3-9]-*)
-		basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
-		;;
 	m68knommu)
 		basic_machine=m68k-unknown
 		os=-linux
@@ -824,7 +796,7 @@
 		os=-mingw64
 		;;
 	mingw32)
-		basic_machine=i686-pc
+		basic_machine=i386-pc
 		os=-mingw32
 		;;
 	mingw32ce)
@@ -852,10 +824,6 @@
 		basic_machine=powerpc-unknown
 		os=-morphos
 		;;
-	moxiebox)
-		basic_machine=moxie-unknown
-		os=-moxiebox
-		;;
 	msdos)
 		basic_machine=i386-pc
 		os=-msdos
@@ -864,7 +832,7 @@
 		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
 		;;
 	msys)
-		basic_machine=i686-pc
+		basic_machine=i386-pc
 		os=-msys
 		;;
 	mvs)
@@ -1032,7 +1000,7 @@
 	ppc-* | ppcbe-*)
 		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
-	ppcle | powerpclittle)
+	ppcle | powerpclittle | ppc-le | powerpc-little)
 		basic_machine=powerpcle-unknown
 		;;
 	ppcle-* | powerpclittle-*)
@@ -1042,7 +1010,7 @@
 		;;
 	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
-	ppc64le | powerpc64little)
+	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
 		basic_machine=powerpc64le-unknown
 		;;
 	ppc64le-* | powerpc64little-*)
@@ -1386,30 +1354,29 @@
 	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
 	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
 	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
-	      | -sym* | -kopensolaris* | -plan9* \
+	      | -sym* | -kopensolaris* \
 	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
-	      | -aos* | -aros* | -cloudabi* | -sortix* \
+	      | -aos* | -aros* \
 	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
 	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
 	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
-	      | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
+	      | -bitrig* | -openbsd* | -solidbsd* \
 	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
 	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
 	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
 	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
-	      | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \
+	      | -chorusos* | -chorusrdb* | -cegcc* \
 	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-	      | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+	      | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
 	      | -linux-newlib* | -linux-musl* | -linux-uclibc* \
-	      | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
+	      | -uxpv* | -beos* | -mpeix* | -udk* \
 	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
 	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
 	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
 	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
 	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
 	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
-	      | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox*)
+	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
 	# Remember, each alternative MUST END IN *, to match a version number.
 		;;
 	-qnx*)
@@ -1533,6 +1500,9 @@
 	-aros*)
 		os=-aros
 		;;
+	-kaos*)
+		os=-kaos
+		;;
 	-zvmoe)
 		os=-zvmoe
 		;;
@@ -1541,8 +1511,6 @@
 		;;
 	-nacl*)
 		;;
-	-ios)
-		;;
 	-none)
 		;;
 	*)
@@ -1583,9 +1551,6 @@
 	c4x-* | tic4x-*)
 		os=-coff
 		;;
-	c8051-*)
-		os=-elf
-		;;
 	hexagon-*)
 		os=-elf
 		;;
@@ -1638,9 +1603,6 @@
 	sparc-* | *-sun)
 		os=-sunos4.1.1
 		;;
-	pru-*)
-		os=-elf
-		;;
 	*-be)
 		os=-beos
 		;;
--- a/external/bsd/file/dist/configure	Wed Apr 18 01:39:14 2018 +0000
+++ b/external/bsd/file/dist/configure	Sun Apr 22 07:20:06 2018 +0000
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for file 5.32.
+# Generated by GNU Autoconf 2.69 for file 5.33.
 #
 # Report bugs to <christos@astron.com>.
 #
@@ -590,8 +590,8 @@
 # Identity of this package.
 PACKAGE_NAME='file'
 PACKAGE_TARNAME='file'
-PACKAGE_VERSION='5.32'
-PACKAGE_STRING='file 5.32'
+PACKAGE_VERSION='5.33'
+PACKAGE_STRING='file 5.33'
 PACKAGE_BUGREPORT='christos@astron.com'
 PACKAGE_URL=''
 
@@ -638,8 +638,6 @@
 IS_CROSS_COMPILE_FALSE
 IS_CROSS_COMPILE_TRUE
 LIBOBJS
-HAVE_VISIBILITY
-CFLAG_VISIBILITY
 OTOOL64
 OTOOL
 LIPO
@@ -771,6 +769,7 @@
 enable_elf
 enable_elf_core
 enable_zlib
+enable_libseccomp
 enable_fsect_man5
 enable_dependency_tracking
 enable_static
@@ -1332,7 +1331,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures file 5.32 to adapt to many kinds of systems.
+\`configure' configures file 5.33 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1402,7 +1401,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of file 5.32:";;
+     short | recursive ) echo "Configuration of file 5.33:";;
    esac
   cat <<\_ACEOF
 
@@ -1418,6 +1417,7 @@
   --disable-elf            disable builtin ELF support
   --disable-elf-core       disable ELF core file support
   --disable-zlib          disable zlib compression support [default=auto]
+  --disable-libseccomp    disable libseccomp sandboxing [default=auto]
   --enable-fsect-man5      enable file formats in man section 5
   --enable-dependency-tracking
                           do not reject slow dependency extractors
@@ -1516,7 +1516,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-file configure 5.32
+file configure 5.33
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2172,7 +2172,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by file $as_me 5.32, which was
+It was created by file $as_me 5.33, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2523,7 +2523,7 @@
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
-am__api_version='1.15'
+am__api_version='1.13'
 
 ac_aux_dir=
 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
@@ -2724,8 +2724,8 @@
 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
 
-# Expand $ac_aux_dir to an absolute path.
-am_aux_dir=`cd "$ac_aux_dir" && pwd`
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
 
 if test x"${MISSING+set}" != xset; then
   case $am_aux_dir in
@@ -2744,7 +2744,7 @@
 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
 fi
 
-if test x"${install_sh+set}" != xset; then
+if test x"${install_sh}" != xset; then
   case $am_aux_dir in
   *\ * | *\	*)
     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
@@ -3060,7 +3060,7 @@
 
 # Define the identity of the package.
  PACKAGE='file'
- VERSION='5.32'
+ VERSION='5.33'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -3094,65 +3094,18 @@
 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
 mkdir_p='$(MKDIR_P)'
 
-# We need awk for the "check" target (and possibly the TAP driver).  The
-# system "awk" is bad on some platforms.
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
 # Always define AMTAR for backward compatibility.  Yes, it's still used
 # in the wild :-(  We should find a proper way to deprecate it ...
 AMTAR='$${TAR-tar}'
 
-
-# We'll loop over all known methods to create a tar archive until one works.
-_am_tools='gnutar  pax cpio none'
-
 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
 
 
 
 
 
-
-# POSIX will say in a future version that running "rm -f" with no argument
-# is OK; and we want to be able to make that assumption in our Makefile
-# recipes.  So use an aggressive probe to check that the usage we want is
-# actually supported "in the wild" to an acceptable degree.
-# See automake bug#10828.
-# To make any issue more visible, cause the running configure to be aborted
-# by default if the 'rm' program in use doesn't match our expectations; the
-# user can still override this though.
-if rm -f && rm -fr && rm -rf; then : OK; else
-  cat >&2 <<'END'
-Oops!
-
-Your 'rm' program seems unable to run without file operands specified
-on the command line, even when the '-f' option is present.  This is contrary
-to the behaviour of most rm programs out there, and not conforming with
-the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
-
-Please tell bug-automake@gnu.org about your system, including the value
-of your $PATH and any error possibly output before this message.  This
-can help us improve future automake versions.
-
-END
-  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
-    echo 'Configuration will proceed anyway, since you have set the' >&2
-    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
-    echo >&2
-  else
-    cat >&2 <<'END'
-Aborting the configuration process, to ensure you take notice of the issue.
-
-You can download and install GNU coreutils to get an 'rm' implementation
-that behaves properly: <http://www.gnu.org/software/coreutils/>.
-
-If you want to complete the configuration process using your problematic
-'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
-to "yes", and re-run configure.
-
-END
-    as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
-  fi
-fi
-
 # Check whether --enable-silent-rules was given.
 if test "${enable_silent_rules+set}" = set; then :
   enableval=$enable_silent_rules;
@@ -3259,6 +3212,16 @@
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_zlib" >&5
 $as_echo "$enable_zlib" >&6; }
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libseccomp support" >&5
+$as_echo_n "checking for libseccomp support... " >&6; }
+# Check whether --enable-libseccomp was given.
+if test "${enable_libseccomp+set}" = set; then :
+  enableval=$enable_libseccomp;
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_libseccomp" >&5
+$as_echo "$enable_libseccomp" >&6; }
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file formats in man section 5" >&5
 $as_echo_n "checking for file formats in man section 5... " >&6; }
 # Check whether --enable-fsect-man5 was given.
@@ -4237,65 +4200,6 @@
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
-$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
-if ${am_cv_prog_cc_c_o+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-  # Make sure it works both with $CC and with simple cc.
-  # Following AC_PROG_CC_C_O, we do the test twice because some
-  # compilers refuse to overwrite an existing .o file with -o,
-  # though they will create one.
-  am_cv_prog_cc_c_o=yes
-  for am_i in 1 2; do
-    if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
-   ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
-   ac_status=$?
-   echo "$as_me:$LINENO: \$? = $ac_status" >&5
-   (exit $ac_status); } \
-         && test -f conftest2.$ac_objext; then
-      : OK
-    else
-      am_cv_prog_cc_c_o=no
-      break
-    fi
-  done
-  rm -f core conftest*
-  unset am_i
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
-$as_echo "$am_cv_prog_cc_c_o" >&6; }
-if test "$am_cv_prog_cc_c_o" != yes; then
-   # Losing compiler, so override with the script.
-   # FIXME: It is wrong to rewrite CC.
-   # But if we don't then we get into trouble of one sort or another.
-   # A longer-term fix would be to have automake use am__CC in this case,
-   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
-   CC="$am_aux_dir/compile $CC"
-fi
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
 depcc="$CC"   am_compiler_list=
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
@@ -5175,6 +5079,131 @@
   $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
 
 
+if test "x$CC" != xcc; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
+$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
+$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
+fi
+set dummy $CC; ac_cc=`$as_echo "$2" |
+		      sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+# Make sure it works both with $CC and with simple cc.
+# We do the test twice because some compilers refuse to overwrite an
+# existing .o file with -o, though they will create one.
+ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+rm -f conftest2.*
+if { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } &&
+   test -f conftest2.$ac_objext && { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; };
+then
+  eval ac_cv_prog_cc_${ac_cc}_c_o=yes
+  if test "x$CC" != xcc; then
+    # Test first that cc exists at all.
+    if { ac_try='cc -c conftest.$ac_ext >&5'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then
+      ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+      rm -f conftest2.*
+      if { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } &&
+	 test -f conftest2.$ac_objext && { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; };
+      then
+	# cc works too.
+	:
+      else
+	# cc exists but doesn't like -o.
+	eval ac_cv_prog_cc_${ac_cc}_c_o=no
+      fi
+    fi
+  fi
+else
+  eval ac_cv_prog_cc_${ac_cc}_c_o=no
+fi
+rm -f core conftest*
+
+fi
+if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
+
+fi
+
+# FIXME: we rely on the cache variable name because
+# there is no other way.
+set dummy $CC
+am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
+if test "$am_t" != yes; then
+   # Losing compiler, so override with the script.
+   # FIXME: It is wrong to rewrite CC.
+   # But if we don't then we get into trouble of one sort or another.
+   # A longer-term fix would be to have automake use am__CC in this case,
+   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+   CC="$am_aux_dir/compile $CC"
+fi
+
 
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
@@ -12512,92 +12541,7 @@
 # Only expand once:
 
 
-
-
-  CFLAG_VISIBILITY=
-  HAVE_VISIBILITY=0
-  if test -n "$GCC"; then
-                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
-$as_echo_n "checking whether the -Werror option is usable... " >&6; }
-    if ${gl_cv_cc_vis_werror+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-      gl_save_CFLAGS="$CFLAGS"
-      CFLAGS="$CFLAGS -Werror"
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_cc_vis_werror=yes
-else
-  gl_cv_cc_vis_werror=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-      CFLAGS="$gl_save_CFLAGS"
-fi
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
-$as_echo "$gl_cv_cc_vis_werror" >&6; }
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
-$as_echo_n "checking for simple visibility declarations... " >&6; }
-    if ${gl_cv_cc_visibility+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-      gl_save_CFLAGS="$CFLAGS"
-      CFLAGS="$CFLAGS -fvisibility=hidden"
-                                    if test $gl_cv_cc_vis_werror = yes; then
-        CFLAGS="$CFLAGS -Werror"
-      fi
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-extern __attribute__((__visibility__("hidden"))) int hiddenvar;
-             extern __attribute__((__visibility__("default"))) int exportedvar;
-             extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
-             extern __attribute__((__visibility__("default"))) int exportedfunc (void);
-             void dummyfunc (void) {}
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_cc_visibility=yes
-else
-  gl_cv_cc_visibility=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-      CFLAGS="$gl_save_CFLAGS"
-fi
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
-$as_echo "$gl_cv_cc_visibility" >&6; }
-    if test $gl_cv_cc_visibility = yes; then
-      CFLAG_VISIBILITY="-fvisibility=hidden"
-      HAVE_VISIBILITY=1
-    fi
-  fi
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_VISIBILITY $HAVE_VISIBILITY
-_ACEOF
-
-
+gl_VISIBILITY
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
 $as_echo_n "checking for ANSI C header files... " >&6; }
 if ${ac_cv_header_stdc+:} false; then :
@@ -14490,6 +14434,53 @@
 fi
 
 fi
+if test "$enable_libseccomp" != "no"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for seccomp_init in -lseccomp" >&5
+$as_echo_n "checking for seccomp_init in -lseccomp... " >&6; }
+if ${ac_cv_lib_seccomp_seccomp_init+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lseccomp  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char seccomp_init ();
+int
+main ()
+{
+return seccomp_init ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_seccomp_seccomp_init=yes
+else
+  ac_cv_lib_seccomp_seccomp_init=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_seccomp_seccomp_init" >&5
+$as_echo "$ac_cv_lib_seccomp_seccomp_init" >&6; }
+if test "x$ac_cv_lib_seccomp_seccomp_init" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBSECCOMP 1
+_ACEOF
+
+  LIBS="-lseccomp $LIBS"
+
+fi
+
+fi
 if test "$MINGW" = 1; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for regexec in -lgnurx" >&5
 $as_echo_n "checking for regexec in -lgnurx... " >&6; }
@@ -15108,7 +15099,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by file $as_me 5.32, which was
+This file was extended by file $as_me 5.33, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -15174,7 +15165,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-file config.status 5.32
+file config.status 5.33
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
@@ -16236,7 +16227,7 @@
     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
     test -z "$DEPDIR" && continue
     am__include=`sed -n 's/^am__include = //p' < "$mf"`
-    test -z "$am__include" && continue
+    test -z "am__include" && continue
     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
     # Find all dependency output files, they are included files with
     # $(DEPDIR) in their names.  We invoke sed twice because it is the
--- a/external/bsd/file/dist/configure.ac	Wed Apr 18 01:39:14 2018 +0000
+++ b/external/bsd/file/dist/configure.ac	Sun Apr 22 07:20:06 2018 +0000
@@ -1,5 +1,5 @@
 dnl Process this file with autoconf to produce a configure script.
-AC_INIT([file],[5.32],[christos@astron.com])
+AC_INIT([file],[5.33],[christos@astron.com])
 AM_INIT_AUTOMAKE([subdir-objects foreign])
 AM_MAINTAINER_MODE(disable)
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
@@ -40,6 +40,11 @@
 [AS_HELP_STRING([--disable-zlib], [disable zlib compression support @<:@default=auto@:>@])])
 AC_MSG_RESULT($enable_zlib)
 
+AC_MSG_CHECKING(for libseccomp support)
+AC_ARG_ENABLE(libseccomp,
+[AS_HELP_STRING([--disable-libseccomp], [disable libseccomp sandboxing @<:@default=auto@:>@])])
+AC_MSG_RESULT($enable_libseccomp)
+
 AC_MSG_CHECKING(for file formats in man section 5)
 AC_ARG_ENABLE(fsect-man5,
 [  --enable-fsect-man5      enable file formats in man section 5],
@@ -159,6 +164,9 @@
 if test "$enable_zlib" != "no"; then
   AC_CHECK_LIB(z, gzopen)
 fi
+if test "$enable_libseccomp" != "no"; then
+    AC_CHECK_LIB(seccomp, seccomp_init)
+fi
 if test "$MINGW" = 1; then
   AC_CHECK_LIB(gnurx,regexec,,AC_MSG_ERROR([libgnurx is required to build file(1) with MinGW]))
 fi
--- a/external/bsd/file/dist/depcomp	Wed Apr 18 01:39:14 2018 +0000
+++ b/external/bsd/file/dist/depcomp	Sun Apr 22 07:20:06 2018 +0000
@@ -1,9 +1,9 @@
 #! /bin/sh
 # depcomp - compile a program generating dependencies as side-effects
 
-scriptversion=2013-05-30.07; # UTC
+scriptversion=2012-10-18.11; # UTC
 
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Copyright (C) 1999-2013 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -552,7 +552,6 @@
   G
   p
 }' >> "$depfile"
-  echo >> "$depfile" # make sure the fragment doesn't end with a backslash
   rm -f "$tmpdepfile"
   ;;
 
--- a/external/bsd/file/dist/doc/Makefile.in	Wed Apr 18 01:39:14 2018 +0000
+++ b/external/bsd/file/dist/doc/Makefile.in	Sun Apr 22 07:20:06 2018 +0000
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.13.1 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -14,61 +14,23 @@
 
 @SET_MAKE@
 VPATH = @srcdir@
-am__is_gnu_make = { \
-  if test -z '$(MAKELEVEL)'; then \
-    false; \
-  elif test -n '$(MAKE_HOST)'; then \
-    true; \
-  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
-    true; \
-  else \
-    false; \
-  fi; \
-}
-am__make_running_with_option = \
-  case $${target_option-} in \
-      ?) ;; \
-      *) echo "am__make_running_with_option: internal error: invalid" \
-              "target option '$${target_option-}' specified" >&2; \
-         exit 1;; \
-  esac; \
-  has_opt=no; \
-  sane_makeflags=$$MAKEFLAGS; \
-  if $(am__is_gnu_make); then \
-    sane_makeflags=$$MFLAGS; \
-  else \
+am__make_dryrun = \
+  { \
+    am__dry=no; \
     case $$MAKEFLAGS in \
       *\\[\ \	]*) \
-        bs=\\; \
-        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
-          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
     esac; \
-  fi; \
-  skip_next=no; \
-  strip_trailopt () \
-  { \
-    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
-  }; \
-  for flg in $$sane_makeflags; do \
-    test $$skip_next = yes && { skip_next=no; continue; }; \
-    case $$flg in \
-      *=*|--*) continue;; \
-        -*I) strip_trailopt 'I'; skip_next=yes;; \
-      -*I?*) strip_trailopt 'I';; \
-        -*O) strip_trailopt 'O'; skip_next=yes;; \
-      -*O?*) strip_trailopt 'O';; \
-        -*l) strip_trailopt 'l'; skip_next=yes;; \
-      -*l?*) strip_trailopt 'l';; \
-      -[dEDm]) skip_next=yes;; \
-      -[JT]) skip_next=yes;; \
-    esac; \
-    case $$flg in \
-      *$$target_option*) has_opt=yes; break;; \
-    esac; \
-  done; \
-  test $$has_opt = yes
-am__make_dryrun = (target_option=n; $(am__make_running_with_option))
-am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+    test $$am__dry = yes; \
+  }
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
 pkglibexecdir = $(libexecdir)/@PACKAGE@
@@ -87,6 +49,7 @@
 build_triplet = @build@
 host_triplet = @host@
 subdir = doc
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
 	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
@@ -94,7 +57,6 @@
 	$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
-DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -119,7 +81,6 @@
     *) (install-info --version) >/dev/null 2>&1;; \
   esac
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
-am__DIST_COMMON = $(srcdir)/Makefile.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 pkgdatadir = @pkgdatadir@
 ACLOCAL = @ACLOCAL@
@@ -133,7 +94,6 @@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
-CFLAG_VISIBILITY = @CFLAG_VISIBILITY@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
@@ -149,7 +109,6 @@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
 GREP = @GREP@
-HAVE_VISIBILITY = @HAVE_VISIBILITY@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -257,6 +216,7 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --foreign doc/Makefile
+.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -431,8 +391,6 @@
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 	tags-am uninstall uninstall-am
 
-.PRECIOUS: Makefile
-
 
 #MAGIC	 = $(pkgdatadir)/magic
 #man_MAGIC = magic.5
--- a/external/bsd/file/dist/doc/file.1	Wed Apr 18 01:39:14 2018 +0000
+++ b/external/bsd/file/dist/doc/file.1	Sun Apr 22 07:20:06 2018 +0000
@@ -1,7 +1,7 @@
-.\"	$NetBSD: file.1,v 1.20 2017/09/08 13:40:25 christos Exp $
+.\"	$NetBSD: file.1,v 1.20.2.1 2018/04/22 07:20:08 pgoyette Exp $
 .\"
-.\" $File: file.man,v 1.125 2017/01/03 11:24:46 christos Exp $
-.Dd October 19, 2016
+.\" $File: file.man,v 1.129 2018/03/02 16:17:54 christos Exp $
+.Dd March 2, 2018
 .Dt FILE 1
 .Os
 .Sh NAME
@@ -10,7 +10,7 @@
 .Sh SYNOPSIS
 .Nm
 .Bk -words
-.Op Fl bcdEhiklLNnprsvzZ0
+.Op Fl bcdEhiklLNnprsSvzZ0
 .Op Fl Fl apple
 .Op Fl Fl extension
 .Op Fl Fl mime-encoding
@@ -28,7 +28,7 @@
 .Nm
 .Op Fl Fl help
 .Sh DESCRIPTION
-This manual page documents version 5.32 of the
+This manual page documents version 5.33 of the
 .Nm
 command.
 .Pp
@@ -170,7 +170,8 @@
 .Bl -tag -width indent
 .It Fl Fl apple
 Causes the file command to output the file type and creator code as
-used by older MacOS versions. The code consists of eight letters,
+used by older MacOS versions.
+The code consists of eight letters,
 the first describing the file type, the latter the creator.
 .It Fl b , Fl Fl brief
 Do not prepend filenames to output lines (brief mode).
@@ -217,12 +218,14 @@
 .It soft
 Consults magic files.
 .It tar
-Examines tar files.
+Examines tar files by verifying the checksum of the 512 byte tar header.
+Excluding this test can provide more detailed content description by using
+the soft magic method.
 .It text
 A synonym for
 .Sq ascii .
 .El
-.It Fl Fl extension 
+.It Fl Fl extension
 Print a slash-separated list of valid extensions for the file type found.
 .It Fl F , Fl Fl separator Ar separator
 Use the specified string as the separator between the filename and the
@@ -352,6 +355,16 @@
 to disregard the file size as reported by
 .Xr stat 2
 since on some systems it reports a zero size for raw disk partitions.
+.If Fl S , Fl Fl no-sandbox
+On systems where libseccomp
+.Pa ( https://github.com/seccomp/libseccomp )
+is available, the
+.Fl S
+flag disables sandboxing which is enabled by default.
+This option is needed for file to execute external descompressing programs,
+i.e. when the
+.Fl z
+flag is specified and the built-in decompressors are not available.
 .It Fl v , Fl Fl version
 Print the version of the program and exit.
 .It Fl z , Fl Fl uncompress
@@ -368,20 +381,13 @@
 the output.
 This does not affect the separator, which is still printed.
 .Pp
-If this option is repeated more than once, then 
+If this option is repeated more than once, then
 .Nm
 prints just the filename followed by a NUL followed by the description
 (or ERROR: text) followed by a second NUL for each entry.
 .It Fl -help
 Print a help message and exit.
 .El
-.Sh FILES
-.Bl -tag -width /usr/share/misc/magic.mgc -compact
-.It Pa /usr/share/misc/magic.mgc
-Default compiled list of magic.
-.It Pa /usr/share/misc/magic
-Directory containing default magic files.
-.El
 .Sh ENVIRONMENT
 The environment variable
 .Ev MAGIC
@@ -394,11 +400,6 @@
 adds
 .Dq Pa .mgc
 to the value of this variable as appropriate.
-However,
-.Pa file
-has to exist in order for
-.Pa file.mime
-to be considered.
 The environment variable
 .Ev POSIXLY_CORRECT
 controls (on systems that support symbolic links), whether
@@ -412,6 +413,65 @@
 and
 .Fl h
 options.
+.Sh FILES
+.Bl -tag -width /usr/share/misc/magic.mgc -compact
+.It Pa /usr/share/misc/magic.mgc
+Default compiled list of magic.
+.It Pa /usr/share/misc/magic
+Directory containing default magic files.
+.El
+.Sh EXIT STATUS
+.Nm
+will exit with
+.Dv 0
+if the operation was successful or
+.Dv >0
+if an error was encountered.
+The following errors cause diagnostic messages, but don't affect the program
+exit code (as POSIX requires), unless
+.Fl E
+is specified:
+.Bl -bullet -compact -offset indent
+.It
+A file cannot be found
+.It
+There is no permission to read a file
+.It
+The file type cannot be determined
+.El
+.Sh EXAMPLES
+.Bd -literal -offset indent
+$ file file.c file /dev/{wd0a,hda}
+file.c:   C program text
+file:     ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV),
+          dynamically linked (uses shared libs), stripped
+/dev/wd0a: block special (0/0)
+/dev/hda: block special (3/0)
+
+$ file -s /dev/wd0{b,d}
+/dev/wd0b: data
+/dev/wd0d: x86 boot sector
+
+$ file -s /dev/hda{,1,2,3,4,5,6,7,8,9,10}
+/dev/hda:   x86 boot sector
+/dev/hda1:  Linux/i386 ext2 filesystem
+/dev/hda2:  x86 boot sector
+/dev/hda3:  x86 boot sector, extended partition table
+/dev/hda4:  Linux/i386 ext2 filesystem
+/dev/hda5:  Linux/i386 swap file
+/dev/hda6:  Linux/i386 swap file
+/dev/hda7:  Linux/i386 swap file
+/dev/hda8:  Linux/i386 swap file
+/dev/hda9:  empty
+/dev/hda10: empty
+
+$ file -i file.c file /dev/{wd0a,hda}
+file.c:      text/x-c
+file:        application/x-executable
+/dev/hda:    application/x-not-regular-file
+/dev/wd0a:   application/x-not-regular-file
+
+.Ed
 .Sh SEE ALSO
 .Xr hexdump 1 ,
 .Xr od 1 ,
@@ -463,6 +523,23 @@
 .Bd -literal -offset indent
 \*[Gt]16	long\*[Am]0x7fffffff	\*[Gt]0		not stripped
 .Ed
+.Sh SECURITY
+On systems where libseccomp
+.Pa ( https://github.com/seccomp/libseccomp )
+is available,
+.Nm
+is enforces limiting system calls to only the ones necessary for the
+operation of the program.
+This enforcement does not provide any security benefit when
+.Nm
+is asked to decompress input files running external programs with
+the
+.Fl z
+option.
+To enable execution of external decompressors, one needs to disable
+sandboxing using the
+.Fl S
+flag.
 .Sh MAGIC DIRECTORY
 The magic file entries have been collected from various sources,
 mainly USENET, and contributed by various authors.
@@ -480,39 +557,6 @@
 keep the old magic file around for comparison purposes
 (rename it to
 .Pa /usr/share/misc/magic.orig ) .
-.Sh EXAMPLES
-.Bd -literal -offset indent
-$ file file.c file /dev/{wd0a,hda}
-file.c:   C program text
-file:     ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV),
-          dynamically linked (uses shared libs), stripped
-/dev/wd0a: block special (0/0)
-/dev/hda: block special (3/0)
-
-$ file -s /dev/wd0{b,d}
-/dev/wd0b: data
-/dev/wd0d: x86 boot sector
-
-$ file -s /dev/hda{,1,2,3,4,5,6,7,8,9,10}
-/dev/hda:   x86 boot sector
-/dev/hda1:  Linux/i386 ext2 filesystem
-/dev/hda2:  x86 boot sector
-/dev/hda3:  x86 boot sector, extended partition table
-/dev/hda4:  Linux/i386 ext2 filesystem
-/dev/hda5:  Linux/i386 swap file
-/dev/hda6:  Linux/i386 swap file
-/dev/hda7:  Linux/i386 swap file
-/dev/hda8:  Linux/i386 swap file
-/dev/hda9:  empty
-/dev/hda10: empty
-
-$ file -i file.c file /dev/{wd0a,hda}
-file.c:      text/x-c
-file:        application/x-executable
-/dev/hda:    application/x-not-regular-file
-/dev/wd0a:   application/x-not-regular-file
-
-.Ed
 .Sh HISTORY
 There has been a
 .Nm
@@ -584,9 +628,6 @@
 were written by John Gilmore from his public-domain
 .Xr tar 1
 program, and are not covered by the above license.
-.Sh RETURN CODE
-.Nm
-returns 0 on success, and non-zero on error.
 .Sh BUGS
 Please report bugs and send patches to the bug tracker at
 .Pa http://bugs.gw.com/
--- a/external/bsd/file/dist/doc/magic.5	Wed Apr 18 01:39:14 2018 +0000
+++ b/external/bsd/file/dist/doc/magic.5	Sun Apr 22 07:20:06 2018 +0000
@@ -1,7 +1,7 @@
-.\"	$NetBSD: magic.5,v 1.17 2017/09/08 13:40:25 christos Exp $
+.\"	$NetBSD: magic.5,v 1.17.2.1 2018/04/22 07:20:08 pgoyette Exp $
 .\"
-.\" $File: magic.man,v 1.91 2017/02/12 15:30:08 christos Exp $
-.Dd February 12, 2017
+.\" $File: magic.man,v 1.92 2017/11/04 01:11:32 christos Exp $
+.Dd Noveber 3, 2017
 .Dt MAGIC 5
 .Os
 .\" install as magic.4 on USG, magic.5 on V7, Berkeley and Linux systems.
@@ -12,7 +12,7 @@
 This manual page documents the format of magic files as
 used by the
 .Xr file 1
-command, version 5.32.
+command, version 5.33.
 The
 .Xr file 1
 command identifies the type of a file using,
@@ -38,8 +38,20 @@
 The line consists of the following fields:
 .Bl -tag -width ".Dv message"
 .It Dv offset
-A number specifying the offset, in bytes, into the file of the data
+A number specifying the offset (in bytes) into the file of the data
 which is to be tested.
+This offset can be a negative number if it is:
+.Bl -bullet  -compact
+.It
+The first direct offset of the magic entry (at continuation level 0),
+in which case it is interpreted an offset from end end of the file
+going backwards.
+This works only when a file descriptor to the file is a available and it
+is a regular file.
+.It
+A continuation offset relative to the end of the last up-level field
+.Dv ( \*[Am] ) .
+.El
 .It Dv type
 The type of the data to be tested.
 The possible values are:
--- a/external/bsd/file/dist/install-sh	Wed Apr 18 01:39:14 2018 +0000
+++ b/external/bsd/file/dist/install-sh	Sun Apr 22 07:20:06 2018 +0000
@@ -1,301 +1,527 @@
 #!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2011-11-20.07; # UTC
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
 #
-# $NetBSD: install-sh,v 1.10 2014/10/20 22:04:31 christos Exp $
-# This script now also installs multiple files, but might choke on installing
-# multiple files with spaces in the file names.
+# Copyright (C) 1994 X Consortium
 #
-# install - install a program, script, or datafile
-# This comes from X11R5 (mit/util/scripts/install.sh).
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
 #
-# Copyright 1991 by the Massachusetts Institute of Technology
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
 #
-# Permission to use, copy, modify, distribute, and sell this software and its
-# documentation for any purpose is hereby granted without fee, provided that
-# the above copyright notice appear in all copies and that both that
-# copyright notice and this permission notice appear in supporting
-# documentation, and that the name of M.I.T. not be used in advertising or
-# publicity pertaining to distribution of the software without specific,
-# written prior permission.  M.I.T. makes no representations about the
-# suitability of this software for any purpose.  It is provided "as is"
-# without express or implied warranty.
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
 #
 # Calling this script install-sh is preferred over install.sh, to prevent
-# `make' implicit rules from creating a file called install from it
+# 'make' implicit rules from creating a file called install from it
 # when there is no Makefile.
 #
 # This script is compatible with the BSD install script, but was written
 # from scratch.
 
+nl='
+'
+IFS=" ""	$nl"
+
 # set DOITPROG to echo to test this script
 
 # Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
+doit=${DOITPROG-}
+if test -z "$doit"; then
+  doit_exec=exec
+else
+  doit_exec=$doit
+fi
 
-
-# put in absolute paths if you don't have them in your path; or use env. vars.
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
 
-awkprog="${AWKPROG-awk}"
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
 
-instcmd="$cpprog"
-instflags=""
-pathcompchmodcmd="$chmodprog 755"
-chmodcmd="$chmodprog 755"
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
-stripflags=""
+posix_glob='?'
+initialize_posix_glob='
+  test "$posix_glob" != "?" || {
+    if (set -f) 2>/dev/null; then
+      posix_glob=
+    else
+      posix_glob=:
+    fi
+  }
+'
+
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
+
+chgrpcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
 rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=""
-msrc=""
-dst=""
-dir_arg=""
-suffix=""
-suffixfmt=""
+stripcmd=
+
+src=
+dst=
+dir_arg=
+dst_arg=
+
+copy_on_change=false
+no_target_directory=
 
-while [ x"$1" != x ]; do
-    case $1 in
-	-b) suffix=".old"
-	    shift
-	    continue;;
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+   or: $0 [OPTION]... SRCFILES... DIRECTORY
+   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+   or: $0 [OPTION]... -d DIRECTORIES...
 
-	-B) suffixfmt="$2"
-	    shift
-	    shift
-	    continue;;
-
-	-c) instcmd="$cpprog"
-	    shift
-	    continue;;
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
 
-	-d) dir_arg=true
-	    shift
-	    continue;;
+Options:
+     --help     display this help and exit.
+     --version  display version info and exit.
 
-	-m) chmodcmd="$chmodprog $2"
-	    shift
-	    shift
-	    continue;;
+  -c            (ignored)
+  -C            install only if different (preserve the last data modification time)
+  -d            create directories instead of installing files.
+  -g GROUP      $chgrpprog installed files to GROUP.
+  -m MODE       $chmodprog installed files to MODE.
+  -o USER       $chownprog installed files to USER.
+  -s            $stripprog installed files.
+  -t DIRECTORY  install into DIRECTORY.
+  -T            report an error if DSTFILE is a directory.
 
-	-m*)
-	    chmodcmd="$chmodprog ${1#-m}"
-	    shift
-	    continue;;
+Environment variables override the default commands:
+  CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+  RMPROG STRIPPROG
+"
+
+while test $# -ne 0; do
+  case $1 in
+    -c) ;;
 
-	-o) chowncmd="$chownprog $2"
-	    shift
-	    shift
-	    continue;;
+    -C) copy_on_change=true;;
+
+    -d) dir_arg=true;;
 
-	-g) chgrpcmd="$chgrpprog $2"
-	    shift
-	    shift
-	    continue;;
+    -g) chgrpcmd="$chgrpprog $2"
+	shift;;
+
+    --help) echo "$usage"; exit $?;;
 
-	-s) stripcmd="$stripprog"
-	    shift
-	    continue;;
+    -m) mode=$2
+	case $mode in
+	  *' '* | *'	'* | *'
+'*	  | *'*'* | *'?'* | *'['*)
+	    echo "$0: invalid mode: $mode" >&2
+	    exit 1;;
+	esac
+	shift;;
 
-	-S) stripcmd="$stripprog"
-	    stripflags="-S $2 $stripflags"
-	    shift
-	    shift
-	    continue;;
+    -o) chowncmd="$chownprog $2"
+	shift;;
+
+    -s) stripcmd=$stripprog;;
 
-	-p) instflags="-p"
-	    shift
-	    continue;;
+    -t) dst_arg=$2
+	# Protect names problematic for 'test' and other utilities.
+	case $dst_arg in
+	  -* | [=\(\)!]) dst_arg=./$dst_arg;;
+	esac
+	shift;;
+
+    -T) no_target_directory=true;;
 
-	*)  if [ x"$msrc" = x ]
-	    then
-		msrc="$dst"
-	    else
-		msrc="$msrc $dst"
-	    fi
-	    src="$dst"
-	    dst="$1"
-	    shift
-	    continue;;
-    esac
+    --version) echo "$0 $scriptversion"; exit $?;;
+
+    --)	shift
+	break;;
+
+    -*)	echo "$0: invalid option: $1" >&2
+	exit 1;;
+
+    *)  break;;
+  esac
+  shift
 done
 
-if [ x"$dir_arg" = x ]
-then
-	dstisfile=""
-	if [ ! -d "$dst" ]
-	then
-		if [ x"$msrc" = x"$src" ]
-		then
-			dstisfile=true
-		else
-			echo "install: destination is not a directory"
-			exit 1
-		fi
-	fi
-else
-	msrc="$msrc $dst"
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+  # When -d is used, all remaining arguments are directories to create.
+  # When -t is used, the destination is already specified.
+  # Otherwise, the last argument is the destination.  Remove it from $@.
+  for arg
+  do
+    if test -n "$dst_arg"; then
+      # $@ is not empty: it contains at least $arg.
+      set fnord "$@" "$dst_arg"
+      shift # fnord
+    fi
+    shift # arg
+    dst_arg=$arg
+    # Protect names problematic for 'test' and other utilities.
+    case $dst_arg in
+      -* | [=\(\)!]) dst_arg=./$dst_arg;;
+    esac
+  done
+fi
+
+if test $# -eq 0; then
+  if test -z "$dir_arg"; then
+    echo "$0: no input file specified." >&2
+    exit 1
+  fi
+  # It's OK to call 'install-sh -d' without argument.
+  # This can happen when creating conditional directories.
+  exit 0
+fi
+
+if test -z "$dir_arg"; then
+  do_exit='(exit $ret); exit $ret'
+  trap "ret=129; $do_exit" 1
+  trap "ret=130; $do_exit" 2
+  trap "ret=141; $do_exit" 13
+  trap "ret=143; $do_exit" 15
+
+  # Set umask so as not to create temps with too-generous modes.
+  # However, 'strip' requires both read and write access to temps.
+  case $mode in
+    # Optimize common cases.
+    *644) cp_umask=133;;
+    *755) cp_umask=22;;
+
+    *[0-7])
+      if test -z "$stripcmd"; then
+	u_plus_rw=
+      else
+	u_plus_rw='% 200'
+      fi
+      cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+    *)
+      if test -z "$stripcmd"; then
+	u_plus_rw=
+      else
+	u_plus_rw=,u+rw
+      fi
+      cp_umask=$mode$u_plus_rw;;
+  esac
 fi
 
-if [ x"$msrc" = x ]
-then
-	echo "install: no destination specified"
-	exit 1
-fi      
-
-for srcarg in $msrc; do
+for src
+do
+  # Protect names problematic for 'test' and other utilities.
+  case $src in
+    -* | [=\(\)!]) src=./$src;;
+  esac
 
-if [ x"$dir_arg" != x ]; then
-
-	dstarg="$srcarg"
-else
-	dstarg="$dst"
-
-# Waiting for this to be detected by the "$instcmd $srcarg $dsttmp" command
-# might cause directories to be created, which would be especially bad 
-# if $src (and thus $dsttmp) contains '*'.
+  if test -n "$dir_arg"; then
+    dst=$src
+    dstdir=$dst
+    test -d "$dstdir"
+    dstdir_status=$?
+  else
 
-	if [ -f "$srcarg" ]
-	then
-		doinst="$instcmd $instflags"
-	elif [ -d "$srcarg" ]
-	then
-		echo "install: $srcarg: not a regular file"
-		exit 1
-	elif [ "$srcarg" = "/dev/null" ]
-	then
-		doinst="$cpprog"
-	else
-		echo "install:  $srcarg does not exist"
-		exit 1
-	fi
-	
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
+    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+    # might cause directories to be created, which would be especially bad
+    # if $src (and thus $dsttmp) contains '*'.
+    if test ! -f "$src" && test ! -d "$src"; then
+      echo "$0: $src does not exist." >&2
+      exit 1
+    fi
+
+    if test -z "$dst_arg"; then
+      echo "$0: no destination specified." >&2
+      exit 1
+    fi
+    dst=$dst_arg
 
-	if [ -d "$dstarg" ]
-	then
-		dstarg="$dstarg"/`basename "$srcarg"`
-	fi
-fi
-
-## this sed command emulates the dirname command
-dstdir=`echo "$dstarg" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
-
-# Make sure that the destination directory exists.
-#  this part is taken from Noah Friedman's mkinstalldirs script
-
-# Skip lots of stat calls in the usual case.
-if [ ! -d "$dstdir" ]; then
-defaultIFS='	
-'
-IFS="${IFS-${defaultIFS}}"
+    # If destination is a directory, append the input filename; won't work
+    # if double slashes aren't ignored.
+    if test -d "$dst"; then
+      if test -n "$no_target_directory"; then
+	echo "$0: $dst_arg: Is a directory" >&2
+	exit 1
+      fi
+      dstdir=$dst
+      dst=$dstdir/`basename "$src"`
+      dstdir_status=0
+    else
+      # Prefer dirname, but fall back on a substitute if dirname fails.
+      dstdir=`
+	(dirname "$dst") 2>/dev/null ||
+	expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	     X"$dst" : 'X\(//\)[^/]' \| \
+	     X"$dst" : 'X\(//\)$' \| \
+	     X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+	echo X"$dst" |
+	    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\/\)[^/].*/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\/\)$/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\).*/{
+		   s//\1/
+		   q
+		 }
+		 s/.*/./; q'
+      `
 
-oIFS="${IFS}"
-# Some sh's can't handle IFS=/ for some reason.
-IFS='%'
-set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
-IFS="${oIFS}"
+      test -d "$dstdir"
+      dstdir_status=$?
+    fi
+  fi
 
-pathcomp=''
+  obsolete_mkdir_used=false
 
-while [ $# -ne 0 ] ; do
-	pathcomp="${pathcomp}${1}"
-	shift
+  if test $dstdir_status != 0; then
+    case $posix_mkdir in
+      '')
+	# Create intermediate dirs using mode 755 as modified by the umask.
+	# This is like FreeBSD 'install' as of 1997-10-28.
+	umask=`umask`
+	case $stripcmd.$umask in
+	  # Optimize common cases.
+	  *[2367][2367]) mkdir_umask=$umask;;
+	  .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
 
-	if [ ! -d "${pathcomp}" ] ;
-        then
-		$doit $mkdirprog "${pathcomp}"
-        	if [ x"$chowncmd" != x ]; then $doit $chowncmd "${pathcomp}"; else true ; fi &&
-        	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "${pathcomp}"; else true ; fi &&
-        	if [ x"$pathcompchmodcmd" != x ]; then $doit $pathcompchmodcmd "${pathcomp}"; else true ; fi
+	  *[0-7])
+	    mkdir_umask=`expr $umask + 22 \
+	      - $umask % 100 % 40 + $umask % 20 \
+	      - $umask % 10 % 4 + $umask % 2
+	    `;;
+	  *) mkdir_umask=$umask,go-w;;
+	esac
 
+	# With -d, create the new directory with the user-specified mode.
+	# Otherwise, rely on $mkdir_umask.
+	if test -n "$dir_arg"; then
+	  mkdir_mode=-m$mode
 	else
-		true
+	  mkdir_mode=
 	fi
 
-	pathcomp="${pathcomp}/"
-done
-fi
+	posix_mkdir=false
+	case $umask in
+	  *[123567][0-7][0-7])
+	    # POSIX mkdir -p sets u+wx bits regardless of umask, which
+	    # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+	    ;;
+	  *)
+	    tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+	    trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
 
-	if [ x"$dir_arg" != x ]
-	then
-		if [ -d "$dstarg" ]; then
-			true
-		else
-			$doit $mkdirprog "$dstarg" &&
+	    if (umask $mkdir_umask &&
+		exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+	    then
+	      if test -z "$dir_arg" || {
+		   # Check for POSIX incompatibilities with -m.
+		   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+		   # other-writable bit of parent directory when it shouldn't.
+		   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+		   ls_ld_tmpdir=`ls -ld "$tmpdir"`
+		   case $ls_ld_tmpdir in
+		     d????-?r-*) different_mode=700;;
+		     d????-?--*) different_mode=755;;
+		     *) false;;
+		   esac &&
+		   $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+		     ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+		     test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+		   }
+		 }
+	      then posix_mkdir=:
+	      fi
+	      rmdir "$tmpdir/d" "$tmpdir"
+	    else
+	      # Remove any dirs left behind by ancient mkdir implementations.
+	      rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+	    fi
+	    trap '' 0;;
+	esac;;
+    esac
 
-			if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dstarg"; else true ; fi &&
-			if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dstarg"; else true ; fi &&
-			if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dstarg"; else true ; fi
-		fi
-	else
+    if
+      $posix_mkdir && (
+	umask $mkdir_umask &&
+	$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+      )
+    then :
+    else
+
+      # The umask is ridiculous, or mkdir does not conform to POSIX,
+      # or it failed possibly due to a race condition.  Create the
+      # directory the slow way, step by step, checking for races as we go.
+
+      case $dstdir in
+	/*) prefix='/';;
+	[-=\(\)!]*) prefix='./';;
+	*)  prefix='';;
+      esac
+
+      eval "$initialize_posix_glob"
 
-		if [ x"$dstisfile" = x ]
-		then
-			file=$srcarg
-		else
-			file=$dst
-		fi
+      oIFS=$IFS
+      IFS=/
+      $posix_glob set -f
+      set fnord $dstdir
+      shift
+      $posix_glob set +f
+      IFS=$oIFS
+
+      prefixes=
+
+      for d
+      do
+	test X"$d" = X && continue
 
-		dstfile=`basename "$file"`
-		dstfinal="$dstdir/$dstfile"
-
-# Make a temp file name in the proper directory.
-
-		dsttmp=$dstdir/#inst.$$#
+	prefix=$prefix$d
+	if test -d "$prefix"; then
+	  prefixes=
+	else
+	  if $posix_mkdir; then
+	    (umask=$mkdir_umask &&
+	     $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+	    # Don't fail if two instances are running concurrently.
+	    test -d "$prefix" || exit 1
+	  else
+	    case $prefix in
+	      *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+	      *) qprefix=$prefix;;
+	    esac
+	    prefixes="$prefixes '$qprefix'"
+	  fi
+	fi
+	prefix=$prefix/
+      done
 
-# Make a backup file name in the proper directory.
-		case x$suffixfmt in
-		*%*)	suffix=`echo x |
-			$awkprog -v bname="$dstfinal" -v fmt="$suffixfmt" '
-			{ cnt = 0;
-			  do {
-				sfx = sprintf(fmt, cnt++);
-				name = bname sfx;
-			  } while (system("test -f " name) == 0);
-			  print sfx; }' -`;;
-		x)	;;
-		*)	suffix="$suffixfmt";;
-		esac
-		dstbackup="$dstfinal$suffix"
+      if test -n "$prefixes"; then
+	# Don't fail if two instances are running concurrently.
+	(umask $mkdir_umask &&
+	 eval "\$doit_exec \$mkdirprog $prefixes") ||
+	  test -d "$dstdir" || exit 1
+	obsolete_mkdir_used=true
+      fi
+    fi
+  fi
+
+  if test -n "$dir_arg"; then
+    { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+    { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+      test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+  else
+
+    # Make a couple of temp file names in the proper directory.
+    dsttmp=$dstdir/_inst.$$_
+    rmtmp=$dstdir/_rm.$$_
 
-# Move or copy the file name to the temp name
+    # Trap to clean up those temp files at exit.
+    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
 
-		$doit $doinst $srcarg "$dsttmp" &&
+    # Copy the file name to the temp name.
+    (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
 
-		trap "rm -f ${dsttmp}" 0 &&
+    # and set any options; do chmod last to preserve setuid bits.
+    #
+    # If any of these fail, we abort the whole thing.  If we want to
+    # ignore errors from any of these, just make sure not to ignore
+    # errors from the above "$doit $cpprog $src $dsttmp" command.
+    #
+    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+    { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+    { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
 
-# and set any options; do chmod last to preserve setuid bits
+    # If -C, don't bother to copy if it wouldn't change the file.
+    if $copy_on_change &&
+       old=`LC_ALL=C ls -dlL "$dst"	2>/dev/null` &&
+       new=`LC_ALL=C ls -dlL "$dsttmp"	2>/dev/null` &&
 
-# If any of these fail, we abort the whole thing.  If we want to
-# ignore errors from any of these, just make sure not to ignore
-# errors from the above "$doit $instcmd $src $dsttmp" command.
+       eval "$initialize_posix_glob" &&
+       $posix_glob set -f &&
+       set X $old && old=:$2:$4:$5:$6 &&
+       set X $new && new=:$2:$4:$5:$6 &&
+       $posix_glob set +f &&
 
-		if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else true;fi &&
-		if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else true;fi &&
-		if [ x"$stripcmd" != x ]; then $doit $stripcmd $stripflags "$dsttmp"; else true;fi &&
-		if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else true;fi &&
-
-# Now rename the file to the real destination.
+       test "$old" = "$new" &&
+       $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+    then
+      rm -f "$dsttmp"
+    else
+      # Rename the file to the real destination.
+      $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
 
-		if [ x"$suffix" != x ] && [ -f "$dstfinal" ]
-		then
-			$doit $mvcmd "$dstfinal" "$dstbackup"
-		else
-			$doit $rmcmd -f "$dstfinal"
-		fi &&
-		$doit $mvcmd "$dsttmp" "$dstfinal"
-	fi
+      # The rename failed, perhaps because mv can't rename something else
+      # to itself, or perhaps because mv is so ancient that it does not
+      # support -f.
+      {
+	# Now remove or move aside any old file at destination location.
+	# We try this two ways since rm can't unlink itself on some
+	# systems and the destination file might be busy for other
+	# reasons.  In this case, the final cleanup might fail but the new
+	# file should still install successfully.
+	{
+	  test ! -f "$dst" ||
+	  $doit $rmcmd -f "$dst" 2>/dev/null ||
+	  { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+	    { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+	  } ||
+	  { echo "$0: cannot unlink or rename $dst" >&2
+	    (exit 1); exit 1
+	  }
+	} &&
 
-done &&
+	# Now rename the file to the real destination.
+	$doit $mvcmd "$dsttmp" "$dst"
+      }
+    fi || exit 1
 
+    trap '' 0
+  fi
+done
 
-exit 0
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
--- a/external/bsd/file/dist/ltmain.sh	Wed Apr 18 01:39:14 2018 +0000
+++ b/external/bsd/file/dist/ltmain.sh	Sun Apr 22 07:20:06 2018 +0000
@@ -133,9 +133,8 @@
 # function.
 progpath="$0"
 
-unset CP
-unset MV
-unset RM
+
+
 : ${CP="cp -f"}
 test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
 : ${MAKE="make"}
@@ -6900,11 +6899,7 @@
 	    # Finalize command for both is simple: just hardcode it.
 	    if test "$hardcode_direct" = yes &&
 	       test "$hardcode_direct_absolute" = no; then
-	      if test -f "$inst_prefix_dir$libdir/$linklib"; then
-	        add="$inst_prefix_dir$libdir/$linklib"
-	      else
-	        add="$libdir/$linklib"
-	      fi
+	      add="$libdir/$linklib"
 	    elif test "$hardcode_minus_L" = yes; then
 	      add_dir="-L$libdir"
 	      add="-l$name"
@@ -7396,7 +7391,6 @@
 	# Calculate the version variables.
 	major=
 	versuffix=
-	versuffix2=
 	verstring=
 	case $version_type in
 	none) ;;
@@ -7457,7 +7451,6 @@
 	  func_arith $current - $age
 	  major=.$func_arith_result
 	  versuffix="$major.$age.$revision"
-	  versuffix2="$major.$age"
 	  ;;
 
 	osf)
@@ -7518,10 +7511,8 @@
 	  esac
 	  if test "$need_version" = no; then
 	    versuffix=
-	    versuffix2=
 	  else
 	    versuffix=".0.0"
-	    versuffix2=".0.0"
 	  fi
 	fi
 
@@ -7529,7 +7520,6 @@
 	if test "$avoid_version" = yes && test "$need_version" = no; then
 	  major=
 	  versuffix=
-	  versuffix2=
 	  verstring=""
 	fi
 
@@ -7640,7 +7630,7 @@
 	  *-*-netbsd*)
 	    # Don't link with libc until the a.out ld.so is fixed.
 	    ;;
-	  *-*-openbsd* | *-*-mirbsd* | *-*-freebsd* | *-*-dragonfly*)
+	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
 	    # Do not include libc due to us having libc/libc_r.
 	    ;;
 	  *-*-sco3.2v5* | *-*-sco5v6*)
@@ -7663,14 +7653,12 @@
 	libname_save=$libname
 	release_save=$release
 	versuffix_save=$versuffix
-	versuffix2_save=$versuffix2
 	major_save=$major
 	# I'm not sure if I'm treating the release correctly.  I think
 	# release should show up in the -l (ie -lgmp5) so we don't want to
 	# add it in twice.  Is that correct?
 	release=""
 	versuffix=""
-	versuffix2=""
 	major=""
 	newdeplibs=
 	droppeddeps=no
@@ -7947,7 +7935,6 @@
 	  ;;
 	esac
 	versuffix=$versuffix_save
-	versuffix2=$versuffix2_save
 	major=$major_save
 	release=$release_save
 	libname=$libname_save
@@ -9432,8 +9419,7 @@
 
 # Directory that this library needs to be installed in:
 libdir='$install_libdir'"
-	  if test "$installed" = no && test "$need_relink" = yes && \
-	     test -n "$relink_command"; then
+	  if test "$installed" = no && test "$need_relink" = yes; then
 	    $ECHO >> $output "\
 relink_command=\"$relink_command\""
 	  fi
--- a/external/bsd/file/dist/magic/Makefile.am	Wed Apr 18 01:39:14 2018 +0000
+++ b/external/bsd/file/dist/magic/Makefile.am	Sun Apr 22 07:20:06 2018 +0000
@@ -1,5 +1,5 @@
 #
-# $File: Makefile.am,v 1.126 2017/08/10 11:01:38 christos Exp $
+# $File: Makefile.am,v 1.132 2018/01/28 00:00:17 rrt Exp $
 #
 MAGIC_FRAGMENT_BASE = magdir
 MAGIC_DIR = $(top_srcdir)/magic
@@ -34,6 +34,7 @@
 $(MAGIC_FRAGMENT_DIR)/audio \
 $(MAGIC_FRAGMENT_DIR)/basis \
 $(MAGIC_FRAGMENT_DIR)/ber \
+$(MAGIC_FRAGMENT_DIR)/beetle \
 $(MAGIC_FRAGMENT_DIR)/bflt \
 $(MAGIC_FRAGMENT_DIR)/bhl \
 $(MAGIC_FRAGMENT_DIR)/bioinformatics \
@@ -71,6 +72,7 @@
 $(MAGIC_FRAGMENT_DIR)/cups \
 $(MAGIC_FRAGMENT_DIR)/dact \
 $(MAGIC_FRAGMENT_DIR)/database \
+$(MAGIC_FRAGMENT_DIR)/dbpf \
 $(MAGIC_FRAGMENT_DIR)/der \
 $(MAGIC_FRAGMENT_DIR)/diamond \
 $(MAGIC_FRAGMENT_DIR)/diff \
@@ -156,6 +158,7 @@
 $(MAGIC_FRAGMENT_DIR)/mathematica \
 $(MAGIC_FRAGMENT_DIR)/matroska \
 $(MAGIC_FRAGMENT_DIR)/mcrypt \
+$(MAGIC_FRAGMENT_DIR)/measure \
 $(MAGIC_FRAGMENT_DIR)/mercurial \
 $(MAGIC_FRAGMENT_DIR)/metastore \
 $(MAGIC_FRAGMENT_DIR)/meteorological \
@@ -222,6 +225,7 @@
 $(MAGIC_FRAGMENT_DIR)/qt \
 $(MAGIC_FRAGMENT_DIR)/revision \
 $(MAGIC_FRAGMENT_DIR)/riff \
+$(MAGIC_FRAGMENT_DIR)/rpi \
 $(MAGIC_FRAGMENT_DIR)/rpm \
 $(MAGIC_FRAGMENT_DIR)/rtf \
 $(MAGIC_FRAGMENT_DIR)/ruby \
@@ -258,6 +262,7 @@
 $(MAGIC_FRAGMENT_DIR)/tgif \
 $(MAGIC_FRAGMENT_DIR)/ti-8x \
 $(MAGIC_FRAGMENT_DIR)/timezone \
+$(MAGIC_FRAGMENT_DIR)/tplink \
 $(MAGIC_FRAGMENT_DIR)/troff \
 $(MAGIC_FRAGMENT_DIR)/tuxedo \
 $(MAGIC_FRAGMENT_DIR)/typeset \
@@ -293,6 +298,7 @@
 $(MAGIC_FRAGMENT_DIR)/yara \
 $(MAGIC_FRAGMENT_DIR)/zfs \
 $(MAGIC_FRAGMENT_DIR)/zilog \
+$(MAGIC_FRAGMENT_DIR)/zip \
 $(MAGIC_FRAGMENT_DIR)/zyxel 
 
 MAGIC = magic.mgc
--- a/external/bsd/file/dist/magic/Makefile.in	Wed Apr 18 01:39:14 2018 +0000
+++ b/external/bsd/file/dist/magic/Makefile.in	Sun Apr 22 07:20:06 2018 +0000
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.13.1 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -15,61 +15,23 @@
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = { \
-  if test -z '$(MAKELEVEL)'; then \
-    false; \
-  elif test -n '$(MAKE_HOST)'; then \
-    true; \
-  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
-    true; \
-  else \
-    false; \
-  fi; \
-}
-am__make_running_with_option = \
-  case $${target_option-} in \
-      ?) ;; \
-      *) echo "am__make_running_with_option: internal error: invalid" \
-              "target option '$${target_option-}' specified" >&2; \
-         exit 1;; \
-  esac; \
-  has_opt=no; \
-  sane_makeflags=$$MAKEFLAGS; \
-  if $(am__is_gnu_make); then \
-    sane_makeflags=$$MFLAGS; \
-  else \
+am__make_dryrun = \
+  { \
+    am__dry=no; \
     case $$MAKEFLAGS in \
       *\\[\ \	]*) \
-        bs=\\; \
-        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
-          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
     esac; \
-  fi; \
-  skip_next=no; \
-  strip_trailopt () \
-  { \
-    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
-  }; \
-  for flg in $$sane_makeflags; do \
-    test $$skip_next = yes && { skip_next=no; continue; }; \
-    case $$flg in \
-      *=*|--*) continue;; \
-        -*I) strip_trailopt 'I'; skip_next=yes;; \
-      -*I?*) strip_trailopt 'I';; \
-        -*O) strip_trailopt 'O'; skip_next=yes;; \
-      -*O?*) strip_trailopt 'O';; \
-        -*l) strip_trailopt 'l'; skip_next=yes;; \
-      -*l?*) strip_trailopt 'l';; \
-      -[dEDm]) skip_next=yes;; \
-      -[JT]) skip_next=yes;; \
-    esac; \
-    case $$flg in \
-      *$$target_option*) has_opt=yes; break;; \
-    esac; \
-  done; \
-  test $$has_opt = yes
-am__make_dryrun = (target_option=n; $(am__make_running_with_option))
-am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+    test $$am__dry = yes; \
+  }
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
 pkglibexecdir = $(libexecdir)/@PACKAGE@
@@ -88,6 +50,7 @@
 build_triplet = @build@
 host_triplet = @host@
 subdir = magic
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
 	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
@@ -95,7 +58,6 @@
 	$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
-DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
@@ -149,7 +111,6 @@
 am__installdirs = "$(DESTDIR)$(pkgdatadir)"
 DATA = $(pkgdata_DATA)
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
-am__DIST_COMMON = $(srcdir)/Makefile.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 pkgdatadir = @pkgdatadir@
 ACLOCAL = @ACLOCAL@
@@ -163,7 +124,6 @@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
-CFLAG_VISIBILITY = @CFLAG_VISIBILITY@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
 CYGPATH_W = @CYGPATH_W@
@@ -179,7 +139,6 @@
 EXEEXT = @EXEEXT@
 FGREP = @FGREP@
 GREP = @GREP@
-HAVE_VISIBILITY = @HAVE_VISIBILITY@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -274,7 +233,7 @@
 top_srcdir = @top_srcdir@
 
 #
-# $File: Makefile.am,v 1.126 2017/08/10 11:01:38 christos Exp $
+# $File: Makefile.am,v 1.132 2018/01/28 00:00:17 rrt Exp $
 #
 MAGIC_FRAGMENT_BASE = magdir
 MAGIC_DIR = $(top_srcdir)/magic
@@ -307,6 +266,7 @@
 $(MAGIC_FRAGMENT_DIR)/audio \
 $(MAGIC_FRAGMENT_DIR)/basis \
 $(MAGIC_FRAGMENT_DIR)/ber \
+$(MAGIC_FRAGMENT_DIR)/beetle \
 $(MAGIC_FRAGMENT_DIR)/bflt \
 $(MAGIC_FRAGMENT_DIR)/bhl \
 $(MAGIC_FRAGMENT_DIR)/bioinformatics \
@@ -344,6 +304,7 @@
 $(MAGIC_FRAGMENT_DIR)/cups \
 $(MAGIC_FRAGMENT_DIR)/dact \
 $(MAGIC_FRAGMENT_DIR)/database \
+$(MAGIC_FRAGMENT_DIR)/dbpf \
 $(MAGIC_FRAGMENT_DIR)/der \
 $(MAGIC_FRAGMENT_DIR)/diamond \
 $(MAGIC_FRAGMENT_DIR)/diff \
@@ -429,6 +390,7 @@
 $(MAGIC_FRAGMENT_DIR)/mathematica \
 $(MAGIC_FRAGMENT_DIR)/matroska \
 $(MAGIC_FRAGMENT_DIR)/mcrypt \
+$(MAGIC_FRAGMENT_DIR)/measure \
 $(MAGIC_FRAGMENT_DIR)/mercurial \
 $(MAGIC_FRAGMENT_DIR)/metastore \
 $(MAGIC_FRAGMENT_DIR)/meteorological \
@@ -495,6 +457,7 @@
 $(MAGIC_FRAGMENT_DIR)/qt \
 $(MAGIC_FRAGMENT_DIR)/revision \
 $(MAGIC_FRAGMENT_DIR)/riff \
+$(MAGIC_FRAGMENT_DIR)/rpi \
 $(MAGIC_FRAGMENT_DIR)/rpm \
 $(MAGIC_FRAGMENT_DIR)/rtf \
 $(MAGIC_FRAGMENT_DIR)/ruby \
@@ -531,6 +494,7 @@
 $(MAGIC_FRAGMENT_DIR)/tgif \
 $(MAGIC_FRAGMENT_DIR)/ti-8x \
 $(MAGIC_FRAGMENT_DIR)/timezone \
+$(MAGIC_FRAGMENT_DIR)/tplink \
 $(MAGIC_FRAGMENT_DIR)/troff \
 $(MAGIC_FRAGMENT_DIR)/tuxedo \
 $(MAGIC_FRAGMENT_DIR)/typeset \
@@ -566,6 +530,7 @@
 $(MAGIC_FRAGMENT_DIR)/yara \
 $(MAGIC_FRAGMENT_DIR)/zfs \
 $(MAGIC_FRAGMENT_DIR)/zilog \
+$(MAGIC_FRAGMENT_DIR)/zip \
 $(MAGIC_FRAGMENT_DIR)/zyxel 
 
 MAGIC = magic.mgc
@@ -592,6 +557,7 @@
 	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign magic/Makefile'; \
 	$(am__cd) $(top_srcdir) && \
 	  $(AUTOMAKE) --foreign magic/Makefile
+.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
 	  *config.status*) \
@@ -791,8 +757,6 @@
 	mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
 	ps ps-am tags-am uninstall uninstall-am uninstall-pkgdataDATA
 
-.PRECIOUS: Makefile
-
 
 ${MAGIC}: $(EXTRA_DIST) $(FILE_COMPILE_DEP)
 	@rm -fr magic
--- a/external/bsd/file/dist/magic/magdir/acorn	Wed Apr 18 01:39:14 2018 +0000
+++ b/external/bsd/file/dist/magic/magdir/acorn	Sun Apr 22 07:20:06 2018 +0000
@@ -1,6 +1,6 @@
 
 #------------------------------------------------------------------------------
-# $File: acorn,v 1.5 2009/09/19 16:28:07 christos Exp $
+# $File: acorn,v 1.6 2017/10/19 16:40:37 christos Exp $
 # acorn:  file(1) magic for files found on Acorn systems
 #
 
@@ -67,3 +67,36 @@
 >>8	byte	x	version %d,
 >>10	leshort	=1	1 pattern
 >>10	leshort	!1	%d patterns
+
+# From: Joerg Jenderek
+# URL: https://www.kyzer.me.uk/pack/xad/#PackDir
+# reference: https://www.kyzer.me.uk/pack/xad/xad_PackDir.lha/PackDir.c
+# GRR: line below is too general as it matches also "Git pack" in ./revision
+0	string	PACK\0
+# check for valid compression method 0-4
+>5	ulelong	<5
+# https://www.riscosopen.org/wiki/documentation/show/Introduction%20To%20Filing%20Systems
+# To skip "Git pack" version 0 test for root directory object like
+# ADFS::RPC.$.websitezip.FONTFIX
+>>9	string	>ADFS\  PackDir archive (RISC OS)
+# TrID labels above as "Acorn PackDir compressed Archive"
+# compression mode y (0 - 4) for GIF LZW with a maximum n bits
+# (y~n,0~12,1~13,2~14,3~15,4~16)
+>>>5	ulelong+12 x	\b, LZW %u-bits compression
+# http://www.filebase.org.uk/filetypes
+# !Packdir compressed archive has three hexadecimal digits code 68E
+!:mime	application/x-acorn-68E
+!:ext	pkd/bin
+# null terminated root directory object like IDEFS::IDE-4.$.Apps.GRAPHICS.!XFMPdemo
+>>>9	string	x	\b, root "%s"
+# load address 0xFFFtttdd, ttt is the object filetype and dddddddddd is time
+>>>>&1	ulelong	x	\b, load address 0x%x
+# execution address 0xdddddddd dddddddddd is 40 bit unsigned centiseconds since 1.1.1900 UTC
+>>>>&5	ulelong	x	\b, exec address 0x%x
+# attributes (bits: 0~owner read,1~owner write,3~no delete,4~public read,5~public write)
+>>>>&9	ulelong	x	\b, attributes 0x%x 
+# number of entries in this directory. for root dir 0
+#>>>&13	ulelong	x	\b, entries 0x%x 
+# the entries start here with object name
+>>>>&17	string	x	\b, 1st object "%s"
+
--- a/external/bsd/file/dist/magic/magdir/animation	Wed Apr 18 01:39:14 2018 +0000
+++ b/external/bsd/file/dist/magic/magdir/animation	Sun Apr 22 07:20:06 2018 +0000
@@ -1,6 +1,6 @@
 
 #------------------------------------------------------------------------------
-# $File: animation,v 1.63 2017/05/26 14:33:07 christos Exp $
+# $File: animation,v 1.66 2017/10/06 15:36:38 christos Exp $
 # animation:  file(1) magic for animation/movie formats
 #
 # animation formats
@@ -56,20 +56,20 @@
 >>11	byte		6		\b, Release 6 MBMS Extended Presentations
 >>11	byte		7		\b, Release 7 MBMS Extended Presentations
 >8	string		3gg		\b, MPEG v4 system, 3GPP
->11	byte		6		\b, Release 6 General Profile
 !:mime	video/3gpp
+>>11	byte		6		\b, Release 6 General Profile
 >8	string		3gp		\b, MPEG v4 system, 3GPP
->11	byte		1		\b, Release %d (non existent)
->11	byte		2		\b, Release %d (non existent)
->11	byte		3		\b, Release %d (non existent)
->11	byte		4		\b, Release %d
->11	byte		5		\b, Release %d
->11	byte		6		\b, Release %d
->11	byte		7		\b, Release %d Streaming Servers
 !:mime	video/3gpp
+>>11	byte		1		\b, Release %d (non existent)
+>>11	byte		2		\b, Release %d (non existent)
+>>11	byte		3		\b, Release %d (non existent)
+>>11	byte		4		\b, Release %d
+>>11	byte		5		\b, Release %d
+>>11	byte		6		\b, Release %d
+>>11	byte		7		\b, Release %d Streaming Servers
 >8	string		3gs		\b, MPEG v4 system, 3GPP
->11	byte		7		\b, Release %d Streaming Servers
 !:mime	video/3gpp
+>>11	byte		7		\b, Release %d Streaming Servers
 >8	string		avc1		\b, MPEG v4 system, 3GPP JVT AVC [ISO 14496-12:2005]
 !:mime	video/mp4
 >8	string/W	qt		\b, Apple QuickTime movie
@@ -188,6 +188,36 @@
 >8	string		pana		\b, Panasonic Digital Camera
 >8	string		qt  		\b, Apple QuickTime (.MOV/QT)
 !:mime	video/quicktime
+# HEIF image format
+# see https://nokiatech.github.io/heif/technical.html
+>8	string		mif1		\b, HEIF Image
+!:mime image/heif
+>8	string		msf1		\b, HEIF Image Sequence
+!:mime image/heif-sequence
+>8	string		heic		\b, HEIF Image HEVC Main or Main Still Picture Profile
+!:mime image/heic
+>8	string		heix		\b, HEIF Image HEVC Main 10 Profile
+!:mime image/heic
+>8	string		hevc		\b, HEIF Image Sequenz HEVC Main or Main Still Picture Profile
+!:mime image/heic-sequence
+>8	string		hevx		\b, HEIF Image Sequence HEVC Main 10 Profile
+!:mime image/heic-sequence
+# following HEIF brands are not mentioned in the heif technical info currently (Oct 2017)
+# but used in the reference implementation:
+# https://github.com/nokiatech/heif/blob/d5e9a21c8ba8df712bdf643021dd9f6518134776/Srcs/reader/hevcimagefilereader.cpp
+>8	string		heim		\b, HEIF Image L-HEVC
+!:mime image/heif
+>8	string		heis		\b, HEIF Image L-HEVC
+!:mime image/heif
+>8	string		avic		\b, HEIF Image AVC
+!:mime image/heif
+>8	string		hevm		\b, HEIF Image Sequence L-HEVC
+!:mime image/heif-sequence
+>8	string		hevs		\b, HEIF Image Sequence L-HEVC
+!:mime image/heif-sequence
+>8	string		avcs		\b, HEIF Image Sequence AVC
+!:mime image/heif-sequence
+
 >8	string		ROSS		\b, Ross Video
 >8	string		sdv		\b, SD Memory Card Video
 >8	string		ssc1		\b, Samsung stereo, single stream (patent pending)
--- a/external/bsd/file/dist/magic/magdir/apple	Wed Apr 18 01:39:14 2018 +0000
+++ b/external/bsd/file/dist/magic/magdir/apple	Sun Apr 22 07:20:06 2018 +0000
@@ -1,6 +1,6 @@
 
 #------------------------------------------------------------------------------
-# $File: apple,v 1.36 2017/03/17 21:35:28 christos Exp $
+# $File: apple,v 1.39 2018/03/02 15:26:39 christos Exp $
 # apple:  file(1) magic for Apple file formats
 #
 0	search/1/t	FiLeStArTfIlEsTaRt	binscii (apple ][) text
@@ -431,3 +431,19 @@
 >>>>0	use	appleworks
 >0	belong	0x0481ad00
 >>0	use 	appleworks
+
+# magic for Apple File System (APFS)
+# from Alex Myczko <alex@aiei.ch>
+32		string	NXSB		Apple File System (APFS)
+>36		ulelong	x		\b, blocksize %u
+
+# iTunes cover art (versions 1 and 2)
+4		string	itch
+>24		string	artw
+>>0x1e8		string	data		iTunes cover art
+>>>0x1ed	string	PNG		(PNG)
+>>>0x1ec	beshort 0xffd8		(JPEG)
+
+# MacPaint image
+65		string	PNTGMPNT	MacPaint image data
+#0		belong	2		MacPaint image data
--- a/external/bsd/file/dist/magic/magdir/archive	Wed Apr 18 01:39:14 2018 +0000
+++ b/external/bsd/file/dist/magic/magdir/archive	Sun Apr 22 07:20:06 2018 +0000
@@ -1,16 +1,150 @@
 #------------------------------------------------------------------------------
-# $File: archive,v 1.108 2017/08/30 13:45:10 christos Exp $
+# $File: archive,v 1.117 2018/03/17 02:11:04 christos Exp $
 # archive:  file(1) magic for archive formats (see also "msdos" for self-
 #           extracting compressed archives)
 #
 # cpio, ar, arc, arj, hpack, lha/lharc, rar, squish, uc2, zip, zoo, etc.
-# pre-POSIX "tar" archives are handled in the C code.
+# pre-POSIX "tar" archives are also handled in the C code ../../src/is_tar.c.
 
 # POSIX tar archives
-257	string		ustar\0		POSIX tar archive
-!:mime	application/x-tar # encoding: posix
-257	string		ustar\040\040\0	GNU tar archive
-!:mime	application/x-tar # encoding: gnu
+# URL: https://en.wikipedia.org/wiki/Tar_(computing)
+# Reference: https://www.freebsd.org/cgi/man.cgi?query=tar&sektion=5&manpath=FreeBSD+8-current
+# header mainly padded with nul bytes
+500	quad		0		
+# filename or extended attribute printable strings in range space null til umlaut ue
+>0	ubeshort	>0x1F00		
+>>0	ubeshort	<0xFCFD
+# last 4 header bytes often null but tar\0 in gtarfail2.tar gtarfail.tar-bad
+# at https://sourceforge.net/projects/s-tar/files/testscripts/
+>>>508	ubelong&0x8B9E8DFF	0	
+# nul, space or ascii digit 0-7 at start of mode
+>>>>100	ubyte&0xC8	=0		
+>>>>>101 ubyte&0xC8	=0		
+# nul, space at end of check sum
+>>>>>>155 ubyte&0xDF	=0	
+# space or ascii digit 0 at start of check sum
+>>>>>>>148	ubyte&0xEF	=0x20	
+>>>>>>>>0	use	tar-file
+#	minimal check and then display tar archive information which can also be
+#	embedded inside others like Android Backup, Clam AntiVirus database
+0	name		tar-file
+>257	string		!ustar		
+# header padded with nuls
+>>257	ulong		=0		
+# GNU tar version 1.29 with non pax format option without refusing
+# creates misleading V7 header for Long path, Multi-volume, Volume type
+>>>156	ubyte		0x4c		GNU tar archive
+!:mime	application/x-gtar
+!:ext	tar/gtar
+>>>156	ubyte		0x4d		GNU tar archive
+!:mime	application/x-gtar
+!:ext	tar/gtar
+>>>156	ubyte		0x56		GNU tar archive
+!:mime	application/x-gtar
+!:ext	tar/gtar
+>>>156	default		x		tar archive (V7)
+!:mime	application/x-tar
+!:ext	tar
+# other stuff in padding
+# some implementations add new fields to the blank area at the end of the header record
+# created for example by DOS TAR 3.20g 1994 Tim V.Shapore with -j option
+>>257	ulong		!0		tar archive (old)
+!:mime	application/x-tar
+!:ext	tar
+# magic in newer, GNU, posix variants
+>257	string		=ustar		
+# 2 last char of magic and UStar version because string expression does not work
+# 2 space characters followed by a null for GNU variant
+>>261	ubelong		=0x72202000	POSIX tar archive (GNU)
+!:mime	application/x-gtar
+!:ext	tar/gtar
+# UStar version with ASCII "00"
+>>261	ubelong		0x72003030	POSIX
+# gLOBAL and ExTENSION type only found in POSIX.1-2001 format
+>>>156	ubyte		0x67		\b.1-2001
+>>>156	ubyte		0x78		\b.1-2001
+>>>156	ubyte		x		tar archive
+!:mime	application/x-ustar
+!:ext	tar/ustar
+# version with 2 binary nuls embedded in Android Backup like com.android.settings.ab
+>>261	ubelong		0x72000000	tar archive (ustar)
+!:mime	application/x-ustar
+!:ext	tar/ustar
+# not seen ustar variant with garbish version
+>>261	default		x		tar archive (unknown ustar)
+!:mime	application/x-ustar
+!:ext	tar/ustar
+# type flag of 1st tar archive member
+#>156	ubyte		x		\b, %c-type
+>156	ubyte		x		
+>>156	ubyte		0		\b, file
+>>156	ubyte		0x30		\b, file
+>>156	ubyte		0x31		\b, hard link
+>>156	ubyte		0x32		\b, symlink
+>>156	ubyte		0x33		\b, char device
+>>156	ubyte		0x34		\b, block device
+>>156	ubyte		0x35		\b, directory
+>>156	ubyte		0x36		\b, fifo
+>>156	ubyte		0x37		\b, reserved
+>>156	ubyte		0x4c		\b, long path
+>>156	ubyte		0x4d		\b, multi volume
+>>156	ubyte		0x56		\b, volume
+>>156	ubyte		0x67		\b, global
+>>156	ubyte		0x78		\b, extension
+>>156	default		x		\b, type
+>>>156	ubyte		x		'%c'
+# name[100]
+>0	string		>\0		%-.60s
+# mode mainly stored as an octal number in ASCII null or space terminated
+>100	string		>\0		\b, mode %-.7s
+# user id mainly as octal numbers in ASCII null or space terminated
+>108	string		>\0		\b, uid %-.7s
+# group id mainly as octal numbers in ASCII null or space terminated
+>116	string		>\0		\b, gid %-.7s
+# size mainly as octal number in ASCII
+>124	ubyte		<0x38		
+>>124	string		>\0		\b, size %-.12s
+# coding indicated by setting the high-order bit of the leftmost byte
+>124	ubyte		>0xEF		\b, size 0x
+>>124	ubyte		!0xff		\b%2.2x
+>>125	ubyte		!0xff		\b%2.2x
+>>126	ubyte		!0xff		\b%2.2x
+>>127	ubyte		!0xff		\b%2.2x
+>>128	ubyte		!0xff		\b%2.2x
+>>129	ubyte		!0xff		\b%2.2x
+>>130	ubyte		!0xff		\b%2.2x
+>>131	ubyte		!0xff		\b%2.2x
+>>132	ubyte		!0xff		\b%2.2x
+>>133	ubyte		!0xff		\b%2.2x
+>>134	ubyte		!0xff		\b%2.2x
+>>135	ubyte		!0xff		\b%2.2x
+# seconds since 0:0:0 1 jan 1970 UTC as octal number mainly in ASCII null or space terminated
+>136	string		>\0		\b, seconds %-.11s
+# header checksum stored as an octal number in ASCII null or space terminated
+#>148	string		x		\b, cksum %.7s
+# linkname[100]
+>157	string		>\0		\b, linkname %-.40s
+# additional fields for ustar
+>257	string		=ustar		
+# owner user name null terminated
+>>265	string		>\0		\b, user %-.32s
+# group name null terminated
+>>297	string		>\0		\b, group %-.32s
+# device major minor if not zero
+>>329	ubequad&0xCFCFCFCFcFcFcFdf	!0
+>>>329	string		x		\b, devmaj %-.7s
+>>337	ubequad&0xCFCFCFCFcFcFcFdf	!0
+>>>337	string		x		\b, devmin %-.7s
+# prefix[155]
+>>345	string		>\0		\b, prefix %-.155s
+# old non ustar/POSIX tar
+>257	string		!ustar		
+>>508	string		=tar\0		
+# padding[255] in old star
+>>>257	string		>\0		\b, padding: %-.40s
+>>508	default		x		
+# padding[255] in old tar sometimes comment field
+>>>257	string		>\0		\b, comment: %-.40s
 
 # Incremental snapshot gnu-tar format from:
 # http://www.gnu.org/software/tar/manual/html_node/Snapshot-Files.html
@@ -272,15 +406,115 @@
 # PPMZ
 0	string	PPMZ PPMZ archive data
 # MS Compress
-4	string	\x88\xf0\x27 MS Compress archive data
-# updated by Joerg Jenderek
->9	string	\0
->>0	string	KWAJ
->>>7	string	\321\003	MS Compress archive data
->>>>14	ulong	>0		\b, original size: %d bytes
->>>>18		ubyte	>0x65
->>>>>18		string	x       \b, was %.8s
->>>>>(10.b-4)	string	x       \b.%.3s
+# Update: Joerg Jenderek
+# URL: http://fileformats.archiveteam.org/wiki/MS-DOS_installation_compression
+# Reference: https://hwiegman.home.xs4all.nl/fileformats/compress/szdd_kwaj_format.html
+# Note: use correct version of extracting tool like EXPAND, UNPACK, DECOMP or 7Z  
+4	string	\x88\xf0\x27
+#		KWAJ variant
+>0	string	KWAJ		MS Compress archive data, KWAJ variant
+!:mime	application/x-ms-compress-kwaj
+# extension not working in version 5.32
+# magic/Magdir/archive, 284: Warning: EXTENSION type ` ??_' has bad char '?'
+# file: line 284: Bad magic entry '   ??_'
+!:ext	??_
+# compression method (0-4)
+>>8	uleshort	x	\b, %u method
+# offset of compressed data
+>>10	uleshort	x	\b, 0x%x offset
+#>>(10.s)	uleshort	x
+#>>>&-6		string	x	\b, TEST extension %-.3s
+# header flags to mark header extensions
+>>12	uleshort	>0	\b, 0x%x flags
+# 4 bytes: decompressed length of file
+>>12	uleshort	&0x01
+>>>14	ulelong		x	\b, original size: %u bytes
+# 2 bytes: unknown purpose
+# 2 bytes: length of unknown data + mentioned bytes
+# 1-9 bytes: null-terminated file name
+# 1-4 bytes: null-terminated file extension
+>>12	uleshort	&0x08
+>>>12	uleshort				^0x01
+>>>>12		uleshort			^0x02
+>>>>>12			uleshort		^0x04
+>>>>>>12			uleshort	^0x10	
+>>>>>>>14				string	x	\b, %-.8s
+>>>>>>12			uleshort	&0x10	
+>>>>>>>14				string	x	\b, %-.8s
+>>>>>>>>&1				string	x	\b.%-.3s
+>>>>>12			uleshort		&0x04
+>>>>>>12			uleshort	^0x10	
+>>>>>>>(14.s)			uleshort	x
+>>>>>>>>&14				string	x	\b, %-.8s
+>>>>>>12			uleshort	&0x10	
+>>>>>>>(14.s)			uleshort	x
+>>>>>>>>&14				string	x	\b, %-.8s
+>>>>>>>>>&1				string	x	\b.%-.3s
+>>>>12		uleshort			&0x02
+>>>>>12			uleshort		^0x04
+>>>>>>12			uleshort	^0x10	
+>>>>>>>16				string	x	\b, %-.8s
+>>>>>>12			uleshort	&0x10	
+>>>>>>>16				string	x	\b, %-.8s
+>>>>>>>>&1				string	x	\b.%-.3s
+>>>>>12			uleshort		&0x04
+>>>>>>12			uleshort	^0x10	
+>>>>>>>(16.s)			uleshort	x
+>>>>>>>>&16				string	x	\b, %-.8s
+>>>>>>12			uleshort	&0x10	
+>>>>>>>(16.s)			uleshort	x
+>>>>>>>&16				string	x	%-.8s
+>>>>>>>>&1				string	x	\b.%-.3s
+>>>12	uleshort				&0x01
+>>>>12		uleshort			^0x02
+>>>>>12			uleshort		^0x04
+>>>>>>12			uleshort	^0x10
+>>>>>>>18				string	x	\b, %-.8s
+>>>>>>12			uleshort	&0x10	
+>>>>>>>18				string	x	\b, %-.8s
+>>>>>>>>&1				string	x	\b.%-.3s
+>>>>>12			uleshort		&0x04
+>>>>>>12			uleshort	^0x10	
+>>>>>>>(18.s)			uleshort	x
+>>>>>>>>&18				string	x	\b, %-.8s
+>>>>>>12			uleshort	&0x10	
+>>>>>>>(18.s)			uleshort	x
+>>>>>>>>&18				string	x	\b, %-.8s
+>>>>>>>>>&1				string	x	\b.%-.3s
+>>>>12		uleshort			&0x02
+>>>>>12			uleshort		^0x04
+>>>>>>12			uleshort	^0x10	
+>>>>>>>20				string	x	\b, %-.8s
+>>>>>>12			uleshort	&0x10	
+>>>>>>>20				string	x	\b, %-.8s
+>>>>>>>>&1				string	x	\b.%-.3s
+>>>>>12			uleshort		&0x04
+>>>>>>12			uleshort	^0x10	
+>>>>>>>(20.s)			uleshort	x
+>>>>>>>>&20				string	x	\b, %-.8s
+>>>>>>12			uleshort	&0x10	
+>>>>>>>(20.s)			uleshort	x
+>>>>>>>>&20				string	x	\b, %-.8s
+>>>>>>>>>&1				string	x	\b.%-.3s
+# 2 bytes: length of data + mentioned bytes
+#
+#		SZDD variant Haruhiko Okumura's LZSS or 7z type MsLZ
+>0	string	SZDD		MS Compress archive data, SZDD variant
+!:mime	application/x-ms-compress-szdd
+!:ext	??_
+# The character missing from the end of the filename (0=unknown)
+>>9	string	>\0		\b, %-.1s is last character of original name
+# https://www.betaarchive.com/forum/viewtopic.php?t=26161
+# Compression mode: "A" (0x41) found but sometimes "B" in Windows 3.1 builds 026 and 034e
+>>8	string	!A		\b, %-.1s method
+>>10	ulelong	>0		\b, original size: %u bytes
+#		QBasic SZDD variant
+3	string	\x88\xf0\x27
+>0	string	SZ\x20		MS Compress archive data, QBasic variant
+!:mime	application/x-ms-compress-sz
+!:ext	??$
+>>8	ulelong	>0		\b, original size: %u bytes
+
 # MP3 (archiver, not lossy audio compression)
 0	string	MP3\x1a MP3-Archiver archive data
 # ZET
@@ -483,9 +717,19 @@
 
 # These were inspired by idarc, but actually verified
 # Dzip archiver (.dz)
-0	string	DZ Dzip archive data
->2	byte	x \b, version %i
->3	byte	x \b.%i
+# Update: Joerg Jenderek
+# URL: http://speeddemosarchive.com/dzip/
+# reference: http://speeddemosarchive.com/dzip/dz29src.zip/main.c 
+# GRR: line below is too general as it matches also ASCII texts like Doszip commander help dz.txt
+0	string	DZ 
+# latest version is 2.9 dated 7 may 2003
+>2	byte	<4 Dzip archive data
+!:mime	application/x-dzip
+!:ext	dz
+>>2	byte	x \b, version %i
+>>3	byte	x \b.%i
+>>4	ulelong	x \b, offset 0x%x
+>>8	ulelong	x \b, %u files
 # ZZip archiver (.zz)
 0	string	ZZ\ \0\0 ZZip archive data
 0	string	ZZ0 ZZip archive data
@@ -857,6 +1101,9 @@
 !:mime	application/vnd.oasis.opendocument.formula-template
 >>>73	string	database		Database
 !:mime	application/vnd.oasis.opendocument.database
+# Valid for LibreOffice Base 6.0.1.1 at least
+>>>73	string	base 			Database
+!:mime	application/vnd.oasis.opendocument.base
 >>>73	string	image
 >>>>78	byte	!0x2d			Image
 !:mime	application/vnd.oasis.opendocument.image
@@ -904,21 +1151,9 @@
 >(26.s+30)	leshort	!0xcafe
 >>26    string          !\x8\0\0\0mimetype	Zip archive data
 !:mime	application/zip
->>>4	byte		0x09		\b, at least v0.9 to extract
->>>4	byte		0x0a		\b, at least v1.0 to extract
->>>4	byte		0x0b		\b, at least v1.1 to extract
->>>4	byte		0x14		\b, at least v2.0 to extract
->>>4	byte		0x15		\b, at least v2.1 to extract
->>>4	byte		0x19		\b, at least v2.5 to extract
->>>4	byte		0x1b		\b, at least v2.7 to extract
->>>4	byte		0x2d		\b, at least v4.5 to extract
->>>4	byte		0x2e		\b, at least v4.6 to extract
->>>4	byte		0x32		\b, at least v5.0 to extract
->>>4	byte		0x33		\b, at least v5.1 to extract
->>>4	byte		0x34		\b, at least v5.2 to extract
->>>4	byte		0x3d		\b, at least v6.1 to extract
->>>4	byte		0x3e		\b, at least v6.2 to extract
->>>4	byte		0x3f		\b, at least v6.3 to extract
+>>>4	beshort		x			\b, at least
+>>>4	use		zipversion
+>>>4	beshort		x			to extract
 >>>0x161	string		WINZIP		\b, WinZIP self-extracting
 
 # StarView Metafile
@@ -1014,6 +1249,8 @@
 
 # Alternate ZIP string (amc@arwen.cs.berkeley.edu)
 0	string	PK00PK\003\004	Zip archive data
+!:mime	application/zip
+!:ext zip/cbz
 
 # ACE archive (from http://www.wotsit.org/download.asp?f=ace)
 # by Stefan `Sec` Zehl <sec@42.org>
@@ -1186,3 +1423,6 @@
 # reference: https://github.com/MarcoPon/SeqBox
 0	string	SBx	SeqBox,
 >3	byte	x	version %d
+
+# LyNX archive
+56	string	USE\040LYNX\040TO\040DISSOLVE\040THIS\040FILE	 LyNX archive
--- a/external/bsd/file/dist/magic/magdir/audio	Wed Apr 18 01:39:14 2018 +0000
+++ b/external/bsd/file/dist/magic/magdir/audio	Sun Apr 22 07:20:06 2018 +0000
@@ -1,6 +1,6 @@
 
 #------------------------------------------------------------------------------
-# $File: audio,v 1.80 2017/08/13 00:21:47 christos Exp $
+# $File: audio,v 1.86 2018/03/11 00:53:11 christos Exp $
 # audio:  file(1) magic for sound formats (see also "iff")
 #
 # Jan Nicolai Langfeldt (janl@ifi.uio.no), Dan Quinlan (quinlan@yggdrasil.com),
@@ -450,7 +450,7 @@
 # Free lossless audio codec <http://flac.sourceforge.net>
 # From: Przemyslaw Augustyniak <silvathraec@rpg.pl>
 0	string			fLaC		FLAC audio bitstream data
-!:mime	audio/x-flac
+!:mime	audio/flac
 >4	byte&0x7f		>0		\b, unknown version
 >4	byte&0x7f		0		\b
 # some common bits/sample values
@@ -468,20 +468,25 @@
 >>20	byte&0xe		0xa		\b, 6 channels
 >>20	byte&0xe		0xc		\b, 7 channels
 >>20	byte&0xe		0xe		\b, 8 channels
-# some common sample rates
->>17	belong&0xfffff0		0x2ee000	\b, 192 kHz
->>17	belong&0xfffff0		0x158880	\b, 88.2 kHz
->>17	belong&0xfffff0		0x0ac440	\b, 44.1 kHz
->>17	belong&0xfffff0		0x0bb800	\b, 48 kHz
->>17	belong&0xfffff0		0x07d000	\b, 32 kHz
->>17	belong&0xfffff0		0x056220	\b, 22.05 kHz
->>17	belong&0xfffff0		0x05dc00	\b, 24 kHz
->>17	belong&0xfffff0		0x03e800	\b, 16 kHz
->>17	belong&0xfffff0		0x02b110	\b, 11.025 kHz
->>17	belong&0xfffff0		0x02ee00	\b, 12 kHz
->>17	belong&0xfffff0		0x01f400	\b, 8 kHz
->>17	belong&0xfffff0		0x177000	\b, 96 kHz
->>17	belong&0xfffff0		0x0fa000	\b, 64 kHz
+# sample rates derived from known oscillator frequencies;
+# 24.576 MHz (video/fs=48kHz), 22.5792 (audio/fs=44.1kHz) and
+# 16.384 (other/fs=32kHz).
+>>17	belong&0xfffff0       	0x02b110	\b, 11.025 kHz
+>>17	belong&0xfffff0       	0x03e800	\b, 16 kHz
+>>17	belong&0xfffff0       	0x056220	\b, 22.05 kHz
+>>17	belong&0xfffff0       	0x05dc00	\b, 24 kHz
+>>17	belong&0xfffff0       	0x07d000	\b, 32 kHz
+>>17	belong&0xfffff0       	0x0ac440	\b, 44.1 kHz
+>>17	belong&0xfffff0       	0x0bb800	\b, 48 kHz
+>>17	belong&0xfffff0       	0x0fa000	\b, 64 kHz
+>>17	belong&0xfffff0       	0x158880	\b, 88.2 kHz
+>>17	belong&0xfffff0       	0x177000	\b, 96 kHz
+>>17	belong&0xfffff0       	0x1f4000	\b, 128 kHz
+>>17	belong&0xfffff0       	0x2b1100	\b, 176.4 kHz
+>>17	belong&0xfffff0       	0x2ee000	\b, 192 kHz
+>>17	belong&0xfffff0       	0x3e8000	\b, 256 kHz
+>>17	belong&0xfffff0       	0x562200	\b, 352.8 kHz
+>>17	belong&0xfffff0       	0x5dc000	\b, 384 kHz
 >>21	byte&0xf		>0		\b, >4G samples
 >>21	byte&0xf		0		\b
 >>>22	belong			>0		\b, %u samples
@@ -529,7 +534,7 @@
 >>12		ulelong		x		\b, sample rate %d
 
 # adlib sound files
-# From Gurkan Sengun <gurkan@linuks.mine.nu>, http://www.linuks.mine.nu
+# From: Alex Myczko <alex@aiei.ch>
 0    	string		RAWADATA	RdosPlay RAW
 
 1068	string		RoR		AMUSIC Adlib Tracker
@@ -810,3 +815,46 @@
 >>>0x31		byte/16		x	Version %d.
 >>>0x31		byte&0x0F	x	\b%02d
 >>>>0x4		string		>\0	\b, title: "%s"
+
+# magic for Klystrack, http://kometbomb.github.io/klystrack/
+# from Alex Myczko <alex@aiei.ch>
+0	string	cyd!song	Klystrack song
+>8	byte	>0		\b, version %u
+>8	byte	>26
+#>>9	byte	x		\b, channels %u
+#>>10	leshort	x		\b, time signature %u
+#>>12	leshort	x		\b, sequence step %u
+#>>14	byte	x		\b, instruments %u
+#>>15	leshort	x		\b, patterns %u
+#>>17	leshort	x		\b, sequences %u
+#>>19	leshort	x		\b, length %u
+#>>21	leshort	x		\b, loop point %u
+#>>23	byte	x		\b, master volume %u
+#>>24	byte	x		\b, song speed %u
+#>>25	byte	x		\b, song speed2 %u
+#>>26	byte	x		\b, song rate %u
+#>>27	belong	x		\b, flags %#x
+#>>31	byte	x		\b, multiplex period %u
+#>>32	byte	x		\b, pitch inaccuracy %u
+>>149	pstring	x		\b, title %s
+
+0	string	cyd!inst	Klystrack instrument
+
+# magic for WOPL instrument files, https://github.com/Wohlstand/OPL3BankEditor
+# see Specifications/WOPL-and-OPLI-Specification.txt
+
+0	string	WOPL3-INST\0	WOPL instrument
+>11	leshort	x	\b, version %u
+0	string	WOPL3-BANK\0	WOPL instrument bank
+>11	leshort	x	\b, version %u
+
+# AdLib/OPL instrument files. Format specifications on
+#  http://www.shikadi.net/moddingwiki
+0	string	Junglevision\ Patch\ File	Junglevision instrument data
+0	string	#OPL_II#	DMX OP2 instrument data
+0	string	IBK\x1a		IBK instrument data
+0	string	2OP\x1a		IBK instrument data, 2 operators
+0	string	4OP\x1a		IBK instrument data, 4 operators
+2	string	ADLIB-		AdLib instrument data
+>0	byte	x		\b, version %u
+>1	byte	x		\b.%u
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/file/dist/magic/magdir/beetle	Sun Apr 22 07:20:06 2018 +0000
@@ -0,0 +1,7 @@
+#------------------------------------------------------------------------------
+# $File: beetle,v 1.2 2018/02/05 23:42:17 rrt Exp $
+# beetle:  file(1) magic for Beetle VM object files
+# https://github.com/rrthomas/beetle/
+
+# Beetle object module
+0	string		BEETLE\000	Beetle VM object file
--- a/external/bsd/file/dist/magic/magdir/c64	Wed Apr 18 01:39:14 2018 +0000
+++ b/external/bsd/file/dist/magic/magdir/c64	Sun Apr 22 07:20:06 2018 +0000
@@ -1,6 +1,6 @@
 
 #------------------------------------------------------------------------------
-# $File: c64,v 1.6 2015/08/24 05:17:42 christos Exp $
+# $File: c64,v 1.7 2017/11/15 12:19:06 christos Exp $
 # c64:  file(1) magic for various commodore 64 related files
 #
 # From: Dirk Jagdmann <doj@cubic.org>
@@ -46,4 +46,13 @@
 # Esa Hyyti <esa@netlab.tkk.fi>
 0	string		C64-TAPE-RAW	C64 Raw Tape File (.tap),
 >0x0c	byte		x		Version:%u,
->0x10   lelong		x		Length:%u cycles
+>0x10	lelong		x		Length:%u cycles
+
+# magic for Goattracker2, http://covertbitops.c64.org/
+# from Alex Myczko <alex@aiei.ch>
+0	string		GTS5		GoatTracker 2 song
+>4	string		>\0		\b, "%s"
+>36	string		>\0		\b by %s
+>68	string		>\0		\b (C) %s
+>100	byte		>0		\b, %u subsong(s)
+
--- a/external/bsd/file/dist/magic/magdir/compress	Wed Apr 18 01:39:14 2018 +0000
+++ b/external/bsd/file/dist/magic/magdir/compress	Sun Apr 22 07:20:06 2018 +0000
@@ -1,5 +1,5 @@
 #------------------------------------------------------------------------------
-# $File: compress,v 1.68 2017/05/25 20:07:23 christos Exp $
+# $File: compress,v 1.72 2018/03/27 23:26:41 christos Exp $
 # compress:  file(1) magic for pure-compression formats (no archives)
 #
 # compress, gzip, pack, compact, huf, squeeze, crunch, freeze, yabba, etc.
@@ -49,6 +49,7 @@
 >9	byte		=0x0B		\b, from NTFS filesystem (NT)
 >9	byte		=0x0C		\b, from QDOS
 >9	byte		=0x0D		\b, from Acorn RISCOS
+>-4	lelong		x		\b, original size %d
 
 # packed data, Huffman (minimum redundancy) codes on a byte-by-byte basis
 0	string		\037\036	packed data
@@ -77,6 +78,12 @@
 !:mime	application/x-bzip2
 >3	byte		>47		\b, block size = %c00k
 
+# bzip	a block-sorting file compressor
+#	by Julian Seward <sewardj@cs.man.ac.uk> and others
+0	string		BZ0		bzip compressed data
+!:mime	application/x-bzip
+>3	byte		>47		\b, block size = %c00k
+
 # lzip
 0	string		LZIP		lzip compressed data
 !:mime application/x-lzip
@@ -113,21 +120,6 @@
 #>99	byte&0xF0	0xd0
 #>132	byte&0xF0	0xd0		GSM 06.10 compressed audio
 
-# bzip	a block-sorting file compressor
-#	by Julian Seward <sewardj@cs.man.ac.uk> and others
-#
-#0	string		BZ		bzip compressed data
-#>2	byte		x		\b, version: %c
-#>3	string		=1		\b, compression block size 100k
-#>3	string		=2		\b, compression block size 200k
-#>3	string		=3		\b, compression block size 300k
-#>3	string		=4		\b, compression block size 400k
-#>3	string		=5		\b, compression block size 500k
-#>3	string		=6		\b, compression block size 600k
-#>3	string		=7		\b, compression block size 700k
-#>3	string		=8		\b, compression block size 800k
-#>3	string		=9		\b, compression block size 900k
-
 # lzop from <markus.oberhumer@jk.uni-linz.ac.at>
 0	string		\x89\x4c\x5a\x4f\x00\x0d\x0a\x1a\x0a	lzop compressed data
 >9	beshort		<0x0940
@@ -314,3 +306,22 @@
 >>0	byte&0xf	=8
 >>>0	byte&0x80 	=0	zlib compressed data
 !:mime	application/zlib
+
+# BWC compression
+0	string		BWC
+>3	byte		0	BWC compressed data
+
+# UCL compression
+0	bequad		0x00e955434cff011a	UCL compressed data
+
+# Softlib archive
+0	string		SLIB	Softlib archive
+>4	leshort		x	\b, version %d
+>6	leshort		x	(contains %d files)
+
+# URL:  https://github.com/lzfse/lzfse/blob/master/src/lzfse_internal.h#L276
+# From: Eric Hall <eric.hall@darkart.com>
+0	string	bvx-	lzfse encoded, no compression
+0	string	bvx1	lzfse compressed, uncompressed tables
+0	string	bvx2	lzfse compressed, compressed tables
+0	string	bvxn	lzfse encoded, lzvn compressed
--- a/external/bsd/file/dist/magic/magdir/console	Wed Apr 18 01:39:14 2018 +0000
+++ b/external/bsd/file/dist/magic/magdir/console	Sun Apr 22 07:20:06 2018 +0000
@@ -1,6 +1,6 @@
 
 #------------------------------------------------------------------------------
-# $File: console,v 1.32 2017/08/13 00:21:47 christos Exp $
+# $File: console,v 1.35 2017/11/14 15:48:36 christos Exp $
 # Console game magic
 # Toby Deshane <hac@shoelace.digivill.net>
 
@@ -510,7 +510,7 @@
 # From: Serge van den Boom <svdb@stack.nl>
 0	string		\x01ZZZZZ\x01	3DO "Opera" file system
 
-# From: Gurkan Sengun <gurkan@linuks.mine.nu>, www.linuks.mine.nu
+# From: Alex Myczko <alex@aiei.ch>
 # From: David Pflug <david@pflug.email>
 # is the offset 12 or the offset 16 correct?
 # GBS (Game Boy Sound) magic
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/file/dist/magic/magdir/dbpf	Sun Apr 22 07:20:06 2018 +0000
@@ -0,0 +1,17 @@
+
+#------------------------------------------------------------------------------
+# $File: dbpf,v 1.1 2017/10/13 20:47:14 christos Exp $
+# dppf:	Maxis Database Packed Files, the stored data file format used by all
+#	Maxis games after the Sims: http://wiki.niotso.org/DBPF
+# 	http://www.wiki.sc4devotion.com/index.php?title=DBPF
+#	13 Oct 2017, Kip Warner <kip at thevertigo dot com>
+0	string	DBPF	Maxis Database Packed File
+>4	ulelong	x	\b, version: %u.
+>>8	ulelong	x	\b%u
+>>>36	ulelong	x       \b, files: %u
+!:ext	dbpf/package/dat/sc4
+!:mime	application/x-maxis-dbpf
+4	ulelong	1
+>8	ulelong	!1
+>>24	ledate	!0	\b, created: %s
+>>>28	ledate	!0	\b, modified: %s
--- a/external/bsd/file/dist/magic/magdir/elf	Wed Apr 18 01:39:14 2018 +0000
+++ b/external/bsd/file/dist/magic/magdir/elf	Sun Apr 22 07:20:06 2018 +0000
@@ -1,6 +1,6 @@
 
 #------------------------------------------------------------------------------
-# $File: elf,v 1.70 2016/06/02 12:36:30 christos Exp $
+# $File: elf,v 1.72 2018/02/24 19:50:04 christos Exp $
 # elf:  file(1) magic for ELF executables
 #
 # We have to check the byte order flag to see what byte order all the
@@ -48,8 +48,9 @@
 !:mime	application/x-object
 >16	leshort		2		executable,
 !:mime	application/x-executable
->16	leshort		3		shared object,
-!:mime	application/x-sharedlib
+>16	leshort		3		${x?pie executable:shared object}
+
+!:mime	application/x-${x?pie-executable:sharedlib}
 >16	leshort		4		core file
 !:mime	application/x-coredump
 # Core file detection is not reliable.
--- a/external/bsd/file/dist/magic/magdir/filesystems	Wed Apr 18 01:39:14 2018 +0000
+++ b/external/bsd/file/dist/magic/magdir/filesystems	Sun Apr 22 07:20:06 2018 +0000
@@ -1,5 +1,5 @@
 #------------------------------------------------------------------------------
-# $File: filesystems,v 1.122 2017/07/21 10:34:41 christos Exp $
+# $File: filesystems,v 1.124 2018/01/12 12:35:30 christos Exp $
 # filesystems:  file(1) magic for different filesystems
 #
 0	name	partid
@@ -1732,6 +1732,16 @@
 #>0x464	lelong          &0x0000020      (many subdirs)
 #>0x463	lelong          &0x0000040      (extra isize)
 
+# f2fs filesystem - Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
+0x400	lelong		0xF2F52010	F2FS filesystem
+>0x46c	belong		x		\b, UUID=%08x
+>0x470	beshort		x		\b-%04x
+>0x472	beshort		x		\b-%04x
+>0x474	beshort		x		\b-%04x
+>0x476	belong		x		\b-%08x
+>0x47a	beshort		x		\b%04x
+>0x147c	lestring16	x		\b, volume name "%s"
+
 # Minix filesystems - Juan Cespedes <cespedes@debian.org>
 0x410	leshort		0x137f
 !:strength / 2
@@ -1937,8 +1947,10 @@
 0	name				cdrom
 >38913	string   !NSR0      ISO 9660 CD-ROM filesystem data
 !:mime	application/x-iso9660-image
+!:ext	iso/iso9660
 >38913	string    NSR0      UDF filesystem data
 !:mime	application/x-iso9660-image
+!:ext	iso/udf
 >>38917	string    1         (version 1.0)
 >>38917	string    2         (version 1.5)
 >>38917	string    3         (version 2.0)
@@ -1964,6 +1976,16 @@
 !:strength +34
 >0	use	cdrom
 
+# URL: https://en.wikipedia.org/wiki/NRG_(file_format)
+# Reference: https://dl.opendesktop.org/api/files/download/id/1460731811/
+#	11577-mount-iso-0.9.5.tar.bz2/mount-iso-0.9.5/install.sh
+# From: Joerg Jenderek
+# Note:	Only for nero disc with once (DAO) type after 300 KB header
+339969	string    CD001	Nero CD image at 0x4B000
+!:mime	application/x-nrg
+!:ext	nrg
+>307200	use cdrom
+
 # .cso files
 # Reference: http://pismotec.com/ciso/ciso.h
 # NOTE: There are two other formats with the same magic but
--- a/external/bsd/file/dist/magic/magdir/fonts	Wed Apr 18 01:39:14 2018 +0000
+++ b/external/bsd/file/dist/magic/magdir/fonts	Sun Apr 22 07:20:06 2018 +0000
@@ -1,6 +1,6 @@
 
 #------------------------------------------------------------------------------
-# $File: fonts,v 1.37 2017/06/24 00:39:00 christos Exp $
+# $File: fonts,v 1.38 2017/11/14 15:48:36 christos Exp $
 # fonts:  file(1) magic for font data
 #
 0	search/1	FONT		ASCII vfont text
@@ -294,7 +294,7 @@
 0	string		OTTO		OpenType font data
 !:mime application/vnd.ms-opentype
 
-# Gurkan Sengun <gurkan@linuks.mine.nu>, www.linuks.mine.nu
+# From: Alex Myczko <alex@aiei.ch>
 0	string		SplineFontDB:	Spline Font Database
 !:mime application/vnd.font-fontforge-sfd
 >14	string		x		version %s
--- a/external/bsd/file/dist/magic/magdir/games	Wed Apr 18 01:39:14 2018 +0000
+++ b/external/bsd/file/dist/magic/magdir/games	Sun Apr 22 07:20:06 2018 +0000
@@ -1,6 +1,6 @@
 
 #------------------------------------------------------------------------------
-# $File: games,v 1.15 2017/03/17 21:35:28 christos Exp $
+# $File: games,v 1.16 2017/10/19 16:40:37 christos Exp $
 # games:  file(1) for games
 
 # Fabio Bonelli <fabiobonelli@libero.it>
@@ -34,8 +34,44 @@
 
 # Quake
 
-0       string  PACK    Quake I or II world or extension
->8	lelong	>0	\b, %d entries
+# Update: Joerg Jenderek
+# URL: http://fileformats.archiveteam.org/wiki/PAK
+# reference: https://quakewiki.org/wiki/.pak
+# GRR: line below is too general as it matches also Acorn PackDir compressed Archive
+# and Git pack ./revision
+0       string  PACK    
+# real Quake examples like pak0.pak have only some hundreds like 150 files
+# So test for few files
+>8	ulelong <0x01000000	
+# in file version 5.32 test for null terminator is only true for
+# offset ~< FILE_BYTES_MAX = 1 MB defined in ../../src/file.h 
+# look for null terminator of 1st entry name
+>>(4.l+55)	ubyte	0	Quake I or II world or extension
+!:mime	application/x-dzip
+!:ext	pak
+#>>>8	ulelong	x	\b, table size %u
+# dividing this by entry size (64) gives number of files
+>>>8	ulelong/64 x	\b, %u files
+# offset to the beginning of the file table
+>>>4	ulelong	x	\b, offset 0x%x
+# 1st file entry
+>>>(4.l)	use	pak-entry
+# 2nd file entry
+#>>>4	ulelong+64	x	\b, offset 0x%x
+#>>>(4.l+64)	use	pak-entry
+#
+#	display file table entry of Quake PAK archive
+0	name		pak-entry
+# normally entry start after header which implies offset 12 or higher
+>56	ulelong	>11	
+# the offset from the beginning of pak to beginning of this entry file contents
+>>56	ulelong	x	at 0x%x
+# the size of file for this entry 
+>>60	ulelong	x	%u bytes
+# 56 byte null-terminated entry name string includes path like maps/e1m1.bsp
+>>0	string	x	'%-.56s'
+# inspect entry content by jumping to entry offset
+>>(56)	indirect x	\b: 
 
 #0       string  -1\x0a  Quake I demo
 #>30     string  x        version %.4s
--- a/external/bsd/file/dist/magic/magdir/geo	Wed Apr 18 01:39:14 2018 +0000
+++ b/external/bsd/file/dist/magic/magdir/geo	Sun Apr 22 07:20:06 2018 +0000
@@ -1,6 +1,6 @@
 
 #------------------------------------------------------------------------------
-# $File: geo,v 1.4 2017/03/17 21:35:28 christos Exp $
+# $File: geo,v 1.6 2018/03/11 00:48:16 christos Exp $
 # Geo- files from Kurt Schwehr <schwehr@ccom.unh.edu>
 
 ######################################################################
@@ -115,3 +115,16 @@
 >40	ledouble	x	\b, minz=%g
 >48	ledouble	x	\b, maxz=%g
 
+# magic for LAS format files
+# alex myczko <alex@aiei.ch>
+# http://www.asprs.org/wp-content/uploads/2010/12/LAS_1_3_r11.pdf
+0	string		LASF	LIDAR point data records
+>24	byte		>0	\b, version %u
+>25	byte		>0	\b.%u
+>26	string		>\0	\b, SYSID %s
+>58	string		>\0	\b, Generating Software %s
+
+# magic for PCD format files
+# alex myczko <alex@aiei.ch>
+# http://pointclouds.org/documentation/tutorials/pcd_file_format.php
+0	string		#\ .PCD	Point Cloud Data
--- a/external/bsd/file/dist/magic/magdir/gnu	Wed Apr 18 01:39:14 2018 +0000
+++ b/external/bsd/file/dist/magic/magdir/gnu	Sun Apr 22 07:20:06 2018 +0000
@@ -1,21 +1,111 @@
 
 #------------------------------------------------------------------------------
-# $File: gnu,v 1.18 2017/03/17 21:35:28 christos Exp $
+# $File: gnu,v 1.20 2018/02/24 16:11:23 christos Exp $
 # gnu:  file(1) magic for various GNU tools
 #
 # GNU nlsutils message catalog file format
 #
 # GNU message catalog (.mo and .gmo files)
 
+# Update: Joerg Jenderek
+# URL: https://www.gnu.org/software/gettext/manual/html_node/MO-Files.html
+# Reference: ftp://ftp.gnu.org/pub/gnu/gettext/gettext-0.19.8.tar.gz/
+#	gettext-0.19.8.1/gettext-runtime/intl/gmo.h
+# Note: maybe call it like "GNU translation gettext machine object"
 0	string		\336\22\4\225	GNU message catalog (little endian),
->6	leshort		x		revision %d.
->4	leshort		>0		\b%d,
->>8	lelong		x		%d messages,
->>36	lelong		x		%d sysdep messages
->4	leshort		=0		\b%d,
->>8	lelong		x		%d messages
+#0	ulelong	0x950412DE		GNU-format message catalog data
+# TODO: write lines in such a way that code can also be called for big endian variant
+#>0	use		gettext-object
+#0	name		gettext-object
+>4	ulelong		x		revision
+!:mime	application/x-gettext-translation
+# mo extension is also used for Easeus Partition Master PE32 executable module
+# like ConvertFatToNTFS.mo
+!:ext	gmo/mo
+# only found three revision combinations 0.0 0.1 1.1 as unsigned 32-bit
+# major revision
+>4	ulelong/0xFFff	x		%u.
+# minor revision
+>4	ulelong&0x0000FFff	x	\b%u
+>>8	ulelong		x		\b, %u message
+# plural s
+>>8	ulelong		>1		\bs
+# size of hashing table
+#>20	ulelong		x		\b, %u hash
+#>20	ulelong		>1		\bes
+#>24	ulelong		x		at 0x%x
+# for revsion x.0 offset of table with originals is 1Ch if directly after header
+>4	ulelong&0x0000FFff	=0
+>>12	ulelong		!0x1C		\b, at 0x%x string table
+# but for x.1 table offset i found is 30h. That means directly after bigger header
+>4	ulelong&0x0000FFff	>0
+>>12	ulelong		!0x30		\b, at 0x%x string table
+# The following variables are only used in .mo files with minor revision >= 1
+# number of system dependent segments
+#>>28	ulelong		x		\b, %u segment
+#>>28	ulelong		>1		\bs
+# offset of table describing system dependent segments
+#>>32	ulelong		x		at 0x%x
+# number of system dependent strings pairs
+>>36	ulelong		x		\b, %u sysdep message
+>>36	ulelong		>1		\bs
+# offset of table with start offsets of original sysdep strings
+#>>40	ulelong		x		\b, at 0x%x sysdep strings
+# offset of table with start offsets of translated sysdep strings
+#>>44	ulelong		x		\b, at 0x%x sysdep translations
+# >>(44.l)	ulelong	x		0x%x chars
+# >>>&0		ulelong	x		at 0x%x
+# >>>>(&-4)	string	x		"%s"
+# string table after big header
+#>>48	ubequad		x		\b, string table 0x%llx
+#
+# 0th string length seems to be always 0
+#>(12.l)	ulelong	x		\b, %u chars
+#>>&0		ulelong	x		at 0x%x
+# if 1st string length positiv inspect offset and string
+#>(12.l+8)	ulelong	>0		\b, %u chars
+#>>&0		ulelong	x		at 0x%x
+# if 2nd string length positiv inspect offset and string
+# >(12.l+16)	ulelong	>0		\b, %u chars
+# >>&0		ulelong	x		at 0x%x
+# skip newline byte
+#>>>(&-4)	ubyte	=0x0A
+#>>>>&0		string	x		"%s"
+#>>>(&-4)	ubyte	!0x0A
+#>>>>&-1		string	x		'%s'
+# offset of table with translation strings
+#>16	ulelong		x		\b, at 0x%x translation table
+# check translation 0 length and offset
+>(16.l)		ulelong	>0
+>>&0		ulelong	x
+# translation 0 seems to be often Project-Id with name and version
+>>>(&-4)	string	x		\b, %s
+# trans. 1 with bytes >= 1 unlike icoutils-0.31.0\po\en@boldquot.gmo with 1 NL
+>(16.l+8)	ulelong	>1
+>>&0		ulelong	x
+>>>(&-4)	ubyte	!0x0A
+>>>>&-1		string	x		'%s'
+# 1 New Line like in tar-1.29\po\de.gmo
+>>>(&-4)	ubyte	=0x0A
+>>>>&0		ubyte	!0x0A
+>>>>>&-1	string	x		'%s'
+# 2nd New Line like in parted-3.1\po\de.gmo
+>>>>&0		ubyte	=0x0A
+>>>>>&0		string	x		'%s'
 
 0	string		\225\4\22\336	GNU message catalog (big endian),
+#0	ubelong	0x950412DE		GNU-format message catalog data
+!:mime	application/x-gettext-translation
+!:ext	gmo/mo
+# TODO: for big endian use same code as for little endian
+#>0	use		\^gettext-object
+# DEBUG code
+#>16	ubelong		x		\b, at 0x%x translation table
+#>(16.L)		ubelong	x		0x%x chars
+#>>&0		ubelong	x		at 0x%x
+# unexpected value HERE!
+#>>>(&-4)	ubequad	x		0x%llx
+#
 >4	beshort		x		revision %d.
 >6	beshort		>0		\b%d,
 >>8	belong		x		%d messages,
@@ -32,13 +122,15 @@
 0	beshort		0x8502			GPG encrypted data
 !:mime	text/PGP # encoding: data
 
+# Update: Joerg Jenderek
+# Note:	PGP and GPG use same data structure.
+#	So recognition is now done by ./pgp with start test for byte 0x99
 # This magic is not particularly good, as the keyrings don't have true
 # magic. Nevertheless, it covers many keyrings.
-0	ubeshort-0x9901	<2
->3	byte		4
->>4	bedate		x		GPG key public ring, created %s
-!:mime application/x-gnupg-keyring
-
+# 0	ubeshort-0x9901	<2
+# >3	byte		4
+# >>4	bedate		x		GPG key public ring, created %s
+# !:mime application/x-gnupg-keyring
 
 # Symmetric encryption
 0	leshort		0x0d8c
@@ -78,8 +170,6 @@
 >7	string	02		\b (frcode)
 
 # Files produced by GNU gettext
-0	long	0xDE120495		GNU-format message catalog data
-0	long	0x950412DE		GNU-format message catalog data
 
 # gettext message catalogue
 0	search/1024	\nmsgid
--- a/external/bsd/file/dist/magic/magdir/images	Wed Apr 18 01:39:14 2018 +0000
+++ b/external/bsd/file/dist/magic/magdir/images	Sun Apr 22 07:20:06 2018 +0000
@@ -1,6 +1,6 @@
 
 #------------------------------------------------------------------------------
-# $File: images,v 1.126 2017/06/11 22:25:44 christos Exp $
+# $File: images,v 1.131 2018/02/16 15:44:28 christos Exp $
 # images:  file(1) magic for image formats (see also "iff", and "c-lang" for
 # XPM bitmaps)
 #
@@ -27,27 +27,23 @@
 # and Image Type 1 2 3 9 10 11 32 33
 # and Color Map Entry Size 0 15 16 24 32
 0	ubequad&0x00FeC400000000C0	0
-# skip more garbage by looking for positive image type
+# skip more garbage like *.iso by looking for positive image type
 >2	ubyte			>0
-# skip some compiled terminfo by looking for image type less equal 33
+# skip some compiled terminfo like xterm+tmux by looking for image type less equal 33
 >>2	ubyte			<34
-# skip arches.3200 , Finder.Root , Slp.1 by looking for low pixel sizes 15 16 24 32
->>>16	ubyte			<33
-# skip more by looking for pixel size 0Fh 10h 18h 20h
->>>>16	ubyte&0xC0		0x00
-# Color Map
->>>>>1	belong&0xfff7ffff	0x01010000
->>>>>>0		use		tga-image
->>>>>1	belong&0xfff7ffff	0x00020000
->>>>>>0		use		tga-image
->>>>>1	belong&0xfff7ffff	0x00030000
->>>>>>0		use		tga-image
->>>>>1	default			x
-# skip 260-16.ico by looking for no color map
->>>>>>1	ubyte			0
-# implies no first map entry
->>>>>>>3	uleshort		0
->>>>>>>>0	use		tga-image
+# skip arches.3200 , Finder.Root , Slp.1 by looking for low pixel depth 1 8 15 16 24 32
+>>>16	ubyte			1
+>>>>0		use		tga-image
+>>>16	ubyte			8
+>>>>0		use		tga-image
+>>>16	ubyte			15
+>>>>0		use		tga-image
+>>>16	ubyte			16
+>>>>0		use		tga-image
+>>>16	ubyte			24
+>>>>0		use		tga-image
+>>>16	ubyte			32
+>>>>0		use		tga-image
 #	display tga bitmap image information
 0	name				tga-image
 >2	ubyte		<34		Targa image data
@@ -81,7 +77,7 @@
 # image height. 0 interpreted as 65536
 >14	uleshort	>0		%d
 >14	uleshort	=0		65536
-# Image Pixel Size 15 16 24 32
+# Image Pixel depth 1 8 15 16 24 32
 >16	ubyte		x		x %d
 # X origin of image. 0 normal
 >8	uleshort	>0		+%d
@@ -752,7 +748,7 @@
 >5	byte	0x00		(white background)
 >5	byte	0xFF		(black background)
 
-# Gurkan Sengun <gurkan@linuks.mine.nu>, www.linuks.mine.nu
+# From: Alex Myczko <alex@aiei.ch>
 # http://www.atarimax.com/jindroush.atari.org/afmtatr.html
 0	leshort	0x0296		Atari ATR image
 
@@ -1065,7 +1061,9 @@
 >>&16	byte		5		pxr24
 >>&16	byte		6		b44
 >>&16	byte		7		b44a
->>&16	byte		>7		unknown
+>>&16	byte		8		dwaa
+>>&16	byte		9		dwab
+>>&16	byte		>9		unknown
 >8	 search/0x1000	dataWindow\0	\b, dataWindow:
 >>&10	lelong		x		(%d
 >>&14	lelong		x		%d)-
@@ -1087,8 +1085,15 @@
 # ANSI/SMPTE 268M-1994, SMPTE Standard for File Format for Digital
 # Moving-Picture Exchange (DPX), v1.0, 18 February 1994
 # Robert Minsk <robertminsk at yahoo.com>
+# Modified by Harry Mallon <hjmallon at gmail.com>
 0	string		SDPX	DPX image data, big-endian,
 !:mime image/x-dpx
+>0	use		dpx_info
+0	string		XPDS	DPX image data, little-endian,
+!:mime image/x-dpx
+>0	use		\^dpx_info
+
+0	name		dpx_info
 >768	beshort		<4
 >>772	belong		x	%dx
 >>776	belong		x	\b%d,
@@ -1101,8 +1106,8 @@
 >768	beshort		3	right to left/bottom to top
 >768	beshort		4	top to bottom/left to right
 >768	beshort		5	top to bottom/right to left
->768	leshort		6	bottom to top/left to right
->768	leshort		7	bottom to top/right to left
+>768	beshort		6	bottom to top/left to right
+>768	beshort		7	bottom to top/right to left
 
 # From: Tom Hilinski <tom.hilinski@comcast.net>
 # http://www.unidata.ucar.edu/packages/netcdf/
@@ -1479,3 +1484,30 @@
 >4	belong	0x0D0A1A0A
 >12	belong	0x00000000	Lytro Light Field Picture
 >8	belong	x		\b, version %d
+
+# Type: Vision Research Phantom CINE Format
+# URL: https://www.phantomhighspeed.com/
+# URL2: http://phantomhighspeed.force.com/vriknowledge/servlet/fileField?id=0BEU0000000Cfyk
+# From: Harry Mallon <hjmallon at gmail.com>
+#
+# This has a short "CI" code but the 44 is the size of the struct which is
+# stable
+0	string	CI
+>2	leshort 44		Vision Research CINE Video,
+>>4	leshort	0		Grayscale,
+>>4	leshort 1		JPEG Compressed,
+>>4	leshort 2		RAW,
+>>6	leshort x		version %d,
+>>20	lelong	x		%d frames,
+>>48	lelong	x		%dx
+>>52	lelong	x		\b%d
+
+# Type: ARRI Raw Image
+# Info: SMPTE RDD30:2014
+# From: Harry Mallon <hjmallon at gmail.com>
+0	string ARRI		ARRI ARI image data,
+>4	lelong 0x78563412	little-endian,
+>4 	lelong 0x12345678	big-endian,
+>12	lelong x		version %d,
+>20	lelong x 		%dx
+>24	lelong x		\b%d
--- a/external/bsd/file/dist/magic/magdir/intel	Wed Apr 18 01:39:14 2018 +0000
+++ b/external/bsd/file/dist/magic/magdir/intel	Sun Apr 22 07:20:06 2018 +0000
@@ -1,6 +1,6 @@
 
 #------------------------------------------------------------------------------
-# $File: intel,v 1.15 2017/03/17 21:35:28 christos Exp $
+# $File: intel,v 1.16 2017/11/14 15:48:36 christos Exp $
 # intel:  file(1) magic for x86 Unix
 #
 # Various flavors of x86 UNIX executable/object (other than Xenix, which
@@ -45,7 +45,7 @@
 
 # rom: file(1) magic for BIOS ROM Extensions found in intel machines
 #      mapped into memory between 0xC0000 and 0xFFFFF
-# From Gurkan Sengun <gurkan@linuks.mine.nu>, www.linuks.mine.nu
+# From: Alex Myczko <alex@aiei.ch>
 # updated by Joerg Jenderek
 # https://en.wikipedia.org/wiki/Option_ROM
 0        beshort         0x55AA       BIOS (ia32) ROM Ext.
--- a/external/bsd/file/dist/magic/magdir/macintosh	Wed Apr 18 01:39:14 2018 +0000
+++ b/external/bsd/file/dist/magic/magdir/macintosh	Sun Apr 22 07:20:06 2018 +0000
@@ -1,6 +1,6 @@
 
 #------------------------------------------------------------------------------
-# $File: macintosh,v 1.27 2017/03/17 21:35:28 christos Exp $
+# $File: macintosh,v 1.28 2017/12/05 02:17:48 christos Exp $
 # macintosh description
 #
 # BinHex is the Macintosh ASCII-encoded file format (see also "apple")
@@ -60,182 +60,272 @@
 #>2	string		x			: %s
 
 # MacBinary format (Eric Fischer, enf@pobox.com)
+# Update: Joerg Jenderek 
+# URL: https://en.wikipedia.org/wiki/MacBinary
+# Reference: http://files.stairways.com/other/macbinaryii-standard-info.txt
 #
 # Unfortunately MacBinary doesn't really have a magic number prior
-# to the MacBinary III format.  The checksum is really the way to
-# do it, but the magic file format isn't up to the challenge.
+# to the MacBinary III format.
 #
-# 0	byte		0
-# 1	byte				# filename length
-# 2	string				# filename
-# 65    string				# file type
-# 69	string				# file creator
-# 73	byte				# Finder flags
-# 74	byte		0
+
+# old version number, must be kept at zero for compatibility
+0	byte	0
+# length of filename (must be in the range 1-63)
+>1	ubyte	>0
+# skip T.PIC.LZ INSTRUMENT.7T INVENTORY
+>>1	ubyte	<64
+# skip Docs.MWII ReadMe.MacWrite "Notes (MacWrite II)"
+# by looking for printable characters at beginning of file name
+>>>2	ubelong	>0x1F000000
+# zero fill, must be zero for compatibility
+>>>>74	byte	0
+# zero fill, must be zero for compatibility
+>>>>>82	byte	0
+# MacBinary I		test for valid version numbers
+>>>>>>122	ubeshort	0
+# additional check for creation date after 1 Jan 1970 ~ 7C25B080h
+#>>>>>>>91	ubelong		>0x7c25b07F
+# additional check for undefined header fields in MacBinary I
+#>>>>>>>101	ulong		0
+>>>>>>>0	use	mac-bin
+# MacBinary II		the newer versions begins at 129
+>>>>>>122	ubeshort	0x8181
+>>>>>>>0	use	mac-bin
+# MacBinary III with MacBinary II to read
+>>>>>122	ubeshort	0x8281
+>>>>>>0	use	mac-bin
+
+#	display information of MacBinary file
+0	name		mac-bin
+>122	ubyte	x	MacBinary
+# versions for MacBinary II/III
+>122	ubyte	129		II
+>122	ubyte	130		III
+# only in MacBinary III
+>>102	string	!mBIN		with surprising version
+!:mime	application/x-macbinary
+!:apple	PSPTBINA
+!:ext	bin/macbin
+# THIS SHOULD NEVER HAPPEN! Maybe another file type is misidetified as MacBinary
+#>1	ubyte	>63		\b, name length %u too BIG!
+#>122	ubeshort	x	\b, version 0x%x
+# Finder flags if not 0
+# >73	byte		!0		\b, flags 0x
+# >73	byte		=0		
+# >>101	byte		!0		\b, flags 0x
+# # original Finder flags (Bits 8-15)
+# >73	byte		!0		\b%x
+# # finder flags, bits 0-7
+# >101	byte		!0		\b%x
+>73	byte		&0x01		\b, inited
+>73	byte		&0x02		\b, changed
+>73	byte		&0x04		\b, busy
+>73	byte		&0x08		\b, bozo
+>73	byte		&0x10		\b, system
+>73	byte		&0x20		\b, bundle
+>73	byte		&0x40		\b, invisible
+>73	byte		&0x80		\b, locked
+
 # 75	beshort				# vertical posn in window
+#>75	beshort		!0		\b, v.pos %u
 # 77	beshort				# horiz posn in window
+#>77	beshort		!0		\b, h.pos %u
 # 79	beshort				# window or folder ID
-# 81    byte				# protected?
-# 82	byte		0
-# 83	belong				# length of data segment
-# 87	belong				# length of resource segment
-# 91	belong				# file creation date
-# 95	belong				# file modification date
-# 99	beshort				# length of comment after resource
-# 101	byte				# new Finder flags
-# 102	string		mBIN		# (only in MacBinary III)
-# 106	byte				# char. code of file name
-# 107	byte				# still more Finder flags
-# 116	belong				# total file length
+>79	ubeshort	!0		\b, ID 0x%x
+# protected flag
+>81	byte		!0		\b, protected 0x%x
+# length of comment after resource
+>99	ubeshort	!0		\b, comment length %u
+# char. code of file name
+>106	ubyte		!0		\b, char. code 0x%x
+# still more Finder flags
+>107	ubyte		!0		\b, more flags 0x%x
+# length of total files when unpacked only used when pack and unpack on the fly
+>116	ubelong		!0		\b, total length %u
 # 120	beshort				# length of add'l header
-# 122	byte		129		# for MacBinary II
-# 122	byte		130		# for MacBinary III
-# 123	byte		129		# minimum version that can read fmt
+>120	ubeshort	!0		\b, 2nd header length %u
 # 124	beshort				# checksum
-#
-# This attempts to use the version numbers as a magic number, requiring
-# that the first one be 0x80, 0x81, 0x82, or 0x83, and that the second
-# be 0x81.  This works for the files I have, but maybe not for everyone's.
-
-# Unfortunately, this magic is quite weak - MPi
-#122	beshort&0xFCFF	0x8081		Macintosh MacBinary data
+#>124	ubeshort	!0		\b, CRC 0x%x
+# creation date in seconds since MacOS epoch start. So 1 Jan 1970 ~ 7C25B080
+>91	beldate-0x7C25B080	x	\b, %s
+# THIS SHOULD NEVER HAPPEN! Maybe another file type is misidetified or time overflow
+>91	ubelong		<0x7c25b080	INVALID date
+#>91	belong-0x7C25B080	x	\b, DEBUG DATE %d
+# last modified date
+>95	beldate-0x7C25B080	x	\b, modified %s
+# Apple creator+typ if not null
+# file creator (normally expressed as four characters)
+>69	ulong			!0	\b, creator
+# instead 4 character code display full creator name
+>>69	use			apple-creator
+# file type (normally expressed as four characters)
+>65	ulong			!0	\b, type
+>>65	use			apple-type
+# length of data segment
+>83	ubelong			!0	\b, %u bytes
+# filename (in the range 1-63)
+>1	pstring			x	"%s"
+# print 1 space and then at offset 128 inspect data fork content if it has one
+>83	ubelong			!0	\b 
+>>128	indirect		x
+# Afterwards resource fork if length of resource segment not zero
+>87	ubelong			!0
+# calculate resource fork offset
+>>83	ubelong+128		x	\b, at 0x%x
+# length of resource segment
+>>87	ubelong			!0	%u bytes
+>>(83.S+128)	ubequad		x	resource 
+# further resource fork content inspection 
+>>>&-8	indirect		x
 
-# MacBinary I doesn't have the version number field at all, but MacBinary II
-# has been in use since 1987 so I hope there aren't many really old files
-# floating around that this will miss.  The original spec calls for using
-# the nulls in 0, 74, and 82 as the magic number.
-#
-# Another possibility, that would also work for MacBinary I, is to use
-# the assumption that 65-72 will all be ASCII (0x20-0x7F), that 73 will
-# have bits 1 (changed), 2 (busy), 3 (bozo), and 6 (invisible) unset,
-# and that 74 will be 0.  So something like
-#
-# 71 	belong&0x80804EFF 0x00000000 	Macintosh MacBinary data
-#
-# >73	byte&0x01	0x01		\b, inited
-# >73	byte&0x02	0x02		\b, changed
-# >73	byte&0x04	0x04		\b, busy
-# >73	byte&0x08	0x08		\b, bozo
-# >73	byte&0x10	0x10		\b, system
-# >73	byte&0x10	0x20		\b, bundle
-# >73	byte&0x10	0x40		\b, invisible
-# >73	byte&0x10	0x80		\b, locked
+# Apple Type/Creator Database
+# URL: https://en.wikipedia.org/wiki/Type_code
+# Reference:	http://www.lacikam.co.il/tcdb/
+#		http://www.macdisk.com/macsigen.php
+# Note:	classic Mac OS files have two 4 character codes for type and creator.
+#	Thereby the Finder attach documents types to applications.
 
 #>65	string		x		\b, type "%4.4s"
 
-#>65	string		8BIM		(PhotoShop)
-#>65	string		ALB3		(PageMaker 3)
-#>65	string		ALB4		(PageMaker 4)
-#>65	string		ALT3		(PageMaker 3)
-#>65	string		APPL		(application)
-#>65	string		AWWP		(AppleWorks word processor)
-#>65	string		CIRC		(simulated circuit)
-#>65	string		DRWG		(MacDraw)
-#>65	string		EPSF		(Encapsulated PostScript)
-#>65	string		FFIL		(font suitcase)
-#>65	string		FKEY		(function key)
-#>65	string		FNDR		(Macintosh Finder)
-#>65	string		GIFf		(GIF image)
-#>65	string		Gzip		(GNU gzip)
-#>65	string		INIT		(system extension)
-#>65	string		LIB\ 		(library)
-#>65	string		LWFN		(PostScript font)
-#>65	string		MSBC		(Microsoft BASIC)
-#>65	string		PACT		(Compact Pro archive)
-#>65	string		PDF\ 		(Portable Document Format)
-#>65	string		PICT		(picture)
-#>65	string		PNTG		(MacPaint picture)
-#>65	string		PREF		(preferences)
-#>65	string		PROJ		(Think C project)
-#>65	string		QPRJ		(Think Pascal project)
-#>65	string		SCFL		(Defender scores)
-#>65	string		SCRN		(startup screen)
-#>65	string		SITD		(StuffIt Deluxe)
-#>65	string		SPn3		(SuperPaint)
-#>65	string		STAK		(HyperCard stack)
-#>65	string		Seg\ 		(StuffIt segment)
-#>65	string		TARF		(Unix tar archive)
-#>65	string		TEXT		(ASCII)
-#>65	string		TIFF		(TIFF image)
-#>65	string		TOVF		(Eudora table of contents)
-#>65	string		WDBN		(Microsoft Word word processor)
-#>65	string		WORD		(MacWrite word processor)
-#>65	string		XLS\ 		(Microsoft Excel)
-#>65	string		ZIVM		(compress (.Z))
-#>65	string		ZSYS		(Pre-System 7 system file)
-#>65	string		acf3		(Aldus FreeHand)
-#>65	string		cdev		(control panel)
-#>65	string		dfil		(Desk Accessory suitcase)
-#>65	string		libr		(library)
-#>65	string		nX^d		(WriteNow word processor)
-#>65	string		nX^w		(WriteNow dictionary)
-#>65	string		rsrc		(resource)
-#>65	string		scbk		(Scrapbook)
-#>65	string		shlb		(shared library)
-#>65	string		ttro		(SimpleText read-only)
-#>65	string		zsys		(system file)
+#	display information about apple type
+0	name		apple-type
+>0	string		8BIM		PhotoShop
+>0	string		ALB3		PageMaker 3
+>0	string		ALB4		PageMaker 4
+>0	string		ALT3		PageMaker 3
+>0	string		APPL		application
+>0	string		AWWP		AppleWorks word processor
+>0	string		CIRC		simulated circuit
+>0	string		DRWG		MacDraw
+>0	string		EPSF		Encapsulated PostScript
+>0	string		FFIL		font suitcase
+>0	string		FKEY		function key
+>0	string		FNDR		Macintosh Finder
+>0	string		GIFf		GIF image
+>0	string		Gzip		GNU gzip
+>0	string		INIT		system extension
+>0	string		LIB\ 		library
+>0	string		LWFN		PostScript font
+>0	string		MSBC		Microsoft BASIC
+>0	string		PACT		Compact Pro archive
+>0	string		PDF\ 		Portable Document Format
+>0	string		PICT		picture
+>0	string		PNTG		MacPaint picture
+>0	string		PREF		preferences
+>0	string		PROJ		Think C project
+>0	string		QPRJ		Think Pascal project
+>0	string		SCFL		Defender scores
+>0	string		SCRN		startup screen
+>0	string		SITD		StuffIt Deluxe
+>0	string		SPn3		SuperPaint
+>0	string		STAK		HyperCard stack
+>0	string		Seg\ 		StuffIt segment
+>0	string		TARF		Unix tar archive
+>0	string		TEXT		ASCII
+>0	string		TIFF		TIFF image
+>0	string		TOVF		Eudora table of contents
+>0	string		WDBN		Microsoft Word word processor
+>0	string		WORD		MacWrite word processor
+>0	string		XLS\ 		Microsoft Excel
+>0	string		ZIVM		compress (.Z)
+>0	string		ZSYS		Pre-System 7 system file
+>0	string		acf3		Aldus FreeHand
+>0	string		cdev		control panel
+>0	string		dfil		Desk Accessory suitcase
+>0	string		libr		library
+>0	string		nX^d		WriteNow word processor
+>0	string		nX^w		WriteNow dictionary
+>0	string		rsrc		resource
+>0	string		scbk		Scrapbook
+>0	string		shlb		shared library
+>0	string		ttro		SimpleText read-only
+>0	string		zsys		system file
+
+#	additional types added in Dec 2017
+>0	string		BINA		binary file
+>0	string		BMPp		BMP image
+>0	string		JPEG		JPEG image
+#>0	string		W4BN		Microsoft Word x.y word processor?
+# if type name is not known display 4 character identifier
+>0	default		x		
+>>0	string		x		'%4.4s'
 
 #>69	string		x		\b, creator "%4.4s"
 
-# Somewhere, Apple has a repository of registered Creator IDs.  These are
+# Now Apple has no repository of registered Creator IDs any more. These are
 # just the ones that I happened to have files from and was able to identify.
 
-#>69	string		8BIM		(Adobe Photoshop)
-#>69	string		ALD3		(PageMaker 3)
-#>69	string		ALD4		(PageMaker 4)
-#>69	string		ALFA		(Alpha editor)
-#>69	string		APLS		(Apple Scanner)
-#>69	string		APSC		(Apple Scanner)
-#>69	string		BRKL		(Brickles)
-#>69	string		BTFT		(BitFont)
-#>69	string		CCL2 		(Common Lisp 2)
-#>69	string		CCL\ 		(Common Lisp)
-#>69	string		CDmo		(The Talking Moose)
-#>69	string		CPCT		(Compact Pro)
-#>69	string		CSOm		(Eudora)
-#>69	string		DMOV		(Font/DA Mover)
-#>69	string		DSIM		(DigSim)
-#>69	string		EDIT		(Macintosh Edit)
-#>69	string		ERIK		(Macintosh Finder)
-#>69	string		EXTR		(self-extracting archive)
-#>69	string		Gzip		(GNU gzip)
-#>69	string		KAHL		(Think C)
-#>69	string		LWFU		(LaserWriter Utility)
-#>69	string		LZIV		(compress)
-#>69	string		MACA		(MacWrite)
-#>69	string		MACS		(Macintosh operating system)
-#>69	string		MAcK		(MacKnowledge terminal emulator)
-#>69	string		MLND		(Defender)
-#>69	string		MPNT		(MacPaint)
-#>69	string		MSBB		(Microsoft BASIC (binary))
-#>69	string		MSWD		(Microsoft Word)
-#>69	string		NCSA		(NCSA Telnet)
-#>69	string		PJMM		(Think Pascal)
-#>69	string		PSAL		(Hunt the Wumpus)
-#>69	string		PSI2		(Apple File Exchange)
-#>69	string		R*ch		(BBEdit)
-#>69	string		RMKR		(Resource Maker)
-#>69	string		RSED		(Resource Editor)
-#>69	string		Rich		(BBEdit)
-#>69	string		SIT!		(StuffIt)
-#>69	string		SPNT		(SuperPaint)
-#>69	string		Unix		(NeXT Mac filesystem)
-#>69	string		VIM!		(Vim editor)
-#>69	string		WILD		(HyperCard)
-#>69	string		XCEL		(Microsoft Excel)
-#>69	string		aCa2		(Fontographer)
-#>69	string		aca3		(Aldus FreeHand)
-#>69	string		dosa		(Macintosh MS-DOS file system)
-#>69	string		movr		(Font/DA Mover)
-#>69	string		nX^n		(WriteNow)
-#>69	string		pdos		(Apple ProDOS file system)
-#>69	string		scbk		(Scrapbook)
-#>69	string		ttxt		(SimpleText)
-#>69	string		ufox		(Foreign File Access)
-
-# Just in case...
-
-102	string		mBIN		MacBinary III data with surprising version number
+#	display information about apple creator
+0	name		apple-creator
+>0	string		8BIM		Adobe Photoshop
+>0	string		ALD3		PageMaker 3
+>0	string		ALD4		PageMaker 4
+>0	string		ALFA		Alpha editor
+>0	string		APLS		Apple Scanner
+>0	string		APSC		Apple Scanner
+>0	string		BRKL		Brickles
+>0	string		BTFT		BitFont
+>0	string		CCL2		Common Lisp 2
+>0	string		CCL\ 		Common Lisp
+>0	string		CDmo		The Talking Moose
+>0	string		CPCT		Compact Pro
+>0	string		CSOm		Eudora
+>0	string		DMOV		Font/DA Mover
+>0	string		DSIM		DigSim
+>0	string		EDIT		Macintosh Edit
+>0	string		ERIK		Macintosh Finder
+>0	string		EXTR		self-extracting archive
+>0	string		Gzip		GNU gzip
+>0	string		KAHL		Think C
+>0	string		LWFU		LaserWriter Utility
+>0	string		LZIV		compress
+>0	string		MACA		MacWrite
+>0	string		MACS		Macintosh operating system
+>0	string		MAcK		MacKnowledge terminal emulator
+>0	string		MLND		Defender
+>0	string		MPNT		MacPaint
+>0	string		MSBB		Microsoft BASIC (binary)
+>0	string		MSWD		Microsoft Word
+>0	string		NCSA		NCSA Telnet
+>0	string		PJMM		Think Pascal
+>0	string		PSAL		Hunt the Wumpus
+#>0	string		PSI2		Apple File Exchange
+>0	string		R*ch		BBEdit
+>0	string		RMKR		Resource Maker
+>0	string		RSED		Resource Editor
+>0	string		Rich		BBEdit
+>0	string		SIT!		StuffIt
+>0	string		SPNT		SuperPaint
+>0	string		Unix		NeXT Mac filesystem
+>0	string		VIM!		Vim editor
+>0	string		WILD		HyperCard
+>0	string		XCEL		Microsoft Excel
+>0	string		aCa2		Fontographer
+>0	string		aca3		Aldus FreeHand
+>0	string		dosa		Macintosh MS-DOS file system
+>0	string		movr		Font/DA Mover
+>0	string		nX^n		WriteNow
+>0	string		pdos		Apple ProDOS file system
+>0	string		scbk		Scrapbook
+>0	string		ttxt		SimpleText
+>0	string		ufox		Foreign File Access
+#	additional creators added in Dec 2017
+# Claris/Apple Works
+>0	string		BOBO		Apple Works
+# CU-SeeMe_0.87b3_(68K).bin
+#>0	string		CUce		bar
+>0	string		PSPT		Apple File Exchange
+# Disk_Copy_4.2.sea.bin
+#>0	string		NCse		foo
+# probably StuffIt/Aladdin by Smith Micro Software, Inc.
+>0	string		STi0		stuffit
+# MacGzip-1.1.3.sea.bin
+#>0	string		aust		bar
+# D-Disk_Copy_6.3.3.smi.bin 
+>0	string		oneb		Disk Copy Self Mounting
+# if creator name is not known display 4 character identifier
+>0	default		x		
+>>0	string		x		'%4.4s'
 
 # sas magic from Bruce Foster (bef@nwu.edu)
 #
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/file/dist/magic/magdir/measure	Sun Apr 22 07:20:06 2018 +0000
@@ -0,0 +1,39 @@
+
+#------------------------------------------------------------------------------
+# $File: measure,v 1.1 2017/11/28 14:01:14 christos Exp $
+# measure: file(1) magic for measurement data
+
+# DIY-Thermocam raw data
+0	name	diy-thermocam-parser
+>0	beshort	x	scale %d-
+>2	beshort x	\b%d,
+>4	lefloat	x	spot sensor temperature %f,
+>9	byte	0	unit celsius,
+>9	byte	1	unit fahrenheit,
+>8	byte	x	color scheme %d
+>10	byte	1	\b, show spot sensor
+>11	byte	1	\b, show scale bar
+>12	byte	&1	\b, minimum point enabled
+>12	byte	&2	\b, maximum point enabled
+>13	lefloat	x	\b, calibration: offset %f,
+>17	lefloat x	slope %f
+
+0	name	diy-thermocam-checker
+>9	byte	<2
+>>10	byte	<2
+>>>11	byte	<2
+>>>>12	byte	<4
+>>>>>17	lefloat	>0.0001	DIY-Thermocam raw data
+
+# V2 and Leption 3.x:
+38408	byte	<19
+>38400	use	diy-thermocam-checker
+>>38400	default x	(Lepton 3.x),
+>>>38400	use	diy-thermocam-parser
+
+# V1 or Lepton 2.x
+9608	byte	<19
+>9600	use	diy-thermocam-checker
+>>9600	default	x	(Lepton 2.x),
+>>>9600	use	diy-thermocam-parser
+
--- a/external/bsd/file/dist/magic/magdir/mozilla	Wed Apr 18 01:39:14 2018 +0000
+++ b/external/bsd/file/dist/magic/magdir/mozilla	Sun Apr 22 07:20:06 2018 +0000
@@ -1,6 +1,6 @@
 
 #------------------------------------------------------------------------------
-# $File: mozilla,v 1.7 2017/03/17 21:35:28 christos Exp $
+# $File: mozilla,v 1.8 2018/01/17 12:08:36 christos Exp $
 # mozilla:  file(1) magic for Mozilla XUL fastload files
 # (XUL.mfasl and XPC.mfasl)
 # URL:	http://www.mozilla.org/
@@ -8,3 +8,15 @@
 
 0	string	XPCOM\nMozFASL\r\n\x1A		Mozilla XUL fastload data
 0	string	mozLz4a				Mozilla lz4 compressed bookmark data
+
+# From: Joerg Jenderek
+# URL: https://en.wikipedia.org/wiki/Firefox_4
+# Reference: https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT
+# Note:	Most ZIP utilities are able to extract such archives
+#	maybe only partly or after some warnings. Example:
+#	zip -FF omni.ja --out omni.zip
+4	string	PK\001\002	Mozilla archive omni.ja
+!:mime	application/x-zip
+!:ext	ja
+# TODO:
+#>4	use	zip-dir-entry
--- a/external/bsd/file/dist/magic/magdir/msdos	Wed Apr 18 01:39:14 2018 +0000
+++ b/external/bsd/file/dist/magic/magdir/msdos	Sun Apr 22 07:20:06 2018 +0000
@@ -1,6 +1,6 @@
 
 #------------------------------------------------------------------------------
-# $File: msdos,v 1.120 2017/08/13 00:21:47 christos Exp $
+# $File: msdos,v 1.121 2017/10/27 21:43:23 christos Exp $
 # msdos:  file(1) magic for MS-DOS files
 #
 
@@ -597,8 +597,9 @@
 0	string/b	\333\245-\0\0\0			Microsoft Word 2.0 Document
 !:mime	application/msword
 !:ext   doc
-512	string/b	\354\245\301			Microsoft Word Document
-!:mime	application/msword
+# Note: seems already recognized as "OLE 2 Compound Document" in ./ole2compounddocs
+#512	string/b	\354\245\301			Microsoft Word Document
+#!:mime	application/msword
 
 #
 0	string/b	\xDB\xA5\x2D\x00		Microsoft WinWord 2.0 Document
@@ -1068,16 +1069,6 @@
 >40	string	\ EMF		Windows Enhanced Metafile (EMF) image data
 >>44	ulelong x		version 0x%x
 
-# from http://filext.com by Derek M Jones <derek@knosof.co.uk>
-# False positive with PPT (also currently this string is too long)
-#0	string/b	\xD0\xCF\x11\xE0\xA1\xB1\x1A\xE1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3E\x00\x03\x00\xFE\xFF\x09\x00\x06	Microsoft Installer
-0	string/b	\320\317\021\340\241\261\032\341	Microsoft Office Document
-#>48	byte	0x1B					Excel Document
-#!:mime application/vnd.ms-excel
->546	string	bjbj			Microsoft Word Document
-!:mime	application/msword
->546	string	jbjb			Microsoft Word Document
-!:mime	application/msword
 
 0	string/b	\224\246\056		Microsoft Word Document
 !:mime	application/msword
--- a/external/bsd/file/dist/magic/magdir/msooxml	Wed Apr 18 01:39:14 2018 +0000
+++ b/external/bsd/file/dist/magic/magdir/msooxml	Sun Apr 22 07:20:06 2018 +0000
@@ -1,6 +1,6 @@
 
 #------------------------------------------------------------------------------
-# $File: msooxml,v 1.5 2014/08/05 07:38:45 christos Exp $
+# $File: msooxml,v 1.7 2018/03/12 12:38:59 christos Exp $
 # msooxml:  file(1) magic for Microsoft Office XML
 # From: Ralf Brown <ralf.brown@gmail.com>
 
@@ -12,6 +12,14 @@
 #   file of ePub or OpenDocument, we'll have to scan for a filename
 #   which can distinguish between the three types
 
+0		name		msooxml
+>0		string		word/		Microsoft Word 2007+
+!:mime application/vnd.openxmlformats-officedocument.wordprocessingml.document
+>0		string		ppt/		Microsoft PowerPoint 2007+
+!:mime application/vnd.openxmlformats-officedocument.presentationml.presentation
+>0		string		xl/		Microsoft Excel 2007+
+!:mime application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
+
 # start by checking for ZIP local file header signature
 0		string		PK\003\004
 !:strength +10
@@ -27,10 +35,9 @@
 # and check the subdirectory name to determine which type of OOXML
 # file we have.  Correct the mimetype with the registered ones:
 # http://technet.microsoft.com/en-us/library/cc179224.aspx
->>>>&26		string		word/		Microsoft Word 2007+
-!:mime application/vnd.openxmlformats-officedocument.wordprocessingml.document
->>>>&26		string		ppt/		Microsoft PowerPoint 2007+
-!:mime application/vnd.openxmlformats-officedocument.presentationml.presentation
->>>>&26		string		xl/		Microsoft Excel 2007+
-!:mime application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
->>>>&26		default		x		Microsoft OOXML
+>>>>&26		use		msooxml	
+>>>>&26		default		x
+# OpenOffice/Libreoffice orders ZIP entry differently, so check the 4th file
+>>>>>&26	search/1000	PK\003\004
+>>>>>>&26	use		msooxml	
+>>>>>>&26	default		x		Microsoft OOXML
--- a/external/bsd/file/dist/magic/magdir/netbsd	Wed Apr 18 01:39:14 2018 +0000
+++ b/external/bsd/file/dist/magic/magdir/netbsd	Sun Apr 22 07:20:06 2018 +0000
@@ -1,6 +1,6 @@
 
 #------------------------------------------------------------------------------
-# $File: netbsd,v 1.24 2017/03/17 21:35:28 christos Exp $
+# $File: netbsd,v 1.25 2017/09/28 02:37:47 christos Exp $
 # netbsd:  file(1) magic for NetBSD objects
 #
 # All new-style magic numbers are in network byte order.
--- a/external/bsd/file/dist/magic/magdir/ole2compounddocs	Wed Apr 18 01:39:14 2018 +0000
+++ b/external/bsd/file/dist/magic/magdir/ole2compounddocs	Sun Apr 22 07:20:06 2018 +0000
@@ -1,8 +1,8 @@
 
 #------------------------------------------------------------------------------
-# $File: ole2compounddocs,v 1.4 2009/09/19 16:28:11 christos Exp $
+# $File: ole2compounddocs,v 1.5 2017/10/27 21:43:23 christos Exp $
 # Microsoft OLE 2 Compound Documents : file(1) magic for Microsoft Structured
-# storage (http://en.wikipedia.org/wiki/Structured_Storage)
+# storage (https://en.wikipedia.org/wiki/Compound_File_Binary_Format)
 # Additional tests for OLE 2 Compound Documents should be under this recipe.
 
 0   string  \320\317\021\340\241\261\032\341      OLE 2 Compound Document
@@ -12,3 +12,22 @@
 # - Visio documents
 #   Last update on 10/23/2006 by Lester Hightower
 > 0x480  string  V\000i\000s\000i\000o\000D\000o\000c : Visio Document
+
+# Note: moved & merged Microsoft Office parts from ./msdos Oct 2017
+# Update: Joerg Jenderek
+# from http://filext.com by Derek M Jones <derek@knosof.co.uk>
+# False positive with PPT (also currently this string is too long)
+#0	string/b	\xD0\xCF\x11\xE0\xA1\xB1\x1A\xE1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3E\x00\x03\x00\xFE\xFF\x09\x00\x06	Microsoft Installer
+#0	string/b	\320\317\021\340\241\261\032\341	Microsoft Office Document
+#>48	byte	0x1B					Excel Document
+#!:mime application/vnd.ms-excel
+>546	string	bjbj			: Microsoft Word Document
+!:mime	application/msword
+# https://www.macdisk.com/macsigen.php
+!:apple	MSWDWDBN
+!:ext	doc/dot
+>546	string	jbjb			: Microsoft Word Document
+!:mime	application/msword
+!:apple	MSWDWDBN
+!:ext	doc
+
--- a/external/bsd/file/dist/magic/magdir/pgp	Wed Apr 18 01:39:14 2018 +0000
+++ b/external/bsd/file/dist/magic/magdir/pgp	Sun Apr 22 07:20:06 2018 +0000
@@ -1,11 +1,50 @@
 
 #------------------------------------------------------------------------------
-# $File: pgp,v 1.14 2017/03/17 21:35:28 christos Exp $
+# $File: pgp,v 1.15 2018/02/24 16:11:23 christos Exp $
 # pgp:  file(1) magic for Pretty Good Privacy
 # see http://lists.gnupg.org/pipermail/gnupg-devel/1999-September/016052.html
 #
-0       beshort         0x9900                  PGP key public ring
-!:mime	application/x-pgp-keyring
+# Update: Joerg Jenderek
+# Note: verified by `gpg -v --debug 0x02 --list-packets < PUBRING263_10.PGP`
+#0		byte	0x99		MAYBE PGP 0x99
+0		byte	0x99
+# 99h~10;0110;01~2=old packet type;tag 6=Public-Key Packet;1=two-octet length
+# A two-octet body header encodes packet lengths of 192~00C0h - 8383~20BFh
+#>1		ubeshort	x		\b, body length 0x%.4x
+# skip Basic.Image Beauty.320 Pic.Icons by looking for low version number
+#>3		ubyte		x		\b, V=%u
+#>3		ubyte		<5		VERSION OK
+>3		ubyte		<5
+# next packet type often b4h~(tag 13)~User ID Packet, b0h~(tag 12)~Trust packet
+#>>(1.S+3)	ubyte	x		\b, next packet type 0x%x
+# skip 9900-v4.bin 9902-v4.bin by looking for valid second packet type (bit 7=1)
+#>>(1.S+3)	ubyte	>0x7F		TYPE OK,
+>>(1.S+3)	ubyte	>0x7F
+# old versions 2,3 implies Pretty Good Privacy
+>>>3		ubyte		<4		PGP key public ring (v%u)
+!:mime		application/pgp-keys
+!:ext		pgp/ASD
+>>>>4		beldate		x		created %s
+# days that this key is valid. If this number is zero, then it does not expire
+>>>>8		ubeshort	>0		\b, %u days valid
+>>>>8		ubeshort	=0		\b, not expire
+# display key algorithm 1~RSA (Encrypt or Sign)
+>>>>10		use		key_algo
+# Multiprecision Integers (MPI) size
+>>>>11		ubeshort	x		%u bits
+# MPI
+>>>>13		ubequad		x		MPI=0x%16.16llx...
+# new version implies Pretty Good Privacy (PGP) >= 5.0 or Gnu Privacy Guard (GPG)
+>>>3		ubyte		>3		PGP/GPG key public ring (v%u)
+!:mime		application/pgp-keys
+!:ext		pgp/gpg/pkr/asd