From owner-p4-projects@FreeBSD.ORG Tue Apr 6 09:57:39 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 63DD31065673; Tue, 6 Apr 2010 09:57:39 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 278201065670 for ; Tue, 6 Apr 2010 09:57:39 +0000 (UTC) (envelope-from mav@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 145E28FC0C for ; Tue, 6 Apr 2010 09:57:39 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o369vdhu013587 for ; Tue, 6 Apr 2010 09:57:39 GMT (envelope-from mav@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o369vctW013585 for perforce@freebsd.org; Tue, 6 Apr 2010 09:57:38 GMT (envelope-from mav@freebsd.org) Date: Tue, 6 Apr 2010 09:57:38 GMT Message-Id: <201004060957.o369vctW013585@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mav@freebsd.org using -f From: Alexander Motin To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 176574 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Apr 2010 09:57:39 -0000 http://p4web.freebsd.org/chv.cgi?CH=176574 Change 176574 by mav@mav_mavbook on 2010/04/06 09:57:10 IFC Affected files ... .. //depot/projects/scottl-camlock/src/UPDATING#29 integrate .. //depot/projects/scottl-camlock/src/bin/sh/expand.c#8 integrate .. //depot/projects/scottl-camlock/src/bin/sh/mksyntax.c#5 integrate .. //depot/projects/scottl-camlock/src/bin/sh/options.c#5 integrate .. //depot/projects/scottl-camlock/src/bin/sh/parser.c#13 integrate .. //depot/projects/scottl-camlock/src/bin/sh/sh.1#10 integrate .. //depot/projects/scottl-camlock/src/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c#4 integrate .. //depot/projects/scottl-camlock/src/contrib/tzdata/asia#3 integrate .. //depot/projects/scottl-camlock/src/contrib/tzdata/europe#2 integrate .. //depot/projects/scottl-camlock/src/contrib/tzdata/zone.tab#3 integrate .. //depot/projects/scottl-camlock/src/etc/rc.subr#11 integrate .. //depot/projects/scottl-camlock/src/include/netdb.h#4 integrate .. //depot/projects/scottl-camlock/src/include/nsswitch.h#4 integrate .. //depot/projects/scottl-camlock/src/lib/libc/db/hash/hash.c#4 integrate .. //depot/projects/scottl-camlock/src/lib/libc/db/hash/hash.h#3 integrate .. //depot/projects/scottl-camlock/src/lib/libc/db/man/hash.3#2 integrate .. //depot/projects/scottl-camlock/src/lib/libc/net/getservent.c#2 integrate .. //depot/projects/scottl-camlock/src/lib/libc/net/nsdispatch.3#2 integrate .. //depot/projects/scottl-camlock/src/lib/libc/stdio/printf.3#5 integrate .. //depot/projects/scottl-camlock/src/lib/libc/stdio/vasprintf.c#4 integrate .. //depot/projects/scottl-camlock/src/lib/libpmc/Makefile#6 integrate .. //depot/projects/scottl-camlock/src/lib/libpmc/libpmc.c#9 integrate .. //depot/projects/scottl-camlock/src/lib/libpmc/pmc.corei7.3#1 branch .. //depot/projects/scottl-camlock/src/lib/libpmc/pmc.corei7uc.3#1 branch .. //depot/projects/scottl-camlock/src/lib/libpmc/pmc.ucf.3#1 branch .. //depot/projects/scottl-camlock/src/lib/libpmc/pmc.westmere.3#1 branch .. //depot/projects/scottl-camlock/src/lib/libpmc/pmc.westmereuc.3#1 branch .. //depot/projects/scottl-camlock/src/lib/libz/zconf.h#4 integrate .. //depot/projects/scottl-camlock/src/share/examples/indent/indent.pro#1 branch .. //depot/projects/scottl-camlock/src/share/man/man5/nsswitch.conf.5#3 integrate .. //depot/projects/scottl-camlock/src/share/man/man5/services.5#2 integrate .. //depot/projects/scottl-camlock/src/share/man/man7/build.7#5 integrate .. //depot/projects/scottl-camlock/src/share/misc/committers-ports.dot#10 integrate .. //depot/projects/scottl-camlock/src/share/mk/bsd.lib.mk#6 integrate .. //depot/projects/scottl-camlock/src/share/mk/bsd.port.mk#2 integrate .. //depot/projects/scottl-camlock/src/share/mk/bsd.prog.mk#4 integrate .. //depot/projects/scottl-camlock/src/share/mk/sys.mk#5 integrate .. //depot/projects/scottl-camlock/src/sys/amd64/include/pmc_mdep.h#5 integrate .. //depot/projects/scottl-camlock/src/sys/cam/scsi/scsi_da.c#54 integrate .. //depot/projects/scottl-camlock/src/sys/compat/ia32/ia32_signal.h#8 integrate .. //depot/projects/scottl-camlock/src/sys/compat/linprocfs/linprocfs.c#30 integrate .. //depot/projects/scottl-camlock/src/sys/conf/files.amd64#29 integrate .. //depot/projects/scottl-camlock/src/sys/conf/files.i386#29 integrate .. //depot/projects/scottl-camlock/src/sys/conf/files.pc98#22 integrate .. //depot/projects/scottl-camlock/src/sys/conf/kern.mk#12 integrate .. //depot/projects/scottl-camlock/src/sys/conf/kern.post.mk#17 integrate .. //depot/projects/scottl-camlock/src/sys/conf/kern.pre.mk#13 integrate .. //depot/projects/scottl-camlock/src/sys/conf/kmod.mk#21 integrate .. //depot/projects/scottl-camlock/src/sys/contrib/dev/acpica/changes.txt#8 integrate .. //depot/projects/scottl-camlock/src/sys/contrib/dev/acpica/common/dmextern.c#4 integrate .. //depot/projects/scottl-camlock/src/sys/contrib/dev/acpica/compiler/aslanalyze.c#8 integrate .. //depot/projects/scottl-camlock/src/sys/contrib/dev/acpica/compiler/aslcompiler.h#9 integrate .. //depot/projects/scottl-camlock/src/sys/contrib/dev/acpica/compiler/aslpredef.c#2 integrate .. //depot/projects/scottl-camlock/src/sys/contrib/dev/acpica/compiler/aslstubs.c#9 integrate .. //depot/projects/scottl-camlock/src/sys/contrib/dev/acpica/compiler/asltypes.h#10 integrate .. //depot/projects/scottl-camlock/src/sys/contrib/dev/acpica/debugger/dbdisply.c#4 integrate .. //depot/projects/scottl-camlock/src/sys/contrib/dev/acpica/events/evgpe.c#5 integrate .. //depot/projects/scottl-camlock/src/sys/contrib/dev/acpica/events/evgpeblk.c#6 integrate .. //depot/projects/scottl-camlock/src/sys/contrib/dev/acpica/events/evxface.c#5 integrate .. //depot/projects/scottl-camlock/src/sys/contrib/dev/acpica/events/evxfevnt.c#4 integrate .. //depot/projects/scottl-camlock/src/sys/contrib/dev/acpica/executer/exdebug.c#2 integrate .. //depot/projects/scottl-camlock/src/sys/contrib/dev/acpica/executer/exmutex.c#5 integrate .. //depot/projects/scottl-camlock/src/sys/contrib/dev/acpica/executer/exoparg2.c#4 integrate .. //depot/projects/scottl-camlock/src/sys/contrib/dev/acpica/executer/exregion.c#5 integrate .. //depot/projects/scottl-camlock/src/sys/contrib/dev/acpica/include/acevents.h#3 integrate .. //depot/projects/scottl-camlock/src/sys/contrib/dev/acpica/include/acexcep.h#3 integrate .. //depot/projects/scottl-camlock/src/sys/contrib/dev/acpica/include/acglobal.h#6 integrate .. //depot/projects/scottl-camlock/src/sys/contrib/dev/acpica/include/aclocal.h#5 integrate .. //depot/projects/scottl-camlock/src/sys/contrib/dev/acpica/include/acpixf.h#8 integrate .. //depot/projects/scottl-camlock/src/sys/contrib/dev/acpica/include/actables.h#3 integrate .. //depot/projects/scottl-camlock/src/sys/contrib/dev/acpica/include/actypes.h#4 integrate .. //depot/projects/scottl-camlock/src/sys/contrib/dev/acpica/include/platform/acfreebsd.h#3 integrate .. //depot/projects/scottl-camlock/src/sys/contrib/dev/acpica/parser/psxface.c#6 integrate .. //depot/projects/scottl-camlock/src/sys/contrib/dev/acpica/tables/tbutils.c#5 integrate .. //depot/projects/scottl-camlock/src/sys/contrib/dev/acpica/tables/tbxface.c#3 integrate .. //depot/projects/scottl-camlock/src/sys/contrib/dev/acpica/utilities/utglobal.c#5 integrate .. //depot/projects/scottl-camlock/src/sys/dev/acpica/acpi.c#31 integrate .. //depot/projects/scottl-camlock/src/sys/dev/acpica/acpi_button.c#8 integrate .. //depot/projects/scottl-camlock/src/sys/dev/acpica/acpi_ec.c#16 integrate .. //depot/projects/scottl-camlock/src/sys/dev/acpica/acpi_lid.c#8 integrate .. //depot/projects/scottl-camlock/src/sys/dev/acpica/acpivar.h#19 integrate .. //depot/projects/scottl-camlock/src/sys/dev/cxgb/cxgb_adapter.h#13 integrate .. //depot/projects/scottl-camlock/src/sys/dev/cxgb/cxgb_main.c#18 integrate .. //depot/projects/scottl-camlock/src/sys/dev/cxgb/cxgb_sge.c#22 integrate .. //depot/projects/scottl-camlock/src/sys/dev/hwpmc/hwpmc_core.c#6 integrate .. //depot/projects/scottl-camlock/src/sys/dev/hwpmc/hwpmc_core.h#2 integrate .. //depot/projects/scottl-camlock/src/sys/dev/hwpmc/hwpmc_intel.c#3 integrate .. //depot/projects/scottl-camlock/src/sys/dev/hwpmc/hwpmc_uncore.c#1 branch .. //depot/projects/scottl-camlock/src/sys/dev/hwpmc/hwpmc_uncore.h#1 branch .. //depot/projects/scottl-camlock/src/sys/dev/hwpmc/pmc_events.h#8 integrate .. //depot/projects/scottl-camlock/src/sys/dev/ofw/ofw_standard.c#5 integrate .. //depot/projects/scottl-camlock/src/sys/fs/coda/cnode.h#3 integrate .. //depot/projects/scottl-camlock/src/sys/fs/coda/coda.h#2 integrate .. //depot/projects/scottl-camlock/src/sys/fs/coda/coda_subr.c#3 integrate .. //depot/projects/scottl-camlock/src/sys/fs/coda/coda_subr.h#2 integrate .. //depot/projects/scottl-camlock/src/sys/fs/coda/coda_venus.c#3 integrate .. //depot/projects/scottl-camlock/src/sys/fs/coda/coda_venus.h#3 integrate .. //depot/projects/scottl-camlock/src/sys/fs/coda/coda_vfsops.c#4 integrate .. //depot/projects/scottl-camlock/src/sys/fs/coda/coda_vfsops.h#2 integrate .. //depot/projects/scottl-camlock/src/sys/fs/coda/coda_vnops.c#4 integrate .. //depot/projects/scottl-camlock/src/sys/fs/deadfs/dead_vnops.c#8 integrate .. //depot/projects/scottl-camlock/src/sys/fs/msdosfs/msdosfs_vfsops.c#20 integrate .. //depot/projects/scottl-camlock/src/sys/fs/nfsserver/nfs_nfsdport.c#9 integrate .. //depot/projects/scottl-camlock/src/sys/fs/nfsserver/nfs_nfsdserv.c#5 integrate .. //depot/projects/scottl-camlock/src/sys/geom/geom_vfs.c#9 integrate .. //depot/projects/scottl-camlock/src/sys/i386/include/pmc_mdep.h#5 integrate .. //depot/projects/scottl-camlock/src/sys/kern/init_main.c#22 integrate .. //depot/projects/scottl-camlock/src/sys/kern/vfs_bio.c#22 integrate .. //depot/projects/scottl-camlock/src/sys/kern/vfs_default.c#22 integrate .. //depot/projects/scottl-camlock/src/sys/kern/vfs_subr.c#31 integrate .. //depot/projects/scottl-camlock/src/sys/kern/vfs_vnops.c#26 integrate .. //depot/projects/scottl-camlock/src/sys/modules/hwpmc/Makefile#5 integrate .. //depot/projects/scottl-camlock/src/sys/netinet/sctp_asconf.c#11 integrate .. //depot/projects/scottl-camlock/src/sys/netinet/sctp_constants.h#13 integrate .. //depot/projects/scottl-camlock/src/sys/netinet/sctp_indata.c#20 integrate .. //depot/projects/scottl-camlock/src/sys/netinet/sctp_indata.h#9 integrate .. //depot/projects/scottl-camlock/src/sys/netinet/sctp_input.c#21 integrate .. //depot/projects/scottl-camlock/src/sys/netinet/sctp_output.c#24 integrate .. //depot/projects/scottl-camlock/src/sys/netinet/sctp_output.h#10 integrate .. //depot/projects/scottl-camlock/src/sys/netinet/sctp_pcb.c#22 integrate .. //depot/projects/scottl-camlock/src/sys/netinet/sctp_pcb.h#12 integrate .. //depot/projects/scottl-camlock/src/sys/netinet/sctp_structs.h#15 integrate .. //depot/projects/scottl-camlock/src/sys/netinet/sctp_usrreq.c#17 integrate .. //depot/projects/scottl-camlock/src/sys/netinet/sctp_var.h#10 integrate .. //depot/projects/scottl-camlock/src/sys/netinet/sctputil.c#23 integrate .. //depot/projects/scottl-camlock/src/sys/netinet/sctputil.h#14 integrate .. //depot/projects/scottl-camlock/src/sys/netinet6/sctp6_usrreq.c#11 integrate .. //depot/projects/scottl-camlock/src/sys/netipsec/ipsec.c#18 integrate .. //depot/projects/scottl-camlock/src/sys/powerpc/ofw/ofw_real.c#4 integrate .. //depot/projects/scottl-camlock/src/sys/sparc64/sparc64/trap.c#20 integrate .. //depot/projects/scottl-camlock/src/sys/sys/pmc.h#10 integrate .. //depot/projects/scottl-camlock/src/sys/sys/vnode.h#25 integrate .. //depot/projects/scottl-camlock/src/sys/teken/teken.c#7 integrate .. //depot/projects/scottl-camlock/src/sys/ufs/ffs/ffs_vfsops.c#23 integrate .. //depot/projects/scottl-camlock/src/sys/vm/vm_map.c#29 integrate .. //depot/projects/scottl-camlock/src/sys/vm/vm_map.h#13 integrate .. //depot/projects/scottl-camlock/src/sys/vm/vm_page.c#26 integrate .. //depot/projects/scottl-camlock/src/tools/regression/bin/sh/expansion/arith4.0#1 branch .. //depot/projects/scottl-camlock/src/tools/regression/bin/sh/expansion/arith5.0#1 branch .. //depot/projects/scottl-camlock/src/tools/regression/bin/sh/expansion/plus-minus2.0#1 branch .. //depot/projects/scottl-camlock/src/tools/regression/bin/sh/expansion/tilde1.0#1 branch .. //depot/projects/scottl-camlock/src/tools/regression/bin/sh/expansion/tilde2.0#1 branch .. //depot/projects/scottl-camlock/src/tools/regression/bin/sh/expansion/trim1.0#1 branch .. //depot/projects/scottl-camlock/src/tools/regression/bin/sh/expansion/trim2.0#1 branch .. //depot/projects/scottl-camlock/src/tools/regression/bin/sh/parser/heredoc2.0#1 branch .. //depot/projects/scottl-camlock/src/usr.bin/getent/getent.c#5 integrate .. //depot/projects/scottl-camlock/src/usr.bin/make/main.c#5 integrate .. //depot/projects/scottl-camlock/src/usr.sbin/Makefile#12 integrate .. //depot/projects/scottl-camlock/src/usr.sbin/ac/ac.c#3 integrate .. //depot/projects/scottl-camlock/src/usr.sbin/mtree/mtree.8#4 integrate .. //depot/projects/scottl-camlock/src/usr.sbin/pkg_install/lib/lib.h#8 integrate .. //depot/projects/scottl-camlock/src/usr.sbin/pkg_install/lib/plist.c#4 integrate .. //depot/projects/scottl-camlock/src/usr.sbin/pmcstat/pmcpl_callgraph.c#3 integrate .. //depot/projects/scottl-camlock/src/usr.sbin/pmcstat/pmcpl_calltree.c#4 integrate .. //depot/projects/scottl-camlock/src/usr.sbin/pmcstat/pmcstat_log.c#7 integrate .. //depot/projects/scottl-camlock/src/usr.sbin/pmcstat/pmcstat_log.h#2 integrate .. //depot/projects/scottl-camlock/src/usr.sbin/services_mkdb/Makefile#1 branch .. //depot/projects/scottl-camlock/src/usr.sbin/services_mkdb/services_mkdb.8#1 branch .. //depot/projects/scottl-camlock/src/usr.sbin/services_mkdb/services_mkdb.c#1 branch .. //depot/projects/scottl-camlock/src/usr.sbin/services_mkdb/uniq.c#1 branch Differences ... ==== //depot/projects/scottl-camlock/src/UPDATING#29 (text+ko) ==== @@ -22,6 +22,16 @@ machines to maximize performance. (To disable malloc debugging, run ln -s aj /etc/malloc.conf.) +20100402: + WITH_CTF can now be specified in src.conf (not recommended, there + are some problems with static executables), make.conf (would also + affect ports which do not use GNU make and do not override the + compile targets) or in the kernel config (via "makeoptions + WITH_CTF=yes"). + When WITH_CTF was specified there before this was silently ignored, + so make sure that WITH_CTF is not used in places which could lead + to unwanted behavior. + 20100311: The kernel option COMPAT_IA32 has been replaced with COMPAT_FREEBSD32 to allow 32-bit compatibility on non-x86 platforms. All kernel @@ -1120,4 +1130,4 @@ Contact Warner Losh if you have any questions about your use of this document. -$FreeBSD: src/UPDATING,v 1.656 2010/03/11 14:49:06 nwhitehorn Exp $ +$FreeBSD: src/UPDATING,v 1.657 2010/04/02 06:55:31 netchild Exp $ ==== //depot/projects/scottl-camlock/src/bin/sh/expand.c#8 (text+ko) ==== @@ -36,7 +36,7 @@ #endif #endif /* not lint */ #include -__FBSDID("$FreeBSD: src/bin/sh/expand.c,v 1.60 2010/01/01 18:17:46 jilles Exp $"); +__FBSDID("$FreeBSD: src/bin/sh/expand.c,v 1.62 2010/04/03 22:04:44 jilles Exp $"); #include #include @@ -273,7 +273,6 @@ switch(c) { case CTLESC: /* This means CTL* are always considered quoted. */ case CTLVAR: - case CTLENDVAR: case CTLBACKQ: case CTLBACKQ | CTLQUOTE: case CTLARI: @@ -285,6 +284,7 @@ goto done; break; case '/': + case CTLENDVAR: goto done; } p++; @@ -506,7 +506,9 @@ int amount; herefd = -1; - argstr(p, 0); + argstr(p, (subtype == VSTRIMLEFT || subtype == VSTRIMLEFTMAX || + subtype == VSTRIMRIGHT || subtype == VSTRIMRIGHTMAX ? + EXP_CASE : 0) | EXP_TILDE); STACKSTRNUL(expdest); herefd = saveherefd; argbackq = saveargbackq; ==== //depot/projects/scottl-camlock/src/bin/sh/mksyntax.c#5 (text+ko) ==== @@ -42,7 +42,7 @@ #endif /* not lint */ #endif #include -__FBSDID("$FreeBSD: src/bin/sh/mksyntax.c,v 1.27 2009/12/27 18:04:05 jilles Exp $"); +__FBSDID("$FreeBSD: src/bin/sh/mksyntax.c,v 1.28 2010/04/03 21:01:01 jilles Exp $"); /* * This program creates syntax.h and syntax.c. @@ -232,8 +232,6 @@ add("\n", "CNL"); add("\\", "CBACK"); add("`", "CBQUOTE"); - add("'", "CSQUOTE"); - add("\"", "CDQUOTE"); add("$", "CVAR"); add("}", "CENDVAR"); add("(", "CLP"); ==== //depot/projects/scottl-camlock/src/bin/sh/options.c#5 (text+ko) ==== @@ -36,7 +36,7 @@ #endif #endif /* not lint */ #include -__FBSDID("$FreeBSD: src/bin/sh/options.c,v 1.29 2009/12/27 18:04:05 jilles Exp $"); +__FBSDID("$FreeBSD: src/bin/sh/options.c,v 1.30 2010/04/05 14:15:51 jilles Exp $"); #include #include @@ -93,8 +93,11 @@ options(1); if (*argptr == NULL && minusc == NULL) sflag = 1; - if (iflag == 2 && sflag == 1 && isatty(0) && isatty(1)) + if (iflag != 0 && sflag == 1 && isatty(0) && isatty(1)) { iflag = 1; + if (Eflag == 2) + Eflag = 1; + } if (mflag == 2) mflag = iflag; for (i = 0; i < NOPTS; i++) ==== //depot/projects/scottl-camlock/src/bin/sh/parser.c#13 (text+ko) ==== @@ -36,7 +36,7 @@ #endif #endif /* not lint */ #include -__FBSDID("$FreeBSD: src/bin/sh/parser.c,v 1.74 2010/03/13 20:43:11 jilles Exp $"); +__FBSDID("$FreeBSD: src/bin/sh/parser.c,v 1.77 2010/04/03 21:01:01 jilles Exp $"); #include #include @@ -79,6 +79,10 @@ int striptabs; /* if set, strip leading tabs */ }; +struct parser_temp { + struct parser_temp *next; + void *data; +}; STATIC struct heredoc *heredoclist; /* list of here documents to read */ @@ -94,6 +98,7 @@ STATIC int quoteflag; /* set if (part of) last token was quoted */ STATIC int startlinno; /* line # where last token started */ STATIC int funclinno; /* line # where the current function started */ +STATIC struct parser_temp *parser_temp; /* XXX When 'noaliases' is set to one, no alias expansion takes place. */ static int noaliases = 0; @@ -117,6 +122,73 @@ STATIC void setprompt(int); +STATIC void * +parser_temp_alloc(size_t len) +{ + struct parser_temp *t; + + INTOFF; + t = ckmalloc(sizeof(*t)); + t->data = NULL; + t->next = parser_temp; + parser_temp = t; + t->data = ckmalloc(len); + INTON; + return t->data; +} + + +STATIC void * +parser_temp_realloc(void *ptr, size_t len) +{ + struct parser_temp *t; + + INTOFF; + t = parser_temp; + if (ptr != t->data) + error("bug: parser_temp_realloc misused"); + t->data = ckrealloc(t->data, len); + INTON; + return t->data; +} + + +STATIC void +parser_temp_free_upto(void *ptr) +{ + struct parser_temp *t; + int done = 0; + + INTOFF; + while (parser_temp != NULL && !done) { + t = parser_temp; + parser_temp = t->next; + done = t->data == ptr; + ckfree(t->data); + ckfree(t); + } + INTON; + if (!done) + error("bug: parser_temp_free_upto misused"); +} + + +STATIC void +parser_temp_free_all(void) +{ + struct parser_temp *t; + + INTOFF; + while (parser_temp != NULL) { + t = parser_temp; + parser_temp = t->next; + ckfree(t->data); + ckfree(t); + } + INTON; +} + + /* * Read and parse a command. Returns NEOF on end of file. (NULL is a * valid parse tree indicating a blank line.) @@ -127,6 +199,11 @@ { int t; + /* This assumes the parser is not re-entered, + * which could happen if we add command substitution on PS1/PS2. + */ + parser_temp_free_all(); + tokpushback = 0; doprompt = interact; if (doprompt) @@ -863,6 +940,21 @@ } +#define MAXNEST_STATIC 8 +struct tokenstate +{ + const char *syntax; /* *SYNTAX */ + int parenlevel; /* levels of parentheses in arithmetic */ + enum tokenstate_category + { + TSTATE_TOP, + TSTATE_VAR_OLD, /* ${var+-=?}, inherits dquotes */ + TSTATE_VAR_NEW, /* other ${var...}, own dquote state */ + TSTATE_ARITH + } category; +}; + + /* * Called to parse command substitutions. */ @@ -1040,7 +1132,7 @@ #define PARSEARITH() {goto parsearith; parsearith_return:;} STATIC int -readtoken1(int firstc, char const *syntax, char *eofmark, int striptabs) +readtoken1(int firstc, char const *initialsyntax, char *eofmark, int striptabs) { int c = firstc; char *out; @@ -1048,22 +1140,21 @@ char line[EOFMARKLEN + 1]; struct nodelist *bqlist; int quotef; - int dblquote; - int varnest; /* levels of variables expansion */ - int arinest; /* levels of arithmetic expansion */ - int parenlevel; /* levels of parens in arithmetic */ - char const *prevsyntax; /* syntax before arithmetic */ + int newvarnest; + int level; int synentry; + struct tokenstate state_static[MAXNEST_STATIC]; + int maxnest = MAXNEST_STATIC; + struct tokenstate *state = state_static; startlinno = plinno; - dblquote = 0; - if (syntax == DQSYNTAX) - dblquote = 1; quotef = 0; bqlist = NULL; - varnest = 0; - arinest = 0; - parenlevel = 0; + newvarnest = 0; + level = 0; + state[level].syntax = initialsyntax; + state[level].parenlevel = 0; + state[level].category = TSTATE_TOP; STARTSTACKSTR(out); loop: { /* for each line, until end of word */ @@ -1071,11 +1162,11 @@ for (;;) { /* until end of line or end of word */ CHECKSTRSPACE(3, out); /* permit 3 calls to USTPUTC */ - synentry = syntax[c]; + synentry = state[level].syntax[c]; switch(synentry) { case CNL: /* '\n' */ - if (syntax == BASESYNTAX) + if (state[level].syntax == BASESYNTAX) goto endword; /* exit outer loop */ USTPUTC(c, out); plinno++; @@ -1089,7 +1180,7 @@ USTPUTC(c, out); break; case CCTL: - if (eofmark == NULL || dblquote) + if (eofmark == NULL || initialsyntax != SQSYNTAX) USTPUTC(CTLESC, out); USTPUTC(c, out); break; @@ -1105,41 +1196,34 @@ else setprompt(0); } else { - if (dblquote && c != '\\' && - c != '`' && c != '$' && - (c != '"' || eofmark != NULL)) + if (state[level].syntax == DQSYNTAX && + c != '\\' && c != '`' && c != '$' && + (c != '"' || (eofmark != NULL && + newvarnest == 0)) && + (c != '}' || state[level].category != TSTATE_VAR_OLD)) USTPUTC('\\', out); if (SQSYNTAX[c] == CCTL) USTPUTC(CTLESC, out); - else if (eofmark == NULL) + else if (eofmark == NULL || + newvarnest > 0) USTPUTC(CTLQUOTEMARK, out); USTPUTC(c, out); quotef++; } break; case CSQUOTE: - if (eofmark == NULL) - USTPUTC(CTLQUOTEMARK, out); - syntax = SQSYNTAX; + USTPUTC(CTLQUOTEMARK, out); + state[level].syntax = SQSYNTAX; break; case CDQUOTE: - if (eofmark == NULL) - USTPUTC(CTLQUOTEMARK, out); - syntax = DQSYNTAX; - dblquote = 1; + USTPUTC(CTLQUOTEMARK, out); + state[level].syntax = DQSYNTAX; break; case CENDQUOTE: - if (eofmark != NULL && arinest == 0 && - varnest == 0) { + if (eofmark != NULL && newvarnest == 0) USTPUTC(c, out); - } else { - if (arinest) { - syntax = ARISYNTAX; - dblquote = 0; - } else if (eofmark == NULL) { - syntax = BASESYNTAX; - dblquote = 0; - } + else { + state[level].syntax = BASESYNTAX; quotef++; } break; @@ -1147,30 +1231,33 @@ PARSESUB(); /* parse substitution */ break; case CENDVAR: /* '}' */ - if (varnest > 0) { - varnest--; + if (level > 0 && + (state[level].category == TSTATE_VAR_OLD || + state[level].category == TSTATE_VAR_NEW)) { + if (state[level].category == TSTATE_VAR_OLD) + state[level - 1].syntax = state[level].syntax; + else + newvarnest--; + level--; USTPUTC(CTLENDVAR, out); } else { USTPUTC(c, out); } break; case CLP: /* '(' in arithmetic */ - parenlevel++; + state[level].parenlevel++; USTPUTC(c, out); break; case CRP: /* ')' in arithmetic */ - if (parenlevel > 0) { + if (state[level].parenlevel > 0) { USTPUTC(c, out); - --parenlevel; + --state[level].parenlevel; } else { if (pgetc() == ')') { - if (--arinest == 0) { + if (level > 0 && + state[level].category == TSTATE_ARITH) { + level--; USTPUTC(CTLENDARI, out); - syntax = prevsyntax; - if (syntax == DQSYNTAX) - dblquote = 1; - else - dblquote = 0; } else USTPUTC(')', out); } else { @@ -1184,13 +1271,15 @@ } break; case CBQUOTE: /* '`' */ - out = parsebackq(out, &bqlist, 1, dblquote, - arinest || dblquote); + out = parsebackq(out, &bqlist, 1, + state[level].syntax == DQSYNTAX && + (eofmark == NULL || newvarnest > 0), + state[level].syntax == DQSYNTAX || state[level].syntax == ARISYNTAX); break; case CEOF: goto endword; /* exit outer loop */ default: - if (varnest == 0) + if (level == 0) goto endword; /* exit outer loop */ USTPUTC(c, out); } @@ -1198,14 +1287,17 @@ } } endword: - if (syntax == ARISYNTAX) + if (state[level].syntax == ARISYNTAX) synerror("Missing '))'"); - if (syntax != BASESYNTAX && eofmark == NULL) + if (state[level].syntax != BASESYNTAX && eofmark == NULL) synerror("Unterminated quoted string"); - if (varnest != 0) { + if (state[level].category == TSTATE_VAR_OLD || + state[level].category == TSTATE_VAR_NEW) { startlinno = plinno; synerror("Missing '}'"); } + if (state != state_static) + parser_temp_free_upto(state); USTPUTC('\0', out); len = out - stackblock(); out = stackblock(); @@ -1228,7 +1320,6 @@ /* end of readtoken routine */ - /* * Check to see whether we are at the end of the here document. When this * is called, c is set to the first character of the next input line. If @@ -1345,8 +1436,11 @@ PARSEARITH(); } else { pungetc(); - out = parsebackq(out, &bqlist, 0, dblquote, - arinest || dblquote); + out = parsebackq(out, &bqlist, 0, + state[level].syntax == DQSYNTAX && + (eofmark == NULL || newvarnest > 0), + state[level].syntax == DQSYNTAX || + state[level].syntax == ARISYNTAX); } } else { USTPUTC(CTLVAR, out); @@ -1401,6 +1495,8 @@ subtype = VSERROR; if (c == '}') pungetc(); + else if (c == '\n' || c == PEOF) + synerror("Unexpected end of line in substitution"); else USTPUTC(c, out); } else { @@ -1417,6 +1513,8 @@ default: p = strchr(types, c); if (p == NULL) { + if (c == '\n' || c == PEOF) + synerror("Unexpected end of line in substitution"); if (flags == VSNUL) STPUTC(':', out); STPUTC(c, out); @@ -1442,11 +1540,44 @@ pungetc(); } STPUTC('=', out); - if (subtype != VSLENGTH && (dblquote || arinest)) + if (subtype != VSLENGTH && (state[level].syntax == DQSYNTAX || + state[level].syntax == ARISYNTAX)) flags |= VSQUOTE; *(stackblock() + typeloc) = subtype | flags; - if (subtype != VSNORMAL) - varnest++; + if (subtype != VSNORMAL) { + if (level + 1 >= maxnest) { + maxnest *= 2; + if (state == state_static) { + state = parser_temp_alloc( + maxnest * sizeof(*state)); + memcpy(state, state_static, + MAXNEST_STATIC * sizeof(*state)); + } else + state = parser_temp_realloc(state, + maxnest * sizeof(*state)); + } + level++; + state[level].parenlevel = 0; + if (subtype == VSMINUS || subtype == VSPLUS || + subtype == VSQUESTION || subtype == VSASSIGN) { + /* + * For operators that were in the Bourne shell, + * inherit the double-quote state. + */ + state[level].syntax = state[level - 1].syntax; + state[level].category = TSTATE_VAR_OLD; + } else { + /* + * The other operators take a pattern, + * so go to BASESYNTAX. + * Also, ' and " are now special, even + * in here documents. + */ + state[level].syntax = BASESYNTAX; + state[level].category = TSTATE_VAR_NEW; + newvarnest++; + } + } } goto parsesub_return; } @@ -1457,21 +1588,26 @@ */ parsearith: { - if (++arinest == 1) { - prevsyntax = syntax; - syntax = ARISYNTAX; - USTPUTC(CTLARI, out); - if (dblquote) - USTPUTC('"',out); - else - USTPUTC(' ',out); - } else { - /* - * we collapse embedded arithmetic expansion to - * parenthesis, which should be equivalent - */ - USTPUTC('(', out); + if (level + 1 >= maxnest) { + maxnest *= 2; + if (state == state_static) { + state = parser_temp_alloc( + maxnest * sizeof(*state)); + memcpy(state, state_static, + MAXNEST_STATIC * sizeof(*state)); + } else + state = parser_temp_realloc(state, + maxnest * sizeof(*state)); } + level++; + state[level].syntax = ARISYNTAX; + state[level].parenlevel = 0; + state[level].category = TSTATE_ARITH; + USTPUTC(CTLARI, out); + if (state[level - 1].syntax == DQSYNTAX) + USTPUTC('"',out); + else + USTPUTC(' ',out); goto parsearith_return; } ==== //depot/projects/scottl-camlock/src/bin/sh/sh.1#10 (text+ko) ==== @@ -30,9 +30,9 @@ .\" SUCH DAMAGE. .\" .\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95 -.\" $FreeBSD: src/bin/sh/sh.1,v 1.136 2010/03/06 16:57:53 jilles Exp $ +.\" $FreeBSD: src/bin/sh/sh.1,v 1.138 2010/04/05 14:15:51 jilles Exp $ .\" -.Dd March 6, 2010 +.Dd April 5, 2010 .Dt SH 1 .Os .Sh NAME @@ -210,7 +210,8 @@ .Xr emacs 1 command line editor (disables the .Fl V -option if it has been set). +option if it has been set; +set automatically when interactive on terminals). .It Fl e Li errexit Exit immediately if any untested command fails in non-interactive mode. The exit status of a command is considered to be @@ -1178,10 +1179,20 @@ .Ql } . Any .Ql } -escaped by a backslash or within a quoted string, and characters in +escaped by a backslash or within a single-quoted string, and characters in embedded arithmetic expansions, command substitutions, and variable expansions, are not examined in determining the matching .Ql } . +Except for the variants with +.Ql + , +.Ql - , +.Ql = +or +.Ql ?\& , +any +.Ql } +within a double-quoted string is also not examined in determining the matching +.Ql } . .Pp The simplest form for parameter expansion is: .Pp @@ -1265,6 +1276,14 @@ In the parameter expansions shown previously, use of the colon in the format results in a test for a parameter that is unset or null; omission of the colon results in a test for a parameter that is only unset. +.Pp +The +.Ar word +inherits the type of quoting +(unquoted, double-quoted or here-document) +from the surroundings, +with the exception that a backslash that quotes a closing brace is removed +during quote removal. .Bl -tag -width indent .It Li ${# Ns Ar parameter Ns Li } String Length. ==== //depot/projects/scottl-camlock/src/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c#4 (text+ko) ==== @@ -4288,7 +4288,12 @@ zfs_prop_t zfs_prop = zfs_name_to_prop(nvpair_name(curr)); nvpair_t *next = nvlist_next_nvpair(zhp->zfs_props, curr); - if (props[zfs_prop] == B_FALSE) + /* + * We leave user:props in the nvlist, so there will be + * some ZPROP_INVAL. To be extra safe, don't prune + * those. + */ + if (zfs_prop != ZPROP_INVAL && props[zfs_prop] == B_FALSE) (void) nvlist_remove(zhp->zfs_props, nvpair_name(curr), nvpair_type(curr)); curr = next; ==== //depot/projects/scottl-camlock/src/contrib/tzdata/asia#3 (text+ko) ==== @@ -1,4 +1,4 @@ -# @(#)asia 8.56 +# @(#)asia 8.58 # This file is in the public domain, so clarified as of # 2009-05-17 by Arthur David Olson. @@ -214,42 +214,20 @@ # 2010 midnight. The decision came at a cabinet meeting at the Prime # Minister's Office last night..." -# From Danvin Ruangchan (2009-12-24): -# ...the news mentions DST will be turned off again 7 months after March -# 31st on Oct 31, 2010. - -# From Arthur David Olson (2009-12-26): -# Indeed, "The government will advance again the Banglasdesh Standard -# Time by one one hour on March 31 next year by enforcing the Daylight -# Saving Time (DST) for seven months. It will continue till October 31 -# until further notice." I take that last sentence as the -# establishment of a rule. - -# From Nobutomo Nakano (2010-02-19): -# We received a report from Bangladesh saying that the start/end of -# Bangladesh DST is incorrect. Currently we have only the Bengali version -# of the official mail from BTRC which describes the following: -# -# "From 2010 each year when local standard time is about to reach -# March 31 at 10:59:00 PM clocks are turned forward 1 hour (11:59:00 PM) -# and when local daylight time is about to October 31 at 11:59:00 PM -# clocks are turned backward 1 hour (10:59:00 PM)." -# -# So, DST will start/end 1 minute earlier. - -# From Arthur David Olson (2010-03-03): -# The file -# -# http://www.cabinet.gov/bd/file_upload/news_events/en_169.pdf +# From Alexander Krivenyshev (2010-03-22): +# According to Bangladesh newspaper "The Daily Star," +# Cabinet cancels Daylight Saving Time +# +# http://www.thedailystar.net/newDesign/latest_news.php?nid=22817 +# +# or +# +# http://www.worldtimezone.com/dst_news/dst_news_bangladesh06.html # -# is in Bengali; it does contain two "31"s as well as two "11.59"s and a "10.59" -# which is consistent with the information provided by Nobutomo Nakano. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Dhaka 2009 only - Jun 19 23:00 1:00 S Rule Dhaka 2009 only - Dec 31 23:59 0 - -Rule Dhaka 2010 max - Mar 31 22:59 1:00 S -Rule Dhaka 2010 max - Oct 31 23:59 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Dhaka 6:01:40 - LMT 1890 @@ -2129,6 +2107,32 @@ # http://www.worldtimezone.com/dst_news/dst_news_gazastrip02.html # +# From Alexander Krivenyshev (2010-03-19): +# According to Voice of Palestine DST will last for 191 days, from March +# 26, 2010 till "the last Sunday before the tenth day of Tishri +# (October), each year" (October 03, 2010?) +# +# +# http://palvoice.org/forums/showthread.php?t=245697 +# +# (in Arabic) +# or +# +# http://www.worldtimezone.com/dst_news/dst_news_westbank03.html +# + +# From Steffen Thorsen (2010-03-24): +# ...Ma'an News Agency reports that Hamas cabinet has decided it will +# start one day later, at 12:01am. Not sure if they really mean 12:01am or +# noon though: +# +# +# http://www.maannews.net/eng/ViewDetails.aspx?ID=271178 +# +# (Ma'an News Agency) +# "At 12:01am Friday, clocks in Israel and the West Bank will change to +# 1:01am, while Gaza clocks will change at 12:01am Saturday morning." + # The rules for Egypt are stolen from the `africa' file. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule EgyptAsia 1957 only - May 10 0:00 1:00 S @@ -2146,7 +2150,8 @@ Rule Palestine 2006 only - Sep 22 0:00 0 - Rule Palestine 2007 only - Sep Thu>=8 2:00 0 - Rule Palestine 2008 only - Aug lastFri 2:00 0 - -Rule Palestine 2009 max - Mar lastFri 0:00 1:00 S +Rule Palestine 2009 only - Mar lastFri 0:00 1:00 S +Rule Palestine 2010 max - Mar lastSat 0:01 1:00 S Rule Palestine 2009 max - Sep Fri>=1 2:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] ==== //depot/projects/scottl-camlock/src/contrib/tzdata/europe#2 (text+ko) ==== @@ -1,5 +1,5 @@ #
-# @(#)europe	8.25
+# @(#)europe	8.26
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -2041,7 +2041,9 @@
 			 3:00	Russia	KUY%sT	1991 Mar 31 2:00s
 			 2:00	Russia	KUY%sT	1991 Sep 29 2:00s
 			 3:00	-	KUYT	1991 Oct 20 3:00
-			 4:00	Russia	SAM%sT	# Samara Time
+			 4:00	Russia	SAM%sT	2010 Mar 28 2:00s # Samara Time
+			 3:00	Russia	SAM%sT
+
 #
 # From Oscar van Vlijmen (2001-08-25): [This region consists of]
 # Respublika Bashkortostan, Komi-Permyatskij avtonomnyj okrug,
@@ -2194,7 +2196,8 @@
 			11:00	-	PETT	1930 Jun 21 # P-K Time
 			12:00	Russia	PET%sT	1991 Mar 31 2:00s
 			11:00	Russia	PET%sT	1992 Jan 19 2:00s
-			12:00	Russia	PET%sT
+			12:00	Russia	PET%sT	2010 Mar 28 2:00s
+			11:00	Russia	PET%sT
 #
 # Chukotskij avtonomnyj okrug
 Zone Asia/Anadyr	11:49:56 -	LMT	1924 May  2
@@ -2202,7 +2205,8 @@
 			13:00	Russia	ANA%sT	1982 Apr  1 0:00s
 			12:00	Russia	ANA%sT	1991 Mar 31 2:00s
 			11:00	Russia	ANA%sT	1992 Jan 19 2:00s
-			12:00	Russia	ANA%sT
+			12:00	Russia	ANA%sT	2010 Mar 28 2:00s
+			11:00	Russia	ANA%sT
 
 # Serbia
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]

==== //depot/projects/scottl-camlock/src/contrib/tzdata/zone.tab#3 (text+ko) ====

@@ -1,5 +1,5 @@
 # 
-# @(#)zone.tab	8.34
+# @(#)zone.tab	8.35
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 #
@@ -330,7 +330,7 @@
 RU	+5443+02030	Europe/Kaliningrad	Moscow-01 - Kaliningrad
 RU	+5545+03735	Europe/Moscow	Moscow+00 - west Russia
 RU	+4844+04425	Europe/Volgograd	Moscow+00 - Caspian Sea
-RU	+5312+05009	Europe/Samara	Moscow+01 - Samara, Udmurtia
+RU	+5312+05009	Europe/Samara	Moscow - Samara, Udmurtia
 RU	+5651+06036	Asia/Yekaterinburg	Moscow+02 - Urals
 RU	+5500+07324	Asia/Omsk	Moscow+03 - west Siberia
 RU	+5502+08255	Asia/Novosibirsk	Moscow+03 - Novosibirsk
@@ -341,8 +341,8 @@
 RU	+4310+13156	Asia/Vladivostok	Moscow+07 - Amur River
 RU	+4658+14242	Asia/Sakhalin	Moscow+07 - Sakhalin Island
 RU	+5934+15048	Asia/Magadan	Moscow+08 - Magadan

>>> TRUNCATED FOR MAIL (1000 lines) <<<