From owner-p4-projects@FreeBSD.ORG Fri Sep 5 16:31:55 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E915916A4C1; Fri, 5 Sep 2003 16:31:54 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AAEEF16A4BF for ; Fri, 5 Sep 2003 16:31:54 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4D49543FDD for ; Fri, 5 Sep 2003 16:31:53 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h85NVr0U069936 for ; Fri, 5 Sep 2003 16:31:53 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h85NVqDx069933 for perforce@freebsd.org; Fri, 5 Sep 2003 16:31:52 -0700 (PDT) Date: Fri, 5 Sep 2003 16:31:52 -0700 (PDT) Message-Id: <200309052331.h85NVqDx069933@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 37629 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2003 23:31:55 -0000 http://perforce.freebsd.org/chv.cgi?CH=37629 Change 37629 by marcel@marcel_nfs on 2003/09/05 16:31:41 IFC @37627 Affected files ... .. //depot/projects/ia64/bin/sh/arith.h#4 integrate .. //depot/projects/ia64/bin/sh/arith.y#5 integrate .. //depot/projects/ia64/bin/sh/arith_lex.l#5 integrate .. //depot/projects/ia64/bin/sh/shell.h#5 integrate .. //depot/projects/ia64/contrib/amd/.cvsignore#2 delete .. //depot/projects/ia64/contrib/amd/FREEBSD-upgrade#3 integrate .. //depot/projects/ia64/contrib/amd/amd/.cvsignore#2 delete .. //depot/projects/ia64/contrib/amd/amq/.cvsignore#2 delete .. //depot/projects/ia64/contrib/amd/doc/.cvsignore#2 delete .. //depot/projects/ia64/contrib/amd/doc/version.texi#3 integrate .. //depot/projects/ia64/contrib/amd/fixmount/.cvsignore#2 delete .. //depot/projects/ia64/contrib/amd/fsinfo/.cvsignore#2 delete .. //depot/projects/ia64/contrib/amd/hlfsd/.cvsignore#2 delete .. //depot/projects/ia64/contrib/amd/libamu/.cvsignore#2 delete .. //depot/projects/ia64/contrib/amd/mk-amd-map/.cvsignore#2 delete .. //depot/projects/ia64/contrib/amd/scripts/.cvsignore#2 delete .. //depot/projects/ia64/contrib/amd/wire-test/.cvsignore#2 delete .. //depot/projects/ia64/contrib/gcc/config/freebsd-spec.h#10 integrate .. //depot/projects/ia64/gnu/usr.bin/tar/config.h#3 integrate .. //depot/projects/ia64/include/pthread.h#6 integrate .. //depot/projects/ia64/lib/libc/amd64/sys/Makefile.inc#3 integrate .. //depot/projects/ia64/lib/libc/amd64/sys/getcontext.S#1 branch .. //depot/projects/ia64/lib/libc/amd64/sys/vfork.S#3 integrate .. //depot/projects/ia64/lib/libc/i386/sys/Makefile.inc#6 integrate .. //depot/projects/ia64/lib/libc/i386/sys/getcontext.S#1 branch .. //depot/projects/ia64/lib/libc/locale/table.c#4 integrate .. //depot/projects/ia64/lib/libc/string/index.3#5 integrate .. //depot/projects/ia64/lib/libc/string/strchr.3#4 integrate .. //depot/projects/ia64/lib/libc/sys/accept.2#7 integrate .. //depot/projects/ia64/lib/libpthread/arch/alpha/include/atomic_ops.h#2 integrate .. //depot/projects/ia64/lib/libpthread/arch/amd64/include/atomic_ops.h#2 integrate .. //depot/projects/ia64/lib/libpthread/arch/i386/include/atomic_ops.h#2 integrate .. //depot/projects/ia64/lib/libpthread/pthread.map#4 integrate .. //depot/projects/ia64/lib/libpthread/support/Makefile.inc#6 integrate .. //depot/projects/ia64/lib/libpthread/sys/lock.c#5 integrate .. //depot/projects/ia64/lib/libpthread/sys/lock.h#5 integrate .. //depot/projects/ia64/lib/libpthread/thread/Makefile.inc#10 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_barrier.c#1 branch .. //depot/projects/ia64/lib/libpthread/thread/thr_barrierattr.c#1 branch .. //depot/projects/ia64/lib/libpthread/thread/thr_cond.c#16 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_creat.c#3 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_kern.c#33 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_mutex.c#10 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_pause.c#3 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_private.h#22 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_sleep.c#3 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_system.c#3 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_tcdrain.c#3 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_wait.c#3 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_wait4.c#3 integrate .. //depot/projects/ia64/lib/libpthread/thread/thr_waitpid.c#3 integrate .. //depot/projects/ia64/sbin/ipfw/ipfw2.c#26 integrate .. //depot/projects/ia64/sbin/savecore/savecore.8#6 integrate .. //depot/projects/ia64/sbin/savecore/savecore.c#17 integrate .. //depot/projects/ia64/share/doc/papers/timecounter/Makefile#2 integrate .. //depot/projects/ia64/share/doc/papers/timecounter/timecounter.ms#2 integrate .. //depot/projects/ia64/share/man/Makefile#6 integrate .. //depot/projects/ia64/share/man/man4/aue.4#3 integrate .. //depot/projects/ia64/share/man/man4/cd.4#5 integrate .. //depot/projects/ia64/share/man/man4/da.4#6 integrate .. //depot/projects/ia64/share/man/man4/kue.4#3 integrate .. //depot/projects/ia64/share/man/man4/mtio.4#4 integrate .. //depot/projects/ia64/share/man/man4/syscons.4#7 integrate .. //depot/projects/ia64/share/man/man4/tl.4#4 integrate .. //depot/projects/ia64/share/man/man5/rc.conf.5#45 integrate .. //depot/projects/ia64/share/man/man9/cd.9#3 integrate .. //depot/projects/ia64/share/man/man9/taskqueue.9#4 integrate .. //depot/projects/ia64/share/mk/bsd.lib.mk#26 integrate .. //depot/projects/ia64/sys/amd64/conf/GENERIC#7 integrate .. //depot/projects/ia64/sys/amd64/include/ucontext.h#3 integrate .. //depot/projects/ia64/sys/boot/i386/pxeldr/Makefile#4 integrate .. //depot/projects/ia64/sys/boot/i386/pxeldr/pxeldr.s#2 integrate .. //depot/projects/ia64/sys/cam/scsi/scsi_cd.c#19 integrate .. //depot/projects/ia64/sys/cam/scsi/scsi_da.c#52 integrate .. //depot/projects/ia64/sys/cam/scsi/scsi_target.c#11 integrate .. //depot/projects/ia64/sys/dev/acpica/acpi.c#38 integrate .. //depot/projects/ia64/sys/dev/adlink/adlink.c#5 integrate .. //depot/projects/ia64/sys/dev/ata/atapi-cd.c#28 integrate .. //depot/projects/ia64/sys/dev/ata/atapi-cd.h#10 integrate .. //depot/projects/ia64/sys/dev/ath/if_ath.c#9 integrate .. //depot/projects/ia64/sys/dev/ath/if_athioctl.h#3 integrate .. //depot/projects/ia64/sys/dev/ath/if_athvar.h#5 integrate .. //depot/projects/ia64/sys/dev/awi/awi_wep.c#11 integrate .. //depot/projects/ia64/sys/dev/fxp/if_fxp.c#45 integrate .. //depot/projects/ia64/sys/dev/fxp/if_fxpvar.h#10 integrate .. //depot/projects/ia64/sys/dev/pccard/pccard.c#24 integrate .. //depot/projects/ia64/sys/dev/pci/pci.c#32 integrate .. //depot/projects/ia64/sys/dev/pci/pcireg.h#7 integrate .. //depot/projects/ia64/sys/dev/sound/pci/ich.c#19 integrate .. //depot/projects/ia64/sys/dev/usb/ohci_pci.c#6 integrate .. //depot/projects/ia64/sys/dev/wi/if_wi.c#47 integrate .. //depot/projects/ia64/sys/dev/wi/if_wi_pccard.c#30 integrate .. //depot/projects/ia64/sys/dev/wi/if_wi_pci.c#17 integrate .. //depot/projects/ia64/sys/dev/wi/if_wireg.h#15 integrate .. //depot/projects/ia64/sys/dev/wi/if_wivar.h#16 integrate .. //depot/projects/ia64/sys/geom/geom_dev.c#43 integrate .. //depot/projects/ia64/sys/i386/i386/elan-mmcr.c#12 integrate .. //depot/projects/ia64/sys/i386/isa/isa.h#2 integrate .. //depot/projects/ia64/sys/i386/isa/isa_compat.c#3 integrate .. //depot/projects/ia64/sys/i386/isa/isa_device.h#4 integrate .. //depot/projects/ia64/sys/ia64/ia64/exception.S#6 integrate .. //depot/projects/ia64/sys/ia64/ia64/genassym.c#14 integrate .. //depot/projects/ia64/sys/ia64/ia64/interrupt.c#31 integrate .. //depot/projects/ia64/sys/ia64/include/md_var.h#7 integrate .. //depot/projects/ia64/sys/isa/fd.c#20 integrate .. //depot/projects/ia64/sys/isa/isareg.h#3 integrate .. //depot/projects/ia64/sys/kern/kern_tc.c#30 integrate .. //depot/projects/ia64/sys/kern/subr_bus.c#23 integrate .. //depot/projects/ia64/sys/kern/subr_msgbuf.c#2 integrate .. //depot/projects/ia64/sys/kern/subr_taskqueue.c#7 integrate .. //depot/projects/ia64/sys/kern/subr_trap.c#36 integrate .. //depot/projects/ia64/sys/net/bpf.c#23 integrate .. //depot/projects/ia64/sys/net/if_vlan.c#15 integrate .. //depot/projects/ia64/sys/net80211/ieee80211_radiotap.h#1 branch .. //depot/projects/ia64/sys/netinet/ip_divert.c#19 integrate .. //depot/projects/ia64/sys/netinet/ip_input.c#33 integrate .. //depot/projects/ia64/sys/netinet/udp_usrreq.c#24 integrate .. //depot/projects/ia64/sys/nfsclient/bootp_subr.c#17 integrate .. //depot/projects/ia64/sys/nfsclient/nfs_vnops.c#26 integrate .. //depot/projects/ia64/sys/pci/if_rl.c#44 integrate .. //depot/projects/ia64/sys/pci/if_rlreg.h#14 integrate .. //depot/projects/ia64/sys/pci/if_sis.c#29 integrate .. //depot/projects/ia64/sys/pci/if_sisreg.h#10 integrate .. //depot/projects/ia64/sys/sparc64/pci/psycho.c#31 integrate .. //depot/projects/ia64/sys/sparc64/pci/psychoreg.h#7 integrate .. //depot/projects/ia64/sys/sys/interrupt.h#5 integrate .. //depot/projects/ia64/sys/sys/ioctl_bt848.h#1 branch .. //depot/projects/ia64/sys/sys/ioctl_meteor.h#1 branch .. //depot/projects/ia64/sys/sys/taskqueue.h#3 integrate .. //depot/projects/ia64/sys/ufs/ffs/ffs_softdep.c#30 integrate .. //depot/projects/ia64/usr.bin/Makefile#53 integrate .. //depot/projects/ia64/usr.bin/mklocale/lex.l#4 integrate .. //depot/projects/ia64/usr.bin/mt/mt.1#9 integrate .. //depot/projects/ia64/usr.bin/tcopy/tcopy.1#6 integrate .. //depot/projects/ia64/usr.bin/tsort/tsort.c#6 integrate .. //depot/projects/ia64/usr.sbin/rmt/rmt.c#4 integrate Differences ... ==== //depot/projects/ia64/bin/sh/arith.h#4 (text+ko) ==== @@ -31,9 +31,9 @@ * SUCH DAMAGE. * * @(#)arith.h 1.1 (Berkeley) 5/4/95 - * $FreeBSD: src/bin/sh/arith.h,v 1.7 2003/08/30 12:31:44 schweikh Exp $ + * $FreeBSD: src/bin/sh/arith.h,v 1.8 2003/09/04 18:28:42 schweikh Exp $ */ +int arith(char *); int arith_assign(char *, arith_t); -int arith(char *); -int expcmd(int , char **); +int expcmd(int, char **); ==== //depot/projects/ia64/bin/sh/arith.y#5 (text+ko) ==== @@ -35,13 +35,14 @@ * SUCH DAMAGE. */ +#if 0 #ifndef lint -#if 0 static char sccsid[] = "@(#)arith.y 8.3 (Berkeley) 5/4/95"; #endif #endif /* not lint */ + #include -__FBSDID("$FreeBSD: src/bin/sh/arith.y,v 1.15 2003/08/30 12:31:44 schweikh Exp $"); +__FBSDID("$FreeBSD: src/bin/sh/arith.y,v 1.16 2003/09/04 18:28:42 schweikh Exp $"); #include #include "shell.h" @@ -73,152 +74,187 @@ %left ARITH_UNARYMINUS ARITH_UNARYPLUS ARITH_NOT ARITH_BNOT %% -exp: expr = { - return ($1); - } +exp: + expr + { return ($1); } ; -expr: ARITH_LPAREN expr ARITH_RPAREN = { $$ = $2; } - | expr ARITH_OR expr = { $$ = $1 ? $1 : $3 ? $3 : 0; } - | expr ARITH_AND expr = { $$ = $1 ? ( $3 ? $3 : 0 ) : 0; } - | expr ARITH_BOR expr = { $$ = $1 | $3; } - | expr ARITH_BXOR expr = { $$ = $1 ^ $3; } - | expr ARITH_BAND expr = { $$ = $1 & $3; } - | expr ARITH_EQ expr = { $$ = $1 == $3; } - | expr ARITH_GT expr = { $$ = $1 > $3; } - | expr ARITH_GE expr = { $$ = $1 >= $3; } - | expr ARITH_LT expr = { $$ = $1 < $3; } - | expr ARITH_LE expr = { $$ = $1 <= $3; } - | expr ARITH_NE expr = { $$ = $1 != $3; } - | expr ARITH_LSHIFT expr = { $$ = $1 << $3; } - | expr ARITH_RSHIFT expr = { $$ = $1 >> $3; } - | expr ARITH_ADD expr = { $$ = $1 + $3; } - | expr ARITH_SUB expr = { $$ = $1 - $3; } - | expr ARITH_MUL expr = { $$ = $1 * $3; } - | expr ARITH_DIV expr = { - if ($3 == 0) - yyerror("division by zero"); - $$ = $1 / $3; - } - | expr ARITH_REM expr = { - if ($3 == 0) - yyerror("division by zero"); - $$ = $1 % $3; - } - | ARITH_NOT expr = { $$ = !($2); } - | ARITH_BNOT expr = { $$ = ~($2); } - | ARITH_SUB expr %prec ARITH_UNARYMINUS = { $$ = -($2); } - | ARITH_ADD expr %prec ARITH_UNARYPLUS = { $$ = $2; } - | ARITH_NUM - | ARITH_VAR { - char *p; - arith_t arith_val; - char *str_val; +expr: + ARITH_LPAREN expr ARITH_RPAREN + { $$ = $2; } | + expr ARITH_OR expr + { $$ = $1 ? $1 : $3 ? $3 : 0; } | + expr ARITH_AND expr + { $$ = $1 ? ( $3 ? $3 : 0 ) : 0; } | + expr ARITH_BOR expr + { $$ = $1 | $3; } | + expr ARITH_BXOR expr + { $$ = $1 ^ $3; } | + expr ARITH_BAND expr + { $$ = $1 & $3; } | + expr ARITH_EQ expr + { $$ = $1 == $3; } | + expr ARITH_GT expr + { $$ = $1 > $3; } | + expr ARITH_GE expr + { $$ = $1 >= $3; } | + expr ARITH_LT expr + { $$ = $1 < $3; } | + expr ARITH_LE expr + { $$ = $1 <= $3; } | + expr ARITH_NE expr + { $$ = $1 != $3; } | + expr ARITH_LSHIFT expr + { $$ = $1 << $3; } | + expr ARITH_RSHIFT expr + { $$ = $1 >> $3; } | + expr ARITH_ADD expr + { $$ = $1 + $3; } | + expr ARITH_SUB expr + { $$ = $1 - $3; } | + expr ARITH_MUL expr + { $$ = $1 * $3; } | + expr ARITH_DIV expr + { + if ($3 == 0) + yyerror("division by zero"); + $$ = $1 / $3; + } | + expr ARITH_REM expr + { + if ($3 == 0) + yyerror("division by zero"); + $$ = $1 % $3; + } | + ARITH_NOT expr + { $$ = !($2); } | + ARITH_BNOT expr + { $$ = ~($2); } | + ARITH_SUB expr %prec ARITH_UNARYMINUS + { $$ = -($2); } | + ARITH_ADD expr %prec ARITH_UNARYPLUS + { $$ = $2; } | + ARITH_NUM | + ARITH_VAR + { + char *p; + arith_t arith_val; + char *str_val; - if (lookupvar($1) == NULL) - setvarsafe($1, "0", 0); - str_val = lookupvar($1); - arith_val = strtoarith_t(str_val, &p, 0); - /* - * Conversion is successful only in case - * we've converted _all_ characters. - */ - if (*p != '\0') - yyerror("variable conversion error"); - $$ = arith_val; - } - | ARITH_VAR ARITH_ASSIGN expr { - if (arith_assign($1, $3) != 1) - yyerror("variable assignment error"); - $$ = $3; - } - | ARITH_VAR ARITH_ADDASSIGN expr { - arith_t value; + if (lookupvar($1) == NULL) + setvarsafe($1, "0", 0); + str_val = lookupvar($1); + arith_val = strtoarith_t(str_val, &p, 0); + /* + * Conversion is successful only in case + * we've converted _all_ characters. + */ + if (*p != '\0') + yyerror("variable conversion error"); + $$ = arith_val; + } | + ARITH_VAR ARITH_ASSIGN expr + { + if (arith_assign($1, $3) != 1) + yyerror("variable assignment error"); + $$ = $3; + } | + ARITH_VAR ARITH_ADDASSIGN expr + { + arith_t value; - value = atoarith_t(lookupvar($1)) + $3; - if (arith_assign($1, value) != 0) - yyerror("variable assignment error"); - $$ = value; - } - | ARITH_VAR ARITH_SUBASSIGN expr { - arith_t value; + value = atoarith_t(lookupvar($1)) + $3; + if (arith_assign($1, value) != 0) + yyerror("variable assignment error"); + $$ = value; + } | + ARITH_VAR ARITH_SUBASSIGN expr + { + arith_t value; - value = atoarith_t(lookupvar($1)) - $3; - if (arith_assign($1, value) != 0) - yyerror("variable assignment error"); - $$ = value; - } - | ARITH_VAR ARITH_MULASSIGN expr { - arith_t value; + value = atoarith_t(lookupvar($1)) - $3; + if (arith_assign($1, value) != 0) + yyerror("variable assignment error"); + $$ = value; + } | + ARITH_VAR ARITH_MULASSIGN expr + { + arith_t value; - value = atoarith_t(lookupvar($1)) * $3; - if (arith_assign($1, value) != 0) - yyerror("variable assignment error"); - $$ = value; - } - | ARITH_VAR ARITH_DIVASSIGN expr { - arith_t value; + value = atoarith_t(lookupvar($1)) * $3; + if (arith_assign($1, value) != 0) + yyerror("variable assignment error"); + $$ = value; + } | + ARITH_VAR ARITH_DIVASSIGN expr + { + arith_t value; - if ($3 == 0) - yyerror("division by zero"); + if ($3 == 0) + yyerror("division by zero"); - value = atoarith_t(lookupvar($1)) / $3; - if (arith_assign($1, value) != 0) - yyerror("variable assignment error"); - $$ = value; - } - | ARITH_VAR ARITH_REMASSIGN expr { - arith_t value; + value = atoarith_t(lookupvar($1)) / $3; + if (arith_assign($1, value) != 0) + yyerror("variable assignment error"); + $$ = value; + } | + ARITH_VAR ARITH_REMASSIGN expr + { + arith_t value; - if ($3 == 0) - yyerror("division by zero"); + if ($3 == 0) + yyerror("division by zero"); - value = atoarith_t(lookupvar($1)) % $3; - if (arith_assign($1, value) != 0) - yyerror("variable assignment error"); - $$ = value; - } - | ARITH_VAR ARITH_RSHASSIGN expr { - arith_t value; + value = atoarith_t(lookupvar($1)) % $3; + if (arith_assign($1, value) != 0) + yyerror("variable assignment error"); + $$ = value; + } | + ARITH_VAR ARITH_RSHASSIGN expr + { + arith_t value; - value = atoarith_t(lookupvar($1)) >> $3; - if (arith_assign($1, value) != 0) - yyerror("variable assignment error"); - $$ = value; - } - | ARITH_VAR ARITH_LSHASSIGN expr { - arith_t value; + value = atoarith_t(lookupvar($1)) >> $3; + if (arith_assign($1, value) != 0) + yyerror("variable assignment error"); + $$ = value; + } | + ARITH_VAR ARITH_LSHASSIGN expr + { + arith_t value; - value = atoarith_t(lookupvar($1)) << $3; - if (arith_assign($1, value) != 0) - yyerror("variable assignment error"); - $$ = value; - } - | ARITH_VAR ARITH_BANDASSIGN expr { - arith_t value; + value = atoarith_t(lookupvar($1)) << $3; + if (arith_assign($1, value) != 0) + yyerror("variable assignment error"); + $$ = value; + } | + ARITH_VAR ARITH_BANDASSIGN expr + { + arith_t value; - value = atoarith_t(lookupvar($1)) & $3; - if (arith_assign($1, value) != 0) - yyerror("variable assignment error"); - $$ = value; - } - | ARITH_VAR ARITH_BXORASSIGN expr { - arith_t value; + value = atoarith_t(lookupvar($1)) & $3; + if (arith_assign($1, value) != 0) + yyerror("variable assignment error"); + $$ = value; + } | + ARITH_VAR ARITH_BXORASSIGN expr + { + arith_t value; - value = atoarith_t(lookupvar($1)) ^ $3; - if (arith_assign($1, value) != 0) - yyerror("variable assignment error"); - $$ = value; - } - | ARITH_VAR ARITH_BORASSIGN expr { - arith_t value; + value = atoarith_t(lookupvar($1)) ^ $3; + if (arith_assign($1, value) != 0) + yyerror("variable assignment error"); + $$ = value; + } | + ARITH_VAR ARITH_BORASSIGN expr + { + arith_t value; - value = atoarith_t(lookupvar($1)) | $3; - if (arith_assign($1, value) != 0) - yyerror("variable assignment error"); - $$ = value; - } - ; + value = atoarith_t(lookupvar($1)) | $3; + if (arith_assign($1, value) != 0) + yyerror("variable assignment error"); + $$ = value; + } ; %% #include "error.h" #include "output.h" @@ -233,7 +269,8 @@ int yyparse(void); int -arith_assign(char *name, arith_t value) { +arith_assign(char *name, arith_t value) +{ char *str; int ret; @@ -253,10 +290,10 @@ INTOFF; result = yyparse(); - arith_lex_reset(); /* reprime lex */ + arith_lex_reset(); /* Reprime lex. */ INTON; - return (result); + return result; } void @@ -265,7 +302,7 @@ yyerrok; yyclearin; - arith_lex_reset(); /* reprime lex */ + arith_lex_reset(); /* Reprime lex. */ error("arithmetic expression: %s: \"%s\"", s, arith_startbuf); } @@ -284,7 +321,7 @@ p = argv[1]; if (argc > 2) { /* - * concatenate arguments + * Concatenate arguments. */ STARTSTACKSTR(concat); ap = argv + 2; @@ -304,7 +341,7 @@ i = arith(p); out1fmt("%ld\n", i); - return (! i); + return !i; } /*************************/ ==== //depot/projects/ia64/bin/sh/arith_lex.l#5 (text+ko) ==== @@ -35,19 +35,20 @@ * SUCH DAMAGE. */ +#if 0 #ifndef lint -#if 0 static char sccsid[] = "@(#)arith_lex.l 8.3 (Berkeley) 5/4/95"; #endif #endif /* not lint */ + #include -__FBSDID("$FreeBSD: src/bin/sh/arith_lex.l,v 1.19 2003/08/30 12:31:44 schweikh Exp $"); +__FBSDID("$FreeBSD: src/bin/sh/arith_lex.l,v 1.20 2003/09/04 18:28:42 schweikh Exp $"); #include "shell.h" #include "y.tab.h" #include "error.h" +#include "memalloc.h" #include "var.h" -#include "memalloc.h" extern char *arith_buf, *arith_startbuf; #undef YY_INPUT @@ -60,24 +61,23 @@ [ \t\n] { ; } 0x[a-fA-F0-9]+ { - yylval.l_value = strtoarith_t(yytext, NULL, 16); - return(ARITH_NUM); + yylval.l_value = strtoarith_t(yytext, NULL, 16); + return ARITH_NUM; } -0[0-7]+ { - yylval.l_value = strtoarith_t(yytext, NULL, 8); - return(ARITH_NUM); +0[0-7]+ { + yylval.l_value = strtoarith_t(yytext, NULL, 8); + return ARITH_NUM; } [0-9]+ { - yylval.l_value = strtoarith_t(yytext, NULL, 10); - return(ARITH_NUM); + yylval.l_value = strtoarith_t(yytext, NULL, 10); + return ARITH_NUM; } - [A-Za-z][A-Za-z0-9_]* { /* - * If variable doesn't exist, we should initialize + * If variable doesn't exist, we should initialize * it to zero. */ char *temp; @@ -86,46 +86,49 @@ temp = (char *)ckmalloc(strlen(yytext) + 1); yylval.s_value = strcpy(temp, yytext); - return(ARITH_VAR); + return ARITH_VAR; + } + +"(" { return ARITH_LPAREN; } +")" { return ARITH_RPAREN; } +"||" { return ARITH_OR; } +"&&" { return ARITH_AND; } +"|" { return ARITH_BOR; } +"^" { return ARITH_BXOR; } +"&" { return ARITH_BAND; } +"==" { return ARITH_EQ; } +"!=" { return ARITH_NE; } +">" { return ARITH_GT; } +">=" { return ARITH_GE; } +"<" { return ARITH_LT; } +"<=" { return ARITH_LE; } +"<<" { return ARITH_LSHIFT; } +">>" { return ARITH_RSHIFT; } +"*" { return ARITH_MUL; } +"/" { return ARITH_DIV; } +"%" { return ARITH_REM; } +"+" { return ARITH_ADD; } +"-" { return ARITH_SUB; } +"~" { return ARITH_BNOT; } +"!" { return ARITH_NOT; } +"=" { return ARITH_ASSIGN; } +"+=" { return ARITH_ADDASSIGN; } +"-=" { return ARITH_SUBASSIGN; } +"*=" { return ARITH_MULASSIGN; } +"/=" { return ARITH_DIVASSIGN; } +"%=" { return ARITH_REMASSIGN; } +">>=" { return ARITH_RSHASSIGN; } +"<<=" { return ARITH_LSHASSIGN; } +"&=" { return ARITH_BANDASSIGN; } +"^=" { return ARITH_BXORASSIGN; } +"|=" { return ARITH_BORASSIGN; } +. { + error("arith: syntax error: \"%s\"\n", arith_startbuf); } -"(" { return(ARITH_LPAREN); } -")" { return(ARITH_RPAREN); } -"||" { return(ARITH_OR); } -"&&" { return(ARITH_AND); } -"|" { return(ARITH_BOR); } -"^" { return(ARITH_BXOR); } -"&" { return(ARITH_BAND); } -"==" { return(ARITH_EQ); } -"!=" { return(ARITH_NE); } -">" { return(ARITH_GT); } -">=" { return(ARITH_GE); } -"<" { return(ARITH_LT); } -"<=" { return(ARITH_LE); } -"<<" { return(ARITH_LSHIFT); } -">>" { return(ARITH_RSHIFT); } -"*" { return(ARITH_MUL); } -"/" { return(ARITH_DIV); } -"%" { return(ARITH_REM); } -"+" { return(ARITH_ADD); } -"-" { return(ARITH_SUB); } -"~" { return(ARITH_BNOT); } -"!" { return(ARITH_NOT); } -"=" { return(ARITH_ASSIGN); } -"+=" { return(ARITH_ADDASSIGN); } -"-=" { return(ARITH_SUBASSIGN); } -"*=" { return(ARITH_MULASSIGN); } -"/=" { return(ARITH_DIVASSIGN); } -"%=" { return(ARITH_REMASSIGN); } -">>=" { return(ARITH_RSHASSIGN); } -"<<=" { return(ARITH_LSHASSIGN); } -"&=" { return(ARITH_BANDASSIGN); } -"^=" { return(ARITH_BXORASSIGN); } -"|=" { return(ARITH_BORASSIGN); } -. { error("arith: syntax error: \"%s\"\n", arith_startbuf); } %% void -arith_lex_reset() +arith_lex_reset(void) { YY_NEW_FILE; } ==== //depot/projects/ia64/bin/sh/shell.h#5 (text+ko) ==== @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)shell.h 8.2 (Berkeley) 5/4/95 - * $FreeBSD: src/bin/sh/shell.h,v 1.15 2003/08/30 12:31:44 schweikh Exp $ + * $FreeBSD: src/bin/sh/shell.h,v 1.16 2003/09/04 18:28:42 schweikh Exp $ */ /* @@ -48,28 +48,27 @@ */ -#define JOBS 1 +#define JOBS 1 /* #define DEBUG 1 */ /* * Type of used arithmetics. SUSv3 requires us to have at least signed long. */ typedef long arith_t; -#define strtoarith_t(nptr, endptr, base) strtol(nptr, endptr, base) -#define atoarith_t(arg) strtol(arg, NULL, 0) -#define ARITH_FORMAT_STR "%ld" +#define ARITH_FORMAT_STR "%ld" +#define atoarith_t(arg) strtol(arg, NULL, 0) +#define strtoarith_t(nptr, endptr, base) strtol(nptr, endptr, base) typedef void *pointer; #define STATIC static -#define MKINIT /* empty */ +#define MKINIT /* empty */ #include extern char nullstr[1]; /* null string */ - #ifdef DEBUG -#define TRACE(param) sh_trace param +#define TRACE(param) sh_trace param #else #define TRACE(param) #endif ==== //depot/projects/ia64/contrib/amd/FREEBSD-upgrade#3 (text+ko) ==== @@ -1,5 +1,5 @@ # ex:ts=8 -$FreeBSD: src/contrib/amd/FREEBSD-upgrade,v 1.13 2003/09/02 20:09:55 mbr Exp $ +$FreeBSD: src/contrib/amd/FREEBSD-upgrade,v 1.14 2003/09/03 00:46:21 mbr Exp $ AMD (am-utils) 6.0.9 originals can be found at: ftp://shekel.mcl.cs.columbia.edu/pub/am-utils/ @@ -10,6 +10,8 @@ tar -X FREEBSD-Xlist -xzf am-utils-6.0.9.tar.gz +and `find . -name '.cvsignore' -delete` + Then imported by: cvs import -m 'Virgin import of AMD (am-utils) v6.0.9' \ ==== //depot/projects/ia64/contrib/amd/doc/version.texi#3 (text+ko) ==== @@ -1,3 +1,3 @@ -@set UPDATED 3 July 2001 -@set EDITION 6.0.7 -@set VERSION 6.0.7 +@set UPDATED 28 August 2003 +@set EDITION 6.0.9 +@set VERSION 6.0.9 ==== //depot/projects/ia64/contrib/gcc/config/freebsd-spec.h#10 (text+ko) ==== @@ -18,7 +18,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $FreeBSD: src/contrib/gcc/config/freebsd-spec.h,v 1.11 2003/09/01 05:31:33 deischen Exp $ */ +/* $FreeBSD: src/contrib/gcc/config/freebsd-spec.h,v 1.12 2003/09/03 15:44:34 deischen Exp $ */ /* Common FreeBSD configuration. All FreeBSD architectures should include this file, which will specify @@ -131,15 +131,17 @@ required by the user-land thread model. Before __FreeBSD_version 500016, select the appropriate libc, depending on whether we're doing profiling or need threads support. At __FreeBSD_version - 500016 and later, when threads support is requested include both - -lc and -lc_r instead of only -lc_r. To make matters interesting, - we can't actually use __FreeBSD_version provided by - directly since it breaks cross-compiling. As a final twist, make - it a hard error if -pthread is provided on the command line and gcc - was configured with --disable-threads (this will help avoid bug - reports from users complaining about threading when they - misconfigured the gcc bootstrap but are later consulting FreeBSD - manual pages that refer to the mythical -pthread option). */ + 500016 and later, threads libraries can be linked with libc. + Because of this, and because different (not multiple) threading + libraries may be selected in the link option, the -pthread option + is no longer supported. To make matters interesting, we can't + actually use __FreeBSD_version provided by directly + since it breaks cross-compiling. As a final twist, make it a hard + error if -pthread is provided on the command line and gcc was + configured with --disable-threads (this will help avoid bug reports + from users complaining about threading when they misconfigured the + gcc bootstrap but are later consulting FreeBSD manual pages that + refer to the mythical -pthread option). */ /* Provide a LIB_SPEC appropriate for FreeBSD. Just select the appropriate libc, depending on whether we're doing profiling or need threads support. @@ -157,9 +159,10 @@ #include #if __FreeBSD_version >= 500016 #define FBSD_LIB_SPEC " \ + %{pthread: %eThe -pthread option is deprecated.} \ %{!shared: \ - %{!pg: %{pthread:-lc_r} -lc} \ - %{pg: %{pthread:-lc_r_p} -lc_p} \ + %{!pg: -lc} \ + %{pg: -lc_p} \ }" #else #define FBSD_LIB_SPEC " \ ==== //depot/projects/ia64/gnu/usr.bin/tar/config.h#3 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/gnu/usr.bin/tar/config.h,v 1.2 2002/10/20 07:50:20 obrien Exp $ */ +/* $FreeBSD: src/gnu/usr.bin/tar/config.h,v 1.3 2003/09/04 01:29:11 peter Exp $ */ #include @@ -273,7 +273,7 @@ #define HAVE_SETLOCALE 1 /* Define if you have the header file. */ -#define HAVE_SGTTY_H 1 +/* #define HAVE_SGTTY_H 1 */ /* Define if you have the header file. */ #define HAVE_STDBOOL_H 1 ==== //depot/projects/ia64/include/pthread.h#6 (text+ko) ==== @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/include/pthread.h,v 1.28 2003/04/20 01:53:12 jdp Exp $ + * $FreeBSD: src/include/pthread.h,v 1.29 2003/09/04 14:06:42 davidxu Exp $ */ #ifndef _PTHREAD_H_ #define _PTHREAD_H_ @@ -52,6 +52,7 @@ #define PTHREAD_KEYS_MAX 256 #define PTHREAD_STACK_MIN 1024 #define PTHREAD_THREADS_MAX ULONG_MAX +#define PTHREAD_BARRIER_SERIAL_THREAD -1 /* * Flags for threads and thread attributes. @@ -95,6 +96,8 @@ struct pthread_once; struct pthread_rwlock; struct pthread_rwlockattr; +struct pthread_barrier; +struct pthread_barrier_attr; /* * Primitive system data type definitions required by P1003.1c. @@ -113,6 +116,8 @@ typedef struct pthread_once pthread_once_t; typedef struct pthread_rwlock *pthread_rwlock_t; typedef struct pthread_rwlockattr *pthread_rwlockattr_t; +typedef struct pthread_barrier *pthread_barrier_t; +typedef struct pthread_barrierattr *pthread_barrierattr_t; /* * Additional type definitions: @@ -203,6 +208,15 @@ int pthread_attr_setstack(pthread_attr_t *, void *, size_t); int pthread_attr_setstackaddr(pthread_attr_t *, void *); int pthread_attr_setdetachstate(pthread_attr_t *, int); +int pthread_barrier_destroy(pthread_barrier_t *); +int pthread_barrier_init(pthread_barrier_t *, + const pthread_barrierattr_t *, unsigned); +int pthread_barrier_wait(pthread_barrier_t *); +int pthread_barrierattr_destroy(pthread_barrierattr_t *); +int pthread_barrierattr_getpshared(const pthread_barrierattr_t *, + int *); +int pthread_barrierattr_init(pthread_barrierattr_t *); +int pthread_barrierattr_setpshared(pthread_barrierattr_t *, int); void pthread_cleanup_pop(int); void pthread_cleanup_push(void (*) (void *), void *routine_arg); int pthread_condattr_destroy(pthread_condattr_t *); @@ -236,6 +250,8 @@ const pthread_mutexattr_t *); int pthread_mutex_lock(pthread_mutex_t *); int pthread_mutex_trylock(pthread_mutex_t *); +int pthread_mutex_timedlock(pthread_mutex_t *, + const struct timespec *); int pthread_mutex_unlock(pthread_mutex_t *); int pthread_once(pthread_once_t *, void (*) (void)); int pthread_rwlock_destroy(pthread_rwlock_t *); ==== //depot/projects/ia64/lib/libc/amd64/sys/Makefile.inc#3 (text+ko) ==== @@ -1,8 +1,8 @@ # from: Makefile.inc,v 1.1 1993/09/03 19:04:23 jtc Exp -# $FreeBSD: src/lib/libc/amd64/sys/Makefile.inc,v 1.27 2003/08/11 07:14:06 bms Exp $ +# $FreeBSD: src/lib/libc/amd64/sys/Makefile.inc,v 1.28 2003/09/04 00:29:12 peter Exp $ -MDASM= vfork.S brk.S cerror.S exect.S pipe.S ptrace.S reboot.S sbrk.S \ - setlogin.S sigreturn.S +MDASM= vfork.S brk.S cerror.S exect.S getcontext.S pipe.S ptrace.S \ + reboot.S sbrk.S setlogin.S sigreturn.S # Don't generate default code for these syscalls: NOASM= break.o exit.o ftruncate.o getdomainname.o getlogin.o \ ==== //depot/projects/ia64/lib/libc/amd64/sys/vfork.S#3 (text+ko) ==== @@ -38,7 +38,7 @@ .asciz "@(#)Ovfork.s 5.1 (Berkeley) 4/23/90" #endif /* SYSLIBC_SCCS and not lint */ #include -__FBSDID("$FreeBSD: src/lib/libc/amd64/sys/vfork.S,v 1.21 2003/05/24 17:35:23 peter Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/amd64/sys/vfork.S,v 1.22 2003/09/04 00:26:40 peter Exp $"); #include "SYS.h" @@ -58,5 +58,5 @@ movq PIC_GOT(HIDENAME(cerror)),%rdx jmp *%rdx #else - jmp HIDENAME(cerror) + jmp HIDENAME(cerror) #endif ==== //depot/projects/ia64/lib/libc/i386/sys/Makefile.inc#6 (text+ko) ==== @@ -1,11 +1,11 @@ # from: Makefile.inc,v 1.1 1993/09/03 19:04:23 jtc Exp -# $FreeBSD: src/lib/libc/i386/sys/Makefile.inc,v 1.26 2003/08/11 07:14:06 bms Exp $ +# $FreeBSD: src/lib/libc/i386/sys/Makefile.inc,v 1.27 2003/09/04 00:20:40 peter Exp $ SRCS+= i386_clr_watch.c i386_get_ioperm.c i386_get_ldt.c i386_set_ioperm.c \ i386_set_ldt.c i386_set_watch.c i386_vm86.c -MDASM= Ovfork.S brk.S cerror.S exect.S pipe.S ptrace.S reboot.S sbrk.S \ - setlogin.S sigreturn.S syscall.S +MDASM= Ovfork.S brk.S cerror.S exect.S getcontext.S pipe.S ptrace.S \ + reboot.S sbrk.S setlogin.S sigreturn.S syscall.S # Don't generate default code for these syscalls: NOASM= break.o exit.o ftruncate.o getdomainname.o getlogin.o \ ==== //depot/projects/ia64/lib/libc/locale/table.c#4 (text+ko) ==== @@ -38,14 +38,13 @@ static char sccsid[] = "@(#)table.c 8.1 (Berkeley) 6/27/93"; #endif /* LIBC_SCCS and not lint */ #include -__FBSDID("$FreeBSD: src/lib/libc/locale/table.c,v 1.17 2003/06/25 22:34:13 phantom Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/locale/table.c,v 1.18 2003/09/05 09:01:31 tjr Exp $"); #include #include extern rune_t _none_sgetrune(const char *, size_t, char const **); extern int _none_sputrune(rune_t, char *, size_t, char **); -extern int _none_init(char *, char **); _RuneLocale _DefaultRuneLocale = { _RUNE_MAGIC_1, ==== //depot/projects/ia64/lib/libc/string/index.3#5 (text+ko) ==== @@ -32,7 +32,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)index.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD: src/lib/libc/string/index.3,v 1.9 2003/07/28 22:50:42 simon Exp $ +.\" $FreeBSD: src/lib/libc/string/index.3,v 1.10 2003/09/04 20:36:54 simon Exp $ .\" .Dd June 4, 1993 .Dt INDEX 3 @@ -58,7 +58,13 @@ .Vt char ) in the string pointed to by .Fa s . -The terminating null character is considered part of the string. +The terminating null character is considered part of the string; +therefore if +.Fa c +is +.Ql \e0 , +the functions locate the terminating +.Ql \e0 . .Pp >>> TRUNCATED FOR MAIL (1000 lines) <<<