Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/byacc/dist merge conflicts



details:   https://anonhg.NetBSD.org/src/rev/03b26c5a4c2e
branches:  trunk
changeset: 959640:03b26c5a4c2e
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Feb 20 22:57:56 2021 +0000

description:
merge conflicts

diffstat:

 external/bsd/byacc/dist/closure.c                         |   28 +-
 external/bsd/byacc/dist/config.guess                      |   63 +-
 external/bsd/byacc/dist/config.sub                        |  601 +++++++------
 external/bsd/byacc/dist/config_h.in                       |   12 +
 external/bsd/byacc/dist/defs.h                            |  101 +-
 external/bsd/byacc/dist/graph.c                           |   16 +-
 external/bsd/byacc/dist/lalr.c                            |   43 +-
 external/bsd/byacc/dist/lr0.c                             |   38 +-
 external/bsd/byacc/dist/main.c                            |   92 +-
 external/bsd/byacc/dist/mkpar.c                           |   46 +-
 external/bsd/byacc/dist/mstring.c                         |   27 +-
 external/bsd/byacc/dist/output.c                          |   98 +-
 external/bsd/byacc/dist/reader.c                          |  169 ++-
 external/bsd/byacc/dist/test/btyacc/btyacc_calc1.tab.c    |    6 +-
 external/bsd/byacc/dist/test/btyacc/btyacc_demo.tab.c     |    6 +-
 external/bsd/byacc/dist/test/btyacc/btyacc_demo.tab.h     |    3 +-
 external/bsd/byacc/dist/test/btyacc/btyacc_destroy1.tab.c |    6 +-
 external/bsd/byacc/dist/test/btyacc/btyacc_destroy2.tab.c |    6 +-
 external/bsd/byacc/dist/test/btyacc/btyacc_destroy3.tab.c |    6 +-
 external/bsd/byacc/dist/test/btyacc/calc.tab.c            |    6 +-
 external/bsd/byacc/dist/test/btyacc/calc1.tab.c           |    6 +-
 external/bsd/byacc/dist/test/btyacc/calc2.tab.c           |    6 +-
 external/bsd/byacc/dist/test/btyacc/calc3.tab.c           |    6 +-
 external/bsd/byacc/dist/test/btyacc/code_calc.code.c      |    6 +-
 external/bsd/byacc/dist/test/btyacc/code_error.code.c     |    6 +-
 external/bsd/byacc/dist/test/btyacc/empty.tab.c           |    6 +-
 external/bsd/byacc/dist/test/btyacc/err_inherit1.tab.c    |    6 +-
 external/bsd/byacc/dist/test/btyacc/err_inherit2.tab.c    |    6 +-
 external/bsd/byacc/dist/test/btyacc/err_inherit3.tab.c    |    6 +-
 external/bsd/byacc/dist/test/btyacc/err_inherit4.tab.c    |    6 +-
 external/bsd/byacc/dist/test/btyacc/err_inherit4.tab.h    |    3 +-
 external/bsd/byacc/dist/test/btyacc/err_inherit5.tab.c    |    6 +-
 external/bsd/byacc/dist/test/btyacc/err_syntax1.tab.c     |    6 +-
 external/bsd/byacc/dist/test/btyacc/err_syntax10.tab.c    |    6 +-
 external/bsd/byacc/dist/test/btyacc/err_syntax11.tab.c    |    6 +-
 external/bsd/byacc/dist/test/btyacc/err_syntax12.tab.c    |    6 +-
 external/bsd/byacc/dist/test/btyacc/err_syntax13.tab.c    |    6 +-
 external/bsd/byacc/dist/test/btyacc/err_syntax14.tab.c    |    6 +-
 external/bsd/byacc/dist/test/btyacc/err_syntax15.tab.c    |    6 +-
 external/bsd/byacc/dist/test/btyacc/err_syntax16.tab.c    |    6 +-
 external/bsd/byacc/dist/test/btyacc/err_syntax17.tab.c    |    6 +-
 external/bsd/byacc/dist/test/btyacc/err_syntax18.tab.c    |    6 +-
 external/bsd/byacc/dist/test/btyacc/err_syntax19.tab.c    |    6 +-
 external/bsd/byacc/dist/test/btyacc/err_syntax2.tab.c     |    6 +-
 external/bsd/byacc/dist/test/btyacc/err_syntax20.tab.c    |    6 +-
 external/bsd/byacc/dist/test/btyacc/err_syntax21.tab.c    |    6 +-
 external/bsd/byacc/dist/test/btyacc/err_syntax22.tab.c    |    6 +-
 external/bsd/byacc/dist/test/btyacc/err_syntax23.tab.c    |    6 +-
 external/bsd/byacc/dist/test/btyacc/err_syntax24.tab.c    |    6 +-
 external/bsd/byacc/dist/test/btyacc/err_syntax25.tab.c    |    6 +-
 external/bsd/byacc/dist/test/btyacc/err_syntax26.tab.c    |    6 +-
 external/bsd/byacc/dist/test/btyacc/err_syntax27.tab.c    |    6 +-
 external/bsd/byacc/dist/test/btyacc/err_syntax3.tab.c     |    6 +-
 external/bsd/byacc/dist/test/btyacc/err_syntax4.tab.c     |    6 +-
 external/bsd/byacc/dist/test/btyacc/err_syntax5.tab.c     |    6 +-
 external/bsd/byacc/dist/test/btyacc/err_syntax6.tab.c     |    6 +-
 external/bsd/byacc/dist/test/btyacc/err_syntax7.tab.c     |    6 +-
 external/bsd/byacc/dist/test/btyacc/err_syntax7a.tab.c    |    6 +-
 external/bsd/byacc/dist/test/btyacc/err_syntax7b.tab.c    |    6 +-
 external/bsd/byacc/dist/test/btyacc/err_syntax8.tab.c     |    6 +-
 external/bsd/byacc/dist/test/btyacc/err_syntax8a.tab.c    |    6 +-
 external/bsd/byacc/dist/test/btyacc/err_syntax9.tab.c     |    6 +-
 external/bsd/byacc/dist/test/btyacc/error.tab.c           |    6 +-
 external/bsd/byacc/dist/test/btyacc/expr.oxout.tab.c      |    6 +-
 external/bsd/byacc/dist/test/btyacc/grammar.tab.c         |    8 +-
 external/bsd/byacc/dist/test/btyacc/inherit0.tab.c        |    6 +-
 external/bsd/byacc/dist/test/btyacc/inherit1.tab.c        |    6 +-
 external/bsd/byacc/dist/test/btyacc/inherit2.tab.c        |    6 +-
 external/bsd/byacc/dist/test/btyacc/ok_syntax1.tab.c      |    6 +-
 external/bsd/byacc/dist/test/btyacc/pure_calc.tab.c       |    6 +-
 external/bsd/byacc/dist/test/btyacc/pure_error.tab.c      |    6 +-
 external/bsd/byacc/dist/test/btyacc/quote_calc-s.tab.c    |    6 +-
 external/bsd/byacc/dist/test/btyacc/quote_calc.tab.c      |    6 +-
 external/bsd/byacc/dist/test/btyacc/quote_calc2-s.tab.c   |    6 +-
 external/bsd/byacc/dist/test/btyacc/quote_calc2.tab.c     |    6 +-
 external/bsd/byacc/dist/test/btyacc/quote_calc3-s.tab.c   |    6 +-
 external/bsd/byacc/dist/test/btyacc/quote_calc3.tab.c     |    6 +-
 external/bsd/byacc/dist/test/btyacc/quote_calc4-s.tab.c   |    6 +-
 external/bsd/byacc/dist/test/btyacc/quote_calc4.tab.c     |    6 +-
 external/bsd/byacc/dist/test/btyacc/rename_debug.c        |    6 +-
 external/bsd/byacc/dist/test/btyacc/varsyntax_calc1.tab.c |    6 +-
 external/bsd/byacc/dist/test/yacc/calc.tab.c              |    6 +-
 external/bsd/byacc/dist/test/yacc/calc1.tab.c             |    6 +-
 external/bsd/byacc/dist/test/yacc/calc2.tab.c             |    6 +-
 external/bsd/byacc/dist/test/yacc/calc3.tab.c             |    6 +-
 external/bsd/byacc/dist/test/yacc/code_calc.code.c        |    6 +-
 external/bsd/byacc/dist/test/yacc/code_error.code.c       |    6 +-
 external/bsd/byacc/dist/test/yacc/empty.tab.c             |    6 +-
 external/bsd/byacc/dist/test/yacc/err_syntax10.tab.c      |    6 +-
 external/bsd/byacc/dist/test/yacc/err_syntax11.tab.c      |    6 +-
 external/bsd/byacc/dist/test/yacc/err_syntax12.tab.c      |    6 +-
 external/bsd/byacc/dist/test/yacc/err_syntax18.tab.c      |    6 +-
 external/bsd/byacc/dist/test/yacc/err_syntax20.tab.c      |    6 +-
 external/bsd/byacc/dist/test/yacc/error.tab.c             |    6 +-
 external/bsd/byacc/dist/test/yacc/expr.oxout.tab.c        |    6 +-
 external/bsd/byacc/dist/test/yacc/grammar.tab.c           |    8 +-
 external/bsd/byacc/dist/test/yacc/ok_syntax1.tab.c        |    6 +-
 external/bsd/byacc/dist/test/yacc/pure_calc.tab.c         |    6 +-
 external/bsd/byacc/dist/test/yacc/pure_error.tab.c        |    6 +-
 external/bsd/byacc/dist/test/yacc/quote_calc-s.tab.c      |    6 +-
 external/bsd/byacc/dist/test/yacc/quote_calc.tab.c        |    6 +-
 external/bsd/byacc/dist/test/yacc/quote_calc2-s.tab.c     |    6 +-
 external/bsd/byacc/dist/test/yacc/quote_calc2.tab.c       |    6 +-
 external/bsd/byacc/dist/test/yacc/quote_calc3-s.tab.c     |    6 +-
 external/bsd/byacc/dist/test/yacc/quote_calc3.tab.c       |    6 +-
 external/bsd/byacc/dist/test/yacc/quote_calc4-s.tab.c     |    6 +-
 external/bsd/byacc/dist/test/yacc/quote_calc4.tab.c       |    6 +-
 external/bsd/byacc/dist/test/yacc/rename_debug.c          |    6 +-
 external/bsd/byacc/dist/test/yacc/varsyntax_calc1.tab.c   |    6 +-
 external/bsd/byacc/dist/verbose.c                         |   37 +-
 external/bsd/byacc/dist/warshall.c                        |   14 +-
 external/bsd/byacc/dist/yacc.1                            |   80 +-
 112 files changed, 1138 insertions(+), 901 deletions(-)

