Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Jan 2016 22:44:14 +0000 (UTC)
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r293383 - in projects/sendfile: . bin/sh bin/sh/tests/builtins contrib/binutils/bfd contrib/less contrib/llvm/patches contrib/llvm/projects/libunwind/src contrib/llvm/tools/clang/tools/...
Message-ID:  <201601072244.u07MiEQb079284@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: glebius
Date: Thu Jan  7 22:44:13 2016
New Revision: 293383
URL: https://svnweb.freebsd.org/changeset/base/293383

Log:
  Merge head r261119 through r293382.

Added:
  projects/sendfile/bin/sh/tests/builtins/cd9.0
     - copied unchanged from r293382, head/bin/sh/tests/builtins/cd9.0
  projects/sendfile/bin/sh/tests/builtins/cd9.0.stdout
     - copied unchanged from r293382, head/bin/sh/tests/builtins/cd9.0.stdout
  projects/sendfile/bin/sh/tests/builtins/getopts10.0
     - copied unchanged from r293382, head/bin/sh/tests/builtins/getopts10.0
  projects/sendfile/contrib/less/compose.uni
     - copied unchanged from r293382, head/contrib/less/compose.uni
  projects/sendfile/contrib/less/mkutable
     - copied unchanged from r293382, head/contrib/less/mkutable
  projects/sendfile/contrib/less/ubin.uni
     - copied unchanged from r293382, head/contrib/less/ubin.uni
  projects/sendfile/contrib/less/wide.uni
     - copied unchanged from r293382, head/contrib/less/wide.uni
  projects/sendfile/etc/mtree/BSD.libsoft.dist
     - copied unchanged from r293382, head/etc/mtree/BSD.libsoft.dist
  projects/sendfile/lib/libsysdecode/Makefile.depend
     - copied unchanged from r293382, head/lib/libsysdecode/Makefile.depend
  projects/sendfile/share/man/man4/rtwn.4
     - copied unchanged from r293382, head/share/man/man4/rtwn.4
  projects/sendfile/share/man/man4/rtwnfw.4
     - copied unchanged from r293382, head/share/man/man4/rtwnfw.4
  projects/sendfile/sys/arm64/arm64/ofw_machdep.c
     - copied unchanged from r293382, head/sys/arm64/arm64/ofw_machdep.c
  projects/sendfile/sys/compat/linuxkpi/common/include/linux/rcupdate.h
     - copied unchanged from r293382, head/sys/compat/linuxkpi/common/include/linux/rcupdate.h
  projects/sendfile/sys/contrib/dev/rtwn/
     - copied from r293382, head/sys/contrib/dev/rtwn/
  projects/sendfile/sys/dev/rtwn/
     - copied from r293382, head/sys/dev/rtwn/
  projects/sendfile/sys/dev/syscons/plasma/
     - copied from r293382, head/sys/dev/syscons/plasma/
  projects/sendfile/sys/geom/eli/g_eli_hmac.c
     - copied unchanged from r293382, head/sys/geom/eli/g_eli_hmac.c
  projects/sendfile/sys/modules/rtwn/
     - copied from r293382, head/sys/modules/rtwn/
  projects/sendfile/sys/modules/rtwnfw/
     - copied from r293382, head/sys/modules/rtwnfw/
  projects/sendfile/sys/modules/syscons/plasma/
     - copied from r293382, head/sys/modules/syscons/plasma/
  projects/sendfile/sys/opencrypto/xform_aes_icm.c
     - copied unchanged from r293382, head/sys/opencrypto/xform_aes_icm.c
  projects/sendfile/sys/opencrypto/xform_aes_xts.c
     - copied unchanged from r293382, head/sys/opencrypto/xform_aes_xts.c
  projects/sendfile/sys/opencrypto/xform_auth.h
     - copied unchanged from r293382, head/sys/opencrypto/xform_auth.h
  projects/sendfile/sys/opencrypto/xform_blf.c
     - copied unchanged from r293382, head/sys/opencrypto/xform_blf.c
  projects/sendfile/sys/opencrypto/xform_cast5.c
     - copied unchanged from r293382, head/sys/opencrypto/xform_cast5.c
  projects/sendfile/sys/opencrypto/xform_cml.c
     - copied unchanged from r293382, head/sys/opencrypto/xform_cml.c
  projects/sendfile/sys/opencrypto/xform_comp.h
     - copied unchanged from r293382, head/sys/opencrypto/xform_comp.h
  projects/sendfile/sys/opencrypto/xform_deflate.c
     - copied unchanged from r293382, head/sys/opencrypto/xform_deflate.c
  projects/sendfile/sys/opencrypto/xform_des1.c
     - copied unchanged from r293382, head/sys/opencrypto/xform_des1.c
  projects/sendfile/sys/opencrypto/xform_des3.c
     - copied unchanged from r293382, head/sys/opencrypto/xform_des3.c
  projects/sendfile/sys/opencrypto/xform_enc.h
     - copied unchanged from r293382, head/sys/opencrypto/xform_enc.h
  projects/sendfile/sys/opencrypto/xform_gmac.c
     - copied unchanged from r293382, head/sys/opencrypto/xform_gmac.c
  projects/sendfile/sys/opencrypto/xform_md5.c
     - copied unchanged from r293382, head/sys/opencrypto/xform_md5.c
  projects/sendfile/sys/opencrypto/xform_null.c
     - copied unchanged from r293382, head/sys/opencrypto/xform_null.c
  projects/sendfile/sys/opencrypto/xform_rijndael.c
     - copied unchanged from r293382, head/sys/opencrypto/xform_rijndael.c
  projects/sendfile/sys/opencrypto/xform_rmd160.c
     - copied unchanged from r293382, head/sys/opencrypto/xform_rmd160.c
  projects/sendfile/sys/opencrypto/xform_sha1.c
     - copied unchanged from r293382, head/sys/opencrypto/xform_sha1.c
  projects/sendfile/sys/opencrypto/xform_sha2.c
     - copied unchanged from r293382, head/sys/opencrypto/xform_sha2.c
  projects/sendfile/sys/opencrypto/xform_skipjack.c
     - copied unchanged from r293382, head/sys/opencrypto/xform_skipjack.c
  projects/sendfile/sys/opencrypto/xform_userland.h
     - copied unchanged from r293382, head/sys/opencrypto/xform_userland.h
  projects/sendfile/sys/x86/include/metadata.h
     - copied unchanged from r293382, head/sys/x86/include/metadata.h
  projects/sendfile/tests/sys/kern/unix_passfd_test.c
     - copied unchanged from r293382, head/tests/sys/kern/unix_passfd_test.c
  projects/sendfile/usr.bin/clang/clang/CC.sh
     - copied unchanged from r293382, head/usr.bin/clang/clang/CC.sh
  projects/sendfile/usr.sbin/rpcbind/tests/
     - copied from r293382, head/usr.sbin/rpcbind/tests/
Replaced:
  projects/sendfile/sys/amd64/include/metadata.h
     - copied unchanged from r293382, head/sys/amd64/include/metadata.h
Deleted:
  projects/sendfile/contrib/llvm/patches/patch-02-add-CC-aliases.diff
  projects/sendfile/sys/ofed/include/rdma/Kbuild
  projects/sendfile/tools/regression/sockets/unix_passfd/
