Date: Tue, 15 Jan 2013 20:23:11 +0000 (UTC) From: Brooks Davis <brooks@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r245472 - in projects/mtree: . bin/sh cddl/contrib/opensolaris/cmd/zdb contrib/file/Magdir contrib/gcc contrib/gcc/config/arm contrib/libcxxrt etc include lib/libc/gen lib/libc/net lib/... Message-ID: <201301152023.r0FKNBdK028516@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: brooks Date: Tue Jan 15 20:23:10 2013 New Revision: 245472 URL: http://svnweb.freebsd.org/changeset/base/245472 Log: MFH@245462 Added: projects/mtree/contrib/libcxxrt/atomic.h - copied unchanged from r245462, head/contrib/libcxxrt/atomic.h projects/mtree/sys/arm/allwinner/ - copied from r245462, head/sys/arm/allwinner/ projects/mtree/sys/arm/conf/CUBIEBOARD - copied unchanged from r245462, head/sys/arm/conf/CUBIEBOARD projects/mtree/sys/boot/fdt/dts/cubieboard.dts - copied unchanged from r245462, head/sys/boot/fdt/dts/cubieboard.dts projects/mtree/sys/dev/altera/avgen/altera_avgen_fdt.c - copied unchanged from r245462, head/sys/dev/altera/avgen/altera_avgen_fdt.c projects/mtree/sys/dev/altera/avgen/altera_avgen_nexus.c - copied unchanged from r245462, head/sys/dev/altera/avgen/altera_avgen_nexus.c projects/mtree/sys/dev/altera/jtag_uart/altera_jtag_uart_fdt.c - copied unchanged from r245462, head/sys/dev/altera/jtag_uart/altera_jtag_uart_fdt.c projects/mtree/sys/dev/altera/sdcard/altera_sdcard_fdt.c - copied unchanged from r245462, head/sys/dev/altera/sdcard/altera_sdcard_fdt.c projects/mtree/sys/dev/isf/isf_fdt.c - copied unchanged from r245462, head/sys/dev/isf/isf_fdt.c projects/mtree/sys/dev/terasic/de4led/terasic_de4led_fdt.c - copied unchanged from r245462, head/sys/dev/terasic/de4led/terasic_de4led_fdt.c projects/mtree/sys/dev/terasic/mtl/terasic_mtl_fdt.c - copied unchanged from r245462, head/sys/dev/terasic/mtl/terasic_mtl_fdt.c projects/mtree/sys/mips/mips/bus_space_fdt.c - copied unchanged from r245462, head/sys/mips/mips/bus_space_fdt.c projects/mtree/tools/build/options/WITH_NMTREE - copied unchanged from r245462, head/tools/build/options/WITH_NMTREE projects/mtree/tools/regression/bin/sh/execution/subshell1.0 - copied unchanged from r245462, head/tools/regression/bin/sh/execution/subshell1.0 projects/mtree/tools/regression/bin/sh/execution/subshell1.0.stdout - copied unchanged from r245462, head/tools/regression/bin/sh/execution/subshell1.0.stdout projects/mtree/tools/regression/bin/sh/execution/subshell2.0 - copied unchanged from r245462, head/tools/regression/bin/sh/execution/subshell2.0 projects/mtree/tools/regression/bin/sh/execution/subshell3.0 - copied unchanged from r245462, head/tools/regression/bin/sh/execution/subshell3.0 projects/mtree/tools/regression/bin/sh/execution/subshell4.0 - copied unchanged from r245462, head/tools/regression/bin/sh/execution/subshell4.0 projects/mtree/tools/regression/bin/sh/expansion/cmdsubst14.0 - copied unchanged from r245462, head/tools/regression/bin/sh/expansion/cmdsubst14.0 projects/mtree/tools/regression/bin/sh/expansion/cmdsubst15.0 - copied unchanged from r245462, head/tools/regression/bin/sh/expansion/cmdsubst15.0 projects/mtree/tools/regression/bin/sh/expansion/cmdsubst16.0 - copied unchanged from r245462, head/tools/regression/bin/sh/expansion/cmdsubst16.0 projects/mtree/tools/regression/bin/sh/expansion/cmdsubst17.0 - copied unchanged from r245462, head/tools/regression/bin/sh/expansion/cmdsubst17.0 projects/mtree/tools/regression/bin/sh/parser/empty-braces1.0 - copied unchanged from r245462, head/tools/regression/bin/sh/parser/empty-braces1.0 Deleted: projects/mtree/share/mk/bsd.compat.mk projects/mtree/sys/dev/cxgbe/common/jhash.h Modified: projects/mtree/Makefile.inc1 projects/mtree/ObsoleteFiles.inc projects/mtree/bin/sh/eval.c projects/mtree/bin/sh/exec.c projects/mtree/bin/sh/parser.c projects/mtree/bin/sh/sh.1 projects/mtree/cddl/contrib/opensolaris/cmd/zdb/zdb.c projects/mtree/contrib/file/Magdir/lua projects/mtree/contrib/gcc/config/arm/freebsd.h projects/mtree/contrib/gcc/unwind-dw2.c projects/mtree/contrib/libcxxrt/exception.cc projects/mtree/contrib/libcxxrt/memory.cc projects/mtree/contrib/libcxxrt/typeinfo.h projects/mtree/etc/rc.subr projects/mtree/include/time.h projects/mtree/lib/libc/gen/Makefile.inc projects/mtree/lib/libc/gen/Symbol.map projects/mtree/lib/libc/net/name6.c projects/mtree/lib/libc/sys/chroot.2 projects/mtree/lib/libedit/editline.3 projects/mtree/lib/libedit/editrc.5 projects/mtree/lib/libradius/libradius.3 projects/mtree/lib/libutil/gr_util.c projects/mtree/release/generate-release.sh projects/mtree/release/ia64/mkisoimages.sh projects/mtree/sbin/geom/class/raid3/geom_raid3.c projects/mtree/sbin/geom/class/raid3/graid3.8 projects/mtree/sbin/ifconfig/af_inet6.c projects/mtree/sbin/ifconfig/af_nd6.c projects/mtree/sbin/ifconfig/ifconfig.8 projects/mtree/sbin/sysctl/sysctl.c projects/mtree/share/man/man4/stf.4 projects/mtree/share/man/man5/src.conf.5 projects/mtree/share/man/man9/vm_map_insert.9 projects/mtree/share/man/man9/vm_map_stack.9 projects/mtree/share/misc/committers-ports.dot projects/mtree/share/mk/Makefile projects/mtree/share/mk/bsd.init.mk projects/mtree/share/mk/bsd.own.mk projects/mtree/share/mk/sys.mk projects/mtree/share/zoneinfo/Makefile projects/mtree/sys/amd64/conf/GENERIC projects/mtree/sys/amd64/conf/NOTES projects/mtree/sys/arm/arm/locore.S projects/mtree/sys/arm/broadcom/bcm2835/bcm2835_fb.c projects/mtree/sys/arm/broadcom/bcm2835/bcm2835_machdep.c projects/mtree/sys/boot/i386/libi386/bootinfo64.c projects/mtree/sys/boot/i386/libi386/devicename.c projects/mtree/sys/boot/i386/libi386/pxe.c projects/mtree/sys/cam/ctl/ctl.c projects/mtree/sys/cam/ctl/scsi_ctl.c projects/mtree/sys/cam/scsi/scsi_cd.c projects/mtree/sys/cam/scsi/scsi_da.c projects/mtree/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/ddt.c projects/mtree/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/ddt_zap.c projects/mtree/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/ddt.h projects/mtree/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c projects/mtree/sys/conf/files projects/mtree/sys/conf/files.amd64 projects/mtree/sys/conf/files.i386 projects/mtree/sys/conf/files.mips projects/mtree/sys/dev/acpica/acpi_thermal.c projects/mtree/sys/dev/altera/avgen/altera_avgen.c projects/mtree/sys/dev/altera/avgen/altera_avgen.h projects/mtree/sys/dev/altera/jtag_uart/altera_jtag_uart.h projects/mtree/sys/dev/altera/jtag_uart/altera_jtag_uart_cons.c projects/mtree/sys/dev/altera/jtag_uart/altera_jtag_uart_nexus.c projects/mtree/sys/dev/altera/sdcard/altera_sdcard.c projects/mtree/sys/dev/altera/sdcard/altera_sdcard.h projects/mtree/sys/dev/altera/sdcard/altera_sdcard_nexus.c projects/mtree/sys/dev/ata/ata-raid.c projects/mtree/sys/dev/ath/ath_hal/ah.h projects/mtree/sys/dev/ath/if_ath_rx.c projects/mtree/sys/dev/atkbdc/atkbd.c projects/mtree/sys/dev/atkbdc/atkbd_atkbdc.c projects/mtree/sys/dev/atkbdc/atkbdreg.h projects/mtree/sys/dev/ciss/ciss.c projects/mtree/sys/dev/ciss/cissreg.h projects/mtree/sys/dev/ciss/cissvar.h projects/mtree/sys/dev/cxgbe/adapter.h projects/mtree/sys/dev/cxgbe/firmware/t4fw_cfg.txt projects/mtree/sys/dev/cxgbe/offload.h projects/mtree/sys/dev/cxgbe/t4_l2t.c projects/mtree/sys/dev/cxgbe/t4_l2t.h projects/mtree/sys/dev/cxgbe/t4_main.c projects/mtree/sys/dev/cxgbe/tom/t4_listen.c projects/mtree/sys/dev/cxgbe/tom/t4_tom.c projects/mtree/sys/dev/cxgbe/tom/t4_tom.h projects/mtree/sys/dev/cxgbe/tom/t4_tom_l2t.c projects/mtree/sys/dev/e1000/if_igb.c projects/mtree/sys/dev/fdt/fdt_mips.c projects/mtree/sys/dev/hwpmc/hwpmc_mod.c projects/mtree/sys/dev/hwpmc/hwpmc_soft.c projects/mtree/sys/dev/isf/isf.c projects/mtree/sys/dev/isf/isf.h projects/mtree/sys/dev/isf/isf_nexus.c projects/mtree/sys/dev/sym/sym_hipd.c projects/mtree/sys/dev/terasic/de4led/terasic_de4led.c projects/mtree/sys/dev/terasic/de4led/terasic_de4led.h projects/mtree/sys/dev/terasic/de4led/terasic_de4led_nexus.c projects/mtree/sys/dev/terasic/mtl/terasic_mtl.c projects/mtree/sys/dev/terasic/mtl/terasic_mtl.h projects/mtree/sys/dev/terasic/mtl/terasic_mtl_nexus.c projects/mtree/sys/dev/usb/input/ukbd.c projects/mtree/sys/dev/usb/input/ums.c projects/mtree/sys/dev/usb/quirk/usb_quirk.c projects/mtree/sys/dev/usb/serial/u3g.c projects/mtree/sys/dev/usb/storage/umass.c projects/mtree/sys/dev/usb/usb_hid.c projects/mtree/sys/dev/usb/usbdevs projects/mtree/sys/dev/usb/usbhid.h projects/mtree/sys/dev/wbwd/wbwd.c projects/mtree/sys/fs/nullfs/null_subr.c projects/mtree/sys/fs/nullfs/null_vnops.c projects/mtree/sys/geom/journal/g_journal.c projects/mtree/sys/geom/mirror/g_mirror.c projects/mtree/sys/geom/raid/g_raid.c projects/mtree/sys/geom/raid/g_raid.h projects/mtree/sys/geom/raid/md_intel.c projects/mtree/sys/geom/raid3/g_raid3.c projects/mtree/sys/geom/raid3/g_raid3_ctl.c projects/mtree/sys/i386/conf/GENERIC projects/mtree/sys/i386/conf/NOTES projects/mtree/sys/kern/subr_param.c projects/mtree/sys/kern/vfs_hash.c projects/mtree/sys/kern/vfs_subr.c projects/mtree/sys/kern/vfs_vnops.c projects/mtree/sys/mips/beri/beri_machdep.c projects/mtree/sys/mips/beri/files.beri projects/mtree/sys/mips/include/bus.h projects/mtree/sys/mips/include/fdt.h projects/mtree/sys/mips/include/metadata.h projects/mtree/sys/mips/include/vmparam.h projects/mtree/sys/modules/cxgbe/tom/Makefile projects/mtree/sys/netinet/tcp_timer.c projects/mtree/sys/netinet6/in6_src.c projects/mtree/sys/netinet6/nd6.h projects/mtree/sys/netinet6/scope6.c projects/mtree/sys/pc98/cbus/pckbd.c projects/mtree/sys/sys/bufobj.h projects/mtree/sys/sys/param.h projects/mtree/sys/sys/vnode.h projects/mtree/sys/ufs/ffs/ffs_snapshot.c projects/mtree/sys/ufs/ffs/ffs_softdep.c projects/mtree/sys/ufs/ffs/ffs_suspend.c projects/mtree/sys/ufs/ffs/ffs_vfsops.c projects/mtree/sys/vm/device_pager.c projects/mtree/sys/vm/vm_map.c projects/mtree/sys/vm/vm_map.h projects/mtree/sys/vm/vm_mmap.c projects/mtree/sys/vm/vm_object.h projects/mtree/sys/vm/vm_unix.c projects/mtree/tools/tools/ath/athspectral/athspectral.c projects/mtree/usr.bin/calendar/calendars/calendar.freebsd projects/mtree/usr.bin/procstat/procstat.c projects/mtree/usr.bin/stdbuf/stdbuf.c projects/mtree/usr.sbin/bsdconfig/bsdconfig projects/mtree/usr.sbin/bsdconfig/console/ttys projects/mtree/usr.sbin/bsdconfig/networking/share/device.subr projects/mtree/usr.sbin/bsdconfig/networking/share/hostname.subr projects/mtree/usr.sbin/bsdconfig/networking/share/routing.subr projects/mtree/usr.sbin/bsdconfig/password/password projects/mtree/usr.sbin/bsdconfig/password/share/password.subr projects/mtree/usr.sbin/bsdconfig/security/kern_securelevel projects/mtree/usr.sbin/bsdconfig/share/common.subr projects/mtree/usr.sbin/bsdconfig/share/mustberoot.subr projects/mtree/usr.sbin/bsdconfig/share/variable.subr projects/mtree/usr.sbin/bsdconfig/startup/misc projects/mtree/usr.sbin/bsdconfig/startup/rcdelete projects/mtree/usr.sbin/bsdconfig/startup/rcvar projects/mtree/usr.sbin/bsdconfig/startup/share/rcconf.subr projects/mtree/usr.sbin/bsdconfig/startup/share/rcedit.subr projects/mtree/usr.sbin/bsdconfig/usermgmt/groupinput projects/mtree/usr.sbin/bsdconfig/usermgmt/share/group_input.subr projects/mtree/usr.sbin/bsdconfig/usermgmt/share/user_input.subr projects/mtree/usr.sbin/bsdconfig/usermgmt/userinput projects/mtree/usr.sbin/bsdconfig/usermgmt/usermgmt projects/mtree/usr.sbin/bsdinstall/partedit/sade.8 projects/mtree/usr.sbin/bsdinstall/scripts/services projects/mtree/usr.sbin/mtree/Makefile projects/mtree/usr.sbin/ndp/ndp.8 projects/mtree/usr.sbin/ndp/ndp.c projects/mtree/usr.sbin/nmtree/Makefile projects/mtree/usr.sbin/pkg/dns_utils.c Directory Properties: projects/mtree/ (props changed) projects/mtree/cddl/contrib/opensolaris/ (props changed) projects/mtree/contrib/file/ (props changed) projects/mtree/contrib/gcc/ (props changed) projects/mtree/contrib/libcxxrt/ (props changed) projects/mtree/lib/libc/ (props changed) projects/mtree/lib/libutil/ (props changed) projects/mtree/sbin/ (props changed) projects/mtree/share/man/man4/ (props changed) projects/mtree/share/zoneinfo/ (props changed) projects/mtree/sys/ (props changed) projects/mtree/sys/boot/ (props changed) projects/mtree/sys/cddl/contrib/opensolaris/ (props changed) projects/mtree/sys/conf/ (props changed) projects/mtree/usr.bin/calendar/ (props changed) projects/mtree/usr.bin/procstat/ (props changed) Modified: projects/mtree/Makefile.inc1 ============================================================================== --- projects/mtree/Makefile.inc1 Tue Jan 15 20:13:25 2013 (r245471) +++ projects/mtree/Makefile.inc1 Tue Jan 15 20:23:10 2013 (r245472) @@ -13,6 +13,8 @@ # -DNO_PORTSUPDATE do not update ports in ${MAKE} update # -DNO_DOCUPDATE do not update doc in ${MAKE} update # -DNO_WWWUPDATE do not update www in ${MAKE} update +# -DDB_FROM_SRC use the user/group databases in src/etc instead of +# the system database when installing. # -DNO_CTF do not run the DTrace CTF conversion tools on built objects # LOCAL_DIRS="list of dirs" to add additional dirs to the SUBDIR list # LOCAL_LIB_DIRS="list of dirs" to add additional dirs to libraries target @@ -341,10 +343,9 @@ LIB32WMAKEFLAGS+= \ LIB32WMAKE= ${LIB32WMAKEENV} ${MAKE} ${LIB32WMAKEFLAGS} \ -DWITHOUT_BIND -DWITHOUT_MAN -DWITHOUT_INFO -DWITHOUT_HTML LIB32IMAKE= ${LIB32WMAKE:NINSTALL=*:NDESTDIR=*:N_LDSCRIPTROOT=*} -DNO_INCS \ - INSTALL="install -N ${.CURDIR}/etc ${INSTALLFLAGS}" + ${IMAKE_INSTALL} .endif -# install stage .if !empty(METALOG) INSTALLFLAGS= -M ${METALOG} -D ${DESTDIR} .endif @@ -355,8 +356,7 @@ MTREEFLAGS+= -W .endif IMAKEENV= ${CROSSENV:N_LDSCRIPTROOT=*} IMAKE= ${IMAKEENV} ${MAKE} -f Makefile.inc1 \ - INSTALL="install -N ${.CURDIR}/etc ${INSTALLFLAGS}" \ - MTREE_CMD="nmtree -N ${.CURDIR}/etc ${MTREEFLAGS}" + ${IMAKE_INSTALL} ${IMAKE_MTREE} .if empty(.MAKEFLAGS:M-n) IMAKEENV+= PATH=${STRICTTMPPATH}:${INSTALLTMP} \ LD_LIBRARY_PATH=${INSTALLTMP} \ @@ -365,6 +365,10 @@ IMAKE+= __MAKE_SHELL=${INSTALLTMP}/sh .else IMAKEENV+= PATH=${TMPPATH}:${INSTALLTMP} .endif +.if defined(DB_FROM_SRC) +IMAKE_INSTALL= INSTALL="install -N ${.CURDIR}/etc ${INSTALLFLAGS}" +IMAKE_MTREE= MTREE_CMD="nmtree -N ${.CURDIR}/etc ${MTREEFLAGS}" +.endif # kernel stage KMAKEENV= ${WMAKEENV} @@ -606,9 +610,11 @@ kernel-toolchain: ${TOOLCHAIN_TGTS:N_inc installcheck: # -# Require DESTDIR to be set if installing for a different architecture. +# Require DESTDIR to be set if installing for a different architecture or +# using the user/group database in the source tree. # -.if ${TARGET_ARCH} != ${MACHINE_ARCH} || ${TARGET} != ${MACHINE} +.if ${TARGET_ARCH} != ${MACHINE_ARCH} || ${TARGET} != ${MACHINE} || \ + defined(DB_FROM_SRC) .if !make(distributeworld) installcheck: installcheck_DESTDIR installcheck_DESTDIR: @@ -619,6 +625,36 @@ installcheck_DESTDIR: .endif .endif +.if !defined(DB_FROM_SRC) +# +# Check for missing UIDs/GIDs. +# +CHECK_UIDS= auditdistd +CHECK_GIDS= audit +.if ${MK_SENDMAIL} != "no" +CHECK_UIDS+= smmsp +CHECK_GIDS+= smmsp +.endif +.if ${MK_PF} != "no" +CHECK_UIDS+= proxy +CHECK_GIDS+= proxy authpf +.endif +installcheck: installcheck_UGID +installcheck_UGID: +.for uid in ${CHECK_UIDS} + @if ! `id -u ${uid} >/dev/null 2>&1`; then \ + echo "ERROR: Required ${uid} user is missing, see /usr/src/UPDATING."; \ + false; \ + fi +.endfor +.for gid in ${CHECK_GIDS} + @if ! `find / -prune -group ${gid} >/dev/null 2>&1`; then \ + echo "ERROR: Required ${gid} group is missing, see /usr/src/UPDATING."; \ + false; \ + fi +.endfor +.endif + # # Required install tools to be saved in a scratch dir for safety. # @@ -737,7 +773,8 @@ redistribute: .endif distrib-dirs distribution: - cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH} ${MAKE} ${.TARGET} + cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH} ${MAKE} \ + ${IMAKE_INSTALL} ${.TARGET} # # buildkernel and installkernel @@ -1043,6 +1080,11 @@ _lex= usr.bin/lex _yacc= usr.bin/yacc .endif +.if defined(DB_FROM_SRC) && ${BOOTSTRAPPING} < 1000026 +_nmtree= lib/libnetbsd \ + usr.sbin/nmtree +.endif + .if ${BOOTSTRAPPING} >= 900040 && ${BOOTSTRAPPING} < 900041 _awk= usr.bin/awk .endif @@ -1106,7 +1148,7 @@ bootstrap-tools: usr.bin/xinstall \ ${_gensnmptree} \ usr.sbin/config \ - usr.sbin/nmtree + ${_nmtree} ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \ cd ${.CURDIR}/${_tool}; \ ${MAKE} DIRPRFX=${_tool}/ obj; \ Modified: projects/mtree/ObsoleteFiles.inc ============================================================================== --- projects/mtree/ObsoleteFiles.inc Tue Jan 15 20:13:25 2013 (r245471) +++ projects/mtree/ObsoleteFiles.inc Tue Jan 15 20:23:10 2013 (r245472) @@ -1201,12 +1201,6 @@ OLD_FILES+=usr/include/sys/linedisc.h OLD_FILES+=usr/share/man/man3/posix_openpt.3.gz # 20080725: sgtty.h removed OLD_FILES+=usr/include/sgtty.h -# 20080719: sade(8) removed on all but amd64, i386 and sparc64 -.if ${TARGET_ARCH} != "amd64" && ${TARGET_ARCH} != "i386" && \ - ${TARGET_ARCH} != "sparc64" -OLD_FILES+=usr/sbin/sade -OLD_FILES+=usr/share/man/man8/sade.8.gz -.endif # 20080706: bsdlabel(8) removed on powerpc .if ${TARGET_ARCH} == "powerpc" OLD_FILES+=sbin/bsdlabel Modified: projects/mtree/bin/sh/eval.c ============================================================================== --- projects/mtree/bin/sh/eval.c Tue Jan 15 20:13:25 2013 (r245471) +++ projects/mtree/bin/sh/eval.c Tue Jan 15 20:23:10 2013 (r245472) @@ -624,8 +624,8 @@ evalbackcmd(union node *n, struct backcm exitstatus = 0; goto out; } + exitstatus = oexitstatus; if (is_valid_fast_cmdsubst(n)) { - exitstatus = oexitstatus; savelocalvars = localvars; localvars = NULL; forcelocal++; @@ -649,7 +649,6 @@ evalbackcmd(union node *n, struct backcm poplocalvars(); localvars = savelocalvars; } else { - exitstatus = 0; if (pipe(pip) < 0) error("Pipe call failed: %s", strerror(errno)); jp = makejob(n, 1); Modified: projects/mtree/bin/sh/exec.c ============================================================================== --- projects/mtree/bin/sh/exec.c Tue Jan 15 20:13:25 2013 (r245471) +++ projects/mtree/bin/sh/exec.c Tue Jan 15 20:23:10 2013 (r245472) @@ -86,12 +86,12 @@ struct tblentry { union param param; /* definition of builtin function */ int special; /* flag for special builtin commands */ signed char cmdtype; /* index identifying command */ - char rehash; /* if set, cd done since entry created */ char cmdname[]; /* name of command */ }; static struct tblentry *cmdtable[CMDTABLESIZE]; +static int cmdtable_cd = 0; /* cmdtable contains cd-dependent entries */ int exerrno = 0; /* Last exec error */ @@ -305,8 +305,6 @@ printentry(struct tblentry *cmdp, int ve error("internal error: cmdtype %d", cmdp->cmdtype); #endif } - if (cmdp->rehash) - out1c('*'); out1c('\n'); } @@ -323,12 +321,12 @@ find_command(const char *name, struct cm { struct tblentry *cmdp, loc_cmd; int idx; - int prev; char *fullname; struct stat statb; int e; int i; int spec; + int cd; /* If name contains a slash, don't use the hash table */ if (strchr(name, '/') != NULL) { @@ -337,8 +335,10 @@ find_command(const char *name, struct cm return; } + cd = 0; + /* If name is in the table, and not invalidated by cd, we're done */ - if ((cmdp = cmdlookup(name, 0)) != NULL && cmdp->rehash == 0) { + if ((cmdp = cmdlookup(name, 0)) != NULL) { if (cmdp->cmdtype == CMDFUNCTION && act & DO_NOFUNC) cmdp = NULL; else @@ -359,13 +359,6 @@ find_command(const char *name, struct cm } /* We have to search path. */ - prev = -1; /* where to start */ - if (cmdp) { /* doing a rehash */ - if (cmdp->cmdtype == CMDBUILTIN) - prev = -1; - else - prev = cmdp->param.index; - } e = ENOENT; idx = -1; @@ -380,13 +373,8 @@ loop: goto loop; /* ignore unimplemented options */ } } - /* if rehash, don't redo absolute path names */ - if (fullname[0] == '/' && idx <= prev) { - if (idx < prev) - goto loop; - TRACE(("searchexec \"%s\": no change\n", name)); - goto success; - } + if (fullname[0] != '/') + cd = 1; if (stat(fullname, &statb) < 0) { if (errno != ENOENT && errno != ENOTDIR) e = errno; @@ -426,9 +414,6 @@ loop: goto success; } - /* We failed. If there was an entry for this command, delete it */ - if (cmdp && cmdp->cmdtype != CMDFUNCTION) - delete_cmd_entry(); if (act & DO_ERR) { if (e == ENOENT || e == ENOTDIR) outfmt(out2, "%s: not found\n", name); @@ -440,7 +425,8 @@ loop: return; success: - cmdp->rehash = 0; + if (cd) + cmdtable_cd = 1; entry->cmdtype = cmdp->cmdtype; entry->u = cmdp->param; entry->special = cmdp->special; @@ -469,22 +455,15 @@ find_builtin(const char *name, int *spec /* - * Called when a cd is done. Marks all commands so the next time they - * are executed they will be rehashed. + * Called when a cd is done. If any entry in cmdtable depends on the current + * directory, simply clear cmdtable completely. */ void hashcd(void) { - struct tblentry **pp; - struct tblentry *cmdp; - - for (pp = cmdtable ; pp < &cmdtable[CMDTABLESIZE] ; pp++) { - for (cmdp = *pp ; cmdp ; cmdp = cmdp->next) { - if (cmdp->cmdtype == CMDNORMAL) - cmdp->rehash = 1; - } - } + if (cmdtable_cd) + clearcmdentry(); } @@ -526,6 +505,7 @@ clearcmdentry(void) } } } + cmdtable_cd = 0; INTON; } @@ -566,7 +546,6 @@ cmdlookup(const char *name, int add) + strlen(name) + 1); cmdp->next = NULL; cmdp->cmdtype = CMDUNKNOWN; - cmdp->rehash = 0; strcpy(cmdp->cmdname, name); INTON; } Modified: projects/mtree/bin/sh/parser.c ============================================================================== --- projects/mtree/bin/sh/parser.c Tue Jan 15 20:13:25 2013 (r245471) +++ projects/mtree/bin/sh/parser.c Tue Jan 15 20:23:10 2013 (r245472) @@ -240,9 +240,9 @@ list(int nlflag, int erflag) n2 = andor(); tok = readtoken(); if (tok == TBACKGND) { - if (n2->type == NPIPE) { + if (n2 != NULL && n2->type == NPIPE) { n2->npipe.backgnd = 1; - } else if (n2->type == NREDIR) { + } else if (n2 != NULL && n2->type == NREDIR) { n2->type = NBACKGND; } else { n3 = (union node *)stalloc(sizeof (struct nredir)); @@ -286,7 +286,8 @@ list(int nlflag, int erflag) tokpushback++; } checkkwd = CHKNL | CHKKWD | CHKALIAS; - if (!nlflag && !erflag && tokendlist[peektoken()]) + if (!nlflag && (erflag ? peektoken() == TEOF : + tokendlist[peektoken()])) return ntop; break; case TEOF: Modified: projects/mtree/bin/sh/sh.1 ============================================================================== --- projects/mtree/bin/sh/sh.1 Tue Jan 15 20:13:25 2013 (r245471) +++ projects/mtree/bin/sh/sh.1 Tue Jan 15 20:23:10 2013 (r245472) @@ -32,7 +32,7 @@ .\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95 .\" $FreeBSD$ .\" -.Dd July 15, 2012 +.Dd January 14, 2013 .Dt SH 1 .Os .Sh NAME @@ -2219,10 +2219,6 @@ The shell maintains a hash table which r With no arguments whatsoever, the .Ic hash command prints out the contents of this table. -Entries which have not been looked at since the last -.Ic cd -command are marked with an asterisk; -it is possible for these entries to be invalid. .Pp With arguments, the .Ic hash Modified: projects/mtree/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- projects/mtree/cddl/contrib/opensolaris/cmd/zdb/zdb.c Tue Jan 15 20:13:25 2013 (r245471) +++ projects/mtree/cddl/contrib/opensolaris/cmd/zdb/zdb.c Tue Jan 15 20:23:10 2013 (r245472) @@ -704,7 +704,9 @@ dump_ddt(ddt_t *ddt, enum ddt_type type, return; ASSERT(error == 0); - if ((count = ddt_object_count(ddt, type, class)) == 0) + error = ddt_object_count(ddt, type, class, &count); + ASSERT(error == 0); + if (count == 0) return; dspace = doi.doi_physical_blocks_512 << 9; Modified: projects/mtree/contrib/file/Magdir/lua ============================================================================== --- projects/mtree/contrib/file/Magdir/lua Tue Jan 15 20:13:25 2013 (r245471) +++ projects/mtree/contrib/file/Magdir/lua Tue Jan 15 20:23:10 2013 (r245472) @@ -19,3 +19,4 @@ 0 string \033Lua Lua bytecode, >4 byte 0x50 version 5.0 >4 byte 0x51 version 5.1 +>4 byte 0x52 version 5.2 Modified: projects/mtree/contrib/gcc/config/arm/freebsd.h ============================================================================== --- projects/mtree/contrib/gcc/config/arm/freebsd.h Tue Jan 15 20:13:25 2013 (r245471) +++ projects/mtree/contrib/gcc/config/arm/freebsd.h Tue Jan 15 20:23:10 2013 (r245472) @@ -97,7 +97,7 @@ #define TARGET_VERSION fprintf (stderr, " (FreeBSD/armv6 ELF)"); #else #undef SUBTARGET_CPU_DEFAULT -#define SUBTARGET_CPU_DEFAULT TARGET_CPU_strongarm +#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9 #undef TARGET_VERSION #define TARGET_VERSION fprintf (stderr, " (FreeBSD/StrongARM ELF)"); #endif Modified: projects/mtree/contrib/gcc/unwind-dw2.c ============================================================================== --- projects/mtree/contrib/gcc/unwind-dw2.c Tue Jan 15 20:13:25 2013 (r245471) +++ projects/mtree/contrib/gcc/unwind-dw2.c Tue Jan 15 20:23:10 2013 (r245472) @@ -1438,6 +1438,17 @@ uw_init_context_1 (struct _Unwind_Contex context->ra = __builtin_extract_return_addr (outer_ra); } +#if defined(__clang__) && defined(__amd64__) +/* Some versions of clang don't save and restore all callee registers, if a + __builtin_eh_return() intrinsic is used in a function. This is particularly + bad on amd64. For now, use the following ugly hack to force it to assume + those registers are clobbered, when invoking __builtin_eh_return(), so it + will emit code to save and restore them. */ +#define CLOBBER_REGS_HACK \ + __asm __volatile(" " : : : "r15", "r14", "r13", "r12", "rbx", "rdx", "rax"); +#else +#define CLOBBER_REGS_HACK +#endif /* __clang__ */ /* Install TARGET into CURRENT so that we can return to it. This is a macro because __builtin_eh_return must be invoked in the context of @@ -1448,6 +1459,7 @@ uw_init_context_1 (struct _Unwind_Contex { \ long offset = uw_install_context_1 ((CURRENT), (TARGET)); \ void *handler = __builtin_frob_return_addr ((TARGET)->ra); \ + CLOBBER_REGS_HACK \ __builtin_eh_return (offset, handler); \ } \ while (0) Copied: projects/mtree/contrib/libcxxrt/atomic.h (from r245462, head/contrib/libcxxrt/atomic.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/mtree/contrib/libcxxrt/atomic.h Tue Jan 15 20:23:10 2013 (r245472, copy of r245462, head/contrib/libcxxrt/atomic.h) @@ -0,0 +1,29 @@ + +#ifndef __has_builtin +#define __has_builtin(x) 0 +#endif +#ifndef __has_feature +#define __has_feature(x) 0 +#endif +/** + * Swap macro that enforces a happens-before relationship with a corresponding + * ATOMIC_LOAD. + */ +#if __has_feature(cxx_atomic) +#define ATOMIC_SWAP(addr, val)\ + __c11_atomic_exchange((_Atomic(__typeof__(val))*)addr, val, __ATOMIC_ACQ_REL) +#elif __has_builtin(__sync_swap) +#define ATOMIC_SWAP(addr, val)\ + __sync_swap(addr, val) +#else +#define ATOMIC_SWAP(addr, val)\ + __sync_lock_test_and_set(addr, val) +#endif + +#if __has_feature(cxx_atomic) +#define ATOMIC_LOAD(addr)\ + __c11_atomic_load((_Atomic(__typeof__(*addr))*)addr, __ATOMIC_ACQUIRE) +#else +#define ATOMIC_LOAD(addr)\ + (__sync_synchronize(), *addr) +#endif Modified: projects/mtree/contrib/libcxxrt/exception.cc ============================================================================== --- projects/mtree/contrib/libcxxrt/exception.cc Tue Jan 15 20:13:25 2013 (r245471) +++ projects/mtree/contrib/libcxxrt/exception.cc Tue Jan 15 20:23:10 2013 (r245472) @@ -32,6 +32,7 @@ #include <pthread.h> #include "typeinfo.h" #include "dwarf_eh.h" +#include "atomic.h" #include "cxxabi.h" #pragma weak pthread_key_create @@ -155,6 +156,17 @@ struct __cxa_thread_info */ _Unwind_Exception *currentCleanup; /** + * Our state with respect to foreign exceptions. Usually none, set to + * caught if we have just caught an exception and rethrown if we are + * rethrowing it. + */ + enum + { + none, + caught, + rethrown + } foreign_exception_state; + /** * The public part of this structure, accessible from outside of this * module. */ @@ -308,7 +320,16 @@ static void thread_cleanup(void* thread_ __cxa_thread_info *info = (__cxa_thread_info*)thread_info; if (info->globals.caughtExceptions) { - free_exception_list(info->globals.caughtExceptions); + // If this is a foreign exception, ask it to clean itself up. + if (info->foreign_exception_state != __cxa_thread_info::none) + { + _Unwind_Exception *e = (_Unwind_Exception*)info->globals.caughtExceptions; + e->exception_cleanup(_URC_FOREIGN_EXCEPTION_CAUGHT, e); + } + else + { + free_exception_list(info->globals.caughtExceptions); + } } free(thread_info); } @@ -780,7 +801,8 @@ extern "C" void __cxa_decrement_exceptio */ extern "C" void __cxa_rethrow() { - __cxa_eh_globals *globals = __cxa_get_globals(); + __cxa_thread_info *ti = thread_info_fast(); + __cxa_eh_globals *globals = &ti->globals; // Note: We don't remove this from the caught list here, because // __cxa_end_catch will be called when we unwind out of the try block. We // could probably make this faster by providing an alternative rethrow @@ -795,6 +817,15 @@ extern "C" void __cxa_rethrow() std::terminate(); } + if (ti->foreign_exception_state != __cxa_thread_info::none) + { + ti->foreign_exception_state = __cxa_thread_info::rethrown; + _Unwind_Exception *e = (_Unwind_Exception*)ex; + _Unwind_Reason_Code err = _Unwind_Resume_or_Rethrow(e); + report_failure(err, ex); + return; + } + assert(ex->handlerCount > 0 && "Rethrowing uncaught exception!"); // ex->handlerCount will be decremented in __cxa_end_catch in enclosing @@ -848,9 +879,9 @@ static bool check_type_signature(__cxa_e void *&adjustedPtr) { void *exception_ptr = (void*)(ex+1); - const std::type_info *ex_type = ex->exceptionType; + const std::type_info *ex_type = ex ? ex->exceptionType : 0; - bool is_ptr = ex_type->__is_pointer_p(); + bool is_ptr = ex ? ex_type->__is_pointer_p() : false; if (is_ptr) { exception_ptr = *(void**)exception_ptr; @@ -911,8 +942,8 @@ static handler_type check_action_record( action_record = displacement ? action_record_offset_base + displacement : 0; // We only check handler types for C++ exceptions - foreign exceptions - // are only allowed for cleanup. - if (filter > 0 && 0 != ex) + // are only allowed for cleanups and catchalls. + if (filter > 0) { std::type_info *handler_type = get_type_info_entry(context, lsda, filter); if (check_type_signature(ex, handler_type, adjustedPtr)) @@ -1133,8 +1164,10 @@ extern "C" void *__cxa_begin_catch(void extern "C" void *__cxa_begin_catch(void *e) #endif { - // Decrement the uncaught exceptions count - __cxa_eh_globals *globals = __cxa_get_globals(); + // We can't call the fast version here, because if the first exception that + // we see is a foreign exception then we won't have called it yet. + __cxa_thread_info *ti = thread_info(); + __cxa_eh_globals *globals = &ti->globals; globals->uncaughtExceptions--; _Unwind_Exception *exceptionObject = (_Unwind_Exception*)e; @@ -1177,9 +1210,22 @@ extern "C" void *__cxa_begin_catch(void { ex->handlerCount++; } + ti->foreign_exception_state = __cxa_thread_info::none; return ex->adjustedPtr; } + else + { + // If this is a foreign exception, then we need to be able to + // store it. We can't chain foreign exceptions, so we give up + // if there are already some outstanding ones. + if (globals->caughtExceptions != 0) + { + std::terminate(); + } + globals->caughtExceptions = (__cxa_exception*)exceptionObject; + ti->foreign_exception_state = __cxa_thread_info::caught; + } // exceptionObject is the pointer to the _Unwind_Exception within the // __cxa_exception. The throw object is after this return ((char*)exceptionObject + sizeof(_Unwind_Exception)); @@ -1195,10 +1241,23 @@ extern "C" void __cxa_end_catch() { // We can call the fast version here because the slow version is called in // __cxa_throw(), which must have been called before we end a catch block - __cxa_eh_globals *globals = __cxa_get_globals_fast(); + __cxa_thread_info *ti = thread_info_fast(); + __cxa_eh_globals *globals = &ti->globals; __cxa_exception *ex = globals->caughtExceptions; assert(0 != ex && "Ending catch when no exception is on the stack!"); + + if (ti->foreign_exception_state != __cxa_thread_info::none) + { + globals->caughtExceptions = 0; + if (ti->foreign_exception_state != __cxa_thread_info::rethrown) + { + _Unwind_Exception *e = (_Unwind_Exception*)ti->globals.caughtExceptions; + e->exception_cleanup(_URC_FOREIGN_EXCEPTION_CAUGHT, e); + } + ti->foreign_exception_state = __cxa_thread_info::none; + return; + } bool deleteException = true; @@ -1328,7 +1387,7 @@ namespace std { if (thread_local_handlers) { return pathscale::set_unexpected(f); } - return __sync_lock_test_and_set(&unexpectedHandler, f); + return ATOMIC_SWAP(&terminateHandler, f); } /** * Sets the function that is called to terminate the program. @@ -1336,7 +1395,8 @@ namespace std terminate_handler set_terminate(terminate_handler f) throw() { if (thread_local_handlers) { return pathscale::set_terminate(f); } - return __sync_lock_test_and_set(&terminateHandler, f); + + return ATOMIC_SWAP(&terminateHandler, f); } /** * Terminates the program, calling a custom terminate implementation if @@ -1390,7 +1450,7 @@ namespace std { return info->unexpectedHandler; } - return unexpectedHandler; + return ATOMIC_LOAD(&unexpectedHandler); } /** * Returns the current terminate handler. @@ -1402,7 +1462,7 @@ namespace std { return info->terminateHandler; } - return terminateHandler; + return ATOMIC_LOAD(&terminateHandler); } } #ifdef __arm__ Modified: projects/mtree/contrib/libcxxrt/memory.cc ============================================================================== --- projects/mtree/contrib/libcxxrt/memory.cc Tue Jan 15 20:13:25 2013 (r245471) +++ projects/mtree/contrib/libcxxrt/memory.cc Tue Jan 15 20:23:10 2013 (r245472) @@ -36,14 +36,8 @@ #include <stddef.h> #include <stdlib.h> #include "stdexcept.h" +#include "atomic.h" -#ifndef __has_builtin -#define __has_builtin(x) 0 -#endif - -#if !__has_builtin(__sync_swap) -#define __sync_swap __sync_lock_test_and_set -#endif namespace std { @@ -67,7 +61,12 @@ namespace std __attribute__((weak)) new_handler set_new_handler(new_handler handler) { - return __sync_swap(&new_handl, handler); + return ATOMIC_SWAP(&new_handl, handler); + } + __attribute__((weak)) + new_handler get_new_handler(void) + { + return ATOMIC_LOAD(&new_handl); } } @@ -75,12 +74,17 @@ namespace std __attribute__((weak)) void* operator new(size_t size) { + if (0 == size) + { + size = 1; + } void * mem = malloc(size); while (0 == mem) { - if (0 != new_handl) + new_handler h = std::get_new_handler(); + if (0 != h) { - new_handl(); + h(); } else { @@ -95,14 +99,19 @@ void* operator new(size_t size) __attribute__((weak)) void* operator new(size_t size, const std::nothrow_t &) throw() { + if (0 == size) + { + size = 1; + } void *mem = malloc(size); while (0 == mem) { - if (0 != new_handl) + new_handler h = std::get_new_handler(); + if (0 != h) { try { - new_handl(); + h(); } catch (...) { Modified: projects/mtree/contrib/libcxxrt/typeinfo.h ============================================================================== --- projects/mtree/contrib/libcxxrt/typeinfo.h Tue Jan 15 20:13:25 2013 (r245471) +++ projects/mtree/contrib/libcxxrt/typeinfo.h Tue Jan 15 20:23:10 2013 (r245472) @@ -70,6 +70,14 @@ namespace std */ public: /** + * Returns true if this is some pointer type, false otherwise. + */ + virtual bool __is_pointer_p() const { return false; } + /** + * Returns true if this is some function type, false otherwise. + */ + virtual bool __is_function_p() const { return false; } + /** * Catch function. Allows external libraries to implement * their own basic types. This is used, for example, in the * GNUstep Objective-C runtime to allow Objective-C types to be @@ -95,14 +103,6 @@ namespace std { return false; } - /** - * Returns true if this is some pointer type, false otherwise. - */ - virtual bool __is_pointer_p() const { return false; } - /** - * Returns true if this is some function type, false otherwise. - */ - virtual bool __is_function_p() const { return false; } }; } @@ -284,7 +284,6 @@ namespace ABI_NAMESPACE /** Pointer is a pointer to a member of an incomplete class. */ __incomplete_class_mask = 0x10 }; - virtual bool __is_pointer_p() const { return true; } virtual bool __do_catch(const type_info *thrown_type, void **thrown_object, unsigned outer) const; @@ -296,6 +295,7 @@ namespace ABI_NAMESPACE struct __pointer_type_info : public __pbase_type_info { virtual ~__pointer_type_info(); + virtual bool __is_pointer_p() const { return true; } }; /** Modified: projects/mtree/etc/rc.subr ============================================================================== --- projects/mtree/etc/rc.subr Tue Jan 15 20:13:25 2013 (r245471) +++ projects/mtree/etc/rc.subr Tue Jan 15 20:23:10 2013 (r245472) @@ -290,7 +290,7 @@ _find_processes() _interpbn=${1##*/} _fp_args='_argv' _fp_match='case "$_argv" in - ${_interp}|"${_interp} "*|"${_interpbn}: ${_procname}"*)' + ${_interp}|"${_interp} "*|"[${_interpbn}]"|"${_interpbn}: ${_procname}"*)' else # a normal daemon _procnamebn=${_procname##*/} _fp_args='_arg0 _argv' Modified: projects/mtree/include/time.h ============================================================================== --- projects/mtree/include/time.h Tue Jan 15 20:13:25 2013 (r245471) +++ projects/mtree/include/time.h Tue Jan 15 20:23:10 2013 (r245472) @@ -112,6 +112,7 @@ typedef __pid_t pid_t; #define CLOCK_MONOTONIC_FAST 12 /* FreeBSD-specific. */ #define CLOCK_SECOND 13 /* FreeBSD-specific. */ #define CLOCK_THREAD_CPUTIME_ID 14 +#define CLOCK_PROCESS_CPUTIME_ID 15 #endif /* !defined(CLOCK_REALTIME) && __POSIX_VISIBLE >= 200112 */ #if !defined(TIMER_ABSTIME) && __POSIX_VISIBLE >= 200112 Modified: projects/mtree/lib/libc/gen/Makefile.inc ============================================================================== --- projects/mtree/lib/libc/gen/Makefile.inc Tue Jan 15 20:13:25 2013 (r245471) +++ projects/mtree/lib/libc/gen/Makefile.inc Tue Jan 15 20:23:10 2013 (r245472) @@ -40,6 +40,7 @@ SRCS+= __getosreldate.c __xuname.c \ SRCS+= pwcache.c pwcache.h .PATH: ${.CURDIR}/../../contrib/libc-vis +CFLAGS+= -I${.CURDIR}/../../contrib/libc-vis SRCS+= unvis.c vis.c MISRCS+=modf.c Modified: projects/mtree/lib/libc/gen/Symbol.map ============================================================================== --- projects/mtree/lib/libc/gen/Symbol.map Tue Jan 15 20:13:25 2013 (r245471) +++ projects/mtree/lib/libc/gen/Symbol.map Tue Jan 15 20:23:10 2013 (r245472) @@ -298,6 +298,8 @@ FBSD_1.0 { ualarm; ulimit; uname; + strunvis; + strunvisx; usleep; utime; valloc; @@ -391,8 +393,6 @@ FBSD_1.3 { snvis; strnunvis; strnunvisx; - strunvis; - strunvisx; strnvis; strnvisx; strsnvis; Modified: projects/mtree/lib/libc/net/name6.c ============================================================================== --- projects/mtree/lib/libc/net/name6.c Tue Jan 15 20:13:25 2013 (r245471) +++ projects/mtree/lib/libc/net/name6.c Tue Jan 15 20:23:10 2013 (r245472) @@ -200,7 +200,7 @@ static struct hostent *_hpmapv6(struct #endif static struct hostent *_hpsort(struct hostent *, res_state); -#ifdef ENABLE_IP6ADDRCTL +#ifdef INET6 static struct hostent *_hpreorder(struct hostent *); static int get_addrselectpolicy(struct policyhead *); static void free_addrselectpolicy(struct policyhead *); @@ -287,8 +287,10 @@ getipnodebyname(const char *name, int af hp = gethostbyname2(name, af); hp = _hpcopy(hp, errp); - #ifdef INET6 + if (af == AF_INET6) + hp = _hpreorder(hp); + if (af == AF_INET6 && ((flags & AI_ALL) || hp == NULL) && MAPADDRENABLED(flags)) { struct hostent *hp2 = gethostbyname2(name, AF_INET); @@ -311,11 +313,7 @@ getipnodebyname(const char *name, int af *errp = statp->res_h_errno; statp->options = options; -#ifdef ENABLE_IP6ADDRCTL - return _hpreorder(_hpsort(hp, statp)); -#else return _hpsort(hp, statp); -#endif } struct hostent * @@ -638,7 +636,7 @@ _hpsort(struct hostent *hp, res_state st return hp; } -#ifdef ENABLE_IP6ADDRCTL +#ifdef INET6 /* * _hpreorder: sort address by default address selection */ Modified: projects/mtree/lib/libc/sys/chroot.2 ============================================================================== --- projects/mtree/lib/libc/sys/chroot.2 Tue Jan 15 20:13:25 2013 (r245471) +++ projects/mtree/lib/libc/sys/chroot.2 Tue Jan 15 20:23:10 2013 (r245472) @@ -92,12 +92,8 @@ system call. Any other value for .Ql kern.chroot_allow_open_directories will bypass the check for open directories -.Pp -Upon successful completion, a value of 0 is returned. -Otherwise, -a value of -1 is returned and -.Va errno -is set to indicate an error. +.Sh RETURN VALUES +.Rv -std .Sh ERRORS The .Fn chroot Modified: projects/mtree/lib/libedit/editline.3 ============================================================================== --- projects/mtree/lib/libedit/editline.3 Tue Jan 15 20:13:25 2013 (r245471) +++ projects/mtree/lib/libedit/editline.3 Tue Jan 15 20:23:10 2013 (r245472) @@ -526,8 +526,6 @@ If is .Dv NULL , try -.Pa $PWD/.editrc -then .Pa $HOME/.editrc . Refer to .Xr editrc 5 Modified: projects/mtree/lib/libedit/editrc.5 ============================================================================== --- projects/mtree/lib/libedit/editrc.5 Tue Jan 15 20:13:25 2013 (r245471) +++ projects/mtree/lib/libedit/editrc.5 Tue Jan 15 20:23:10 2013 (r245472) @@ -473,6 +473,13 @@ Move down one line. Editline extended command. .El .\" End of section automatically generated with makelist +.Sh FILES +.Bl -tag -width "~/.editrcXXX" +.It Pa ~/.editrc +User configuration file for the +.Xr editline 3 +library. +.El .Sh SEE ALSO .Xr editline 3 , .Xr regex 3 , Modified: projects/mtree/lib/libradius/libradius.3 ============================================================================== --- projects/mtree/lib/libradius/libradius.3 Tue Jan 15 20:13:25 2013 (r245471) +++ projects/mtree/lib/libradius/libradius.3 Tue Jan 15 20:23:10 2013 (r245472) @@ -38,7 +38,7 @@ .Ft int .Fn rad_add_server "struct rad_handle *h" "const char *host" "int port" "const char *secret" "int timeout" "int max_tries" .Ft int -.Fn rad_add_server_ex "struct rad_handle *h" "const char *host" "int port" "const char *secret" "int timeout" "int max_tries" "int dead_time" "struct in_addr bindto" +.Fn rad_add_server_ex "struct rad_handle *h" "const char *host" "int port" "const char *secret" "int timeout" "int max_tries" "int dead_time" "struct in_addr *bindto" .Ft "struct rad_handle *" .Fn rad_auth_open "void" .Ft void Modified: projects/mtree/lib/libutil/gr_util.c ============================================================================== --- projects/mtree/lib/libutil/gr_util.c Tue Jan 15 20:13:25 2013 (r245471) +++ projects/mtree/lib/libutil/gr_util.c Tue Jan 15 20:23:10 2013 (r245472) @@ -50,8 +50,6 @@ static char group_file[PATH_MAX]; static char tempname[PATH_MAX]; static int initialized; -static const char group_line_format[] = "%s:%s:%ju:"; - /* * Initialize statics */ @@ -318,7 +316,7 @@ gr_mkdb(void) } /* - * Clean up. Preserver errno for the caller's convenience. + * Clean up. Preserves errno for the caller's convenience. */ void gr_fini(void) @@ -346,7 +344,6 @@ gr_equal(const struct group *gr1, const { int gr1_ndx; int gr2_ndx; - bool found; /* Check that the non-member information is the same. */ if (gr1->gr_name == NULL || gr2->gr_name == NULL) { @@ -367,17 +364,15 @@ gr_equal(const struct group *gr1, const if (gr1->gr_mem != gr2->gr_mem) return (false); } else { - for (found = false, gr1_ndx = 0; gr1->gr_mem[gr1_ndx] != NULL; - gr1_ndx++) { - for (gr2_ndx = 0; gr2->gr_mem[gr2_ndx] != NULL; - gr2_ndx++) + for (gr1_ndx = 0; gr1->gr_mem[gr1_ndx] != NULL; gr1_ndx++) { + for (gr2_ndx = 0;; gr2_ndx++) { + if (gr2->gr_mem[gr2_ndx] == NULL) + return (false); if (strcmp(gr1->gr_mem[gr1_ndx], gr2->gr_mem[gr2_ndx]) == 0) { - found = true; break; } - if (!found) - return (false); + } } /* Check that group2 does not have more members than group1. */ @@ -394,7 +389,10 @@ gr_equal(const struct group *gr1, const char * gr_make(const struct group *gr) { + const char *group_line_format = "%s:%s:%ju:"; + const char *sep; char *line; + char *p; size_t line_size; int ndx; @@ -409,16 +407,18 @@ gr_make(const struct group *gr) } /* Create the group line and fill it. */ - if ((line = malloc(line_size)) == NULL) + if ((line = p = malloc(line_size)) == NULL) return (NULL); - snprintf(line, line_size, group_line_format, gr->gr_name, gr->gr_passwd, + p += sprintf(p, group_line_format, gr->gr_name, gr->gr_passwd, (uintmax_t)gr->gr_gid); - if (gr->gr_mem != NULL) + if (gr->gr_mem != NULL) { + sep = ""; for (ndx = 0; gr->gr_mem[ndx] != NULL; ndx++) { - strcat(line, gr->gr_mem[ndx]); - if (gr->gr_mem[ndx + 1] != NULL) - strcat(line, ","); + p = stpcpy(p, sep); + p = stpcpy(p, gr->gr_mem[ndx]); + sep = ","; } + } return (line); } Modified: projects/mtree/release/generate-release.sh ============================================================================== --- projects/mtree/release/generate-release.sh Tue Jan 15 20:13:25 2013 (r245471) +++ projects/mtree/release/generate-release.sh Tue Jan 15 20:23:10 2013 (r245472) @@ -160,7 +160,7 @@ build_docports() { # Could not install textproc/docproj from pkg(8) or pkg_add(1). Build # the port as final fallback. *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201301152023.r0FKNBdK028516>