diffs (truncated from 5457 to 300 lines):

diff -r fad4888fc347 -r 03b26c5a4c2e external/bsd/byacc/dist/closure.c
--- a/external/bsd/byacc/dist/closure.c Sat Feb 20 22:53:31 2021 +0000
+++ b/external/bsd/byacc/dist/closure.c Sat Feb 20 22:57:56 2021 +0000
@@ -1,11 +1,11 @@
-/*     $NetBSD: closure.c,v 1.11 2018/12/23 20:27:23 jakllsch Exp $    */
+/*     $NetBSD: closure.c,v 1.12 2021/02/20 22:57:56 christos Exp $    */
 
-/* Id: closure.c,v 1.11 2014/09/18 00:40:07 tom Exp  */
+/* Id: closure.c,v 1.13 2020/09/22 20:17:00 tom Exp  */
 
 #include "defs.h"
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: closure.c,v 1.11 2018/12/23 20:27:23 jakllsch Exp $");
+__RCSID("$NetBSD: closure.c,v 1.12 2021/02/20 22:57:56 christos Exp $");
 
 Value_t *itemset;
 Value_t *itemsetend;
@@ -26,7 +26,6 @@
 {
     unsigned *row;
     int symbol;
-    Value_t *sp;
     int rowsize;
     int i;
     int rule;
@@ -37,7 +36,7 @@
     row = EFF;
     for (i = start_symbol; i < nsyms; i++)
     {
-       sp = derives[i];
+       Value_t *sp = derives[i];
        for (rule = *sp; rule > 0; rule = *++sp)
        {
            symbol = ritem[rrhs[rule]];
@@ -61,9 +60,7 @@
 set_first_derives(void)
 {
     unsigned *rrow;
-    unsigned *vrow;
     int j;
-    unsigned k;
     unsigned cword = 0;
     Value_t *rp;
 
@@ -82,8 +79,9 @@
     rrow = first_derives + ntokens * rulesetsize;
     for (i = start_symbol; i < nsyms; i++)
     {
-       vrow = EFF + ((i - ntokens) * varsetsize);
-       k = BITS_PER_WORD;
+       unsigned *vrow = EFF + ((i - ntokens) * varsetsize);
+       unsigned k = BITS_PER_WORD;
+
        for (j = start_symbol; j < nsyms; k++, j++)
        {
            if (k >= BITS_PER_WORD)
@@ -92,7 +90,7 @@
                k = 0;
            }
 
-           if (cword & (unsigned)(1 << k))
+           if (cword & (1U << k))
            {
                rp = derives[j];
                while ((rule = *rp++) >= 0)
@@ -116,7 +114,6 @@
 closure(Value_t *nucleus, int n)
 {
     unsigned ruleno;
-    unsigned word;
     unsigned i;
     Value_t *csp;
     unsigned *dsp;
@@ -125,7 +122,6 @@
 
     Value_t *csend;
     unsigned *rsend;
-    int symbol;
     Value_t itemno;
 
     rulesetsize = WORDSIZE(nrules);
@@ -136,7 +132,8 @@
     csend = nucleus + n;
     for (csp = nucleus; csp < csend; ++csp)
     {
-       symbol = ritem[*csp];
+       int symbol = ritem[*csp];
+
        if (ISVAR(symbol))
        {
            dsp = first_derives + symbol * rulesetsize;
@@ -151,12 +148,13 @@
     csp = nucleus;
     for (rsp = ruleset; rsp < rsend; ++rsp)
     {
-       word = *rsp;
+       unsigned word = *rsp;
+
        if (word)
        {
            for (i = 0; i < BITS_PER_WORD; ++i)
            {
-               if (word & (unsigned)(1 << i))
+               if (word & (1U << i))
                {
                    itemno = rrhs[ruleno + i];
                    while (csp < csend && *csp < itemno)
diff -r fad4888fc347 -r 03b26c5a4c2e external/bsd/byacc/dist/config.guess
--- a/external/bsd/byacc/dist/config.guess      Sat Feb 20 22:53:31 2021 +0000
+++ b/external/bsd/byacc/dist/config.guess      Sat Feb 20 22:57:56 2021 +0000
@@ -1,8 +1,8 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
-#   Copyright 1992-2019 Free Software Foundation, Inc.
+#   Copyright 1992-2020 Free Software Foundation, Inc.
 
-timestamp='2019-06-10'
+timestamp='2020-08-17'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -50,7 +50,7 @@
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright 1992-2019 Free Software Foundation, Inc.
+Copyright 1992-2020 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -99,6 +99,8 @@
 trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15
 
 set_cc_for_build() {
+    # prevent multiple calls if $tmp is already set
+    test "$tmp" && return 0
     : "${TMPDIR=/tmp}"
     # shellcheck disable=SC2039
     { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
@@ -275,12 +277,15 @@
     *:Sortix:*:*)
        echo "$UNAME_MACHINE"-unknown-sortix
        exit ;;
+    *:Twizzler:*:*)
+       echo "$UNAME_MACHINE"-unknown-twizzler
+       exit ;;
     *:Redox:*:*)
        echo "$UNAME_MACHINE"-unknown-redox
        exit ;;
     mips:OSF1:*.*)
-        echo mips-dec-osf1
-        exit ;;
+       echo mips-dec-osf1
+       exit ;;
     alpha:OSF1:*:*)
        case $UNAME_RELEASE in
        *4.0)
@@ -400,7 +405,7 @@
        # If there is a compiler, see if it is configured for 64-bit objects.
        # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
        # This test works for both compilers.
-       if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
+       if test "$CC_FOR_BUILD" != no_compiler_found; then
            if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
                (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
                grep IS_64BIT_ARCH >/dev/null
@@ -540,10 +545,10 @@
     AViiON:dgux:*:*)
        # DG/UX returns AViiON for all architectures
        UNAME_PROCESSOR=`/usr/bin/uname -p`
-       if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ]
+       if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110
        then
-           if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \
-              [ "$TARGET_BINARY_INTERFACE"x = x ]
+           if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \
+              test "$TARGET_BINARY_INTERFACE"x = x
            then
                echo m88k-dg-dgux"$UNAME_RELEASE"
            else
@@ -576,7 +581,7 @@
        echo i386-ibm-aix
        exit ;;
     ia64:AIX:*:*)
-       if [ -x /usr/bin/oslevel ] ; then
+       if test -x /usr/bin/oslevel ; then
                IBM_REV=`/usr/bin/oslevel`
        else
                IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
@@ -616,7 +621,7 @@
        else
                IBM_ARCH=powerpc
        fi
-       if [ -x /usr/bin/lslpp ] ; then
+       if test -x /usr/bin/lslpp ; then
                IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
                           awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
        else
@@ -651,7 +656,7 @@
            9000/31?)            HP_ARCH=m68000 ;;
            9000/[34]??)         HP_ARCH=m68k ;;
            9000/[678][0-9][0-9])
-               if [ -x /usr/bin/getconf ]; then
+               if test -x /usr/bin/getconf; then
                    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
                    case "$sc_cpu_version" in
@@ -665,7 +670,7 @@
                        esac ;;
                    esac
                fi
-               if [ "$HP_ARCH" = "" ]; then
+               if test "$HP_ARCH" = ""; then
                    set_cc_for_build
                    sed 's/^            //' << EOF > "$dummy.c"
 
@@ -704,7 +709,7 @@
                    test -z "$HP_ARCH" && HP_ARCH=hppa
                fi ;;
        esac
-       if [ "$HP_ARCH" = hppa2.0w ]
+       if test "$HP_ARCH" = hppa2.0w
        then
            set_cc_for_build
 
@@ -778,7 +783,7 @@
        echo hppa1.0-hp-osf
        exit ;;
     i*86:OSF1:*:*)
-       if [ -x /usr/sbin/sysversion ] ; then
+       if test -x /usr/sbin/sysversion ; then
            echo "$UNAME_MACHINE"-unknown-osf1mk
        else
            echo "$UNAME_MACHINE"-unknown-osf1
@@ -922,7 +927,7 @@
        echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
        exit ;;
     alpha:Linux:*:*)
-       case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+       case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in
          EV5)   UNAME_MACHINE=alphaev5 ;;
          EV56)  UNAME_MACHINE=alphaev56 ;;
          PCA56) UNAME_MACHINE=alphapca56 ;;