Modified:
  projects/sendfile/COPYRIGHT
  projects/sendfile/Makefile
  projects/sendfile/Makefile.inc1
  projects/sendfile/ObsoleteFiles.inc
  projects/sendfile/bin/sh/eval.c
  projects/sendfile/bin/sh/exec.c
  projects/sendfile/bin/sh/expand.c
  projects/sendfile/bin/sh/expand.h
  projects/sendfile/bin/sh/mkbuiltins
  projects/sendfile/bin/sh/tests/builtins/Makefile
  projects/sendfile/contrib/binutils/bfd/elf32-arm.c
  projects/sendfile/contrib/less/LICENSE
  projects/sendfile/contrib/less/NEWS
  projects/sendfile/contrib/less/README
  projects/sendfile/contrib/less/brac.c
  projects/sendfile/contrib/less/ch.c
  projects/sendfile/contrib/less/charset.c
  projects/sendfile/contrib/less/charset.h
  projects/sendfile/contrib/less/cmd.h
  projects/sendfile/contrib/less/cmdbuf.c
  projects/sendfile/contrib/less/command.c
  projects/sendfile/contrib/less/cvt.c
  projects/sendfile/contrib/less/decode.c
  projects/sendfile/contrib/less/edit.c
  projects/sendfile/contrib/less/filename.c
  projects/sendfile/contrib/less/forwback.c
  projects/sendfile/contrib/less/funcs.h
  projects/sendfile/contrib/less/help.c
  projects/sendfile/contrib/less/ifile.c
  projects/sendfile/contrib/less/input.c
  projects/sendfile/contrib/less/jump.c
  projects/sendfile/contrib/less/less.h
  projects/sendfile/contrib/less/less.hlp
  projects/sendfile/contrib/less/less.nro
  projects/sendfile/contrib/less/lessecho.c
  projects/sendfile/contrib/less/lessecho.nro
  projects/sendfile/contrib/less/lesskey.c
  projects/sendfile/contrib/less/lesskey.h
  projects/sendfile/contrib/less/lesskey.nro
  projects/sendfile/contrib/less/lglob.h
  projects/sendfile/contrib/less/line.c
  projects/sendfile/contrib/less/linenum.c
  projects/sendfile/contrib/less/lsystem.c
  projects/sendfile/contrib/less/main.c
  projects/sendfile/contrib/less/mark.c
  projects/sendfile/contrib/less/mkhelp.c
  projects/sendfile/contrib/less/optfunc.c
  projects/sendfile/contrib/less/option.c
  projects/sendfile/contrib/less/option.h
  projects/sendfile/contrib/less/opttbl.c
  projects/sendfile/contrib/less/os.c
  projects/sendfile/contrib/less/output.c
  projects/sendfile/contrib/less/pattern.c
  projects/sendfile/contrib/less/pattern.h
  projects/sendfile/contrib/less/pckeys.h
  projects/sendfile/contrib/less/position.c
  projects/sendfile/contrib/less/position.h
  projects/sendfile/contrib/less/prompt.c
  projects/sendfile/contrib/less/regexp.c
  projects/sendfile/contrib/less/screen.c
  projects/sendfile/contrib/less/scrsize.c
  projects/sendfile/contrib/less/search.c
  projects/sendfile/contrib/less/signal.c
  projects/sendfile/contrib/less/tags.c
  projects/sendfile/contrib/less/ttyin.c
  projects/sendfile/contrib/less/version.c
  projects/sendfile/contrib/llvm/projects/libunwind/src/AddressSpace.hpp
  projects/sendfile/contrib/llvm/projects/libunwind/src/DwarfParser.hpp
  projects/sendfile/contrib/llvm/projects/libunwind/src/UnwindCursor.hpp
  projects/sendfile/contrib/llvm/projects/libunwind/src/UnwindRegistersSave.S
  projects/sendfile/contrib/llvm/projects/libunwind/src/config.h
  projects/sendfile/contrib/llvm/projects/libunwind/src/libunwind.cpp
  projects/sendfile/contrib/llvm/tools/clang/tools/driver/driver.cpp
  projects/sendfile/contrib/pf/pflogd/pflogd.c
  projects/sendfile/etc/Makefile
  projects/sendfile/etc/mtree/BSD.tests.dist
  projects/sendfile/etc/mtree/Makefile
  projects/sendfile/etc/ntp/leap-seconds
  projects/sendfile/etc/rc
  projects/sendfile/gnu/usr.bin/binutils/ld/Makefile
  projects/sendfile/include/paths.h
  projects/sendfile/lib/libc/gen/exec.3
  projects/sendfile/lib/libc/gen/posix_spawn.3
  projects/sendfile/lib/libc/stdio/findfp.c
  projects/sendfile/lib/libc/sys/ptrace.2
  projects/sendfile/lib/libdpv/util.h
  projects/sendfile/lib/libgssapi/gss_release_oid_set.c
  projects/sendfile/lib/libmd/Makefile.depend
  projects/sendfile/lib/libmd/mdXhl.c
  projects/sendfile/lib/libnv/tests/dnv_tests.cc
  projects/sendfile/lib/libnv/tests/nv_array_tests.cc
  projects/sendfile/lib/libstand/Makefile
  projects/sendfile/libexec/rtld-elf/aarch64/rtld_machdep.h
  projects/sendfile/libexec/rtld-elf/amd64/reloc.c
  projects/sendfile/libexec/rtld-elf/amd64/rtld_machdep.h
  projects/sendfile/libexec/rtld-elf/arm/reloc.c
  projects/sendfile/libexec/rtld-elf/arm/rtld_machdep.h
  projects/sendfile/libexec/rtld-elf/i386/rtld_machdep.h
  projects/sendfile/libexec/rtld-elf/mips/rtld_machdep.h
  projects/sendfile/libexec/rtld-elf/paths.h
  projects/sendfile/libexec/rtld-elf/powerpc/rtld_machdep.h
  projects/sendfile/libexec/rtld-elf/powerpc64/reloc.c
  projects/sendfile/libexec/rtld-elf/powerpc64/rtld_machdep.h
  projects/sendfile/libexec/rtld-elf/powerpc64/rtld_start.S
  projects/sendfile/libexec/rtld-elf/rtld.c
  projects/sendfile/libexec/rtld-elf/rtld.h
  projects/sendfile/libexec/rtld-elf/sparc64/rtld_machdep.h
  projects/sendfile/release/Makefile
  projects/sendfile/release/amd64/make-memstick.sh
  projects/sendfile/release/amd64/mkisoimages.sh
  projects/sendfile/release/arm64/make-memstick.sh
  projects/sendfile/release/doc/en_US.ISO8859-1/hardware/article.xml
  projects/sendfile/release/i386/make-memstick.sh
  projects/sendfile/release/i386/mkisoimages.sh
  projects/sendfile/release/pc98/mkisoimages.sh
  projects/sendfile/release/powerpc/make-memstick.sh
  projects/sendfile/release/powerpc/mkisoimages.sh
  projects/sendfile/release/scripts/make-manifest.sh
  projects/sendfile/release/sparc64/mkisoimages.sh
  projects/sendfile/sbin/geom/class/eli/Makefile
  projects/sendfile/sbin/reboot/reboot.c
  projects/sendfile/share/man/man4/Makefile
  projects/sendfile/share/man/man4/ioat.4
  projects/sendfile/share/man/man4/nvme.4
  projects/sendfile/share/man/man4/splash.4
  projects/sendfile/share/man/man7/ascii.7
  projects/sendfile/share/man/man9/Makefile
  projects/sendfile/share/man/man9/make_dev.9
  projects/sendfile/share/misc/ascii   (contents, props changed)
  projects/sendfile/share/mk/bsd.compiler.mk
  projects/sendfile/share/mk/src.opts.mk
  projects/sendfile/share/vt/keymaps/gr.101.acc.kbd
  projects/sendfile/share/vt/keymaps/gr.elot.acc.kbd
  projects/sendfile/share/vt/keymaps/hu.101.kbd
  projects/sendfile/share/vt/keymaps/hu.102.kbd
  projects/sendfile/share/vt/keymaps/lt.kbd
  projects/sendfile/share/vt/keymaps/pt.acc.kbd
  projects/sendfile/share/vt/keymaps/pt.kbd
  projects/sendfile/share/vt/keymaps/ua.kbd
  projects/sendfile/share/vt/keymaps/ua.shift.alt.kbd
  projects/sendfile/sys/amd64/amd64/machdep.c
  projects/sendfile/sys/arm/arm/db_interface.c
  projects/sendfile/sys/arm/arm/locore-v6.S
  projects/sendfile/sys/arm/arm/machdep.c
  projects/sendfile/sys/arm/arm/physmem.c
  projects/sendfile/sys/arm/xscale/ixp425/avila_machdep.c
  projects/sendfile/sys/arm64/arm64/identcpu.c
  projects/sendfile/sys/arm64/arm64/machdep.c
  projects/sendfile/sys/arm64/arm64/mp_machdep.c
  projects/sendfile/sys/arm64/include/armreg.h
  projects/sendfile/sys/arm64/include/cpu.h
  projects/sendfile/sys/arm64/include/ofw_machdep.h
  projects/sendfile/sys/boot/efi/boot1/boot1.c
  projects/sendfile/sys/boot/efi/include/amd64/efibind.h
  projects/sendfile/sys/boot/efi/include/arm64/efibind.h
  projects/sendfile/sys/boot/efi/include/efierr.h
  projects/sendfile/sys/boot/efi/include/i386/efibind.h
  projects/sendfile/sys/boot/efi/libefi/Makefile
  projects/sendfile/sys/boot/efi/libefi/efi_console.c
  projects/sendfile/sys/boot/efi/loader/arch/amd64/framebuffer.c
  projects/sendfile/sys/boot/efi/loader/bootinfo.c
  projects/sendfile/sys/boot/efi/loader/copy.c
  projects/sendfile/sys/boot/efi/loader/devicename.c
  projects/sendfile/sys/boot/efi/loader/main.c
  projects/sendfile/sys/boot/ficl/amd64/sysdep.c
  projects/sendfile/sys/boot/forth/beastie.4th
  projects/sendfile/sys/boot/forth/beastie.4th.8
  projects/sendfile/sys/boot/forth/loader.conf
  projects/sendfile/sys/boot/forth/loader.conf.5
  projects/sendfile/sys/boot/forth/menu-commands.4th
  projects/sendfile/sys/boot/forth/menu.rc
  projects/sendfile/sys/boot/forth/support.4th
  projects/sendfile/sys/boot/i386/loader/main.c
  projects/sendfile/sys/boot/libstand32/Makefile
  projects/sendfile/sys/boot/libstand32/Makefile.depend
  projects/sendfile/sys/boot/uboot/lib/copy.c
  projects/sendfile/sys/boot/userboot/test/Makefile.depend
  projects/sendfile/sys/boot/zfs/libzfs.h
  projects/sendfile/sys/boot/zfs/zfs.c
  projects/sendfile/sys/boot/zfs/zfsimpl.c
  projects/sendfile/sys/cam/ctl/ctl.c
  projects/sendfile/sys/cam/scsi/scsi_ch.c
  projects/sendfile/sys/cam/scsi/scsi_enc.c
  projects/sendfile/sys/cam/scsi/scsi_pass.c
  projects/sendfile/sys/cam/scsi/scsi_pt.c
  projects/sendfile/sys/cam/scsi/scsi_sa.c
  projects/sendfile/sys/cam/scsi/scsi_sg.c
  projects/sendfile/sys/cddl/boot/zfs/lz4.c
  projects/sendfile/sys/compat/linuxkpi/common/include/linux/cdev.h
  projects/sendfile/sys/compat/linuxkpi/common/include/linux/device.h
  projects/sendfile/sys/compat/linuxkpi/common/include/linux/file.h
  projects/sendfile/sys/compat/linuxkpi/common/include/linux/kobject.h
  projects/sendfile/sys/compat/linuxkpi/common/include/linux/miscdevice.h
  projects/sendfile/sys/compat/linuxkpi/common/src/linux_compat.c
  projects/sendfile/sys/compat/linuxkpi/common/src/linux_pci.c
  projects/sendfile/sys/conf/files
  projects/sendfile/sys/conf/files.arm64
  projects/sendfile/sys/conf/kmod.mk
  projects/sendfile/sys/conf/newvers.sh
  projects/sendfile/sys/contrib/rdma/krping/krping.c
  projects/sendfile/sys/crypto/sha1.h
  projects/sendfile/sys/dev/asmc/asmc.c
  projects/sendfile/sys/dev/ath/ah_osdep.c
  projects/sendfile/sys/dev/ath/ah_osdep.h
  projects/sendfile/sys/dev/bwi/if_bwi.c
  projects/sendfile/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c
  projects/sendfile/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c
  projects/sendfile/sys/dev/cxgb/ulp/tom/cxgb_l2t.c
  projects/sendfile/sys/dev/cxgb/ulp/tom/cxgb_listen.c
  projects/sendfile/sys/dev/cxgbe/iw_cxgbe/cm.c
  projects/sendfile/sys/dev/cxgbe/tom/t4_cpl_io.c
  projects/sendfile/sys/dev/cxgbe/tom/t4_listen.c
  projects/sendfile/sys/dev/cxgbe/tom/t4_tom_l2t.c
  projects/sendfile/sys/dev/e1000/if_em.c
  projects/sendfile/sys/dev/e1000/if_em.h
  projects/sendfile/sys/dev/if_ndis/if_ndis.c
  projects/sendfile/sys/dev/ioat/ioat.c
  projects/sendfile/sys/dev/ioat/ioat.h
  projects/sendfile/sys/dev/ismt/ismt.c
  projects/sendfile/sys/dev/iwi/if_iwi.c
  projects/sendfile/sys/dev/iwm/if_iwm.c
  projects/sendfile/sys/dev/iwm/if_iwm_mac_ctxt.c
  projects/sendfile/sys/dev/iwm/if_iwmvar.h
  projects/sendfile/sys/dev/iwn/if_iwn.c
  projects/sendfile/sys/dev/ixgbe/if_ix.c
  projects/sendfile/sys/dev/ixgbe/if_ixv.c
  projects/sendfile/sys/dev/ixl/if_ixl.c
  projects/sendfile/sys/dev/malo/if_malo.c
  projects/sendfile/sys/dev/mlx5/mlx5_en/en.h
  projects/sendfile/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c
  projects/sendfile/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
  projects/sendfile/sys/dev/netmap/if_em_netmap.h
  projects/sendfile/sys/dev/nvd/nvd.c
  projects/sendfile/sys/dev/nvme/nvme.c
  projects/sendfile/sys/dev/nvme/nvme_ctrlr.c
  projects/sendfile/sys/dev/nvme/nvme_private.h
  projects/sendfile/sys/dev/nvme/nvme_qpair.c
  projects/sendfile/sys/dev/nvme/nvme_sysctl.c
  projects/sendfile/sys/dev/ofw/ofw_bus_subr.c
  projects/sendfile/sys/dev/otus/if_otus.c
  projects/sendfile/sys/dev/ral/rt2560.c
  projects/sendfile/sys/dev/ral/rt2661.c
  projects/sendfile/sys/dev/ral/rt2860.c
  projects/sendfile/sys/dev/rt/if_rt.c
  projects/sendfile/sys/dev/sec/sec.c
  projects/sendfile/sys/dev/tsec/if_tsec.c
  projects/sendfile/sys/dev/usb/controller/dwc_otg.c
  projects/sendfile/sys/dev/usb/net/if_axe.c
  projects/sendfile/sys/dev/usb/usbdevs
  projects/sendfile/sys/dev/usb/wlan/if_rsu.c
  projects/sendfile/sys/dev/usb/wlan/if_rum.c
  projects/sendfile/sys/dev/usb/wlan/if_run.c
  projects/sendfile/sys/dev/usb/wlan/if_uath.c
  projects/sendfile/sys/dev/usb/wlan/if_upgt.c
  projects/sendfile/sys/dev/usb/wlan/if_ural.c
  projects/sendfile/sys/dev/usb/wlan/if_urtw.c
  projects/sendfile/sys/dev/usb/wlan/if_urtwn.c
  projects/sendfile/sys/dev/usb/wlan/if_urtwnreg.h
  projects/sendfile/sys/dev/usb/wlan/if_zyd.c
  projects/sendfile/sys/fs/devfs/devfs_vnops.c
  projects/sendfile/sys/fs/ext2fs/ext2_bmap.c
  projects/sendfile/sys/fs/nullfs/null_vnops.c
  projects/sendfile/sys/geom/eli/g_eli.c
  projects/sendfile/sys/geom/eli/g_eli.h
  projects/sendfile/sys/geom/eli/g_eli_crypto.c
  projects/sendfile/sys/geom/eli/g_eli_key_cache.c
  projects/sendfile/sys/geom/eli/pkcs5v2.c
  projects/sendfile/sys/i386/i386/machdep.c
  projects/sendfile/sys/i386/include/metadata.h
  projects/sendfile/sys/kern/kern_conf.c
  projects/sendfile/sys/kern/kern_environment.c
  projects/sendfile/sys/kern/kern_fork.c
  projects/sendfile/sys/kern/kern_ktr.c
  projects/sendfile/sys/kern/kern_sig.c
  projects/sendfile/sys/kern/kern_thr.c
  projects/sendfile/sys/kern/kern_thread.c
  projects/sendfile/sys/kern/sys_process.c
  projects/sendfile/sys/kern/tty.c
  projects/sendfile/sys/kern/vfs_cache.c
  projects/sendfile/sys/kern/vfs_default.c
  projects/sendfile/sys/kern/vfs_subr.c
  projects/sendfile/sys/kgssapi/gss_impl.c
  projects/sendfile/sys/mips/beri/beri_machdep.c
  projects/sendfile/sys/modules/Makefile
  projects/sendfile/sys/modules/geom/geom_eli/Makefile
  projects/sendfile/sys/modules/syscons/Makefile
  projects/sendfile/sys/net/bpf.c
  projects/sendfile/sys/net/flowtable.c
  projects/sendfile/sys/net/if.c
  projects/sendfile/sys/net/if_ethersubr.c
  projects/sendfile/sys/net/if_gif.c
  projects/sendfile/sys/net/if_gre.c
  projects/sendfile/sys/net/if_llatbl.c
  projects/sendfile/sys/net/if_llatbl.h
  projects/sendfile/sys/net/if_var.h
  projects/sendfile/sys/net/route.c
  projects/sendfile/sys/net/route.h
  projects/sendfile/sys/net/rtsock.c
  projects/sendfile/sys/net80211/ieee80211_freebsd.h
  projects/sendfile/sys/net80211/ieee80211_scan_sw.c
  projects/sendfile/sys/net80211/ieee80211_var.h
  projects/sendfile/sys/netgraph/netflow/netflow.c
  projects/sendfile/sys/netinet/if_ether.c
  projects/sendfile/sys/netinet/if_ether.h
  projects/sendfile/sys/netinet/in.c
  projects/sendfile/sys/netinet/in_fib.c
  projects/sendfile/sys/netinet/ip_output.c
  projects/sendfile/sys/netinet/sctp_structs.h
  projects/sendfile/sys/netinet/tcp_input.c
  projects/sendfile/sys/netinet/tcp_output.c
  projects/sendfile/sys/netinet/tcp_stacks/fastpath.c
  projects/sendfile/sys/netinet/tcp_subr.c
  projects/sendfile/sys/netinet/tcp_timer.c
  projects/sendfile/sys/netinet/tcp_usrreq.c
  projects/sendfile/sys/netinet/tcp_var.h
  projects/sendfile/sys/netinet/toecore.c
  projects/sendfile/sys/netinet6/icmp6.c
  projects/sendfile/sys/netinet6/in6.c
  projects/sendfile/sys/netinet6/in6.h
  projects/sendfile/sys/netinet6/in6_pcb.c
  projects/sendfile/sys/netinet6/in6_src.c
  projects/sendfile/sys/netinet6/ip6_output.c
  projects/sendfile/sys/netinet6/ip6_var.h
  projects/sendfile/sys/netinet6/nd6.c
  projects/sendfile/sys/netinet6/nd6.h
  projects/sendfile/sys/netinet6/nd6_nbr.c
  projects/sendfile/sys/netinet6/raw_ip6.c
  projects/sendfile/sys/netinet6/udp6_usrreq.c
  projects/sendfile/sys/netpfil/pf/pf.c
  projects/sendfile/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c
  projects/sendfile/sys/opencrypto/skipjack.h
  projects/sendfile/sys/opencrypto/xform.c
  projects/sendfile/sys/opencrypto/xform.h
  projects/sendfile/sys/powerpc/aim/aim_machdep.c
  projects/sendfile/sys/powerpc/aim/locore64.S
  projects/sendfile/sys/powerpc/aim/mp_cpudep.c
  projects/sendfile/sys/powerpc/booke/booke_machdep.c
  projects/sendfile/sys/powerpc/booke/locore.S
  projects/sendfile/sys/powerpc/booke/machdep_e500.c
  projects/sendfile/sys/powerpc/booke/pmap.c
  projects/sendfile/sys/powerpc/include/cpu.h
  projects/sendfile/sys/powerpc/include/intr_machdep.h
  projects/sendfile/sys/powerpc/include/platform.h
  projects/sendfile/sys/powerpc/mpc85xx/lbc.c
  projects/sendfile/sys/powerpc/mpc85xx/mpc85xx.c
  projects/sendfile/sys/powerpc/mpc85xx/mpc85xx.h
  projects/sendfile/sys/powerpc/mpc85xx/pci_mpc85xx.c
  projects/sendfile/sys/powerpc/mpc85xx/platform_mpc85xx.c
  projects/sendfile/sys/powerpc/powerpc/cpu.c
  projects/sendfile/sys/powerpc/powerpc/intr_machdep.c
  projects/sendfile/sys/powerpc/powerpc/machdep.c
  projects/sendfile/sys/powerpc/powerpc/platform.c
  projects/sendfile/sys/powerpc/powerpc/platform_if.m
  projects/sendfile/sys/sparc64/include/ktr.h
  projects/sendfile/sys/sparc64/include/ofw_machdep.h
  projects/sendfile/sys/sparc64/sparc64/exception.S
  projects/sendfile/sys/sparc64/sparc64/machdep.c
  projects/sendfile/sys/sparc64/sparc64/mp_exception.S
  projects/sendfile/sys/sparc64/sparc64/pmap.c
  projects/sendfile/sys/sparc64/sparc64/swtch.S
  projects/sendfile/sys/sys/conf.h
  projects/sendfile/sys/sys/copyright.h
  projects/sendfile/sys/sys/nv.h
  projects/sendfile/sys/sys/param.h
  projects/sendfile/sys/sys/proc.h
  projects/sendfile/sys/sys/ptrace.h
  projects/sendfile/sys/x86/include/specialreg.h
  projects/sendfile/sys/x86/x86/identcpu.c
  projects/sendfile/sys/x86/xen/pv.c
  projects/sendfile/sys/xen/xenbus/xenbusb.c
  projects/sendfile/targets/pseudo/userland/lib/Makefile.depend
  projects/sendfile/tests/sys/kern/Makefile
  projects/sendfile/tests/sys/kern/ptrace_test.c
  projects/sendfile/tools/build/mk/OptionalObsoleteFiles.inc
  projects/sendfile/tools/regression/geom_concat/conf.sh
  projects/sendfile/tools/regression/geom_mirror/conf.sh
  projects/sendfile/tools/regression/geom_mirror/test-1.t
  projects/sendfile/tools/regression/geom_mirror/test-2.t
  projects/sendfile/tools/regression/geom_mirror/test-3.t
  projects/sendfile/tools/regression/geom_mirror/test-4.t
  projects/sendfile/tools/regression/geom_mirror/test-5.t
  projects/sendfile/tools/regression/geom_mirror/test-6.t
  projects/sendfile/tools/regression/geom_mirror/test-7.t
  projects/sendfile/tools/regression/geom_raid3/conf.sh
  projects/sendfile/tools/regression/geom_shsec/conf.sh
  projects/sendfile/tools/regression/geom_stripe/conf.sh
  projects/sendfile/tools/regression/geom_subr.sh
  projects/sendfile/usr.bin/cap_mkdb/cap_mkdb.c
  projects/sendfile/usr.bin/clang/clang/Makefile
  projects/sendfile/usr.bin/kdump/Makefile.depend
  projects/sendfile/usr.bin/less/defines.h
  projects/sendfile/usr.bin/nfsstat/Makefile.depend
  projects/sendfile/usr.bin/truss/Makefile.depend.amd64
  projects/sendfile/usr.sbin/bhyve/bhyverun.c
  projects/sendfile/usr.sbin/bhyve/pci_emul.c
  projects/sendfile/usr.sbin/bsdinstall/scripts/auto
  projects/sendfile/usr.sbin/camdd/camdd.c
  projects/sendfile/usr.sbin/cron/crontab/crontab.5
  projects/sendfile/usr.sbin/gssd/gssd.c
  projects/sendfile/usr.sbin/jls/Makefile.depend
  projects/sendfile/usr.sbin/kbdcontrol/kbdmap.5
  projects/sendfile/usr.sbin/mountd/exports.5
  projects/sendfile/usr.sbin/mountd/mountd.c
  projects/sendfile/usr.sbin/rpcbind/Makefile
  projects/sendfile/usr.sbin/rpcbind/check_bound.c
  projects/sendfile/usr.sbin/rpcbind/rpcbind.h
  projects/sendfile/usr.sbin/rpcbind/util.c
  projects/sendfile/usr.sbin/services_mkdb/services_mkdb.c
  projects/sendfile/usr.sbin/sesutil/Makefile.depend