@@ -1091,7 +1096,17 @@
        echo "$UNAME_MACHINE"-dec-linux-"$LIBC"
        exit ;;
     x86_64:Linux:*:*)
-       echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
+       set_cc_for_build
+       LIBCABI=$LIBC
+       if test "$CC_FOR_BUILD" != no_compiler_found; then
+           if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \
+               (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+               grep IS_X32 >/dev/null
+           then
+               LIBCABI="$LIBC"x32
+           fi
+       fi
+       echo "$UNAME_MACHINE"-pc-linux-"$LIBCABI"
        exit ;;
     xtensa*:Linux:*:*)
        echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
@@ -1280,7 +1295,7 @@
        echo mips-sony-newsos6
        exit ;;
     R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
-       if [ -d /usr/nec ]; then
+       if test -d /usr/nec; then
                echo mips-nec-sysv"$UNAME_RELEASE"
        else
                echo mips-unknown-sysv"$UNAME_RELEASE"
@@ -1328,6 +1343,9 @@
     *:Rhapsody:*:*)
        echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
        exit ;;
+    arm64:Darwin:*:*)
+       echo aarch64-apple-darwin"$UNAME_RELEASE"
+       exit ;;
     *:Darwin:*:*)
        UNAME_PROCESSOR=`uname -p`
        case $UNAME_PROCESSOR in
@@ -1342,7 +1360,7 @@
        else
            set_cc_for_build
        fi
-       if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
+       if test "$CC_FOR_BUILD" != no_compiler_found; then
            if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
                   (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
                   grep IS_64BIT_ARCH >/dev/null
@@ -1625,6 +1643,12 @@
   https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
 and
   https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
+EOF
+
+year=`echo $timestamp | sed 's,-.*,,'`
+# shellcheck disable=SC2003
+if test "`expr "\`date +%Y\`" - "$year"`" -lt 3 ; then



Home | Main Index | Thread Index | Old Index