Directory Properties:
  projects/sendfile/   (props changed)
  projects/sendfile/contrib/binutils/   (props changed)
  projects/sendfile/contrib/less/   (props changed)
  projects/sendfile/contrib/llvm/   (props changed)
  projects/sendfile/contrib/llvm/projects/libunwind/   (props changed)
  projects/sendfile/contrib/llvm/tools/clang/   (props changed)
  projects/sendfile/contrib/pf/   (props changed)
  projects/sendfile/gnu/usr.bin/binutils/   (props changed)
  projects/sendfile/include/   (props changed)
  projects/sendfile/lib/libc/   (props changed)
  projects/sendfile/sbin/   (props changed)
  projects/sendfile/share/   (props changed)
  projects/sendfile/share/man/man4/   (props changed)
  projects/sendfile/sys/   (props changed)
  projects/sendfile/sys/boot/   (props changed)
  projects/sendfile/sys/conf/   (props changed)
  projects/sendfile/targets/   (props changed)
  projects/sendfile/usr.sbin/bhyve/   (props changed)

Modified: projects/sendfile/COPYRIGHT
==============================================================================
--- projects/sendfile/COPYRIGHT	Thu Jan  7 22:36:10 2016	(r293382)
+++ projects/sendfile/COPYRIGHT	Thu Jan  7 22:44:13 2016	(r293383)
@@ -4,7 +4,7 @@
 The compilation of software known as FreeBSD is distributed under the
 following terms:
 
-Copyright (c) 1992-2015 The FreeBSD Project. All rights reserved.
+Copyright (c) 1992-2016 The FreeBSD Project. All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions

Modified: projects/sendfile/Makefile
==============================================================================
--- projects/sendfile/Makefile	Thu Jan  7 22:36:10 2016	(r293382)
+++ projects/sendfile/Makefile	Thu Jan  7 22:44:13 2016	(r293383)
@@ -205,7 +205,7 @@ _TARGET_ARCH?=	${MACHINE_ARCH}
 # The user can define ALWAYS_CHECK_MAKE to have this check performed
 # for all targets.
 #
-.if defined(ALWAYS_CHECK_MAKE)
+.if defined(ALWAYS_CHECK_MAKE) || !defined(.PARSEDIR)
 ${TGTS}: upgrade_checks
 .else
 buildworld: upgrade_checks

Modified: projects/sendfile/Makefile.inc1
==============================================================================
--- projects/sendfile/Makefile.inc1	Thu Jan  7 22:36:10 2016	(r293382)
+++ projects/sendfile/Makefile.inc1	Thu Jan  7 22:44:13 2016	(r293383)
@@ -1230,7 +1230,7 @@ reinstallkernel reinstallkernel.debug: _
 	    ${CROSSENV} PATH=${TMPPATH} \
 	    ${MAKE} ${IMAKE_INSTALL} KERNEL=${INSTKERNNAME} ${.TARGET:S/kernel//}
 .endif
-.if ${BUILDKERNELS:[#]} > 1
+.if ${BUILDKERNELS:[#]} > 1 && !defined(NO_INSTALLEXTRAKERNELS)
 .for _kernel in ${BUILDKERNELS:[2..-1]}
 	@echo "--------------------------------------------------------------"
 	@echo ">>> Installing kernel ${_kernel}"
@@ -1261,7 +1261,7 @@ distributekernel distributekernel.debug:
 	    ${DESTDIR}/${DISTDIR}/kernel.meta
 .endif
 .endif
-.if ${BUILDKERNELS:[#]} > 1
+.if ${BUILDKERNELS:[#]} > 1 && !defined(NO_INSTALLEXTRAKERNELS)
 .for _kernel in ${BUILDKERNELS:[2..-1]}
 .if defined(NO_ROOT)
 	echo "#${MTREE_MAGIC}" > ${DESTDIR}/${DISTDIR}/kernel.${_kernel}.premeta
@@ -1284,27 +1284,43 @@ packagekernel:
 .if defined(NO_ROOT)
 .if !defined(NO_INSTALLKERNEL)
 	cd ${DESTDIR}/${DISTDIR}/kernel; \
-	    tar cvf - @${DESTDIR}/${DISTDIR}/kernel.meta | \
+	    tar cvf - --exclude '*.debug' \
+	    @${DESTDIR}/${DISTDIR}/kernel.meta | \
 	    ${XZ_CMD} > ${PACKAGEDIR}/kernel.txz
 .endif
-.if ${BUILDKERNELS:[#]} > 1
+	cd ${DESTDIR}/${DISTDIR}/kernel; \
+	    tar cvf - --include '*/*/*.debug' \
+	    @${DESTDIR}/${DISTDIR}/kernel.meta | \
+	    ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/kernel-dbg.txz
+.if ${BUILDKERNELS:[#]} > 1 && !defined(NO_INSTALLEXTRAKERNELS)
 .for _kernel in ${BUILDKERNELS:[2..-1]}
 	cd ${DESTDIR}/${DISTDIR}/kernel.${_kernel}; \
-	    tar cvf - @${DESTDIR}/${DISTDIR}/kernel.${_kernel}.meta | \
+	    tar cvf - --exclude '*.debug' \
+	    @${DESTDIR}/${DISTDIR}/kernel.${_kernel}.meta | \
 	    ${XZ_CMD} > ${PACKAGEDIR}/kernel.${_kernel}.txz
+	cd ${DESTDIR}/${DISTDIR}/kernel.${_kernel}; \
+	    tar cvf - --include '*/*/*.debug' \
+	    @${DESTDIR}/${DISTDIR}/kernel.${_kernel}.meta | \
+	    ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/kernel.${_kernel}-dbg.txz
 .endfor
 .endif
 .else
 .if !defined(NO_INSTALLKERNEL)
 	cd ${DESTDIR}/${DISTDIR}/kernel; \
-	    tar cvf - . | \
+	    tar cvf - --exclude '*.debug' . | \
 	    ${XZ_CMD} > ${PACKAGEDIR}/kernel.txz
 .endif
-.if ${BUILDKERNELS:[#]} > 1
+	cd ${DESTDIR}/${DISTDIR}/kernel; \
+	    tar cvf - --include '*/*/*.debug' $$(eval find .) | \
+	    ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/kernel-dbg.txz
+.if ${BUILDKERNELS:[#]} > 1 && !defined(NO_INSTALLEXTRAKERNELS)
 .for _kernel in ${BUILDKERNELS:[2..-1]}
 	cd ${DESTDIR}/${DISTDIR}/kernel.${_kernel}; \
-	    tar cvf - . | \
+	    tar cvf - --exclude '*.debug' . | \
 	    ${XZ_CMD} > ${PACKAGEDIR}/kernel.${_kernel}.txz
+	cd ${DESTDIR}/${DISTDIR}/kernel.${_kernel}; \
+	    tar cvf - --include '*/*/*.debug' $$(eval find .) | \
+	    ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/kernel.${_kernel}-dbg.txz
 .endfor
 .endif
 .endif

Modified: projects/sendfile/ObsoleteFiles.inc
==============================================================================
--- projects/sendfile/ObsoleteFiles.inc	Thu Jan  7 22:36:10 2016	(r293382)
+++ projects/sendfile/ObsoleteFiles.inc	Thu Jan  7 22:44:13 2016	(r293383)
@@ -105,6 +105,8 @@ OLD_FILES+=usr/lib/clang/3.7.0/include/x
 OLD_FILES+=usr/lib/clang/3.7.0/include/xtestintrin.h
 OLD_DIRS+=usr/lib/clang/3.7.0/include
 OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.asan-i386.a
+OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.asan-preinit-i386.a
+OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.asan-preinit-x86_64.a
 OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.asan-x86_64.a
 OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.asan_cxx-i386.a
 OLD_FILES+=usr/lib/clang/3.7.0/lib/freebsd/libclang_rt.asan_cxx-x86_64.a

Modified: projects/sendfile/bin/sh/eval.c
==============================================================================
--- projects/sendfile/bin/sh/eval.c	Thu Jan  7 22:36:10 2016	(r293382)
+++ projects/sendfile/bin/sh/eval.c	Thu Jan  7 22:44:13 2016	(r293383)
@@ -496,10 +496,12 @@ exphere(union node *redir, struct arglis
 	struct jmploc *savehandler;
 	struct localvar *savelocalvars;
 	int need_longjmp = 0;
+	unsigned char saveoptreset;
 
 	redir->nhere.expdoc = "";
 	savelocalvars = localvars;
 	localvars = NULL;
+	saveoptreset = shellparam.reset;
 	forcelocal++;
 	savehandler = handler;
 	if (setjmp(jmploc.loc))
@@ -514,6 +516,7 @@ exphere(union node *redir, struct arglis
 	forcelocal--;
 	poplocalvars();
 	localvars = savelocalvars;
+	shellparam.reset = saveoptreset;
 	if (need_longjmp)
 		longjmp(handler->loc, 1);
 	INTON;
@@ -647,6 +650,7 @@ evalbackcmd(union node *n, struct backcm
 	struct jmploc jmploc;
 	struct jmploc *savehandler;
 	struct localvar *savelocalvars;
+	unsigned char saveoptreset;
 
 	result->fd = -1;
 	result->buf = NULL;
@@ -661,6 +665,7 @@ evalbackcmd(union node *n, struct backcm
 	if (is_valid_fast_cmdsubst(n)) {
 		savelocalvars = localvars;
 		localvars = NULL;
+		saveoptreset = shellparam.reset;
 		forcelocal++;
 		savehandler = handler;
 		if (setjmp(jmploc.loc)) {
@@ -671,6 +676,7 @@ evalbackcmd(union node *n, struct backcm
 				forcelocal--;
 				poplocalvars();
 				localvars = savelocalvars;
+				shellparam.reset = saveoptreset;
 				longjmp(handler->loc, 1);
 			}
 		} else {
@@ -681,6 +687,7 @@ evalbackcmd(union node *n, struct backcm
 		forcelocal--;
 		poplocalvars();
 		localvars = savelocalvars;
+		shellparam.reset = saveoptreset;
 	} else {
 		if (pipe(pip) < 0)
 			error("Pipe call failed: %s", strerror(errno));

Modified: projects/sendfile/bin/sh/exec.c
==============================================================================
--- projects/sendfile/bin/sh/exec.c	Thu Jan  7 22:36:10 2016	(r293382)
+++ projects/sendfile/bin/sh/exec.c	Thu Jan  7 22:44:13 2016	(r293383)
@@ -439,12 +439,14 @@ success:
 int
 find_builtin(const char *name, int *special)
 {
-	const struct builtincmd *bp;
+	const unsigned char *bp;
+	size_t len;
 
-	for (bp = builtincmd ; bp->name ; bp++) {
-		if (*bp->name == *name && equal(bp->name, name)) {
-			*special = bp->special;
-			return bp->code;
+	len = strlen(name);
+	for (bp = builtincmd ; *bp ; bp += 2 + bp[0]) {
+		if (bp[0] == len && memcmp(bp + 2, name, len) == 0) {
+			*special = (bp[1] & BUILTIN_SPECIAL) != 0;
+			return bp[1] & ~BUILTIN_SPECIAL;
 		}
 	}
 	return -1;

Modified: projects/sendfile/bin/sh/expand.c
==============================================================================
--- projects/sendfile/bin/sh/expand.c	Thu Jan  7 22:36:10 2016	(r293382)
+++ projects/sendfile/bin/sh/expand.c	Thu Jan  7 22:44:13 2016	(r293383)
@@ -3,6 +3,8 @@
  *	The Regents of the University of California.  All rights reserved.
  * Copyright (c) 1997-2005
  *	Herbert Xu <herbert@gondor.apana.org.au>.  All rights reserved.
+ * Copyright (c) 2010-2015
+ *	Jilles Tjoelker <jilles@stack.nl>.  All rights reserved.
  *
  * This code is derived from software contributed to Berkeley by
  * Kenneth Almquist.
@@ -79,42 +81,32 @@ __FBSDID("$FreeBSD$");
 #include "show.h"
 #include "builtins.h"
 
-/*
- * Structure specifying which parts of the string should be searched
- * for IFS characters.
- */
+enum wordstate { WORD_IDLE, WORD_WS_DELIMITED, WORD_QUOTEMARK };
 
-struct ifsregion {
-	struct ifsregion *next;	/* next region in list */
-	int begoff;		/* offset of start of region */
-	int endoff;		/* offset of end of region */
-	int inquotes;		/* search for nul bytes only */
+struct worddest {
+	struct arglist *list;
+	enum wordstate state;
 };
 
-
 static char *expdest;			/* output of current string */
 static struct nodelist *argbackq;	/* list of back quote expressions */
-static struct ifsregion ifsfirst;	/* first struct in list of ifs regions */
-static struct ifsregion *ifslastp;	/* last struct in list */
 
-static char *argstr(char *, int);
+static char *argstr(char *, int, struct worddest *);
 static char *exptilde(char *, int);
-static char *expari(char *);
-static void expbackq(union node *, int, int);
-static int subevalvar_trim(char *, int, int, int, int);
+static char *expari(char *, int, struct worddest *);
+static void expbackq(union node *, int, int, struct worddest *);
+static void subevalvar_trim(char *, int, int, int);
 static int subevalvar_misc(char *, const char *, int, int, int);
-static char *evalvar(char *, int);
+static char *evalvar(char *, int, struct worddest *);
 static int varisset(const char *, int);
-static void strtodest(const char *, int, int, int);
-static void varvalue(const char *, int, int, int);
-static void recordregion(int, int, int);
-static void removerecordregions(int);
-static void ifsbreakup(char *, struct arglist *);
-static void expandmeta(struct arglist *, struct arglist *);
+static void strtodest(const char *, int, int, int, struct worddest *);
+static void reprocess(int, int, int, int, struct worddest *);
+static void varvalue(const char *, int, int, int, struct worddest *);
+static void expandmeta(char *, struct arglist *);
 static void expmeta(char *, char *, struct arglist *);
 static int expsortcmp(const void *, const void *);
-static int patmatch(const char *, const char *, int);
-static char *cvtnum(int, char *);
+static int patmatch(const char *, const char *);
+static void cvtnum(int, char *);
 static int collate_range_cmp(wchar_t, wchar_t);
 
 void
@@ -169,6 +161,53 @@ stputs_quotes(const char *data, const ch
 }
 #define STPUTS_QUOTES(data, syntax, p) p = stputs_quotes((data), syntax, p)
 
+static char *
+nextword(char c, int flag, char *p, struct worddest *dst)
+{
+	int is_ws;
+
+	is_ws = c == '\t' || c == '\n' || c == ' ';
+	if (p != stackblock() || (is_ws ? dst->state == WORD_QUOTEMARK :
+	    dst->state != WORD_WS_DELIMITED) || c == '\0') {
+		STPUTC('\0', p);
+		if (flag & EXP_GLOB)
+			expandmeta(grabstackstr(p), dst->list);
+		else
+			appendarglist(dst->list, grabstackstr(p));
+		dst->state = is_ws ? WORD_WS_DELIMITED : WORD_IDLE;
+	} else if (!is_ws && dst->state == WORD_WS_DELIMITED)
+		dst->state = WORD_IDLE;
+	/* Reserve space while the stack string is empty. */
+	appendarglist(dst->list, NULL);
+	dst->list->count--;
+	STARTSTACKSTR(p);
+	return p;
+}
+#define NEXTWORD(c, flag, p, dstlist) p = nextword(c, flag, p, dstlist)
+
+static char *
+stputs_split(const char *data, const char *syntax, int flag, char *p,
+    struct worddest *dst)
+{
+	const char *ifs;
+	char c;
+
+	ifs = ifsset() ? ifsval() : " \t\n";
+	while (*data) {
+		CHECKSTRSPACE(2, p);
+		c = *data++;
+		if (strchr(ifs, c) != NULL) {
+			NEXTWORD(c, flag, p, dst);
+			continue;
+		}
+		if (flag & EXP_GLOB && syntax[(int)c] == CCTL)
+			USTPUTC(CTLESC, p);
+		USTPUTC(c, p);
+	}
+	return (p);
+}
+#define STPUTS_SPLIT(data, syntax, flag, p, dst) p = stputs_split((data), syntax, flag, p, dst)
+
 /*
  * Perform expansions on an argument, placing the resulting list of arguments
  * in arglist.  Parameter expansion, command substitution and arithmetic
@@ -184,34 +223,31 @@ stputs_quotes(const char *data, const ch
 void
 expandarg(union node *arg, struct arglist *arglist, int flag)
 {
-	struct arglist exparg;
-	char *p;
+	struct worddest exparg;
 
+	if (fflag)
+		flag &= ~EXP_GLOB;
 	argbackq = arg->narg.backquote;
+	exparg.list = arglist;
+	exparg.state = WORD_IDLE;
 	STARTSTACKSTR(expdest);
-	ifsfirst.next = NULL;
-	ifslastp = NULL;
-	argstr(arg->narg.text, flag);
+	argstr(arg->narg.text, flag, &exparg);
 	if (arglist == NULL) {
 		STACKSTRNUL(expdest);
 		return;			/* here document expanded */
 	}
-	STPUTC('\0', expdest);
-	p = grabstackstr(expdest);
-	emptyarglist(&exparg);
-	if (flag & EXP_FULL) {
-		ifsbreakup(p, &exparg);
-		expandmeta(&exparg, arglist);
-	} else
-		appendarglist(arglist, p);
-	while (ifsfirst.next != NULL) {
-		struct ifsregion *ifsp;
-		INTOFF;
-		ifsp = ifsfirst.next->next;
-		ckfree(ifsfirst.next);
-		ifsfirst.next = ifsp;
-		INTON;
+	if ((flag & EXP_SPLIT) == 0 || expdest != stackblock() ||
+	    exparg.state == WORD_QUOTEMARK) {
+		STPUTC('\0', expdest);
+		if (flag & EXP_SPLIT) {
+			if (flag & EXP_GLOB)
+				expandmeta(grabstackstr(expdest), exparg.list);
+			else
+				appendarglist(exparg.list, grabstackstr(expdest));
+		}
 	}
+	if ((flag & EXP_SPLIT) == 0)
+		appendarglist(arglist, grabstackstr(expdest));
 }
 
 
@@ -221,15 +257,16 @@ expandarg(union node *arg, struct arglis
  * expansion, and tilde expansion if requested via EXP_TILDE/EXP_VARTILDE.
  * Processing ends at a CTLENDVAR or CTLENDARI character as well as '\0'.
  * This is used to expand word in ${var+word} etc.
- * If EXP_FULL or EXP_CASE are set, keep and/or generate CTLESC
+ * If EXP_GLOB or EXP_CASE are set, keep and/or generate CTLESC
  * characters to allow for further processing.
- * If EXP_FULL is set, also preserve CTLQUOTEMARK characters.
+ *
+ * If EXP_SPLIT is set, dst receives any complete words produced.
  */
 static char *
-argstr(char *p, int flag)
+argstr(char *p, int flag, struct worddest *dst)
 {
 	char c;
-	int quotes = flag & (EXP_FULL | EXP_CASE);	/* do CTLESC */
+	int quotes = flag & (EXP_GLOB | EXP_CASE);	/* do CTLESC */
 	int firsteq = 1;
 	int split_lit;
 	int lit_quoted;
@@ -253,32 +290,33 @@ argstr(char *p, int flag)
 			if (p[0] == CTLVAR && (p[1] & VSQUOTE) != 0 &&
 			    p[2] == '@' && p[3] == '=')
 				break;
-			if ((flag & EXP_FULL) != 0)
-				USTPUTC(c, expdest);
+			if ((flag & EXP_SPLIT) != 0 && expdest == stackblock())
+				dst->state = WORD_QUOTEMARK;
 			break;
 		case CTLQUOTEEND:
 			lit_quoted = 0;
 			break;
 		case CTLESC:
-			if (quotes)
-				USTPUTC(c, expdest);
 			c = *p++;
+			if (split_lit && !lit_quoted &&
+			    strchr(ifsset() ? ifsval() : " \t\n", c) != NULL) {
+				NEXTWORD(c, flag, expdest, dst);
+				break;
+			}
+			if (quotes)
+				USTPUTC(CTLESC, expdest);
 			USTPUTC(c, expdest);
-			if (split_lit && !lit_quoted)
-				recordregion(expdest - stackblock() -
-				    (quotes ? 2 : 1),
-				    expdest - stackblock(), 0);
 			break;
 		case CTLVAR:
-			p = evalvar(p, flag);
+			p = evalvar(p, flag, dst);
 			break;
 		case CTLBACKQ:
 		case CTLBACKQ|CTLQUOTE:
-			expbackq(argbackq->n, c & CTLQUOTE, flag);
+			expbackq(argbackq->n, c & CTLQUOTE, flag, dst);
 			argbackq = argbackq->next;
 			break;
 		case CTLARI:
-			p = expari(p);
+			p = expari(p, flag, dst);
 			break;
 		case ':':
 		case '=':
@@ -286,10 +324,12 @@ argstr(char *p, int flag)
 			 * sort of a hack - expand tildes in variable
 			 * assignments (after the first '=' and after ':'s).
 			 */
+			if (split_lit && !lit_quoted &&
+			    strchr(ifsset() ? ifsval() : " \t\n", c) != NULL) {
+				NEXTWORD(c, flag, expdest, dst);
+				break;
+			}
 			USTPUTC(c, expdest);
-			if (split_lit && !lit_quoted)
-				recordregion(expdest - stackblock() - 1,
-				    expdest - stackblock(), 0);
 			if (flag & EXP_VARTILDE && *p == '~' &&
 			    (c != '=' || firsteq)) {
 				if (c == '=')
@@ -298,10 +338,12 @@ argstr(char *p, int flag)
 			}
 			break;
 		default:
+			if (split_lit && !lit_quoted &&
+			    strchr(ifsset() ? ifsval() : " \t\n", c) != NULL) {
+				NEXTWORD(c, flag, expdest, dst);
+				break;
+			}
 			USTPUTC(c, expdest);
-			if (split_lit && !lit_quoted)
-				recordregion(expdest - stackblock() - 1,
-				    expdest - stackblock(), 0);
 		}
 	}
 }
@@ -345,7 +387,7 @@ exptilde(char *p, int flag)
 			*p = c;
 			if (home == NULL || *home == '\0')
 				return (startp);
-			strtodest(home, flag, VSNORMAL, 1);
+			strtodest(home, flag, VSNORMAL, 1, NULL);
 			return (p);
 		}
 		p++;
@@ -353,51 +395,11 @@ exptilde(char *p, int flag)
 }
 
 
-static void
-removerecordregions(int endoff)
-{
-	if (ifslastp == NULL)
-		return;
-
-	if (ifsfirst.endoff > endoff) {
-		while (ifsfirst.next != NULL) {
-			struct ifsregion *ifsp;
-			INTOFF;
-			ifsp = ifsfirst.next->next;
-			ckfree(ifsfirst.next);
-			ifsfirst.next = ifsp;
-			INTON;
-		}
-		if (ifsfirst.begoff > endoff)
-			ifslastp = NULL;
-		else {
-			ifslastp = &ifsfirst;
-			ifsfirst.endoff = endoff;
-		}
-		return;
-	}
-
-	ifslastp = &ifsfirst;
-	while (ifslastp->next && ifslastp->next->begoff < endoff)
-		ifslastp=ifslastp->next;
-	while (ifslastp->next != NULL) {
-		struct ifsregion *ifsp;
-		INTOFF;
-		ifsp = ifslastp->next->next;
-		ckfree(ifslastp->next);
-		ifslastp->next = ifsp;
-		INTON;
-	}
-	if (ifslastp->endoff > endoff)
-		ifslastp->endoff = endoff;
-}
-
 /*
  * Expand arithmetic expression.
- * Note that flag is not required as digits never require CTLESC characters.
  */
 static char *
-expari(char *p)
+expari(char *p, int flag, struct worddest *dst)
 {
 	char *q, *start;
 	arith_t result;
@@ -407,8 +409,7 @@ expari(char *p)
 
 	quoted = *p++ == '"';
 	begoff = expdest - stackblock();
-	p = argstr(p, 0);
-	removerecordregions(begoff);
+	p = argstr(p, 0, NULL);
 	STPUTC('\0', expdest);
 	start = stackblock() + begoff;
 
@@ -425,7 +426,7 @@ expari(char *p)
 	adj = strlen(expdest);
 	STADJUST(adj, expdest);
 	if (!quoted)
-		recordregion(begoff, expdest - stackblock(), 0);
+		reprocess(expdest - adj - stackblock(), flag, VSNORMAL, 0, dst);
 	return p;
 }
 
@@ -434,35 +435,34 @@ expari(char *p)
  * Perform command substitution.
  */
 static void
-expbackq(union node *cmd, int quoted, int flag)
+expbackq(union node *cmd, int quoted, int flag, struct worddest *dst)
 {
 	struct backcmd in;
 	int i;
 	char buf[128];
 	char *p;
 	char *dest = expdest;
-	struct ifsregion saveifs, *savelastp;
 	struct nodelist *saveargbackq;
 	char lastc;
-	int startloc = dest - stackblock();
 	char const *syntax = quoted? DQSYNTAX : BASESYNTAX;
-	int quotes = flag & (EXP_FULL | EXP_CASE);
+	int quotes = flag & (EXP_GLOB | EXP_CASE);
 	size_t nnl;
+	const char *ifs;
 
 	INTOFF;
-	saveifs = ifsfirst;
-	savelastp = ifslastp;
 	saveargbackq = argbackq;
 	p = grabstackstr(dest);
 	evalbackcmd(cmd, &in);
 	ungrabstackstr(p, dest);
-	ifsfirst = saveifs;
-	ifslastp = savelastp;
 	argbackq = saveargbackq;
 
 	p = in.buf;
 	lastc = '\0';
 	nnl = 0;
+	if (!quoted && flag & EXP_SPLIT)
+		ifs = ifsset() ? ifsval() : " \t\n";
+	else
+		ifs = "";
 	/* Don't copy trailing newlines */
 	for (;;) {
 		if (--in.nleft < 0) {
@@ -476,15 +476,27 @@ expbackq(union node *cmd, int quoted, in
 			in.nleft = i - 1;
 		}
 		lastc = *p++;
-		if (lastc != '\0') {
-			if (lastc == '\n') {
-				nnl++;
-			} else {
-				CHECKSTRSPACE(nnl + 2, dest);
-				while (nnl > 0) {
-					nnl--;
-					USTPUTC('\n', dest);
+		if (lastc == '\0')
+			continue;
+		if (lastc == '\n') {
+			nnl++;
+		} else {
+			if (nnl > 0) {
+				if (strchr(ifs, '\n') != NULL) {
+					NEXTWORD('\n', flag, dest, dst);
+					nnl = 0;
+				} else {
+					CHECKSTRSPACE(nnl + 2, dest);
+					while (nnl > 0) {
+						nnl--;
+						USTPUTC('\n', dest);
+					}
 				}
+			}
+			if (strchr(ifs, lastc) != NULL)
+				NEXTWORD(lastc, flag, dest, dst);
+			else {
+				CHECKSTRSPACE(2, dest);
 				if (quotes && syntax[(int)lastc] == CCTL)
 					USTPUTC(CTLESC, dest);
 				USTPUTC(lastc, dest);
@@ -498,8 +510,6 @@ expbackq(union node *cmd, int quoted, in
 		ckfree(in.buf);
 	if (in.jp)
 		exitstatus = waitforjob(in.jp, (int *)NULL);
-	if (quoted == 0)
-		recordregion(startloc, dest - stackblock(), 0);
 	TRACE(("expbackq: size=%td: \"%.*s\"\n",
 		((dest - stackblock()) - startloc),
 		(int)((dest - stackblock()) - startloc),
@@ -521,18 +531,17 @@ recordleft(const char *str, const char *
 		*startp++ = *loc++;
 }
 
-static int
-subevalvar_trim(char *p, int strloc, int subtype, int startloc, int quotes)
+static void
+subevalvar_trim(char *p, int strloc, int subtype, int startloc)
 {
 	char *startp;
 	char *loc = NULL;
-	char *q;
 	char *str;
 	int c = 0;
 	struct nodelist *saveargbackq = argbackq;
 	int amount;
 
-	argstr(p, EXP_CASE | EXP_TILDE);
+	argstr(p, EXP_CASE | EXP_TILDE, NULL);
 	STACKSTRNUL(expdest);
 	argbackq = saveargbackq;
 	startp = stackblock() + startloc;
@@ -543,72 +552,56 @@ subevalvar_trim(char *p, int strloc, int
 		for (loc = startp; loc < str; loc++) {
 			c = *loc;
 			*loc = '\0';
-			if (patmatch(str, startp, quotes)) {
+			if (patmatch(str, startp)) {
 				*loc = c;
 				recordleft(str, loc, startp);
-				return 1;
+				return;
 			}
 			*loc = c;
-			if (quotes && *loc == CTLESC)
-				loc++;
 		}
-		return 0;
+		break;
 
 	case VSTRIMLEFTMAX:
 		for (loc = str - 1; loc >= startp;) {
 			c = *loc;
 			*loc = '\0';
-			if (patmatch(str, startp, quotes)) {
+			if (patmatch(str, startp)) {
 				*loc = c;
 				recordleft(str, loc, startp);
-				return 1;
+				return;
 			}
 			*loc = c;
 			loc--;
-			if (quotes && loc > startp && *(loc - 1) == CTLESC) {
-				for (q = startp; q < loc; q++)
-					if (*q == CTLESC)
-						q++;
-				if (q > loc)
-					loc--;
-			}
 		}
-		return 0;
+		break;
 
 	case VSTRIMRIGHT:
 		for (loc = str - 1; loc >= startp;) {
-			if (patmatch(str, loc, quotes)) {
+			if (patmatch(str, loc)) {
 				amount = loc - expdest;
 				STADJUST(amount, expdest);
-				return 1;
+				return;
 			}
 			loc--;
-			if (quotes && loc > startp && *(loc - 1) == CTLESC) {
-				for (q = startp; q < loc; q++)
-					if (*q == CTLESC)
-						q++;
-				if (q > loc)
-					loc--;
-			}
 		}
-		return 0;
+		break;
 
 	case VSTRIMRIGHTMAX:
 		for (loc = startp; loc < str - 1; loc++) {
-			if (patmatch(str, loc, quotes)) {
+			if (patmatch(str, loc)) {
 				amount = loc - expdest;
 				STADJUST(amount, expdest);
-				return 1;
+				return;
 			}
-			if (quotes && *loc == CTLESC)
-				loc++;
 		}
-		return 0;
+		break;
 
 
 	default:
 		abort();
 	}
+	amount = (expdest - stackblock() - strloc) + 1;
+	STADJUST(-amount, expdest);
 }
 
 
@@ -620,7 +613,7 @@ subevalvar_misc(char *p, const char *var
 	struct nodelist *saveargbackq = argbackq;
 	int amount;
 
-	argstr(p, EXP_TILDE);
+	argstr(p, EXP_TILDE, NULL);
 	STACKSTRNUL(expdest);
 	argbackq = saveargbackq;
 	startp = stackblock() + startloc;
@@ -653,7 +646,7 @@ subevalvar_misc(char *p, const char *var
  */
 
 static char *
-evalvar(char *p, int flag)
+evalvar(char *p, int flag, struct worddest *dst)
 {
 	int subtype;
 	int varflags;
@@ -666,9 +659,7 @@ evalvar(char *p, int flag)
 	int startloc;
 	int varlen;
 	int varlenb;
-	int easy;
-	int quotes = flag & (EXP_FULL | EXP_CASE);
-	int record = 0;
+	char buf[21];
 
 	varflags = (unsigned char)*p++;
 	subtype = varflags & VSTYPE;
@@ -710,10 +701,16 @@ again: /* jump here after setting a vari
 	if (set && subtype != VSPLUS) {
 		/* insert the value of the variable */
 		if (special) {
-			if (varflags & VSLINENO)
-				STPUTBIN(var, p - var - 1, expdest);
-			else
-				varvalue(var, varflags & VSQUOTE, subtype, flag);
+			if (varflags & VSLINENO) {
+				if (p - var > (ptrdiff_t)sizeof(buf))
+					abort();
+				memcpy(buf, var, p - var - 1);
+				buf[p - var - 1] = '\0';
+				strtodest(buf, flag, subtype,
+				    varflags & VSQUOTE, dst);
+			} else
+				varvalue(var, varflags & VSQUOTE, subtype, flag,
+				    dst);
 			if (subtype == VSLENGTH) {
 				varlenb = expdest - stackblock() - startloc;
 				varlen = varlenb;
@@ -734,35 +731,29 @@ again: /* jump here after setting a vari
 			}
 			else
 				strtodest(val, flag, subtype,
-				    varflags & VSQUOTE);
+				    varflags & VSQUOTE, dst);
 		}
 	}
 
 	if (subtype == VSPLUS)
 		set = ! set;
 
-	easy = ((varflags & VSQUOTE) == 0 ||
-		(*var == '@' && shellparam.nparam != 1));
-
-
 	switch (subtype) {
 	case VSLENGTH:
-		expdest = cvtnum(varlen, expdest);
-		record = 1;
+		cvtnum(varlen, buf);
+		strtodest(buf, flag, VSNORMAL, varflags & VSQUOTE, dst);
 		break;
 
 	case VSNORMAL:
-		record = easy;
 		break;
 
 	case VSPLUS:
 	case VSMINUS:
 		if (!set) {
-			argstr(p, flag | (flag & EXP_FULL ? EXP_SPLIT_LIT : 0) |
-			    (varflags & VSQUOTE ? EXP_LIT_QUOTED : 0));
+			argstr(p, flag | (flag & EXP_SPLIT ? EXP_SPLIT_LIT : 0) |
+			    (varflags & VSQUOTE ? EXP_LIT_QUOTED : 0), dst);
 			break;
 		}
-		record = easy;
 		break;
 
 	case VSTRIMLEFT:
@@ -777,14 +768,10 @@ again: /* jump here after setting a vari
 		 */
 		STPUTC('\0', expdest);
 		patloc = expdest - stackblock();
-		if (subevalvar_trim(p, patloc, subtype,
-		    startloc, quotes) == 0) {
-			int amount = (expdest - stackblock() - patloc) + 1;
-			STADJUST(-amount, expdest);
-		}
-		/* Remove any recorded regions beyond start of variable */
-		removerecordregions(startloc);
-		record = 1;
+		subevalvar_trim(p, patloc, subtype, startloc);
+		reprocess(startloc, flag, VSNORMAL, varflags & VSQUOTE, dst);
+		if (flag & EXP_SPLIT && *var == '@' && varflags & VSQUOTE)
+			dst->state = WORD_QUOTEMARK;
 		break;
 
 	case VSASSIGN:
@@ -793,16 +780,10 @@ again: /* jump here after setting a vari
 			if (subevalvar_misc(p, var, subtype, startloc,
 			    varflags)) {
 				varflags &= ~VSNUL;
-				/*
-				 * Remove any recorded regions beyond
-				 * start of variable
-				 */
-				removerecordregions(startloc);
 				goto again;
 			}
 			break;
 		}
-		record = easy;
 		break;
 
 	case VSERROR:
@@ -814,11 +795,6 @@ again: /* jump here after setting a vari
 		abort();
 	}
 
-	if (record)
-		recordregion(startloc, expdest - stackblock(),
-		    varflags & VSQUOTE || (ifsset() && ifsval()[0] == '\0' &&
-		    (*var == '@' || *var == '*')));
-
 	if (subtype != VSNORMAL) {	/* skip to end of alternative */
 		int nesting = 1;
 		for (;;) {
@@ -884,26 +860,80 @@ varisset(const char *name, int nulok)
 }
 
 static void
-strtodest(const char *p, int flag, int subtype, int quoted)
+strtodest(const char *p, int flag, int subtype, int quoted,
+    struct worddest *dst)
 {
-	if (flag & (EXP_FULL | EXP_CASE) && subtype != VSLENGTH)
+	if (subtype == VSLENGTH || subtype == VSTRIMLEFT ||
+	    subtype == VSTRIMLEFTMAX || subtype == VSTRIMRIGHT ||
+	    subtype == VSTRIMRIGHTMAX)
+		STPUTS(p, expdest);
+	else if (flag & EXP_SPLIT && !quoted && dst != NULL)
+		STPUTS_SPLIT(p, BASESYNTAX, flag, expdest, dst);
+	else if (flag & (EXP_GLOB | EXP_CASE))
 		STPUTS_QUOTES(p, quoted ? DQSYNTAX : BASESYNTAX, expdest);
 	else
 		STPUTS(p, expdest);
 }
 
+static void
+reprocess(int startloc, int flag, int subtype, int quoted,
+    struct worddest *dst)
+{
+	static char *buf = NULL;
+	static size_t buflen = 0;
+	char *startp;
+	size_t len, zpos, zlen;
+
+	startp = stackblock() + startloc;
+	len = expdest - startp;
+	if (len >= SIZE_MAX / 2)
+		abort();
+	INTOFF;
+	if (len >= buflen) {
+		ckfree(buf);
+		buf = NULL;
+	}
+	if (buflen < 128)
+		buflen = 128;
+	while (len >= buflen)
+		buflen <<= 1;
+	if (buf == NULL)
+		buf = ckmalloc(buflen);
+	INTON;
+	memcpy(buf, startp, len);
+	buf[len] = '\0';
+	STADJUST(-len, expdest);
+	for (zpos = 0;;) {
+		zlen = strlen(buf + zpos);
+		strtodest(buf + zpos, flag, subtype, quoted, dst);
+		zpos += zlen + 1;
+		if (zpos == len + 1)
+			break;
+		if (flag & EXP_SPLIT && (quoted || (zlen > 0 && zpos < len)))
+			NEXTWORD('\0', flag, expdest, dst);
+	}
+}
+
 /*
  * Add the value of a specialized variable to the stack string.
  */
 
 static void
-varvalue(const char *name, int quoted, int subtype, int flag)
+varvalue(const char *name, int quoted, int subtype, int flag,
+    struct worddest *dst)
 {
 	int num;
 	char *p;
 	int i;
+	int splitlater;
 	char sep[2];
 	char **ap;
+	char buf[(NSHORTOPTS > 10 ? NSHORTOPTS : 10) + 1];
+
+	if (subtype == VSLENGTH)
+		flag &= ~EXP_FULL;
+	splitlater = subtype == VSTRIMLEFT || subtype == VSTRIMLEFTMAX ||
+		subtype == VSTRIMRIGHT || subtype == VSTRIMRIGHTMAX;
 
 	switch (*name) {
 	case '$':
@@ -919,18 +949,28 @@ varvalue(const char *name, int quoted, i
 		num = backgndpidval();
 		break;
 	case '-':
+		p = buf;
 		for (i = 0 ; i < NSHORTOPTS ; i++) {
 			if (optlist[i].val)
-				STPUTC(optlist[i].letter, expdest);
+				*p++ = optlist[i].letter;
 		}
+		*p = '\0';
+		strtodest(buf, flag, subtype, quoted, dst);
 		return;
 	case '@':
-		if (flag & EXP_FULL && quoted) {
+		if (flag & EXP_SPLIT && quoted) {
 			for (ap = shellparam.p ; (p = *ap++) != NULL ; ) {
-				strtodest(p, flag, subtype, quoted);
-				if (*ap)
-					STPUTC('\0', expdest);
+				strtodest(p, flag, subtype, quoted, dst);
+				if (*ap) {
+					if (splitlater)
+						STPUTC('\0', expdest);
+					else
+						NEXTWORD('\0', flag, expdest,
+						    dst);
+				}
 			}
+			if (shellparam.nparam > 0)
+				dst->state = WORD_QUOTEMARK;
 			return;
 		}
 		/* FALLTHROUGH */
@@ -941,13 +981,17 @@ varvalue(const char *name, int quoted, i
 			sep[0] = ' ';
 		sep[1] = '\0';
 		for (ap = shellparam.p ; (p = *ap++) != NULL ; ) {
-			strtodest(p, flag, subtype, quoted);
+			strtodest(p, flag, subtype, quoted, dst);
 			if (!*ap)
 				break;
 			if (sep[0])
-				strtodest(sep, flag, subtype, quoted);
-			else if (flag & EXP_FULL && !quoted && **ap != '\0')
-				STPUTC('\0', expdest);

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601072244.u07MiEQb079284>