diff -Nru bison-3.0.2.dfsg/aclocal.m4 bison-3.0.4.dfsg/aclocal.m4 --- bison-3.0.2.dfsg/aclocal.m4 2013-12-05 13:41:17.000000000 +0000 +++ bison-3.0.4.dfsg/aclocal.m4 2015-01-23 10:28:23.000000000 +0000 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.14 -*- Autoconf -*- +# generated automatically by aclocal 1.15 -*- Autoconf -*- -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -20,7 +20,7 @@ If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# Copyright (C) 2002-2013 Free Software Foundation, Inc. +# Copyright (C) 2002-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -32,10 +32,10 @@ # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.14' +[am__api_version='1.15' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.14], [], +m4_if([$1], [1.15], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -51,14 +51,14 @@ # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.14])dnl +[AM_AUTOMAKE_VERSION([1.15])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -103,15 +103,14 @@ # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], -[dnl Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50])dnl -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` +[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2013 Free Software Foundation, Inc. +# Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -142,7 +141,7 @@ Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -333,7 +332,7 @@ # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -409,7 +408,7 @@ # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -499,8 +498,8 @@ # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl @@ -573,7 +572,11 @@ END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi -fi]) +fi +dnl The trailing newline in this macro's definition is deliberate, for +dnl backward compatibility and to allow trailing 'dnl'-style comments +dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. +]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further @@ -602,7 +605,7 @@ done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -613,7 +616,7 @@ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -if test x"${install_sh}" != xset; then +if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; @@ -623,7 +626,7 @@ fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2013 Free Software Foundation, Inc. +# Copyright (C) 2003-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -644,7 +647,7 @@ # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -694,7 +697,7 @@ # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2013 Free Software Foundation, Inc. +# Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -733,7 +736,7 @@ # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -762,7 +765,7 @@ AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -809,7 +812,7 @@ # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -828,7 +831,7 @@ # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -909,7 +912,7 @@ rm -f conftest.file ]) -# Copyright (C) 2009-2013 Free Software Foundation, Inc. +# Copyright (C) 2009-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -969,7 +972,7 @@ _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -997,7 +1000,7 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2013 Free Software Foundation, Inc. +# Copyright (C) 2006-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1016,7 +1019,7 @@ # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2013 Free Software Foundation, Inc. +# Copyright (C) 2004-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1191,6 +1194,7 @@ m4_include([m4/getdtablesize.m4]) m4_include([m4/getopt.m4]) m4_include([m4/gettext.m4]) +m4_include([m4/gettimeofday.m4]) m4_include([m4/glibc21.m4]) m4_include([m4/gnulib-common.m4]) m4_include([m4/gnulib-comp.m4]) @@ -1238,6 +1242,7 @@ m4_include([m4/nocrash.m4]) m4_include([m4/non-recursive-gnulib-prefix-hack.m4]) m4_include([m4/obstack-printf.m4]) +m4_include([m4/obstack.m4]) m4_include([m4/off_t.m4]) m4_include([m4/open.m4]) m4_include([m4/pathmax.m4]) @@ -1284,10 +1289,10 @@ m4_include([m4/string_h.m4]) m4_include([m4/strndup.m4]) m4_include([m4/strnlen.m4]) -m4_include([m4/strtoul.m4]) m4_include([m4/strverscmp.m4]) m4_include([m4/sys_socket_h.m4]) m4_include([m4/sys_stat_h.m4]) +m4_include([m4/sys_time_h.m4]) m4_include([m4/sys_types_h.m4]) m4_include([m4/sys_wait_h.m4]) m4_include([m4/threadlib.m4]) diff -Nru bison-3.0.2.dfsg/AUTHORS bison-3.0.4.dfsg/AUTHORS --- bison-3.0.2.dfsg/AUTHORS 2013-08-02 15:35:13.000000000 +0000 +++ bison-3.0.4.dfsg/AUTHORS 2015-01-16 14:47:42.000000000 +0000 @@ -24,7 +24,7 @@ ----- -Copyright (C) 1998-2013 Free Software Foundation, Inc. +Copyright (C) 1998-2015 Free Software Foundation, Inc. This file is part of Bison, the GNU Compiler Compiler. diff -Nru bison-3.0.2.dfsg/build-aux/announce-gen bison-3.0.4.dfsg/build-aux/announce-gen --- bison-3.0.2.dfsg/build-aux/announce-gen 2013-08-02 15:03:12.000000000 +0000 +++ bison-3.0.4.dfsg/build-aux/announce-gen 2015-01-04 16:43:50.000000000 +0000 @@ -3,13 +3,13 @@ if 0; # Generate a release announcement message. -my $VERSION = '2012-06-08 06:53'; # UTC +my $VERSION = '2013-07-09 06:39'; # UTC # The definition above must lie within the first 8 lines in order # for the Emacs time-stamp write hook (at end) to update it. # If you change this file with Emacs, please let the write hook # do its job. Otherwise, update this string manually. -# Copyright (C) 2002-2013 Free Software Foundation, Inc. +# Copyright (C) 2002-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -29,15 +29,18 @@ use strict; use Getopt::Long; -use Digest::MD5; -eval { require Digest::SHA; } - or eval 'use Digest::SHA1'; use POSIX qw(strftime); (my $ME = $0) =~ s|.*/||; my %valid_release_types = map {$_ => 1} qw (alpha beta stable); my @archive_suffixes = ('tar.gz', 'tar.bz2', 'tar.lzma', 'tar.xz'); +my %digest_classes = + ( + 'md5' => (eval { require Digest::MD5; } and 'Digest::MD5'), + 'sha1' => ((eval { require Digest::SHA; } and 'Digest::SHA') + or (eval { require Digest::SHA1; } and 'Digest::SHA1')) + ); my $srcdir = '.'; sub usage ($) @@ -157,15 +160,13 @@ foreach my $meth (qw (md5 sha1)) { + my $class = $digest_classes{$meth} or next; foreach my $f (@file) { open IN, '<', $f or die "$ME: $f: cannot open for reading: $!\n"; binmode IN; - my $dig = - ($meth eq 'md5' - ? Digest::MD5->new->addfile(*IN)->hexdigest - : Digest::SHA1->new->addfile(*IN)->hexdigest); + my $dig = $class->new->addfile(*IN)->hexdigest; close IN; print "$dig $f\n"; } @@ -416,14 +417,15 @@ @url_dir_list or (warn "URL directory name(s) not specified\n"), $fail = 1; - my @tool_list = split ',', $bootstrap_tools; + my @tool_list = split ',', $bootstrap_tools + if $bootstrap_tools; grep (/^gnulib$/, @tool_list) ^ defined $gnulib_version and (warn "when specifying gnulib as a tool, you must also specify\n" . "--gnulib-version=V, where V is the result of running git describe\n" . "in the gnulib source directory.\n"), $fail = 1; - exists $valid_release_types{$release_type} + !$release_type || exists $valid_release_types{$release_type} or (warn "'$release_type': invalid release type\n"), $fail = 1; @ARGV diff -Nru bison-3.0.2.dfsg/build-aux/compile bison-3.0.4.dfsg/build-aux/compile --- bison-3.0.2.dfsg/build-aux/compile 2013-12-05 13:41:24.000000000 +0000 +++ bison-3.0.4.dfsg/build-aux/compile 2015-01-23 10:28:30.000000000 +0000 @@ -3,7 +3,7 @@ scriptversion=2012-10-14.11; # UTC -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2014 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify diff -Nru bison-3.0.2.dfsg/build-aux/config.guess bison-3.0.4.dfsg/build-aux/config.guess --- bison-3.0.2.dfsg/build-aux/config.guess 2013-12-05 13:36:21.000000000 +0000 +++ bison-3.0.4.dfsg/build-aux/config.guess 2015-01-04 16:43:50.000000000 +0000 @@ -1,8 +1,8 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2013 Free Software Foundation, Inc. +# Copyright 1992-2015 Free Software Foundation, Inc. -timestamp='2013-11-29' +timestamp='2015-01-01' # 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 @@ -24,12 +24,12 @@ # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # -# Originally written by Per Bothner. +# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD # -# Please send patches with a ChangeLog entry to config-patches@gnu.org. +# Please send patches to . me=`echo "$0" | sed -e 's,.*/,,'` @@ -50,7 +50,7 @@ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2013 Free Software Foundation, Inc. +Copyright 1992-2015 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." @@ -149,7 +149,7 @@ LIBC=gnu #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` ;; esac @@ -579,8 +579,9 @@ else IBM_ARCH=powerpc fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` + if [ -x /usr/bin/lslpp ] ; then + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi @@ -826,7 +827,7 @@ *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; - i*:MSYS*:*) + *:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) @@ -969,10 +970,10 @@ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; - or1k:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + openrisc*:Linux:*:*) + echo or1k-unknown-linux-${LIBC} exit ;; - or32:Linux:*:*) + or32:Linux:*:* | or1k*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) @@ -1371,154 +1372,6 @@ exit ;; esac -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - cat >&2 <, 1996 # @@ -367,11 +367,7 @@ dgux*) hardcode_libdir_flag_spec='-L$libdir' ;; - freebsd2.2*) - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - ;; - freebsd2*) + freebsd2.[01]*) hardcode_direct=yes hardcode_minus_L=yes ;; @@ -548,13 +544,11 @@ dgux*) library_names_spec='$libname$shrext' ;; + freebsd[23].*) + library_names_spec='$libname$shrext$versuffix' + ;; freebsd* | dragonfly*) - case "$host_os" in - freebsd[123]*) - library_names_spec='$libname$shrext$versuffix' ;; - *) - library_names_spec='$libname$shrext' ;; - esac + library_names_spec='$libname$shrext' ;; gnu*) library_names_spec='$libname$shrext' diff -Nru bison-3.0.2.dfsg/build-aux/config.sub bison-3.0.4.dfsg/build-aux/config.sub --- bison-3.0.2.dfsg/build-aux/config.sub 2013-10-23 08:25:42.000000000 +0000 +++ bison-3.0.4.dfsg/build-aux/config.sub 2015-01-04 16:43:50.000000000 +0000 @@ -1,8 +1,8 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2013 Free Software Foundation, Inc. +# Copyright 1992-2015 Free Software Foundation, Inc. -timestamp='2013-10-01' +timestamp='2015-01-01' # 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 @@ -25,7 +25,7 @@ # of the GNU General Public License, version 3 ("GPLv3"). -# Please send patches with a ChangeLog entry to config-patches@gnu.org. +# Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. @@ -68,7 +68,7 @@ version="\ GNU config.sub ($timestamp) -Copyright 1992-2013 Free Software Foundation, Inc. +Copyright 1992-2015 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." @@ -260,7 +260,7 @@ | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ | epiphany \ - | fido | fr30 | frv \ + | fido | fr30 | frv | ft32 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ @@ -283,8 +283,10 @@ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipsr5900 | mipsr5900el \ @@ -296,11 +298,11 @@ | nds32 | nds32le | nds32be \ | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ - | open8 \ - | or1k | or32 \ + | open8 | or1k | or1knd | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ + | riscv32 | riscv64 \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ @@ -311,6 +313,7 @@ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ + | visium \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) @@ -325,6 +328,9 @@ c6x) basic_machine=tic6x-unknown ;; + leon|leon[3-9]) + basic_machine=sparc-$basic_machine + ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none @@ -402,8 +408,10 @@ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsr5900-* | mipsr5900el-* \ @@ -415,6 +423,7 @@ | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ + | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ @@ -432,6 +441,7 @@ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ + | visium-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ @@ -769,6 +779,9 @@ basic_machine=m68k-isi os=-sysv ;; + leon-*|leon[3-9]-*) + basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` + ;; m68knommu) basic_machine=m68k-unknown os=-linux @@ -824,6 +837,10 @@ basic_machine=powerpc-unknown os=-morphos ;; + moxiebox) + basic_machine=moxie-unknown + os=-moxiebox + ;; msdos) basic_machine=i386-pc os=-msdos @@ -1369,14 +1386,14 @@ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ + | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1594,9 +1611,6 @@ mips*-*) os=-elf ;; - or1k-*) - os=-elf - ;; or32-*) os=-coff ;; diff -Nru bison-3.0.2.dfsg/build-aux/darwin11.4.0.valgrind bison-3.0.4.dfsg/build-aux/darwin11.4.0.valgrind --- bison-3.0.2.dfsg/build-aux/darwin11.4.0.valgrind 2013-08-02 15:35:13.000000000 +0000 +++ bison-3.0.4.dfsg/build-aux/darwin11.4.0.valgrind 2015-01-16 14:47:42.000000000 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2013 Free Software Foundation, Inc. +# Copyright (C) 2012-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff -Nru bison-3.0.2.dfsg/build-aux/depcomp bison-3.0.4.dfsg/build-aux/depcomp --- bison-3.0.2.dfsg/build-aux/depcomp 2013-08-02 15:03:12.000000000 +0000 +++ bison-3.0.4.dfsg/build-aux/depcomp 2015-01-16 14:22:44.000000000 +0000 @@ -3,7 +3,7 @@ scriptversion=2013-05-30.07; # UTC -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2015 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff -Nru bison-3.0.2.dfsg/build-aux/do-release-commit-and-tag bison-3.0.4.dfsg/build-aux/do-release-commit-and-tag --- bison-3.0.2.dfsg/build-aux/do-release-commit-and-tag 2013-08-02 15:03:12.000000000 +0000 +++ bison-3.0.4.dfsg/build-aux/do-release-commit-and-tag 2015-01-04 16:43:50.000000000 +0000 @@ -7,7 +7,7 @@ # Note: this is a bash script (could be zsh or dash) -# Copyright (C) 2009-2013 Free Software Foundation, Inc. +# Copyright (C) 2009-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff -Nru bison-3.0.2.dfsg/build-aux/gendocs.sh bison-3.0.4.dfsg/build-aux/gendocs.sh --- bison-3.0.2.dfsg/build-aux/gendocs.sh 2013-12-05 13:36:21.000000000 +0000 +++ bison-3.0.4.dfsg/build-aux/gendocs.sh 2015-01-04 16:43:50.000000000 +0000 @@ -2,10 +2,9 @@ # gendocs.sh -- generate a GNU manual in many formats. This script is # mentioned in maintain.texi. See the help message below for usage details. -scriptversion=2013-10-10.09 +scriptversion=2015-01-02.22 -# Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 -# Free Software Foundation, Inc. +# Copyright 2003-2015 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -21,14 +20,13 @@ # along with this program. If not, see . # # Original author: Mohit Agarwal. -# Send bug reports and any other correspondence to bug-texinfo@gnu.org. +# Send bug reports and any other correspondence to bug-gnulib@gnu.org. # # The latest version of this script, and the companion template, is -# available from Texinfo CVS: -# http://savannah.gnu.org/cgi-bin/viewcvs/texinfo/texinfo/util/gendocs.sh -# http://savannah.gnu.org/cgi-bin/viewcvs/texinfo/texinfo/util/gendocs_template +# available from the Gnulib repository: # -# An up-to-date copy is also maintained in Gnulib (gnu.org/software/gnulib). +# http://git.savannah.gnu.org/cgit/gnulib.git/tree/build-aux/gendocs.sh +# http://git.savannah.gnu.org/cgit/gnulib.git/tree/doc/gendocs_template # TODO: # - image importation was only implemented for HTML generated by @@ -39,8 +37,8 @@ prog=`basename "$0"` srcdir=`pwd` -scripturl="http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~/texinfo/texinfo/util/gendocs.sh" -templateurl="http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~/texinfo/texinfo/util/gendocs_template" +scripturl="http://git.savannah.gnu.org/cgit/gnulib.git/plain/build-aux/gendocs.sh" +templateurl="http://git.savannah.gnu.org/cgit/gnulib.git/plain/doc/gendocs_template" : ${SETLANG="env LANG= LC_MESSAGES= LC_ALL= LANGUAGE="} : ${MAKEINFO="makeinfo"} @@ -78,6 +76,9 @@ --html ARG pass ARG to makeinfo or texi2html for HTML targets. --info ARG pass ARG to makeinfo for Info, instead of --no-split. --no-ascii skip generating the plain text output. + --no-html skip generating the html output. + --no-info skip generating the info output. + --no-tex skip generating the dvi and pdf output. --source ARG include ARG in tar archive of sources. --split HOW make split HTML by node, section, chapter; default node. @@ -131,7 +132,7 @@ happen to have a non-English manual and non-English web site, see the SETLANG setting in the source. -Email bug reports or enhancement requests to bug-texinfo@gnu.org. +Email bug reports or enhancement requests to bug-gnulib@gnu.org. " MANUAL_TITLE= @@ -139,10 +140,13 @@ EMAIL=webmasters@gnu.org # please override with --email commonarg= # passed to all makeinfo/texi2html invcations. dirargs= # passed to all tools (-I dir). -dirs= # -I's directories. +dirs= # -I directories. htmlarg= infoarg=--no-split generate_ascii=true +generate_html=true +generate_info=true +generate_tex=true outdir=manual source_extra= split=node @@ -159,6 +163,9 @@ --html) shift; htmlarg=$1;; --info) shift; infoarg=$1;; --no-ascii) generate_ascii=false;; + --no-html) generate_ascii=false;; + --no-info) generate_info=false;; + --no-tex) generate_tex=false;; --source) shift; source_extra=$1;; --split) shift; split=$1;; --texi2html) use_texi2html=1;; @@ -221,8 +228,9 @@ # copy_images OUTDIR HTML-FILE... # ------------------------------- -# Copy all the images needed by the HTML-FILEs into OUTDIR. Look -# for them in the -I directories. +# Copy all the images needed by the HTML-FILEs into OUTDIR. +# Look for them in . and the -I directories; this is simpler than what +# makeinfo supports with -I, but hopefully it will suffice. copy_images() { local odir @@ -232,7 +240,7 @@ BEGIN { \$me = '$prog'; \$odir = '$odir'; - @dirs = qw($dirs); + @dirs = qw(. $dirs); } " -e ' /${srcdir}/$PACKAGE-db.xml" @@ -431,7 +453,8 @@ mv $PACKAGE-db.pdf "$outdir/" fi -printf "\nMaking index file...\n" +# +printf "\nMaking index.html for $PACKAGE...\n" if test -z "$use_texi2html"; then CONDS="/%%IF *HTML_SECTION%%/,/%%ENDIF *HTML_SECTION%%/d;\ /%%IF *HTML_CHAPTER%%/,/%%ENDIF *HTML_CHAPTER%%/d" diff -Nru bison-3.0.2.dfsg/build-aux/gitlog-to-changelog bison-3.0.4.dfsg/build-aux/gitlog-to-changelog --- bison-3.0.2.dfsg/build-aux/gitlog-to-changelog 2013-08-02 15:03:12.000000000 +0000 +++ bison-3.0.4.dfsg/build-aux/gitlog-to-changelog 2015-01-04 16:43:50.000000000 +0000 @@ -3,13 +3,13 @@ if 0; # Convert git log output to ChangeLog format. -my $VERSION = '2012-07-29 06:11'; # UTC +my $VERSION = '2014-11-20 17:25'; # UTC # The definition above must lie within the first 8 lines in order # for the Emacs time-stamp write hook (at end) to update it. # If you change this file with Emacs, please let the write hook # do its job. Otherwise, update this string manually. -# Copyright (C) 2008-2013 Free Software Foundation, Inc. +# Copyright (C) 2008-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -72,6 +72,7 @@ directory can be derived. --since=DATE convert only the logs since DATE; the default is to convert all log entries. + --until=DATE convert only the logs older than DATE. --format=FMT set format string for commit subject and body; see 'man git-log' for the list of format metacharacters; the default is '%s%n%b%n' @@ -220,6 +221,7 @@ { my $since_date; + my $until_date; my $format_string = '%s%n%b%n'; my $amend_file; my $append_dot = 0; @@ -232,6 +234,7 @@ help => sub { usage 0 }, version => sub { print "$ME version $VERSION\n"; exit }, 'since=s' => \$since_date, + 'until=s' => \$until_date, 'format=s' => \$format_string, 'amend=s' => \$amend_file, 'append-dot' => \$append_dot, @@ -243,6 +246,8 @@ defined $since_date and unshift @ARGV, "--since=$since_date"; + defined $until_date + and unshift @ARGV, "--until=$until_date"; # This is a hash that maps an SHA1 to perl code (i.e., s/old/new/) # that makes a correction in the log or attribution of that commit. diff -Nru bison-3.0.2.dfsg/build-aux/git-version-gen bison-3.0.4.dfsg/build-aux/git-version-gen --- bison-3.0.2.dfsg/build-aux/git-version-gen 2013-08-02 15:03:12.000000000 +0000 +++ bison-3.0.4.dfsg/build-aux/git-version-gen 2015-01-04 16:43:50.000000000 +0000 @@ -1,8 +1,8 @@ #!/bin/sh # Print a version string. -scriptversion=2012-12-31.23; # UTC +scriptversion=2014-12-02.19; # UTC -# Copyright (C) 2007-2013 Free Software Foundation, Inc. +# Copyright (C) 2007-2015 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -85,8 +85,9 @@ Options: - --prefix prefix of git tags (default 'v') - --fallback fallback version to use if \"git --version\" fails + --prefix PREFIX prefix of git tags (default 'v') + --fallback VERSION + fallback version to use if \"git --version\" fails --help display this help and exit --version output version information and exit @@ -214,7 +215,7 @@ fi # Omit the trailing newline, so that m4_esyscmd can use the result directly. -echo "$v" | tr -d "$nl" +printf %s "$v" # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) diff -Nru bison-3.0.2.dfsg/build-aux/gnupload bison-3.0.4.dfsg/build-aux/gnupload --- bison-3.0.2.dfsg/build-aux/gnupload 2013-08-02 15:15:59.000000000 +0000 +++ bison-3.0.4.dfsg/build-aux/gnupload 2015-01-04 16:46:00.000000000 +0000 @@ -3,7 +3,7 @@ scriptversion=2013-03-19.17; # UTC -# Copyright (C) 2004-2013 Free Software Foundation, Inc. +# Copyright (C) 2004-2015 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff -Nru bison-3.0.2.dfsg/build-aux/gnu-web-doc-update bison-3.0.4.dfsg/build-aux/gnu-web-doc-update --- bison-3.0.2.dfsg/build-aux/gnu-web-doc-update 2013-08-02 15:03:12.000000000 +0000 +++ bison-3.0.4.dfsg/build-aux/gnu-web-doc-update 2015-01-04 16:43:50.000000000 +0000 @@ -4,7 +4,7 @@ VERSION=2012-12-16.14; # UTC -# Copyright (C) 2009-2013 Free Software Foundation, Inc. +# Copyright (C) 2009-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff -Nru bison-3.0.2.dfsg/build-aux/install-sh bison-3.0.4.dfsg/build-aux/install-sh --- bison-3.0.2.dfsg/build-aux/install-sh 2012-05-04 16:15:07.000000000 +0000 +++ bison-3.0.4.dfsg/build-aux/install-sh 2014-12-29 15:06:00.000000000 +0000 @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2011-11-20.07; # UTC +scriptversion=2013-12-25.23; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -41,19 +41,15 @@ # This script is compatible with the BSD install script, but was written # from scratch. +tab=' ' nl=' ' -IFS=" "" $nl" +IFS=" $tab$nl" -# set DOITPROG to echo to test this script +# Set DOITPROG to "echo" to test this script. -# Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} -if test -z "$doit"; then - doit_exec=exec -else - doit_exec=$doit -fi +doit_exec=${doit:-exec} # Put in absolute file names if you don't have them in your path; # or use environment vars. @@ -68,17 +64,6 @@ rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} -posix_glob='?' -initialize_posix_glob=' - test "$posix_glob" != "?" || { - if (set -f) 2>/dev/null; then - posix_glob= - else - posix_glob=: - fi - } -' - posix_mkdir= # Desired mode of installed file. @@ -97,7 +82,7 @@ dst_arg= copy_on_change=false -no_target_directory= +is_target_a_directory=possibly usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE @@ -137,46 +122,57 @@ -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" - shift;; + shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 - case $mode in - *' '* | *' '* | *' -'* | *'*'* | *'?'* | *'['*) - echo "$0: invalid mode: $mode" >&2 - exit 1;; - esac - shift;; + case $mode in + *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; -o) chowncmd="$chownprog $2" - shift;; + shift;; -s) stripcmd=$stripprog;; - -t) dst_arg=$2 - # Protect names problematic for 'test' and other utilities. - case $dst_arg in - -* | [=\(\)!]) dst_arg=./$dst_arg;; - esac - shift;; + -t) + is_target_a_directory=always + dst_arg=$2 + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + shift;; - -T) no_target_directory=true;; + -T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; - --) shift - break;; + --) shift + break;; - -*) echo "$0: invalid option: $1" >&2 - exit 1;; + -*) echo "$0: invalid option: $1" >&2 + exit 1;; *) break;; esac shift done +# We allow the use of options -d and -T together, by making -d +# take the precedence; this is for compatibility with GNU install. + +if test -n "$dir_arg"; then + if test -n "$dst_arg"; then + echo "$0: target directory not allowed when installing a directory." >&2 + exit 1 + fi +fi + if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. @@ -208,6 +204,15 @@ fi if test -z "$dir_arg"; then + if test $# -gt 1 || test "$is_target_a_directory" = always; then + if test ! -d "$dst_arg"; then + echo "$0: $dst_arg: Is not a directory." >&2 + exit 1 + fi + fi +fi + +if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 @@ -223,16 +228,16 @@ *[0-7]) if test -z "$stripcmd"; then - u_plus_rw= + u_plus_rw= else - u_plus_rw='% 200' + u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then - u_plus_rw= + u_plus_rw= else - u_plus_rw=,u+rw + u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac @@ -269,41 +274,15 @@ # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then - if test -n "$no_target_directory"; then - echo "$0: $dst_arg: Is a directory" >&2 - exit 1 + if test "$is_target_a_directory" = never; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else - # Prefer dirname, but fall back on a substitute if dirname fails. - dstdir=` - (dirname "$dst") 2>/dev/null || - expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$dst" : 'X\(//\)[^/]' \| \ - X"$dst" : 'X\(//\)$' \| \ - X"$dst" : 'X\(/\)' \| . 2>/dev/null || - echo X"$dst" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q' - ` - + dstdir=`dirname "$dst"` test -d "$dstdir" dstdir_status=$? fi @@ -314,74 +293,74 @@ if test $dstdir_status != 0; then case $posix_mkdir in '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *[2367][2367]) mkdir_umask=$umask;; - .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - - *[0-7]) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - - # With -d, create the new directory with the user-specified mode. - # Otherwise, rely on $mkdir_umask. - if test -n "$dir_arg"; then - mkdir_mode=-m$mode - else - mkdir_mode= - fi - - posix_mkdir=false - case $umask in - *[123567][0-7][0-7]) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 - - if (umask $mkdir_umask && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - ls_ld_tmpdir=`ls -ld "$tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/d" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null - fi - trap '' 0;; - esac;; + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 + + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; esac if $posix_mkdir && ( - umask $mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else @@ -391,53 +370,51 @@ # directory the slow way, step by step, checking for races as we go. case $dstdir in - /*) prefix='/';; - [-=\(\)!]*) prefix='./';; - *) prefix='';; + /*) prefix='/';; + [-=\(\)!]*) prefix='./';; + *) prefix='';; esac - eval "$initialize_posix_glob" - oIFS=$IFS IFS=/ - $posix_glob set -f + set -f set fnord $dstdir shift - $posix_glob set +f + set +f IFS=$oIFS prefixes= for d do - test X"$d" = X && continue + test X"$d" = X && continue - prefix=$prefix$d - if test -d "$prefix"; then - prefixes= - else - if $posix_mkdir; then - (umask=$mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break - # Don't fail if two instances are running concurrently. - test -d "$prefix" || exit 1 - else - case $prefix in - *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; - *) qprefix=$prefix;; - esac - prefixes="$prefixes '$qprefix'" - fi - fi - prefix=$prefix/ + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ done if test -n "$prefixes"; then - # Don't fail if two instances are running concurrently. - (umask $mkdir_umask && - eval "\$doit_exec \$mkdirprog $prefixes") || - test -d "$dstdir" || exit 1 - obsolete_mkdir_used=true + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true fi fi fi @@ -472,15 +449,12 @@ # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && - old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && - new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && - - eval "$initialize_posix_glob" && - $posix_glob set -f && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && - $posix_glob set +f && - + set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then @@ -493,24 +467,24 @@ # to itself, or perhaps because mv is so ancient that it does not # support -f. { - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - test ! -f "$dst" || - $doit $rmcmd -f "$dst" 2>/dev/null || - { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } - } || - { echo "$0: cannot unlink or rename $dst" >&2 - (exit 1); exit 1 - } - } && + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dst" + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 diff -Nru bison-3.0.2.dfsg/build-aux/javacomp.sh.in bison-3.0.4.dfsg/build-aux/javacomp.sh.in --- bison-3.0.2.dfsg/build-aux/javacomp.sh.in 2013-08-02 15:03:12.000000000 +0000 +++ bison-3.0.4.dfsg/build-aux/javacomp.sh.in 2015-01-04 16:43:50.000000000 +0000 @@ -1,7 +1,7 @@ #!/bin/sh # Compile a Java program. -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2015 Free Software Foundation, Inc. # Written by Bruno Haible , 2001. # # This program is free software: you can redistribute it and/or modify diff -Nru bison-3.0.2.dfsg/build-aux/javaexec.sh.in bison-3.0.4.dfsg/build-aux/javaexec.sh.in --- bison-3.0.2.dfsg/build-aux/javaexec.sh.in 2013-08-02 15:03:12.000000000 +0000 +++ bison-3.0.4.dfsg/build-aux/javaexec.sh.in 2015-01-04 16:43:50.000000000 +0000 @@ -1,7 +1,7 @@ #!/bin/sh # Execute a Java program. -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2015 Free Software Foundation, Inc. # Written by Bruno Haible , 2001. # # This program is free software: you can redistribute it and/or modify diff -Nru bison-3.0.2.dfsg/build-aux/local.mk bison-3.0.4.dfsg/build-aux/local.mk --- bison-3.0.2.dfsg/build-aux/local.mk 2013-08-02 15:35:13.000000000 +0000 +++ bison-3.0.4.dfsg/build-aux/local.mk 2015-01-16 14:47:42.000000000 +0000 @@ -1,4 +1,4 @@ -# Copyright (C) 2000-2013 Free Software Foundation, Inc. +# Copyright (C) 2000-2015 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff -Nru bison-3.0.2.dfsg/build-aux/mdate-sh bison-3.0.4.dfsg/build-aux/mdate-sh --- bison-3.0.2.dfsg/build-aux/mdate-sh 2013-08-02 15:03:12.000000000 +0000 +++ bison-3.0.4.dfsg/build-aux/mdate-sh 2015-01-16 14:22:44.000000000 +0000 @@ -3,7 +3,7 @@ scriptversion=2010-08-21.06; # UTC -# Copyright (C) 1995-2013 Free Software Foundation, Inc. +# Copyright (C) 1995-2015 Free Software Foundation, Inc. # written by Ulrich Drepper , June 1995 # # This program is free software; you can redistribute it and/or modify diff -Nru bison-3.0.2.dfsg/build-aux/missing bison-3.0.4.dfsg/build-aux/missing --- bison-3.0.2.dfsg/build-aux/missing 2013-12-05 13:41:24.000000000 +0000 +++ bison-3.0.4.dfsg/build-aux/missing 2015-01-23 10:28:30.000000000 +0000 @@ -1,9 +1,9 @@ #! /bin/sh # Common wrapper for a few potentially missing GNU programs. -scriptversion=2012-06-26.16; # UTC +scriptversion=2013-10-28.13; # UTC -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify @@ -160,7 +160,7 @@ ;; autom4te*) echo "You might have modified some maintainer files that require" - echo "the 'automa4te' program to be rebuilt." + echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) diff -Nru bison-3.0.2.dfsg/build-aux/move-if-change bison-3.0.4.dfsg/build-aux/move-if-change --- bison-3.0.2.dfsg/build-aux/move-if-change 2013-08-02 15:03:12.000000000 +0000 +++ bison-3.0.4.dfsg/build-aux/move-if-change 2015-01-04 16:43:50.000000000 +0000 @@ -8,7 +8,7 @@ # If you change this file with Emacs, please let the write hook # do its job. Otherwise, update this string manually. -# Copyright (C) 2002-2013 Free Software Foundation, Inc. +# Copyright (C) 2002-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff -Nru bison-3.0.2.dfsg/build-aux/snippet/arg-nonnull.h bison-3.0.4.dfsg/build-aux/snippet/arg-nonnull.h --- bison-3.0.2.dfsg/build-aux/snippet/arg-nonnull.h 2013-08-02 15:15:59.000000000 +0000 +++ bison-3.0.4.dfsg/build-aux/snippet/arg-nonnull.h 2015-01-04 16:46:00.000000000 +0000 @@ -1,5 +1,5 @@ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2013 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published diff -Nru bison-3.0.2.dfsg/build-aux/snippet/c++defs.h bison-3.0.4.dfsg/build-aux/snippet/c++defs.h --- bison-3.0.2.dfsg/build-aux/snippet/c++defs.h 2013-08-02 15:15:59.000000000 +0000 +++ bison-3.0.4.dfsg/build-aux/snippet/c++defs.h 2015-01-04 16:46:00.000000000 +0000 @@ -1,5 +1,5 @@ /* C++ compatible function declaration macros. - Copyright (C) 2010-2013 Free Software Foundation, Inc. + Copyright (C) 2010-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published diff -Nru bison-3.0.2.dfsg/build-aux/snippet/warn-on-use.h bison-3.0.4.dfsg/build-aux/snippet/warn-on-use.h --- bison-3.0.2.dfsg/build-aux/snippet/warn-on-use.h 2013-08-02 15:15:59.000000000 +0000 +++ bison-3.0.4.dfsg/build-aux/snippet/warn-on-use.h 2015-01-04 16:46:00.000000000 +0000 @@ -1,5 +1,5 @@ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2013 Free Software Foundation, Inc. + Copyright (C) 2010-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published diff -Nru bison-3.0.2.dfsg/build-aux/test-driver bison-3.0.4.dfsg/build-aux/test-driver --- bison-3.0.2.dfsg/build-aux/test-driver 2013-12-05 13:41:25.000000000 +0000 +++ bison-3.0.4.dfsg/build-aux/test-driver 2015-01-23 10:28:30.000000000 +0000 @@ -1,9 +1,9 @@ #! /bin/sh # test-driver - basic testsuite driver script. -scriptversion=2012-06-27.10; # UTC +scriptversion=2013-07-13.22; # UTC -# Copyright (C) 2011-2013 Free Software Foundation, Inc. +# Copyright (C) 2011-2014 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -44,13 +44,12 @@ Usage: test-driver --test-name=NAME --log-file=PATH --trs-file=PATH [--expect-failure={yes|no}] [--color-tests={yes|no}] - [--enable-hard-errors={yes|no}] [--] TEST-SCRIPT + [--enable-hard-errors={yes|no}] [--] + TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS] The '--test-name', '--log-file' and '--trs-file' options are mandatory. END } -# TODO: better error handling in option parsing (in particular, ensure -# TODO: $log_file, $trs_file and $test_name are defined). test_name= # Used for reporting. log_file= # Where to save the output of the test script. trs_file= # Where to save the metadata of the test run. @@ -69,10 +68,23 @@ --enable-hard-errors) enable_hard_errors=$2; shift;; --) shift; break;; -*) usage_error "invalid option: '$1'";; + *) break;; esac shift done +missing_opts= +test x"$test_name" = x && missing_opts="$missing_opts --test-name" +test x"$log_file" = x && missing_opts="$missing_opts --log-file" +test x"$trs_file" = x && missing_opts="$missing_opts --trs-file" +if test x"$missing_opts" != x; then + usage_error "the following mandatory options are missing:$missing_opts" +fi + +if test $# -eq 0; then + usage_error "missing argument" +fi + if test $color_tests = yes; then # Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'. red='' # Red. @@ -94,11 +106,14 @@ # Test script is run here. "$@" >$log_file 2>&1 estatus=$? + if test $enable_hard_errors = no && test $estatus -eq 99; then - estatus=1 + tweaked_estatus=1 +else + tweaked_estatus=$estatus fi -case $estatus:$expect_failure in +case $tweaked_estatus:$expect_failure in 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; 0:*) col=$grn res=PASS recheck=no gcopy=no;; 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; @@ -107,6 +122,12 @@ *:*) col=$red res=FAIL recheck=yes gcopy=yes;; esac +# Report the test outcome and exit status in the logs, so that one can +# know whether the test passed or failed simply by looking at the '.log' +# file, without the need of also peaking into the corresponding '.trs' +# file (automake bug#11814). +echo "$res $test_name (exit status: $estatus)" >>$log_file + # Report outcome to console. echo "${col}${res}${std}: $test_name" diff -Nru bison-3.0.2.dfsg/build-aux/texinfo.tex bison-3.0.4.dfsg/build-aux/texinfo.tex --- bison-3.0.2.dfsg/build-aux/texinfo.tex 2013-10-23 08:25:42.000000000 +0000 +++ bison-3.0.4.dfsg/build-aux/texinfo.tex 2014-12-29 15:06:00.000000000 +0000 @@ -3,11 +3,11 @@ % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2013-09-11.11} +\def\texinfoversion{2014-12-03.16} % % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -% 2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. +% 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc. % % This texinfo.tex file is free software: you can redistribute it and/or % modify it under the terms of the GNU General Public License as @@ -96,7 +96,9 @@ \let\ptexraggedright=\raggedright \let\ptexrbrace=\} \let\ptexslash=\/ +\let\ptexsp=\sp \let\ptexstar=\* +\let\ptexsup=\sup \let\ptext=\t \let\ptextop=\top {\catcode`\'=\active \global\let\ptexquoteright'}% active in plain's math mode @@ -1010,24 +1012,15 @@ % paragraph. % \gdef\dosuppressfirstparagraphindent{% - \gdef\indent{% - \restorefirstparagraphindent - \indent - }% - \gdef\noindent{% - \restorefirstparagraphindent - \noindent - }% - \global\everypar = {% - \kern -\parindent - \restorefirstparagraphindent - }% + \gdef\indent {\restorefirstparagraphindent \indent}% + \gdef\noindent{\restorefirstparagraphindent \noindent}% + \global\everypar = {\kern -\parindent \restorefirstparagraphindent}% } - +% \gdef\restorefirstparagraphindent{% - \global \let \indent = \ptexindent - \global \let \noindent = \ptexnoindent - \global \everypar = {}% + \global\let\indent = \ptexindent + \global\let\noindent = \ptexnoindent + \global\everypar = {}% } @@ -1138,10 +1131,12 @@ \ifpdf % - % Color manipulation macros based on pdfcolor.tex, + % Color manipulation macros using ideas from pdfcolor.tex, % except using rgb instead of cmyk; the latter is said to render as a % very dark gray on-screen and a very dark halftone in print, instead - % of actual black. + % of actual black. The dark red here is dark enough to print on paper as + % nearly black, but still distinguishable for online viewing. We use + % black by default, though. \def\rgbDarkRed{0.50 0.09 0.12} \def\rgbBlack{0 0 0} % @@ -1251,10 +1246,9 @@ % used to mark target names; must be expandable. \def\pdfmkpgn#1{#1} % - % by default, use a color that is dark enough to print on paper as - % nearly black, but still distinguishable for online viewing. - \def\urlcolor{\rgbDarkRed} - \def\linkcolor{\rgbDarkRed} + % by default, use black for everything. + \def\urlcolor{\rgbBlack} + \def\linkcolor{\rgbBlack} \def\endlink{\setcolor{\maincolor}\pdfendlink} % % Adding outlines to PDF; macros for calculating structure of outlines @@ -2089,12 +2083,9 @@ \endgroup } - % In order for the font changes to affect most math symbols and letters, -% we have to define the \textfont of the standard families. Since -% texinfo doesn't allow for producing subscripts and superscripts except -% in the main text, we don't bother to reset \scriptfont and -% \scriptscriptfont (which would also require loading a lot more fonts). +% we have to define the \textfont of the standard families. We don't +% bother to reset \scriptfont and \scriptscriptfont; awaiting user need. % \def\resetmathfonts{% \textfont0=\tenrm \textfont1=\teni \textfont2=\tensy @@ -2108,8 +2099,8 @@ % \tenSTYLE to set the current font. % % Each font-changing command also sets the names \lsize (one size lower) -% and \lllsize (three sizes lower). These relative commands are used in -% the LaTeX logo and acronyms. +% and \lllsize (three sizes lower). These relative commands are used +% in, e.g., the LaTeX logo and acronyms. % % This all needs generalizing, badly. % @@ -2145,7 +2136,7 @@ \let\tenttsl=\secttsl \def\curfontsize{sec}% \def\lsize{subsec}\def\lllsize{reduced}% - \resetmathfonts \setleading{16pt}} + \resetmathfonts \setleading{17pt}} \def\subsecfonts{% \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc @@ -2574,37 +2565,21 @@ \let\file=\code \let\option=\code -% @uref (abbreviation for `urlref') takes an optional (comma-separated) -% second argument specifying the text to display and an optional third -% arg as text to display instead of (rather than in addition to) the url -% itself. First (mandatory) arg is the url. -% (This \urefnobreak definition isn't used now, leaving it for a while -% for comparison.) -\def\urefnobreak#1{\dourefnobreak #1,,,\finish} -\def\dourefnobreak#1,#2,#3,#4\finish{\begingroup - \unsepspaces - \pdfurl{#1}% - \setbox0 = \hbox{\ignorespaces #3}% - \ifdim\wd0 > 0pt - \unhbox0 % third arg given, show only that - \else - \setbox0 = \hbox{\ignorespaces #2}% - \ifdim\wd0 > 0pt - \ifpdf - \unhbox0 % PDF: 2nd arg given, show only it - \else - \unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url - \fi - \else - \code{#1}% only url given, so show it - \fi - \fi - \endlink -\endgroup} - -% This \urefbreak definition is the active one. +% @uref (abbreviation for `urlref') aka @url takes an optional +% (comma-separated) second argument specifying the text to display and +% an optional third arg as text to display instead of (rather than in +% addition to) the url itself. First (mandatory) arg is the url. + +% TeX-only option to allow changing PDF output to show only the second +% arg (if given), and not the url (which is then just the link target). +\newif\ifurefurlonlylink + +% The main macro is \urefbreak, which allows breaking at expected +% places within the url. (There used to be another version, which +% didn't support automatic breaking.) \def\urefbreak{\begingroup \urefcatcodes \dourefbreak} \let\uref=\urefbreak +% \def\dourefbreak#1{\urefbreakfinish #1,,,\finish} \def\urefbreakfinish#1,#2,#3,#4\finish{% doesn't work in @example \unsepspaces @@ -2613,12 +2588,19 @@ \ifdim\wd0 > 0pt \unhbox0 % third arg given, show only that \else - \setbox0 = \hbox{\ignorespaces #2}% + \setbox0 = \hbox{\ignorespaces #2}% look for second arg \ifdim\wd0 > 0pt \ifpdf - \unhbox0 % PDF: 2nd arg given, show only it + \ifurefurlonlylink + % PDF plus option to not display url, show just arg + \unhbox0 + \else + % PDF, normally display both arg and url for consistency, + % visibility, if the pdf is eventually used to print, etc. + \unhbox0\ (\urefcode{#1})% + \fi \else - \unhbox0\ (\urefcode{#1})% DVI: 2nd arg given, show both it and url + \unhbox0\ (\urefcode{#1})% DVI, always show arg and url \fi \else \urefcode{#1}% only url given, so show it @@ -2658,8 +2640,10 @@ % we put a little stretch before and after the breakable chars, to help % line breaking of long url's. The unequal skips make look better in % cmtt at least, especially for dots. -\def\urefprestretch{\urefprebreak \hskip0pt plus.13em } -\def\urefpoststretch{\urefpostbreak \hskip0pt plus.1em } +\def\urefprestretchamount{.13em} +\def\urefpoststretchamount{.1em} +\def\urefprestretch{\urefprebreak \hskip0pt plus\urefprestretchamount\relax} +\def\urefpoststretch{\urefpostbreak \hskip0pt plus\urefprestretchamount\relax} % \def\urefcodeamp{\urefprestretch \&\urefpoststretch} \def\urefcodedot{\urefprestretch .\urefpoststretch} @@ -2857,6 +2841,8 @@ \let\v=\check \let\~=\tilde \let\dotaccent=\dot + % have to provide another name for sup operator + \let\mathopsup=\sup $\finishmath } \def\finishmath#1{#1$\endgroup} % Close the group opened by \tex. @@ -2880,6 +2866,18 @@ } } +% for @sub and @sup, if in math mode, just do a normal sub/superscript. +% If in text, use math to place as sub/superscript, but switch +% into text mode, with smaller fonts. This is a different font than the +% one used for real math sub/superscripts (8pt vs. 7pt), but let's not +% fix it (significant additions to font machinery) until someone notices. +% +\def\sub{\ifmmode \expandafter\sb \else \expandafter\finishsub\fi} +\def\finishsub#1{$\sb{\hbox{\selectfonts\lllsize #1}}$}% +% +\def\sup{\ifmmode \expandafter\ptexsp \else \expandafter\finishsup\fi} +\def\finishsup#1{$\ptexsp{\hbox{\selectfonts\lllsize #1}}$}% + % ctrl is no longer a Texinfo command, but leave this definition for fun. \def\ctrl #1{{\tt \rawbackslash \hat}#1} @@ -3691,7 +3689,7 @@ \parskip=\smallskipamount \ifdim\parskip=0pt \parskip=2pt \fi % - % Try typesetting the item mark that if the document erroneously says + % Try typesetting the item mark so that if the document erroneously says % something like @itemize @samp (intending @table), there's an error % right away at the @itemize. It's not the best error message in the % world, but it's better than leaving it to the @item. This means if @@ -3941,19 +3939,23 @@ } % multitable-only commands. -% -% @headitem starts a heading row, which we typeset in bold. -% Assignments have to be global since we are inside the implicit group -% of an alignment entry. \everycr resets \everytab so we don't have to +% +% @headitem starts a heading row, which we typeset in bold. Assignments +% have to be global since we are inside the implicit group of an +% alignment entry. \everycr below resets \everytab so we don't have to % undo it ourselves. \def\headitemfont{\b}% for people to use in the template row; not changeable \def\headitem{% \checkenv\multitable \crcr + \gdef\headitemcrhook{\nobreak}% attempt to avoid page break after headings \global\everytab={\bf}% can't use \headitemfont since the parsing differs \the\everytab % for the first item }% % +% default for tables with no headings. +\let\headitemcrhook=\relax +% % A \tab used to include \hskip1sp. But then the space in a template % line is not enough. That is bad. So let's go back to just `&' until % we again encounter the problem the 1sp was intended to solve. @@ -3984,15 +3986,15 @@ % \everycr = {% \noalign{% - \global\everytab={}% + \global\everytab={}% Reset from possible headitem. \global\colcount=0 % Reset the column counter. - % Check for saved footnotes, etc. + % + % Check for saved footnotes, etc.: \checkinserts - % Keeps underfull box messages off when table breaks over pages. - %\filbreak - % Maybe so, but it also creates really weird page breaks when the - % table breaks over pages. Wouldn't \vfil be better? Wait until the - % problem manifests itself, so it can be fixed for real --karl. + % + % Perhaps a \nobreak, then reset: + \headitemcrhook + \global\let\headitemcrhook=\relax }% }% % @@ -4434,7 +4436,7 @@ % complicated, when \tex is in effect and \{ is a \delimiter again. % We can't use \lbracecmd and \rbracecmd because texindex assumes % braces and backslashes are used only as delimiters. Perhaps we - % should define @lbrace and @rbrace commands a la @comma. + % should use @lbracechar and @rbracechar? \def\{{{\tt\char123}}% \def\}{{\tt\char125}}% % @@ -4455,8 +4457,7 @@ % @end macro % ... % @funindex commtest - % - % The above is not enough to reproduce the bug, but it gives the flavor. + % This is not enough to reproduce the bug, but it gives the flavor. % % Sample whatsit resulting: % .@write3{\entry{xyz}{@folio }{@code {xyz@endinput }}} @@ -4657,8 +4658,21 @@ \definedummyword\verb \definedummyword\w \definedummyword\xref + % + % Consider: + % @macro mkind{arg1,arg2} + % @cindex \arg2\ + % @end macro + % @mkind{foo, bar} + % The space after the comma will end up in the temporary definition + % that we make for arg2 (see \parsemargdef ff.). We want all this to be + % expanded for the sake of the index, so we end up just seeing "bar". + \let\xeatspaces = \eatspaces } +% For testing: output @{ and @} in index sort strings as \{ and \}. +\newif\ifusebracesinindexes + % \indexnofonts is used when outputting the strings to sort the index % by, and when constructing control sequence names. It eliminates all % control sequences and just writes whatever the best ASCII sort string @@ -4687,11 +4701,16 @@ % Unfortunately, texindex is not prepared to handle braces in the % content at all. So for index sorting, we map @{ and @} to strings % starting with |, since that ASCII character is between ASCII { and }. - \def\{{|a}% - \def\lbracechar{|a}% + \ifusebracesinindexes + \def\lbracechar{\lbracecmd}% + \def\rbracechar{\rbracecmd}% + \else + \def\lbracechar{|a}% + \def\rbracechar{|b}% + \fi + \let\{=\lbracechar + \let\}=\rbracechar % - \def\}{|b}% - \def\rbracechar{|b}% % % Non-English letters. \def\AA{AA}% @@ -5724,13 +5743,16 @@ % % #1 is the text, #2 is the section type (Ynumbered, Ynothing, % Yappendix, Yomitfromtoc), #3 the chapter number. +% Not used for @heading series. % % To test against our argument. \def\Ynothingkeyword{Ynothing} -\def\Yomitfromtockeyword{Yomitfromtoc} \def\Yappendixkeyword{Yappendix} +\def\Yomitfromtockeyword{Yomitfromtoc} % \def\chapmacro#1#2#3{% + \checkenv{}% chapters, etc., should not start inside an environment. + % % Insert the first mark before the heading break (see notes for \domark). \let\prevchapterdefs=\lastchapterdefs \let\prevsectiondefs=\lastsectiondefs @@ -5783,6 +5805,7 @@ % {% \chapfonts \rmisbold + \let\footnote=\errfootnoteheading % give better error message % % Have to define \lastsection before calling \donoderef, because the % xref code eventually uses it. On the other hand, it has to be called @@ -5876,22 +5899,29 @@ % Print any size, any type, section title. % -% #1 is the text, #2 is the section level (sec/subsec/subsubsec), #3 is -% the section type for xrefs (Ynumbered, Ynothing, Yappendix), #4 is the -% section number. +% #1 is the text of the title, +% #2 is the section level (sec/subsec/subsubsec), +% #3 is the section type (Ynumbered, Ynothing, Yappendix, Yomitfromtoc), +% #4 is the section number. % \def\seckeyword{sec} % \def\sectionheading#1#2#3#4{% {% - \checkenv{}% should not be in an environment. + \def\sectionlevel{#2}% + \def\temptype{#3}% + % + % It is ok for the @heading series commands to appear inside an + % environment (it's been historically allowed, though the logic is + % dubious), but not the others. + \ifx\temptype\Yomitfromtockeyword\else + \checkenv{}% non-@*heading should not be in an environment. + \fi + \let\footnote=\errfootnoteheading % % Switch to the right set of fonts. \csname #2fonts\endcsname \rmisbold % - \def\sectionlevel{#2}% - \def\temptype{#3}% - % % Insert first mark before the heading break (see notes for \domark). \let\prevsectiondefs=\lastsectiondefs \ifx\temptype\Ynothingkeyword @@ -6318,6 +6348,7 @@ % other math active characters (just in case), to plain's definitions. \mathactive % + % Inverse of the list at the beginning of the file. \let\b=\ptexb \let\bullet=\ptexbullet \let\c=\ptexc @@ -6333,7 +6364,9 @@ \let\+=\tabalign \let\}=\ptexrbrace \let\/=\ptexslash + \let\sp=\ptexsp \let\*=\ptexstar + %\let\sup=\ptexsup % do not redefine, we want @sup to work in math mode \let\t=\ptext \expandafter \let\csname top\endcsname=\ptextop % we've made it outer \let\frenchspacing=\plainfrenchspacing @@ -6419,8 +6452,6 @@ % side, and for 6pt waste from % each corner char, and rule thickness \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip - % Flag to tell @lisp, etc., not to narrow margin. - \let\nonarrowing = t% % % If this cartouche directly follows a sectioning command, we need the % \parskip glue (backspaced over by default) or the cartouche can @@ -6587,9 +6618,13 @@ % @raggedright does more-or-less normal line breaking but no right -% justification. From plain.tex. +% justification. From plain.tex. Don't stretch around special +% characters in urls in this environment, since the stretch at the right +% should be enough. \envdef\raggedright{% - \rightskip0pt plus2em \spaceskip.3333em \xspaceskip.5em\relax + \rightskip0pt plus2.4em \spaceskip.3333em \xspaceskip.5em\relax + \def\urefprestretchamount{0pt}% + \def\urefpoststretchamount{0pt}% } \let\Eraggedright\par @@ -7397,7 +7432,6 @@ % % \anythingelse will almost certainly be an error of some kind. - % \mbodybackslash is the definition of \ in @macro bodies. % It maps \foo\ => \csname macarg.foo\endcsname => #N % where N is the macro parameter number. @@ -7482,7 +7516,7 @@ % Parse the optional {params} list. Set up \paramno and \paramlist % so \defmacro knows what to do. Define \macarg.BLAH for each BLAH -% in the params list to some hook where the argument si to be expanded. If +% in the params list to some hook where the argument is to be expanded. If % there are less than 10 arguments that hook is to be replaced by ##N where N % is the position in that list, that is to say the macro arguments are to be % defined `a la TeX in the macro body. @@ -7506,8 +7540,7 @@ % the catcode regime underwhich the body was input). % % If you compile with TeX (not eTeX), and you have macros with 10 or more -% arguments, you need that no macro has more than 256 arguments, otherwise an -% error is produced. +% arguments, no macro can have more than 256 arguments (else error). \def\parsemargdef#1;{% \paramno=0\def\paramlist{}% \let\hash\relax @@ -8342,8 +8375,6 @@ % % Auto-number footnotes. Otherwise like plain. \gdef\footnote{% - \let\indent=\ptexindent - \let\noindent=\ptexnoindent \global\advance\footnoteno by \@ne \edef\thisfootno{$^{\the\footnoteno}$}% % @@ -8367,6 +8398,11 @@ % \gdef\dofootnote{% \insert\footins\bgroup + % + % Nested footnotes are not supported in TeX, that would take a lot + % more work. (\startsavinginserts does not suffice.) + \let\footnote=\errfootnotenest + % % We want to typeset this text as a normal paragraph, even if the % footnote reference occurs in (for example) a display environment. % So reset some parameters. @@ -8404,13 +8440,24 @@ } }%end \catcode `\@=11 +\def\errfootnotenest{% + \errhelp=\EMsimple + \errmessage{Nested footnotes not supported in texinfo.tex, + even though they work in makeinfo; sorry} +} + +\def\errfootnoteheading{% + \errhelp=\EMsimple + \errmessage{Footnotes in chapters, sections, etc., are not supported} +} + % In case a @footnote appears in a vbox, save the footnote text and create % the real \insert just after the vbox finished. Otherwise, the insertion % would be lost. % Similarly, if a @footnote appears inside an alignment, save the footnote % text to a box and make the \insert when a row of the table is finished. % And the same can be done for other insert classes. --kasal, 16nov03. - +% % Replace the \insert primitive by a cheating macro. % Deeper inside, just make sure that the saved insertions are not spilled % out prematurely. @@ -8827,20 +8874,20 @@ { \catcode`\_ = \active \globaldefs=1 -\parseargdef\documentlanguage{\begingroup - \let_=\normalunderscore % normal _ character for filenames +\parseargdef\documentlanguage{% \tex % read txi-??.tex file in plain TeX. % Read the file by the name they passed if it exists. + \let_ = \normalunderscore % normal _ character for filename test \openin 1 txi-#1.tex \ifeof 1 - \documentlanguagetrywithoutunderscore{#1_\finish}% + \documentlanguagetrywithoutunderscore #1_\finish \else \globaldefs = 1 % everything in the txi-LL files needs to persist \input txi-#1.tex \fi \closein 1 \endgroup % end raw TeX -\endgroup} +} % % If they passed de_DE, and txi-de_DE.tex doesn't exist, % try txi-de.tex. @@ -9250,6 +9297,18 @@ \UTFviiiLoop \endgroup +\def\globallet{\global\let} % save some \expandafter's below + +% @U{xxxx} to produce U+xxxx, if we support it. +\def\U#1{% + \expandafter\ifx\csname uni:#1\endcsname \relax + \errhelp = \EMsimple + \errmessage{Unicode character U+#1 not supported, sorry}% + \else + \csname uni:#1\endcsname + \fi +} + \begingroup \catcode`\"=12 \catcode`\<=12 @@ -9258,7 +9317,6 @@ \catcode`\;=12 \catcode`\!=12 \catcode`\~=13 - \gdef\DeclareUnicodeCharacter#1#2{% \countUTFz = "#1\relax %\wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}% @@ -9273,6 +9331,8 @@ \expandafter\expandafter\expandafter\expandafter \expandafter\expandafter\expandafter \gdef\UTFviiiTmp{#2}% + % define an additional control sequence for this code point. + \expandafter\globallet\csname uni:#1\endcsname \UTFviiiTmp \endgroup} \gdef\parseXMLCharref{% diff -Nru bison-3.0.2.dfsg/build-aux/update-b4-copyright bison-3.0.4.dfsg/build-aux/update-b4-copyright --- bison-3.0.2.dfsg/build-aux/update-b4-copyright 2013-08-02 15:35:13.000000000 +0000 +++ bison-3.0.4.dfsg/build-aux/update-b4-copyright 2015-01-16 14:47:42.000000000 +0000 @@ -3,7 +3,7 @@ # Update b4_copyright invocations or b4_copyright_years definitions to # include the current year. -# Copyright (C) 2009-2013 Free Software Foundation, Inc. +# Copyright (C) 2009-2015 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff -Nru bison-3.0.2.dfsg/build-aux/update-copyright bison-3.0.4.dfsg/build-aux/update-copyright --- bison-3.0.2.dfsg/build-aux/update-copyright 2013-08-02 15:03:12.000000000 +0000 +++ bison-3.0.4.dfsg/build-aux/update-copyright 2015-01-23 10:24:53.000000000 +0000 @@ -3,9 +3,9 @@ if 0; # Update an FSF copyright year list to include the current year. -my $VERSION = '2013-01-03.09:41'; # UTC +my $VERSION = '2015-01-15.20:53'; # UTC -# Copyright (C) 2009-2013 Free Software Foundation, Inc. +# Copyright (C) 2009-2015 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -124,7 +124,7 @@ use warnings; my $copyright_re = 'Copyright'; -my $circle_c_re = '(?:\([cC]\)|@copyright{}|©)'; +my $circle_c_re = '(?:\([cC]\)|@copyright{}|\\\\\(co|©)'; my $holder = $ENV{UPDATE_COPYRIGHT_HOLDER}; $holder ||= 'Free Software Foundation, Inc.'; my $prefix_max = 5; diff -Nru bison-3.0.2.dfsg/build-aux/useless-if-before-free bison-3.0.4.dfsg/build-aux/useless-if-before-free --- bison-3.0.2.dfsg/build-aux/useless-if-before-free 2013-08-02 15:03:12.000000000 +0000 +++ bison-3.0.4.dfsg/build-aux/useless-if-before-free 2015-01-04 16:43:50.000000000 +0000 @@ -10,7 +10,7 @@ # If you change this file with Emacs, please let the write hook # do its job. Otherwise, update this string manually. -# Copyright (C) 2008-2013 Free Software Foundation, Inc. +# Copyright (C) 2008-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff -Nru bison-3.0.2.dfsg/build-aux/vc-list-files bison-3.0.4.dfsg/build-aux/vc-list-files --- bison-3.0.2.dfsg/build-aux/vc-list-files 2013-08-02 15:03:12.000000000 +0000 +++ bison-3.0.4.dfsg/build-aux/vc-list-files 2015-01-04 16:43:50.000000000 +0000 @@ -4,7 +4,7 @@ # Print a version string. scriptversion=2011-05-16.22; # UTC -# Copyright (C) 2006-2013 Free Software Foundation, Inc. +# Copyright (C) 2006-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff -Nru bison-3.0.2.dfsg/build-aux/ylwrap bison-3.0.4.dfsg/build-aux/ylwrap --- bison-3.0.2.dfsg/build-aux/ylwrap 2013-12-05 13:41:25.000000000 +0000 +++ bison-3.0.4.dfsg/build-aux/ylwrap 2015-01-23 10:28:30.000000000 +0000 @@ -3,7 +3,7 @@ scriptversion=2013-01-12.17; # UTC -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. # # Written by Tom Tromey . # diff -Nru bison-3.0.2.dfsg/cfg.mk bison-3.0.4.dfsg/cfg.mk --- bison-3.0.2.dfsg/cfg.mk 2013-11-12 17:37:14.000000000 +0000 +++ bison-3.0.4.dfsg/cfg.mk 2015-01-16 14:47:42.000000000 +0000 @@ -1,5 +1,5 @@ # Customize maint.mk -*- makefile -*- -# Copyright (C) 2008-2013 Free Software Foundation, Inc. +# Copyright (C) 2008-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff -Nru bison-3.0.2.dfsg/ChangeLog bison-3.0.4.dfsg/ChangeLog --- bison-3.0.2.dfsg/ChangeLog 2013-12-05 14:16:14.000000000 +0000 +++ bison-3.0.4.dfsg/ChangeLog 2015-01-23 13:13:26.000000000 +0000 @@ -1,3 +1,557 @@ +2015-01-23 Akim Demaille + + version 3.0.4 + * NEWS: Record release date. + +2015-01-23 Akim Demaille + + gnulib: update + +2015-01-23 Akim Demaille + + build: re-enable compiler warnings, and fix them + There are warnings (-Wextra) in generated C++ code: + + ltlparse.cc: In member function 'ltlyy::parser::symbol_number_type + ltlyy::parser::by_state::type_get() const': + ltlparse.cc:452:33: warning: enumeral and non-enumeral type in + conditional expression + return state == empty_state ? empty_symbol : yystos_[state]; + + Reported by Alexandre Duret-Lutz. + + It turns out that -Wall and -Wextra were disabled because of a stupid + typo. + + * configure.ac: Fix the stupid typo. + * data/lalr1.cc, src/AnnotationList.c, src/InadequacyList.c, + * src/ielr.c, src/print.c, src/scan-code.l, src/symlist.c, + * src/symlist.h, src/symtab.c, src/tables.c, tests/actions.at, + * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at, + * tests/named-refs.at, tests/torture.at: + Fix warnings, mostly issues about variables used only with assertions, + which are disabled with -DNDEBUG. + +2015-01-22 Akim Demaille + + tests: c++: fix a C++03 conformance issue + This fixes test 241 on xLC: + + "input.y", line 42.11: 1540-0274 (S) The name lookup for "report" did not find a declaration. + "input.y", line 42.11: 1540-1292 (I) Static declarations are not considered for a function call if the function is not qualified. + + where report is: + + static void + report (std::ostream& yyo, int ival, float fval) + { + yyo << "ival: " << ival << ", fval: " << fval; + } + + and line 42 is: + + %printer { report (yyo, $$, $$); } ; + + It turns out that indeed this function must not be declared static, + . Let's put it into an + anonymous namespace. + + Reported by Thomas Jahns. + http://lists.gnu.org/archive/html/bug-bison/2015-01/msg00059.html + + * tests/actions.at (Qualified $$ in actions): Don't use "static", + prefer anonymous namespace. + +2015-01-20 Akim Demaille + + tests: fix a title + * tests/conflicts.at: De-overquote. + +2015-01-20 Akim Demaille + + c++: reserve 200 slots in the parser's stack + This is consistent with what is done with yacc.c and glr.c. Because + it also avoids that the stack needs to be resized very soon, it should + help keeping tests about destructors more reliable. + + Indeed, if the stack is created too small, very soon the C++ library + needs to enlarge it, which means creating a new one, copying the + elements from the initial one onto it, and then destroy the elements + of the initial stack: that would be a spurious call to a destructor. + + Reported by Thomas Jahns. + http://lists.gnu.org/archive/html/bug-bison/2015-01/msg00059.html + + * data/stack.hh (stack::stack): Reserve 200 slots. + * tests/c++.at: Remove traces of stack expansions. + +2015-01-20 Akim Demaille + + tests: be more robust to unrecognized synclines, and try to recognize xlc + Reported by Thomas Jahns. + http://lists.gnu.org/archive/html/bug-bison/2015-01/msg00059.html + + * tests/synclines.at (AT_SYNCLINES_COMPILE): Rename as... + (_AT_SYNCLINES_COMPILE): this. + Try to recognize xlc locations. + (AT_SYNCLINES_COMPILE): New. Skips the test if we can't read the + synclines. + +2015-01-20 Akim Demaille + + tests: fix C++ conformance + Reported by Thomas Jahns. + http://lists.gnu.org/archive/html/bug-bison/2015-01/msg00059.html + + * tests/c++.at (Exception safety): Add missing include. + Don't use const_iterator for erase. + +2015-01-18 Akim Demaille + + build: fix some warnings + Reported by John Horigan. + http://lists.gnu.org/archive/html/bug-bison/2015-01/msg00034.html + + * src/graphviz.c, src/symtab.h: Address compiler warnings. + +2015-01-16 Akim Demaille + + build: avoid infinite recursions on include_next + On MacOS X 10.5 PPC with Apple's GCC 4.0.1: + + % uname -a + Darwin aria.cielonegro.org 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:57:0 + 1 PDT 2009; root:xnu-1228.15.4~1/RELEASE_PPC Power Macintosh + % gcc --version + powerpc-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5493) + Copyright (C) 2005 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. + + building in place enters into an infinite recursion on "#include_next": + + % gmake V=1 + [snip] + depbase=`echo lib/math.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\ + gcc -std=gnu99 -I. -Ilib -I. -I./lib -g -O2 -MT lib/math.o -MD -MP -MF $depbase.Tpo -c -o lib/math.o lib/math.c &&\ + mv -f $depbase.Tpo $depbase.Po + In file included from lib/math.h:27, + from lib/math.h:27, + from lib/math.h:27, + from lib/math.h:27, + [snip] + from lib/math.h:27, + from lib/math.h:27, + from lib/math.c:3: + lib/math.h:27:23: error: #include nested too deeply + Makefile:3414: recipe for target 'lib/math.o' failed + gmake[2]: *** [lib/math.o] Error 1 + + Using -I./lib instead of -Ilib fixes the problem. + + Reported by Pho. + + + * Makefile.am (AM_CPPFLAGS): Use -I./lib instead of -Ilib. + +2015-01-16 Akim Demaille + + doc: minor fixes + * doc/bison.texi: Fix warnings about colon in reference names. + * data/bison.m4, src/files.h: Fix comments. + * doc/Doxyfile.in: update. + +2015-01-15 Akim Demaille + + gnulib: strtoul is considered obsolete and now useless + * bootstrap.conf: here. + +2015-01-15 Akim Demaille + + c++: avoid warnings when destructors don't use $$ + * data/c++.m4: here. + +2015-01-15 Akim Demaille + + maint: post-release administrivia + * NEWS: Add header line for next release. + * .prev-version: Record previous version. + * cfg.mk (old_NEWS_hash): Auto-update. + +2015-01-15 Akim Demaille + + version 3.0.3 + * NEWS: Record release date. + +2015-01-15 Akim Demaille + + gnulib: update + +2015-01-13 Akim Demaille + + tests: split a large test case into several smaller ones + * tests/conflicts.at (AT_CONSISTENT_ERRORS_CHECK): Move AT_SETUP/AT_CLEANUP + into it, so that we don't skip non Java tests following a test case in Java. + +2015-01-12 Akim Demaille + + package: a bit of trouble shooting indications + * README-hacking: here. + +2015-01-12 Akim Demaille + + doc: liby's main arms the internationalization + Reported by Nicolas Bedon. + + + * doc/bison.texi (Yacc Library): Document the call the setlocale. + +2015-01-09 Akim Demaille + + bison: avoid warnings from static code analysis + A static analysis tool reports that some callers of symbol_list_n_get + might get NULL and not handle it properly. This is not the case, yet + we can suppress this pattern. + + Reported by Mike Sullivan. + + + * src/symlist.c (symbol_list_n_get): Actually it is never called + to return 0. Enforce this postcondition via aver. + (symbol_list_n_type_name_get): Simplify accordingly. In particular, + discards a (translated) useless error message. + * src/symlist.h: Adjust documentation. + * src/scan-code.l: Style change. + +2015-01-09 Akim Demaille + + c++: fix the use of destructors when variants are enabled + When using variants, destructors generate invalid code. + + Reported by Michael Catanzaro. + + * data/c++.m4 (~basic_symbol): b4_symbol_foreach works on yysym: + define it. + * tests/c++.at (Variants): Check it. + +2015-01-08 Akim Demaille + + style: tests: simplify the handling of some C++ tests + * tests/c++.at: here. + (Doxygen): Pass %define, so that files such as position.hh etc. + are generated, instead of putting everything into input.hh. + +2015-01-08 Akim Demaille + + c++: symbols can be empty, so use it + The previous patches ensure that symbols (symbol_type and + stack_symbol_type) can be empty, cleared, and their emptiness can be + checked. Therefore, yyempty, which codes whether yyla is empty or + not, is now useless. + + In C skeletons (e.g., yacc.c), the fact that the lookahead is empty is + coded by "yychar = YYEMPTY", which is exactly what this patch + restores, since yychar/yytoken corresponds to yyla.type. + + * data/lalr1.cc (yyempty): Remove. + Rather, depend on yyla.empty (). + +2015-01-08 Akim Demaille + + c++: variants: don't leak the lookahead in error recovery + During error recovery, when discarding the lookeahead, we don't + destroy it, which is caught by parse.assert assertions. + + Reported by Antonio Silva Correia. + With an analysis and suggested patch from Michel d'Hooge. + + + * tests/c++.at (Variants): Strengthen the test to try syntax errors + with discarded lookahead. + +2015-01-08 Akim Demaille + + c++: provide a means to clear symbols + The symbol destructor is currently the only means to clear a symbol. + Unfortunately during error recovery we might have to clear the + lookahead, which is a local variable (yyla) that has not yet reached + its end of scope. + + Rather that duplicating the code to destroy a symbol, or rather than + destroying and recreating yyla, let's provide a means to clear a + symbol. + + Reported by Antonio Silva Correia, with an analysis from Michel d'Hooge. + + + * data/c++.m4, data/lalr1.cc (basis_symbol::clear, by_state::clear) + (by_type::clear): New. + (basic_symbol::~basic_symbol): Use clear. + +2015-01-08 Akim Demaille + + c++: clean up the handling of empty symbols + * data/c++.m4, data/lalr1.cc (yyempty_): Remove, replaced by... + (empty_symbol, by_state::empty_state): these. + (basic_symbol::empty): New. + +2015-01-08 Akim Demaille + + c++: comment and style changes + * data/c++.m4, data/lalr1.cc: More documentation. + Tidy. + * tests/c++.at (string_cast): Rename as... + (to_string): this C++11 name. + +2015-01-07 Akim Demaille + + c++: variants: comparing addresses of typeid.name() is undefined + Instead of storing and comparing pointers to names of types, store + pointers to the typeids, and compares the typeids. + Reported by Thomas Jahns. + + + * data/variant.hh (yytname_): Replace with... + (yytypeid_): this. + +2015-01-05 Akim Demaille + + c++: locations: complete the API and fix comments + There are no support for += between locations, and some comments are wrong. + Reported by Alexandre Duret-Lutz. + + * data/location.cc: Fix. + * doc/bison.texi: Document. + * tests/c++.at: Check. + +2015-01-05 Akim Demaille + + build: do not clean figure sources in make clean + "make clean && make" fails in in-tree builds. + + * doc/local.mk (CLEANDIRS): Replace with... + (CLEANFILES): this safer list of files to clean. + +2015-01-05 Akim Demaille + + build: don't try to generate docs when cross-compiling + When cross-compiling don't run the generated bison to update the docs. + Reported by Aaro Koskinen. + + + * configure.ac (CROSS_COMPILING): New. + * doc/local.mk: Use it. + +2015-01-04 Akim Demaille + + package: fix a reporter's name + * THANKS, build-aux/git-log-fix: s/Bernd Edligner/Bernd Edlinger/. + +2015-01-04 Akim Demaille + + %union: fix the support for named %union + Bison supports a union tag, for obscure reasons. But it does a poor + job at it, especially since Bison 3.0. + Reported by Stephen Cameron and Tobias Frost. + + It did not ensure that the name was not given several times. An easy + way to do this is to make the %union tag be handled as a %define + variable, as they cannot be defined several times. + + Since Bison 3.0, the synclines were wrongly placed, resulting in + invalid code. Addressing this issue, because of the way the union tag + was stored (as a code muscle), would have been tedious. Unless we + rather define the %union tag as a %percent variable, whose synclines + are easier to manipulate. + + So replace the b4_union_name muscle by the api.value.union.name + %define variable, document, and check. + + * data/bison.m4: Make sure that api.value.union.name has a keyword value. + * data/c++.m4: Make sure that api.value.union.name is not defined. + * data/c.m4 (b4_union_name): No longer use it, use api.value.union.name. + * doc/bison.texi (%define Summary): Document it. + * src/parse-gram.y (union_name): No longer define b4_uion_name, but + api.value.union.name. + * tests/input.at (Redefined %union name): New. + * tests/synclines.at (%union name syncline): New. + * tests/types.at: Check named %unions. + +2015-01-04 Akim Demaille + + package: bump to 2015 + Which also requires: + + * gnulib: Update. + +2014-12-31 Akim Demaille + + flex: don't trust YY_USER_INIT + Reported by Bernd Edlinger and others. + + * src/scan-gram.l: here. + +2014-12-31 Akim Demaille + + yacc.c: fix broken union when api.value.type=union and %defines are used + Reported by Rich Wilson. + + * data/c.m4 (b4_symbol_type_register): Append to b4_union_members, + not b4_user_union_members. + The latter invokes the former, but it is the former which is reinitialized + to empty by b4_value_type_setup_union. + * tests/types.at: Check it. + + This reveals another bug, this time in the case of glr.c parsers. + + * data/glr.c: Generate the header file before the implementation file, + to be sure that the setup is run before what depends on it. + +2014-12-31 Akim Demaille + + doc: fix missing xref + Reported by xolodho. + + * doc/bison.texi (Printer Decl): here. + +2014-12-29 Akim Demaille + + gnulib: update + +2014-02-03 Akim Demaille + + location: remove some ugly debugging code traces + * data/location.cc: here. + +2014-02-03 Akim Demaille + + build: use abort to pacify compiler errors + clang, with -DNDEBUG and -Werror fails on some functions that might + lack a return. This is because aver is just another assert, discarded + with -DNDEBUG. So use abort. + + * src/muscle-tab.c, src/scan-skel.l: here. + +2014-02-03 Akim Demaille + + package: bump to 2014 + * AUTHORS, ChangeLog-2012, Makefile.am, NEWS, PACKAGING, README, + * README-alpha, README-hacking, THANKS, TODO, bootstrap.conf, + * build-aux/darwin11.4.0.valgrind, build-aux/local.mk, + * build-aux/update-b4-copyright, + * build-aux/update-package-copyright-year, cfg.mk, configure.ac, + * data/README, data/bison.m4, data/c++-skel.m4, data/c++.m4, + * data/c-like.m4, data/c-skel.m4, data/c.m4, data/glr.c, data/glr.cc, + * data/java-skel.m4, data/java.m4, data/lalr1.cc, data/lalr1.java, + * data/local.mk, data/location.cc, data/stack.hh, data/variant.hh, + * data/xslt/bison.xsl, data/xslt/xml2dot.xsl, data/xslt/xml2text.xsl, + * data/xslt/xml2xhtml.xsl, data/yacc.c, djgpp/Makefile.maint, + * djgpp/README.in, djgpp/config.bat, djgpp/config.sed, + * djgpp/config.site, djgpp/config_h.sed, djgpp/djunpack.bat, + * djgpp/local.mk, djgpp/subpipe.c, djgpp/subpipe.h, + * djgpp/testsuite.sed, doc/bison.texi, doc/local.mk, doc/refcard.tex, + * etc/README, etc/bench.pl.in, etc/local.mk, + * examples/calc++/calc++.test, examples/calc++/local.mk, + * examples/extexi, examples/local.mk, examples/mfcalc/local.mk, + * examples/mfcalc/mfcalc.test, examples/rpcalc/local.mk, + * examples/rpcalc/rpcalc.test, examples/test, examples/variant.yy, + * lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c, + * lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h, + * lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c, + * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c, + * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h, + * lib/local.mk, lib/main.c, lib/timevar.c, lib/timevar.def, + * lib/timevar.h, lib/vbitset.c, lib/vbitset.h, lib/yyerror.c, + * m4/bison-i18n.m4, m4/c-working.m4, m4/cxx.m4, m4/flex.m4, + * m4/timevar.m4, src/AnnotationList.c, src/AnnotationList.h, + * src/InadequacyList.c, src/InadequacyList.h, src/LR0.c, src/LR0.h, + * src/Sbitset.c, src/Sbitset.h, src/assoc.c, src/assoc.h, + * src/closure.c, src/closure.h, src/complain.c, src/complain.h, + * src/conflicts.c, src/conflicts.h, src/derives.c, src/derives.h, + * src/files.c, src/files.h, src/flex-scanner.h, src/getargs.c, + * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c, + * src/graphviz.h, src/ielr.c, src/ielr.h, src/lalr.c, src/lalr.h, + * src/local.mk, src/location.c, src/location.h, src/main.c, + * src/muscle-tab.c, src/muscle-tab.h, src/named-ref.c, + * src/named-ref.h, src/nullable.c, src/nullable.h, src/output.c, + * src/output.h, src/parse-gram.c, src/parse-gram.y, src/print-xml.c, + * src/print-xml.h, src/print.c, src/print.h, src/print_graph.c, + * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c, + * src/reduce.h, src/relation.c, src/relation.h, src/scan-code.h, + * src/scan-code.l, src/scan-gram.h, src/scan-gram.l, src/scan-skel.h, + * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c, + * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h, + * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h, + * tests/actions.at, tests/atlocal.in, tests/bison.in, tests/c++.at, + * tests/calc.at, tests/conflicts.at, tests/cxx-type.at, + * tests/existing.at, tests/glr-regression.at, tests/headers.at, + * tests/input.at, tests/java.at, tests/javapush.at, tests/local.at, + * tests/local.mk, tests/named-refs.at, tests/output.at, tests/push.at, + * tests/reduce.at, tests/regression.at, tests/sets.at, + * tests/skeletons.at, tests/synclines.at, tests/testsuite.at, + * tests/torture.at, tests/types.at: + here. + +2014-01-03 Paul Eggert + + doc: specify documentation encoding + * doc/bison.texi: Add '@documentencoding UTF-8'; needed since the + manual contains UTF-8 characters. This will cause the .info files + to contain UTF-8 quotes and the like, which should be OK nowadays. + Add @documentlanguage while we're at it. + +2013-12-09 Akim Demaille + + package: install the examples + Currently, we do not install the various examples extracted from the + documentation. Let's do it, as they are useful starting points. + + * configure.ac: When --enable-gcc-warnings is set, enable ENABLE_GCC_WARNINGS. + * examples/extexi: No longer issue synclines by default. + * examples/local.mk: Except if ENABLE_GCC_WARNINGS. + * examples/calc++/local.mk, examples/mfcalc/local.mk, + * examples/rpcalc/local.mk: Install the example files. + +2013-12-09 Akim Demaille + + package: install README and the like in docdir + * Makefile.am: here. + +2013-12-09 Akim Demaille + + diagnostics: fix the order of multiple declarations reports + On + + %token FOO "foo" + %printer {} "foo" + %printer {} FOO + + we report + + /tmp/foo.yy:2.10-11: error: %printer redeclaration for FOO + %printer {} "foo" + ^^ + /tmp/foo.yy:3.10-11: previous declaration + %printer {} FOO + ^^ + + * src/symtab.c (locations_sort): New. + Use it. + * tests/input.at (Invalid Aliases): Stress the order of diagnostics. + +2013-12-09 Akim Demaille + + symbol: provide an easy means to compare them in source order + * src/symtab.c (symbols_sort): New. + (user_token_number_redeclaration): Taken from here. + +2013-12-05 Akim Demaille + + maint: post-release administrivia + * NEWS: Add header line for next release. + * .prev-version: Record previous version. + * cfg.mk (old_NEWS_hash): Auto-update. + 2013-12-05 Akim Demaille version 3.0.2 diff -Nru bison-3.0.2.dfsg/ChangeLog-2012 bison-3.0.4.dfsg/ChangeLog-2012 --- bison-3.0.2.dfsg/ChangeLog-2012 2013-08-02 15:35:13.000000000 +0000 +++ bison-3.0.4.dfsg/ChangeLog-2012 2015-01-16 14:47:42.000000000 +0000 @@ -26733,7 +26733,7 @@ ----- - Copyright (C) 1987-1988, 1991-2013 Free Software Foundation, + Copyright (C) 1987-1988, 1991-2015 Free Software Foundation, Inc. Copying and distribution of this file, with or without diff -Nru bison-3.0.2.dfsg/configure bison-3.0.4.dfsg/configure --- bison-3.0.2.dfsg/configure 2013-12-05 13:58:51.000000000 +0000 +++ bison-3.0.4.dfsg/configure 2015-01-23 12:54:23.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for GNU Bison 3.0.2. +# Generated by GNU Autoconf 2.69 for GNU Bison 3.0.4. # # Report bugs to . # @@ -580,8 +580,8 @@ # Identity of this package. PACKAGE_NAME='GNU Bison' PACKAGE_TARNAME='bison' -PACKAGE_VERSION='3.0.2' -PACKAGE_STRING='GNU Bison 3.0.2' +PACKAGE_VERSION='3.0.4' +PACKAGE_STRING='GNU Bison 3.0.4' PACKAGE_BUGREPORT='bug-bison@gnu.org' PACKAGE_URL='http://www.gnu.org/software/bison/' @@ -659,6 +659,8 @@ HAVE_GCJ_IN_PATH GCC AUTOM4TE +CROSS_COMPILING_FALSE +CROSS_COMPILING_TRUE VALGRIND_PREBISON VALGRIND aclocaldir @@ -678,7 +680,6 @@ MSGFMT GETTEXT_MACRO_VERSION USE_NLS -SED LIBBISON_LTLIBDEPS LIBBISON_LIBDEPS gltests_WITNESS @@ -707,11 +708,14 @@ HAVE_UNISTD_H NEXT_AS_FIRST_DIRECTIVE_UNISTD_H NEXT_UNISTD_H +UNISTD_H_DEFINES_STRUCT_TIMESPEC PTHREAD_H_DEFINES_STRUCT_TIMESPEC SYS_TIME_H_DEFINES_STRUCT_TIMESPEC TIME_H_DEFINES_STRUCT_TIMESPEC NEXT_AS_FIRST_DIRECTIVE_TIME_H NEXT_TIME_H +REPLACE_LOCALTIME +REPLACE_GMTIME REPLACE_TIMEGM REPLACE_NANOSLEEP REPLACE_MKTIME @@ -743,6 +747,7 @@ GL_GENERATE_STDDEF_H_TRUE STDDEF_H HAVE_WCHAR_T +HAVE_MAX_ALIGN_T REPLACE_NULL HAVE__BOOL GL_GENERATE_STDBOOL_H_FALSE @@ -777,6 +782,7 @@ GNULIB_RAISE GNULIB_PTHREAD_SIGMASK ASM_SYMBOL_PREFIX +LIB_POSIX_SPAWN REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE @@ -974,6 +980,7 @@ GNULIB_BTOWC NEXT_AS_FIRST_DIRECTIVE_MATH_H NEXT_MATH_H +SED LTLIBMULTITHREAD LIBMULTITHREAD LTLIBTHREAD @@ -1033,6 +1040,14 @@ HAVE_WCHAR_H HAVE_UNSIGNED_LONG_LONG_INT HAVE_LONG_LONG_INT +NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H +NEXT_SYS_TIME_H +REPLACE_STRUCT_TIMEVAL +REPLACE_GETTIMEOFDAY +HAVE_SYS_TIME_H +HAVE_STRUCT_TIMEVAL +HAVE_GETTIMEOFDAY +GNULIB_GETTIMEOFDAY LTLIBINTL LIBINTL GNULIB_GL_UNISTD_H_GETOPT @@ -1478,9 +1493,11 @@ REPLACE_UNLINKAT REPLACE_UNLINK REPLACE_TTYNAME_R +REPLACE_SYMLINKAT REPLACE_SYMLINK REPLACE_SLEEP REPLACE_RMDIR +REPLACE_READLINKAT REPLACE_READLINK REPLACE_READ REPLACE_PWRITE @@ -1599,6 +1616,7 @@ REPLACE_REALPATH REPLACE_REALLOC REPLACE_RANDOM_R +REPLACE_QSORT_R REPLACE_PUTENV REPLACE_PTSNAME_R REPLACE_PTSNAME @@ -1650,6 +1668,7 @@ GNULIB_REALLOC_POSIX GNULIB_RANDOM_R GNULIB_RANDOM +GNULIB_QSORT_R GNULIB_PUTENV GNULIB_PTSNAME_R GNULIB_PTSNAME @@ -1704,6 +1723,8 @@ WARN_CFLAGS_TEST WERROR_CFLAGS WARN_CFLAGS +ENABLE_GCC_WARNINGS_FALSE +ENABLE_GCC_WARNINGS_TRUE host_os host_vendor host_cpu @@ -2380,7 +2401,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures GNU Bison 3.0.2 to adapt to many kinds of systems. +\`configure' configures GNU Bison 3.0.4 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -2450,7 +2471,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of GNU Bison 3.0.2:";; + short | recursive ) echo "Configuration of GNU Bison 3.0.4:";; esac cat <<\_ACEOF @@ -2468,7 +2489,9 @@ --enable-threads={posix|solaris|pth|windows} specify multithreading API --disable-threads build without multithread safety - --enable-gcc-warnings turn on lots of GCC warnings (not recommended) + --enable-gcc-warnings turn on lots of GCC warnings (not recommended). + Also, issue synclines from the examples/ to + the corresponding source in the Texinfo doc. --disable-yacc do not build a yacc command or an -ly library --disable-assert turn off assertions --disable-rpath do not hardcode runtime library paths @@ -2575,7 +2598,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -GNU Bison configure 3.0.2 +GNU Bison configure 3.0.4 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -3368,7 +3391,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by GNU Bison $as_me 3.0.2, which was +It was created by GNU Bison $as_me 3.0.4, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3651,6 +3674,7 @@ as_fn_append ac_header_list " locale.h" as_fn_append ac_func_list " _set_invalid_parameter_handler" as_fn_append ac_header_list " sys/socket.h" +as_fn_append ac_func_list " getdtablesize" as_fn_append ac_header_list " unistd.h" as_fn_append ac_func_list " fcntl" as_fn_append ac_func_list " symlink" @@ -3660,9 +3684,10 @@ as_fn_append ac_func_list " snprintf" as_fn_append ac_func_list " __fseterr" as_fn_append ac_header_list " sys/stat.h" -as_fn_append ac_func_list " getdtablesize" gl_getopt_required=GNU as_fn_append ac_header_list " getopt.h" +as_fn_append ac_header_list " sys/time.h" +as_fn_append ac_func_list " gettimeofday" as_fn_append ac_header_list " wchar.h" as_fn_append ac_header_list " stdint.h" as_fn_append ac_header_list " inttypes.h" @@ -3678,7 +3703,6 @@ as_fn_append ac_func_list " strerror_r" as_fn_append ac_func_list " __xpg_strerror_r" as_fn_append ac_func_list " pipe2" -as_fn_append ac_func_list " posix_spawn" gl_printf_safe=yes as_fn_append ac_header_list " sched.h" as_fn_append ac_func_list " sigaction" @@ -3689,7 +3713,6 @@ as_fn_append ac_func_list " catgets" as_fn_append ac_func_list " strndup" as_fn_append ac_header_list " sys/wait.h" -as_fn_append ac_header_list " sys/time.h" as_fn_append ac_func_list " pipe" as_fn_append ac_func_list " iswcntrl" as_fn_append ac_header_list " wctype.h" @@ -3764,7 +3787,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -PACKAGE_COPYRIGHT_YEAR=2013 +PACKAGE_COPYRIGHT_YEAR=2015 cat >>confdefs.h <<_ACEOF @@ -3811,7 +3834,7 @@ # releases, we want to be able run make dist without being required to # add a bogus NEWS entry. In that case, the version string # automatically contains a dash, which we also let disable gnits. -am__api_version='1.14' +am__api_version='1.15' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -3983,8 +4006,8 @@ ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in @@ -4003,7 +4026,7 @@ $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi -if test x"${install_sh}" != xset; then +if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; @@ -4297,7 +4320,7 @@ # Define the identity of the package. PACKAGE='bison' - VERSION='3.0.2' + VERSION='3.0.4' cat >>confdefs.h <<_ACEOF @@ -4331,8 +4354,8 @@ # mkdir_p='$(MKDIR_P)' -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' @@ -4389,6 +4412,7 @@ as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi + # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; @@ -6848,6 +6872,8 @@ $as_echo "#define _GNU_SOURCE 1" >>confdefs.h + $as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h + $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h @@ -7261,6 +7287,7 @@ # Code from module absolute-header: + # Code from module alignof: # Code from module alloca-opt: # Code from module announce-gen: # Code from module argmatch: @@ -7316,6 +7343,7 @@ # Code from module getopt-posix: # Code from module gettext: # Code from module gettext-h: + # Code from module gettimeofday: # Code from module git-version-gen: # Code from module gitlog-to-changelog: # Code from module gnu-web-doc-update: @@ -7419,9 +7447,9 @@ # Code from module string: # Code from module strndup: # Code from module strnlen: - # Code from module strtoul: # Code from module strverscmp: # Code from module sys_stat: + # Code from module sys_time: # Code from module sys_types: # Code from module sys_wait: # Code from module threadlib: @@ -7506,8 +7534,16 @@ enable_gcc_warnings=no fi + if test "$enable_gcc_warnings" = yes; then + ENABLE_GCC_WARNINGS_TRUE= + ENABLE_GCC_WARNINGS_FALSE='#' +else + ENABLE_GCC_WARNINGS_TRUE='#' + ENABLE_GCC_WARNINGS_FALSE= +fi + if test "$enable_gcc_warnings" = yes; then - warn_common='-Wall-Wextra -Wno-sign-compare -Wcast-align -Wdocumentation + warn_common='-Wall -Wextra -Wno-sign-compare -Wcast-align -Wdocumentation -Wformat -Wpointer-arith -Wwrite-strings' warn_c='-Wbad-function-cast -Wshadow -Wstrict-prototypes' warn_cxx='-Wnoexcept' @@ -9242,6 +9278,7 @@ GNULIB_PTSNAME=0; GNULIB_PTSNAME_R=0; GNULIB_PUTENV=0; + GNULIB_QSORT_R=0; GNULIB_RANDOM=0; GNULIB_RANDOM_R=0; GNULIB_REALLOC_POSIX=0; @@ -9293,6 +9330,7 @@ REPLACE_PTSNAME=0; REPLACE_PTSNAME_R=0; REPLACE_PUTENV=0; + REPLACE_QSORT_R=0; REPLACE_RANDOM_R=0; REPLACE_REALLOC=0; REPLACE_REALPATH=0; @@ -9445,9 +9483,11 @@ REPLACE_PWRITE=0; REPLACE_READ=0; REPLACE_READLINK=0; + REPLACE_READLINKAT=0; REPLACE_RMDIR=0; REPLACE_SLEEP=0; REPLACE_SYMLINK=0; + REPLACE_SYMLINKAT=0; REPLACE_TTYNAME_R=0; REPLACE_UNLINK=0; REPLACE_UNLINKAT=0; @@ -9540,6 +9580,8 @@ + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5 $as_echo_n "checking if environ is properly declared... " >&6; } if ${gt_cv_var_environ_declaration+:} false; then : @@ -10565,7 +10607,7 @@ # Guess yes on glibc systems. *-gnu*) gl_cv_func_printf_sizes_c99="guessing yes";; # Guess yes on FreeBSD >= 5. - freebsd[1-4]*) gl_cv_func_printf_sizes_c99="guessing no";; + freebsd[1-4].*) gl_cv_func_printf_sizes_c99="guessing no";; freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";; # Guess yes on Mac OS X >= 10.3. darwin[1-6].*) gl_cv_func_printf_sizes_c99="guessing no";; @@ -10707,7 +10749,7 @@ # Guess yes on glibc systems. *-gnu*) gl_cv_func_printf_infinite="guessing yes";; # Guess yes on FreeBSD >= 6. - freebsd[1-5]*) gl_cv_func_printf_infinite="guessing no";; + freebsd[1-5].*) gl_cv_func_printf_infinite="guessing no";; freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";; # Guess yes on Mac OS X >= 10.3. darwin[1-6].*) gl_cv_func_printf_infinite="guessing no";; @@ -11106,7 +11148,7 @@ # Guess yes on glibc systems. *-gnu*) gl_cv_func_printf_infinite_long_double="guessing yes";; # Guess yes on FreeBSD >= 6. - freebsd[1-5]*) gl_cv_func_printf_infinite_long_double="guessing no";; + freebsd[1-5].*) gl_cv_func_printf_infinite_long_double="guessing no";; freebsd* | kfreebsd*) gl_cv_func_printf_infinite_long_double="guessing yes";; # Guess yes on HP-UX >= 11. hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite_long_double="guessing no";; @@ -11294,7 +11336,7 @@ # ifdef WORDS_BIGENDIAN # define LDBL80_WORDS(exponent,manthi,mantlo) \ { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \ - ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \ + ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \ (unsigned int) (mantlo) << 16 \ } # else @@ -11534,7 +11576,7 @@ # Guess yes on glibc systems. *-gnu*) gl_cv_func_printf_directive_f="guessing yes";; # Guess yes on FreeBSD >= 6. - freebsd[1-5]*) gl_cv_func_printf_directive_f="guessing no";; + freebsd[1-5].*) gl_cv_func_printf_directive_f="guessing no";; freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";; # Guess yes on Mac OS X >= 10.3. darwin[1-6].*) gl_cv_func_printf_directive_f="guessing no";; @@ -12895,7 +12937,7 @@ # Guess yes on glibc systems. *-gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on FreeBSD >= 5. - freebsd[1-4]*) gl_cv_func_snprintf_retval_c99="guessing no";; + freebsd[1-4].*) gl_cv_func_snprintf_retval_c99="guessing no";; freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on Mac OS X >= 10.3. darwin[1-6].*) gl_cv_func_snprintf_retval_c99="guessing no";; @@ -13594,8 +13636,6 @@ - - if test $gl_cv_have_include_next = yes; then gl_cv_next_getopt_h='<'getopt.h'>' else @@ -14215,6 +14255,306 @@ #define HAVE_DECL_GETENV $ac_have_decl _ACEOF +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 +$as_echo_n "checking for C/C++ restrict keyword... " >&6; } +if ${ac_cv_c_restrict+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_c_restrict=no + # The order here caters to the fact that C++ does not require restrict. + for ac_kw in __restrict __restrict__ _Restrict restrict; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +typedef int *int_ptr; + int foo (int_ptr $ac_kw ip) { return ip[0]; } + int bar (int [$ac_kw]); /* Catch GCC bug 14050. */ + int bar (int ip[$ac_kw]) { return ip[0]; } + +int +main () +{ +int s[1]; + int *$ac_kw t = s; + t[0] = 0; + return foo (t) + bar (t); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_restrict=$ac_kw +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_restrict" != no && break + done + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 +$as_echo "$ac_cv_c_restrict" >&6; } + + case $ac_cv_c_restrict in + restrict) ;; + no) $as_echo "#define restrict /**/" >>confdefs.h + ;; + *) cat >>confdefs.h <<_ACEOF +#define restrict $ac_cv_c_restrict +_ACEOF + ;; + esac + + + GNULIB_GETTIMEOFDAY=0; + HAVE_GETTIMEOFDAY=1; + HAVE_STRUCT_TIMEVAL=1; + HAVE_SYS_TIME_H=1; + REPLACE_GETTIMEOFDAY=0; + REPLACE_STRUCT_TIMEVAL=0; + + + + + + + + + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_sys_time_h='<'sys/time.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if ${gl_cv_next_sys_time_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test $ac_cv_header_sys_time_h = yes; then + + + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac + + case "$host_os" in + mingw*) + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo 'sys/time.h' \ + | sed -e "$gl_make_literal_regex_sed"` + gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ + s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ + s|^/[^/]|//&| + p + q + }' + + gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_sys_time_h + gl_cv_next_sys_time_h='"'$gl_header'"' + else + gl_cv_next_sys_time_h='<'sys/time.h'>' + fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5 +$as_echo "$gl_cv_next_sys_time_h" >&6; } + fi + NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h + + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'sys/time.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_sys_time_h + fi + NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive + + + + + + if test $ac_cv_header_sys_time_h != yes; then + HAVE_SYS_TIME_H=0 + fi + + + + + + if test $ac_cv_header_sys_socket_h != yes; then + for ac_header in winsock2.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" +if test "x$ac_cv_header_winsock2_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_WINSOCK2_H 1 +_ACEOF + +fi + +done + + fi + if test "$ac_cv_header_winsock2_h" = yes; then + HAVE_WINSOCK2_H=1 + UNISTD_H_HAVE_WINSOCK2_H=1 + SYS_IOCTL_H_HAVE_WINSOCK2_H=1 + else + HAVE_WINSOCK2_H=0 + fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5 +$as_echo_n "checking for struct timeval... " >&6; } +if ${gl_cv_sys_struct_timeval+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if HAVE_SYS_TIME_H + #include + #endif + #include + #if HAVE_WINSOCK2_H + # include + #endif + +int +main () +{ +static struct timeval x; x.tv_sec = x.tv_usec; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_sys_struct_timeval=yes +else + gl_cv_sys_struct_timeval=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5 +$as_echo "$gl_cv_sys_struct_timeval" >&6; } + if test $gl_cv_sys_struct_timeval != yes; then + HAVE_STRUCT_TIMEVAL=0 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5 +$as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; } +if ${gl_cv_sys_struct_timeval_tv_sec+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if HAVE_SYS_TIME_H + #include + #endif + #include + #if HAVE_WINSOCK2_H + # include + #endif + +int +main () +{ +static struct timeval x; + typedef int verify_tv_sec_type[ + sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1 + ]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_sys_struct_timeval_tv_sec=yes +else + gl_cv_sys_struct_timeval_tv_sec=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5 +$as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; } + if test $gl_cv_sys_struct_timeval_tv_sec != yes; then + REPLACE_STRUCT_TIMEVAL=1 + fi + fi + + + for gl_func in gettimeofday; do + as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 +$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } +if eval \${$as_gl_Symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#if HAVE_SYS_TIME_H +# include +#endif +#include + +int +main () +{ +#undef $gl_func + (void) $gl_func; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_gl_Symbol=yes" +else + eval "$as_gl_Symbol=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$as_gl_Symbol + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 +_ACEOF + + eval ac_cv_have_decl_$gl_func=yes +fi + done + + + + + + + @@ -15719,7 +16059,7 @@ # ifdef WORDS_BIGENDIAN # define LDBL80_WORDS(exponent,manthi,mantlo) \ { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \ - ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \ + ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \ (unsigned int) (mantlo) << 16 \ } # else @@ -16250,26 +16590,42 @@ # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist # in libc. IRIX 6.5 has the first one in both libc and libpthread, but # the second one only in libpthread, and lock.c needs it. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # + # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04 + # needs -pthread for some reason. See: + # http://lists.gnu.org/archive/html/bug-gnulib/2014-09/msg00023.html + save_LIBS=$LIBS + for gl_pthread in '' '-pthread'; do + LIBS="$LIBS $gl_pthread" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include + pthread_mutex_t m; + pthread_mutexattr_t ma; + int main () { -pthread_mutex_lock((pthread_mutex_t*)0); - pthread_mutexattr_init((pthread_mutexattr_t*)0); +pthread_mutex_lock (&m); + pthread_mutexattr_init (&ma); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gl_have_pthread=yes + LIBTHREAD=$gl_pthread LTLIBTHREAD=$gl_pthread + LIBMULTITHREAD=$gl_pthread LTLIBMULTITHREAD=$gl_pthread fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext + LIBS=$save_LIBS + test -n "$gl_have_pthread" && break + done + # Test for libpthread by looking for pthread_kill. (Not pthread_self, # since it is defined as a macro on OSF/1.) - if test -n "$gl_have_pthread"; then + if test -n "$gl_have_pthread" && test -z "$LIBTHREAD"; then # The program links fine without libpthread. But it may actually # need to link with libpthread in order to create multiple threads. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5 @@ -16323,7 +16679,7 @@ fi - else + elif test -z "$gl_have_pthread"; then # Some library is needed. Try libpthread and libc_r. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; } @@ -17127,6 +17483,75 @@ ;; esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +$as_echo_n "checking for a sed that does not truncate output... " >&6; } +if ${ac_cv_path_SED+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + { ac_script=; unset ac_script;} + if test -z "$SED"; then + ac_path_SED_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_SED" || continue +# Check for GNU ac_path_SED and select it if it is found. + # Check for GNU $ac_path_SED +case `"$ac_path_SED" --version 2>&1` in +*GNU*) + ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo '' >> "conftest.nl" + "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_SED="$ac_path_SED" + ac_path_SED_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_SED_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 + fi +else + ac_cv_path_SED=$SED +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +$as_echo "$ac_cv_path_SED" >&6; } + SED="$ac_cv_path_SED" + rm -f conftest.sed + @@ -18263,8 +18688,78 @@ + LIB_POSIX_SPAWN= + gl_saved_libs=$LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing posix_spawn" >&5 +$as_echo_n "checking for library containing posix_spawn... " >&6; } +if ${ac_cv_search_posix_spawn+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char posix_spawn (); +int +main () +{ +return posix_spawn (); + ; + return 0; +} +_ACEOF +for ac_lib in '' rt; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_posix_spawn=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_posix_spawn+:} false; then : + break +fi +done +if ${ac_cv_search_posix_spawn+:} false; then : + +else + ac_cv_search_posix_spawn=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_posix_spawn" >&5 +$as_echo "$ac_cv_search_posix_spawn" >&6; } +ac_res=$ac_cv_search_posix_spawn +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + test "$ac_cv_search_posix_spawn" = "none required" || + LIB_POSIX_SPAWN=$ac_cv_search_posix_spawn +fi + + for ac_func in posix_spawn +do : + ac_fn_c_check_func "$LINENO" "posix_spawn" "ac_cv_func_posix_spawn" +if test "x$ac_cv_func_posix_spawn" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_POSIX_SPAWN 1 +_ACEOF + +fi +done + + LIBS=$gl_saved_libs if test $ac_cv_func_posix_spawn != yes; then HAVE_POSIX_SPAWN=0 @@ -19104,52 +19599,6 @@ -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 -$as_echo_n "checking for C/C++ restrict keyword... " >&6; } -if ${ac_cv_c_restrict+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_c_restrict=no - # The order here caters to the fact that C++ does not require restrict. - for ac_kw in __restrict __restrict__ _Restrict restrict; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -typedef int * int_ptr; - int foo (int_ptr $ac_kw ip) { - return ip[0]; - } -int -main () -{ -int s[1]; - int * $ac_kw t = s; - t[0] = 0; - return foo(t) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_restrict=$ac_kw -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_restrict" != no && break - done - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 -$as_echo "$ac_cv_c_restrict" >&6; } - - case $ac_cv_c_restrict in - restrict) ;; - no) $as_echo "#define restrict /**/" >>confdefs.h - ;; - *) cat >>confdefs.h <<_ACEOF -#define restrict $ac_cv_c_restrict -_ACEOF - ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 $as_echo_n "checking for uid_t in sys/types.h... " >&6; } if ${ac_cv_type_uid_t+:} false; then : @@ -19286,6 +19735,7 @@ REPLACE_NULL=0; + HAVE_MAX_ALIGN_T=1; HAVE_WCHAR_T=1; @@ -19551,7 +20001,9 @@ REPLACE_NANOSLEEP=GNULIB_PORTCHECK; REPLACE_TIMEGM=GNULIB_PORTCHECK; - + : ${GNULIB_GETTIMEOFDAY=0}; + REPLACE_GMTIME=0; + REPLACE_LOCALTIME=0; @@ -19585,6 +20037,7 @@ TIME_H_DEFINES_STRUCT_TIMESPEC=0 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0 + UNISTD_H_DEFINES_STRUCT_TIMESPEC=0 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then TIME_H_DEFINES_STRUCT_TIMESPEC=1 else @@ -19645,6 +20098,36 @@ $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; } if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in " >&5 +$as_echo_n "checking for struct timespec in ... " >&6; } +if ${gl_cv_sys_struct_timespec_in_unistd_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main () +{ +static struct timespec x; x.tv_sec = x.tv_nsec; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_sys_struct_timespec_in_unistd_h=yes +else + gl_cv_sys_struct_timespec_in_unistd_h=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5 +$as_echo "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; } + if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then + UNISTD_H_DEFINES_STRUCT_TIMESPEC=1 + fi fi fi fi @@ -19663,6 +20146,7 @@ + if test $gl_cv_have_include_next = yes; then gl_cv_next_time_h='<'time.h'>' else @@ -20326,6 +20810,7 @@ + $as_echo "#define HAVE_DUP2 1" >>confdefs.h @@ -20344,7 +20829,9 @@ linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a # closed fd may yield -EBADF instead of -1 / errno=EBADF. gl_cv_func_dup2_works="guessing no" ;; - freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF. + aix* | freebsd*) + # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE, + # not EBADF. gl_cv_func_dup2_works="guessing no" ;; haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC. gl_cv_func_dup2_works="guessing no" ;; @@ -20361,6 +20848,11 @@ main () { int result = 0; +#ifdef HAVE_GETDTABLESIZE + int bad_fd = getdtablesize (); +#else + int bad_fd = 1000000; +#endif #ifdef FD_CLOEXEC if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1) result |= 1; @@ -20375,7 +20867,7 @@ if (dup2 (0, 0) != -1) result |= 8; /* Many gnulib modules require POSIX conformance of EBADF. */ - if (dup2 (2, 1000000) == -1 && errno != EBADF) + if (dup2 (2, bad_fd) == -1 && errno != EBADF) result |= 16; /* Flush out some cygwin core dumps. */ if (dup2 (2, -1) != -1 || errno != EBADF) @@ -20556,6 +21048,9 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#ifdef HAVE_GETDTABLESIZE +# include +#endif #include #include @@ -20563,8 +21058,15 @@ main () { int result = 0; +#ifdef HAVE_GETDTABLESIZE + int bad_fd = getdtablesize (); +#else + int bad_fd = 1000000; +#endif if (fcntl (0, F_DUPFD, -1) != -1) result |= 1; if (errno != EINVAL) result |= 2; + if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4; + if (errno != EINVAL) result |= 8; return result; ; @@ -22197,6 +22699,207 @@ + + + + + + + gl_gettimeofday_timezone=void + if test $ac_cv_func_gettimeofday != yes; then + HAVE_GETTIMEOFDAY=0 + else + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5 +$as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; } +if ${gl_cv_func_gettimeofday_clobber+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + # When cross-compiling: + case "$host_os" in + # Guess all is fine on glibc systems. + *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;; + # If we don't know, assume the worst. + *) gl_cv_func_gettimeofday_clobber="guessing yes" ;; + esac + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + #include + #include + +int +main () +{ + + time_t t = 0; + struct tm *lt; + struct tm saved_lt; + struct timeval tv; + lt = localtime (&t); + saved_lt = *lt; + gettimeofday (&tv, NULL); + return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_gettimeofday_clobber=no +else + gl_cv_func_gettimeofday_clobber=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5 +$as_echo "$gl_cv_func_gettimeofday_clobber" >&6; } + + case "$gl_cv_func_gettimeofday_clobber" in + *yes) + REPLACE_GETTIMEOFDAY=1 + + REPLACE_GMTIME=1 + REPLACE_LOCALTIME=1 + + +$as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h + + ;; + esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5 +$as_echo_n "checking for gettimeofday with POSIX signature... " >&6; } +if ${gl_cv_func_gettimeofday_posix_signature+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + struct timeval c; + int gettimeofday (struct timeval *restrict, void *restrict); + +int +main () +{ +/* glibc uses struct timezone * rather than the POSIX void * + if _GNU_SOURCE is defined. However, since the only portable + use of gettimeofday uses NULL as the second parameter, and + since the glibc definition is actually more typesafe, it is + not worth wrapping this to get a compliant signature. */ + int (*f) (struct timeval *restrict, void *restrict) + = gettimeofday; + int x = f (&c, 0); + return !(x | c.tv_sec | c.tv_usec); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_func_gettimeofday_posix_signature=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int gettimeofday (struct timeval *restrict, struct timezone *restrict); + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_func_gettimeofday_posix_signature=almost +else + gl_cv_func_gettimeofday_posix_signature=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5 +$as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; } + if test $gl_cv_func_gettimeofday_posix_signature = almost; then + gl_gettimeofday_timezone='struct timezone' + elif test $gl_cv_func_gettimeofday_posix_signature != yes; then + REPLACE_GETTIMEOFDAY=1 + fi + if test $REPLACE_STRUCT_TIMEVAL = 1; then + REPLACE_GETTIMEOFDAY=1 + fi + + fi + +cat >>confdefs.h <<_ACEOF +#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone +_ACEOF + + + if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext" + + + for ac_header in sys/timeb.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_timeb_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SYS_TIMEB_H 1 +_ACEOF + +fi + +done + + for ac_func in _ftime +do : + ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime" +if test "x$ac_cv_func__ftime" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE__FTIME 1 +_ACEOF + +fi +done + + + fi + + + + + + GNULIB_GETTIMEOFDAY=1 + + + + + +$as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h + + + # Autoconf 2.61a.99 and earlier don't support linking a file only # in VPATH builds. But since GNUmakefile is for maintainer use # only, it does not matter if we skip the link with older autoconf. @@ -23463,7 +24166,7 @@ # ifdef WORDS_BIGENDIAN # define LDBL80_WORDS(exponent,manthi,mantlo) \ { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \ - ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \ + ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \ (unsigned int) (mantlo) << 16 \ } # else @@ -23819,7 +24522,7 @@ # ifdef WORDS_BIGENDIAN # define LDBL80_WORDS(exponent,manthi,mantlo) \ { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \ - ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \ + ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \ (unsigned int) (mantlo) << 16 \ } # else @@ -24392,6 +25095,7 @@ + for ac_header in stdlib.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" @@ -25234,6 +25938,49 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5 $as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; } + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5 +$as_echo_n "checking whether mbrtowc works on empty input... " >&6; } +if ${gl_cv_func_mbrtowc_empty_input+:} false; then : + $as_echo_n "(cached) " >&6 +else + + case "$host_os" in + # Guess no on AIX and glibc systems. + aix* | *-gnu*) + gl_cv_func_mbrtowc_empty_input="guessing no" ;; + *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;; + esac + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + static wchar_t wc; + static mbstate_t mbs; + int + main (void) + { + return mbrtowc (&wc, "", 0, &mbs) == (size_t) -2; + } +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_mbrtowc_empty_input=no +else + gl_cv_func_mbrtowc_empty_input=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5 +$as_echo "$gl_cv_func_mbrtowc_empty_input" >&6; } + case "$gl_cv_func_mbrtowc_null_arg1" in *yes) ;; *) @@ -25266,6 +26013,14 @@ REPLACE_MBRTOWC=1 ;; esac + case "$gl_cv_func_mbrtowc_empty_input" in + *yes) ;; + *) +$as_echo "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h + + REPLACE_MBRTOWC=1 + ;; + esac fi fi @@ -25715,23 +26470,26 @@ -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for obstacks" >&5 -$as_echo_n "checking for obstacks... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for obstacks that work with any size object" >&5 +$as_echo_n "checking for obstacks that work with any size object... " >&6; } if ${ac_cv_func_obstack+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default - #include "obstack.h" +#include "obstack.h" + void *obstack_chunk_alloc (size_t n) { return 0; } + void obstack_chunk_free (void *p) { } + /* Check that an internal function returns size_t, not int. */ + size_t _obstack_memory_used (struct obstack *); + int main () { struct obstack mem; - #define obstack_chunk_alloc malloc - #define obstack_chunk_free free - obstack_init (&mem); - obstack_free (&mem, 0); + obstack_init (&mem); + obstack_free (&mem, 0); + ; return 0; } @@ -25746,11 +26504,11 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_obstack" >&5 $as_echo "$ac_cv_func_obstack" >&6; } -if test $ac_cv_func_obstack = yes; then + if test "$ac_cv_func_obstack" = yes; then $as_echo "#define HAVE_OBSTACK 1" >>confdefs.h -else + else @@ -25761,7 +26519,7 @@ gl_LIBOBJS="$gl_LIBOBJS obstack.$ac_objext" -fi + fi @@ -27310,7 +28068,17 @@ fi - ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#include + if test "$HAVE_SCHED_H" = 1; then + ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#include +" +if test "x$ac_cv_type_struct_sched_param" = xyes; then : + HAVE_STRUCT_SCHED_PARAM=1 +else + HAVE_STRUCT_SCHED_PARAM=0 +fi + + else + ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#include " if test "x$ac_cv_type_struct_sched_param" = xyes; then : HAVE_STRUCT_SCHED_PARAM=1 @@ -27318,6 +28086,7 @@ HAVE_STRUCT_SCHED_PARAM=0 fi + fi @@ -28664,7 +29433,7 @@ # Guess yes on glibc systems. *-gnu*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on FreeBSD >= 5. - freebsd[1-4]*) gl_cv_func_snprintf_truncation_c99="guessing no";; + freebsd[1-4].*) gl_cv_func_snprintf_truncation_c99="guessing no";; freebsd* | kfreebsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on Mac OS X >= 10.3. darwin[1-6].*) gl_cv_func_snprintf_truncation_c99="guessing no";; @@ -28758,7 +29527,7 @@ # Guess yes on glibc systems. *-gnu*) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess yes on FreeBSD >= 5. - freebsd[1-4]*) gl_cv_func_snprintf_directive_n="guessing no";; + freebsd[1-4].*) gl_cv_func_snprintf_directive_n="guessing no";; freebsd* | kfreebsd*) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess yes on Mac OS X >= 10.3. darwin[1-6].*) gl_cv_func_snprintf_directive_n="guessing no";; @@ -28899,7 +29668,7 @@ # Guess yes on glibc systems. *-gnu*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on FreeBSD >= 5. - freebsd[1-4]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; + freebsd[1-4].*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; freebsd* | kfreebsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on Mac OS X >= 10.3. darwin[1-6].*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; @@ -29986,6 +30755,15 @@ STDDEF_H= + ac_fn_c_check_type "$LINENO" "max_align_t" "ac_cv_type_max_align_t" "#include + +" +if test "x$ac_cv_type_max_align_t" = xyes; then : + +else + HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h +fi + if test $gt_cv_c_wchar_t = no; then HAVE_WCHAR_T=0 STDDEF_H=stddef.h @@ -30115,6 +30893,8 @@ + + if test $gl_cv_have_include_next = yes; then gl_cv_next_stdio_h='<'stdio.h'>' else @@ -30179,6 +30959,36 @@ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether inttypes macros match system or gnu printf" >&5 +$as_echo_n "checking whether inttypes macros match system or gnu printf... " >&6; } +if ${gl_cv_func_printf_attribute_flavor+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define __STDC_FORMAT_MACROS 1 + #include + #include + findme PRIdMAX findme + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "findme .(ll|j)d. findme" >/dev/null 2>&1; then : + gl_cv_func_printf_attribute_flavor=gnu +else + gl_cv_func_printf_attribute_flavor=system +fi +rm -f conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5 +$as_echo "$gl_cv_func_printf_attribute_flavor" >&6; } + if test "$gl_cv_func_printf_attribute_flavor" = gnu; then + +$as_echo "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h + + fi + GNULIB_FSCANF=1 @@ -30970,31 +31780,6 @@ - for ac_func in strtoul -do : - ac_fn_c_check_func "$LINENO" "strtoul" "ac_cv_func_strtoul" -if test "x$ac_cv_func_strtoul" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STRTOUL 1 -_ACEOF - -fi -done - - - if test $ac_cv_func_strtoul = no; then - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS strtoul.$ac_objext" - - fi - @@ -31207,6 +31992,10 @@ + + + + if test $gl_cv_have_include_next = yes; then gl_cv_next_sys_wait_h='<'sys/wait.h'>' else @@ -31486,7 +32275,7 @@ || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \ && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \ || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \ - && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0 + && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4 } } } @@ -31513,7 +32302,7 @@ || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \ && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \ || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \ - && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0 + && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4 } } } @@ -31540,7 +32329,7 @@ || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \ && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \ || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \ - && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4 + && test $LIBUNISTRING_VERSION_SUBMINOR -lt 5 } } } @@ -32543,7 +33332,7 @@ # Guess yes on glibc systems. *-gnu*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on FreeBSD >= 5. - freebsd[1-4]*) gl_cv_func_snprintf_truncation_c99="guessing no";; + freebsd[1-4].*) gl_cv_func_snprintf_truncation_c99="guessing no";; freebsd* | kfreebsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on Mac OS X >= 10.3. darwin[1-6].*) gl_cv_func_snprintf_truncation_c99="guessing no";; @@ -32637,7 +33426,7 @@ # Guess yes on glibc systems. *-gnu*) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess yes on FreeBSD >= 5. - freebsd[1-4]*) gl_cv_func_snprintf_directive_n="guessing no";; + freebsd[1-4].*) gl_cv_func_snprintf_directive_n="guessing no";; freebsd* | kfreebsd*) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess yes on Mac OS X >= 10.3. darwin[1-6].*) gl_cv_func_snprintf_directive_n="guessing no";; @@ -32778,7 +33567,7 @@ # Guess yes on glibc systems. *-gnu*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on FreeBSD >= 5. - freebsd[1-4]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; + freebsd[1-4].*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; freebsd* | kfreebsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on Mac OS X >= 10.3. darwin[1-6].*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; @@ -34468,75 +35257,6 @@ # Gettext. # We use gnulib, which is only guaranteed to work properly with the # latest Gettext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 -$as_echo_n "checking for a sed that does not truncate output... " >&6; } -if ${ac_cv_path_SED+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for ac_i in 1 2 3 4 5 6 7; do - ac_script="$ac_script$as_nl$ac_script" - done - echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed - { ac_script=; unset ac_script;} - if test -z "$SED"; then - ac_path_SED_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_SED" || continue -# Check for GNU ac_path_SED and select it if it is found. - # Check for GNU $ac_path_SED -case `"$ac_path_SED" --version 2>&1` in -*GNU*) - ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo '' >> "conftest.nl" - "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_SED_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_SED="$ac_path_SED" - ac_path_SED_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_SED_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_SED"; then - as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 - fi -else - ac_cv_path_SED=$SED -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 -$as_echo "$ac_cv_path_SED" >&6; } - SED="$ac_cv_path_SED" - rm -f conftest.sed - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 $as_echo_n "checking whether NLS is requested... " >&6; } @@ -35572,36 +36292,42 @@ if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi - if test "$cross_compiling" = yes; then : - - case "$host_os" in - aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; - *) am_cv_func_iconv_works="guessing yes" ;; - esac - + am_cv_func_iconv_works=no + for ac_iconv_const in '' 'const'; do + if test "$cross_compiling" = yes; then : + case "$host_os" in + aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; + *) am_cv_func_iconv_works="guessing yes" ;; + esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include -int main () + +#ifndef ICONV_CONST +# define ICONV_CONST $ac_iconv_const +#endif + +int +main () { - int result = 0; +int result = 0; /* Test against AIX 5.1 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { - static const char input[] = "\342\202\254"; /* EURO SIGN */ + static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */ char buf[10]; - const char *inptr = input; + ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_utf8_to_88591, - (char **) &inptr, &inbytesleft, + &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 1; @@ -35614,14 +36340,14 @@ iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); if (cd_ascii_to_88591 != (iconv_t)(-1)) { - static const char input[] = "\263"; + static ICONV_CONST char input[] = "\263"; char buf[10]; - const char *inptr = input; + ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_ascii_to_88591, - (char **) &inptr, &inbytesleft, + &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) result |= 2; @@ -35633,14 +36359,14 @@ iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { - static const char input[] = "\304"; + static ICONV_CONST char input[] = "\304"; static char buf[2] = { (char)0xDE, (char)0xAD }; - const char *inptr = input; + ICONV_CONST char *inptr = input; size_t inbytesleft = 1; char *outptr = buf; size_t outbytesleft = 1; size_t res = iconv (cd_88591_to_utf8, - (char **) &inptr, &inbytesleft, + &inptr, &inbytesleft, &outptr, &outbytesleft); if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) result |= 4; @@ -35653,14 +36379,14 @@ iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { - static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; + static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; - const char *inptr = input; + ICONV_CONST char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_88591_to_utf8, - (char **) &inptr, &inbytesleft, + &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) result |= 8; @@ -35680,17 +36406,20 @@ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) result |= 16; return result; + + ; + return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : am_cv_func_iconv_works=yes -else - am_cv_func_iconv_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi + test "$am_cv_func_iconv_works" = no || break + done LIBS="$am_save_LIBS" fi @@ -36472,6 +37201,16 @@ ;; esac +# Whether we cannot run the compiled bison. + if test "$cross_compiling" = yes; then + CROSS_COMPILING_TRUE= + CROSS_COMPILING_FALSE='#' +else + CROSS_COMPILING_TRUE='#' + CROSS_COMPILING_FALSE= +fi + + AUTOM4TE=${AUTOM4TE-"${am_missing_run}autom4te"} @@ -36554,23 +37293,23 @@ if $JAVAC --version 2>/dev/null | sed -e 1q | grep gcj > /dev/null; then if $JAVAC --version 2>/dev/null | sed -e 's,^[^0-9]*,,' -e 1q | sed -e '/^4\.[012]/d' | grep '^[4-9]' >/dev/null; then rm -f conftest.class - if { echo "$as_me:36557: $JAVAC -d . conftest.java" >&5 + if { echo "$as_me:37296: $JAVAC -d . conftest.java" >&5 $JAVAC -d . conftest.java >&5 2>&1 } \ && test -f conftest.class \ && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5; then rm -f conftest.class rm -f conftestfail.class - if { echo "$as_me:36564: $JAVAC -fsource=$source_version -d . conftest.java" >&5 + if { echo "$as_me:37303: $JAVAC -fsource=$source_version -d . conftest.java" >&5 $JAVAC -fsource="$source_version" -d . conftest.java >&5 2>&1 } \ && test -f conftest.class \ && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5 \ - && { echo "$as_me:36569: $JAVAC -d . conftestfail.java" >&5 + && { echo "$as_me:37308: $JAVAC -d . conftestfail.java" >&5 $JAVAC -d . conftestfail.java >&5 2>&1 } \ && test -f conftestfail.class \ - && ! { echo "$as_me:36573: $JAVAC -fsource=$source_version -d . conftestfail.java" >&5 + && ! { echo "$as_me:37312: $JAVAC -fsource=$source_version -d . conftestfail.java" >&5 $JAVAC -fsource="$source_version" -d . conftestfail.java >&5 2>&1 }; then CONF_JAVAC="$JAVAC -fsource=$source_version" @@ -36584,7 +37323,7 @@ else rm -f conftest.class rm -f conftestfail.class - if { echo "$as_me:36587: $JAVAC -fsource=$source_version -ftarget=$target_version -d . conftest.java" >&5 + if { echo "$as_me:37326: $JAVAC -fsource=$source_version -ftarget=$target_version -d . conftest.java" >&5 $JAVAC -fsource="$source_version" -ftarget="$target_version" -d . conftest.java >&5 2>&1 } \ && test -f conftest.class \ @@ -36597,7 +37336,7 @@ else if test "$target_version" = 1.4 && test "$source_version" = 1.4; then rm -f conftest.class - if { echo "$as_me:36600: $JAVAC -d . conftest.java" >&5 + if { echo "$as_me:37339: $JAVAC -d . conftest.java" >&5 $JAVAC -d . conftest.java >&5 2>&1 } \ && test -f conftest.class; then @@ -36609,7 +37348,7 @@ if test "$target_version" = 1.4 && test "$source_version" = 1.3; then javac_works= rm -f conftest.class - if { echo "$as_me:36612: $JAVAC -d . conftest.java" >&5 + if { echo "$as_me:37351: $JAVAC -d . conftest.java" >&5 $JAVAC -d . conftest.java >&5 2>&1 } \ && test -f conftest.class; then @@ -36617,7 +37356,7 @@ fi javac_noassert_works= rm -f conftest.class - if { echo "$as_me:36620: $JAVAC -fno-assert -d . conftest.java" >&5 + if { echo "$as_me:37359: $JAVAC -fno-assert -d . conftest.java" >&5 $JAVAC -fno-assert -d . conftest.java >&5 2>&1 } \ && test -f conftest.class; then @@ -36625,11 +37364,11 @@ fi if test -n "$javac_works" && test -n "$javac_noassert_works"; then rm -f conftestfail.class - if { echo "$as_me:36628: $JAVAC -d . conftestfail.java" >&5 + if { echo "$as_me:37367: $JAVAC -d . conftestfail.java" >&5 $JAVAC -d . conftestfail.java >&5 2>&1 } \ && test -f conftestfail.class \ - && ! { echo "$as_me:36632: $JAVAC -fno-assert -d . conftestfail.java" >&5 + && ! { echo "$as_me:37371: $JAVAC -fno-assert -d . conftestfail.java" >&5 $JAVAC -fno-assert -d . conftestfail.java >&5 2>&1 }; then javac_works= @@ -36651,23 +37390,23 @@ fi else rm -f conftest.class - if { echo "$as_me:36654: $JAVAC -d . conftest.java" >&5 + if { echo "$as_me:37393: $JAVAC -d . conftest.java" >&5 $JAVAC -d . conftest.java >&5 2>&1 } \ && test -f conftest.class \ && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5; then rm -f conftest.class rm -f conftestfail.class - if { echo "$as_me:36661: $JAVAC -source $source_version -d . conftest.java" >&5 + if { echo "$as_me:37400: $JAVAC -source $source_version -d . conftest.java" >&5 $JAVAC -source "$source_version" -d . conftest.java >&5 2>&1 } \ && test -f conftest.class \ && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5 \ - && { echo "$as_me:36666: $JAVAC -d . conftestfail.java" >&5 + && { echo "$as_me:37405: $JAVAC -d . conftestfail.java" >&5 $JAVAC -d . conftestfail.java >&5 2>&1 } \ && test -f conftestfail.class \ - && ! { echo "$as_me:36670: $JAVAC -source $source_version -d . conftestfail.java" >&5 + && ! { echo "$as_me:37409: $JAVAC -source $source_version -d . conftestfail.java" >&5 $JAVAC -source "$source_version" -d . conftestfail.java >&5 2>&1 }; then CONF_JAVAC="$JAVAC -source $source_version" @@ -36680,23 +37419,23 @@ fi else rm -f conftest.class - if { echo "$as_me:36683: $JAVAC -target $target_version -d . conftest.java" >&5 + if { echo "$as_me:37422: $JAVAC -target $target_version -d . conftest.java" >&5 $JAVAC -target "$target_version" -d . conftest.java >&5 2>&1 } \ && test -f conftest.class \ && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5; then rm -f conftest.class rm -f conftestfail.class - if { echo "$as_me:36690: $JAVAC -target $target_version -source $source_version -d . conftest.java" >&5 + if { echo "$as_me:37429: $JAVAC -target $target_version -source $source_version -d . conftest.java" >&5 $JAVAC -target "$target_version" -source "$source_version" -d . conftest.java >&5 2>&1 } \ && test -f conftest.class \ && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5 \ - && { echo "$as_me:36695: $JAVAC -target $target_version -d . conftestfail.java" >&5 + && { echo "$as_me:37434: $JAVAC -target $target_version -d . conftestfail.java" >&5 $JAVAC -target "$target_version" -d . conftestfail.java >&5 2>&1 } \ && test -f conftestfail.class \ - && ! { echo "$as_me:36699: $JAVAC -target $target_version -source $source_version -d . conftestfail.java" >&5 + && ! { echo "$as_me:37438: $JAVAC -target $target_version -source $source_version -d . conftestfail.java" >&5 $JAVAC -target "$target_version" -source "$source_version" -d . conftestfail.java >&5 2>&1 }; then CONF_JAVAC="$JAVAC -target $target_version -source $source_version" @@ -36709,7 +37448,7 @@ fi else rm -f conftest.class - if { echo "$as_me:36712: $JAVAC -target $target_version -source $source_version -d . conftest.java" >&5 + if { echo "$as_me:37451: $JAVAC -target $target_version -source $source_version -d . conftest.java" >&5 $JAVAC -target "$target_version" -source "$source_version" -d . conftest.java >&5 2>&1 } \ && test -f conftest.class \ @@ -36827,28 +37566,28 @@ if test -z "$HAVE_JAVACOMP" && test -n "$HAVE_GCJ_IN_PATH"; then if gcj --version 2>/dev/null | sed -e 's,^[^0-9]*,,' -e 1q | sed -e '/^3\.[01]/d' | grep '^[3-9]' >/dev/null; then - if { echo "$as_me:36830: gcj -C -d . conftestlib.java" >&5 + if { echo "$as_me:37569: gcj -C -d . conftestlib.java" >&5 gcj -C -d . conftestlib.java >&5 2>&1 }; then if gcj --version 2>/dev/null | sed -e 's,^[^0-9]*,,' -e 1q | sed -e '/^4\.[012]/d' | grep '^[4-9]' >/dev/null; then rm -f conftest.class - if { echo "$as_me:36835: gcj -C -d . conftest.java" >&5 + if { echo "$as_me:37574: gcj -C -d . conftest.java" >&5 gcj -C -d . conftest.java >&5 2>&1 } \ && test -f conftest.class \ && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5; then rm -f conftest.class rm -f conftestfail.class - if { echo "$as_me:36842: gcj -C -fsource=$source_version -d . conftest.java" >&5 + if { echo "$as_me:37581: gcj -C -fsource=$source_version -d . conftest.java" >&5 gcj -C -fsource="$source_version" -d . conftest.java >&5 2>&1 } \ && test -f conftest.class \ && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5 \ - && { echo "$as_me:36847: gcj -C -d . conftestfail.java" >&5 + && { echo "$as_me:37586: gcj -C -d . conftestfail.java" >&5 gcj -C -d . conftestfail.java >&5 2>&1 } \ && test -f conftestfail.class \ - && ! { echo "$as_me:36851: gcj -C -fsource=$source_version -d . conftestfail.java" >&5 + && ! { echo "$as_me:37590: gcj -C -fsource=$source_version -d . conftestfail.java" >&5 gcj -C -fsource="$source_version" -d . conftestfail.java >&5 2>&1 }; then CONF_JAVAC="gcj -C -fsource=$source_version" @@ -36862,7 +37601,7 @@ else rm -f conftest.class rm -f conftestfail.class - if { echo "$as_me:36865: gcj -C -fsource=$source_version -ftarget=$target_version -d . conftest.java" >&5 + if { echo "$as_me:37604: gcj -C -fsource=$source_version -ftarget=$target_version -d . conftest.java" >&5 gcj -C -fsource="$source_version" -ftarget="$target_version" -d . conftest.java >&5 2>&1 } \ && test -f conftest.class \ @@ -36875,7 +37614,7 @@ else if test "$target_version" = 1.4 && test "$source_version" = 1.4; then rm -f conftest.class - if { echo "$as_me:36878: gcj -C -d . conftest.java" >&5 + if { echo "$as_me:37617: gcj -C -d . conftest.java" >&5 gcj -C -d . conftest.java >&5 2>&1 } \ && test -f conftest.class; then @@ -36886,7 +37625,7 @@ else if test "$target_version" = 1.4 && test "$source_version" = 1.3; then rm -f conftest.class - if { echo "$as_me:36889: gcj -C -fno-assert -d . conftest.java" >&5 + if { echo "$as_me:37628: gcj -C -fno-assert -d . conftest.java" >&5 gcj -C -fno-assert -d . conftest.java >&5 2>&1 } \ && test -f conftest.class; then @@ -36895,7 +37634,7 @@ HAVE_JAVACOMP=1 else rm -f conftest.class - if { echo "$as_me:36898: gcj -C -d . conftest.java" >&5 + if { echo "$as_me:37637: gcj -C -d . conftest.java" >&5 gcj -C -d . conftest.java >&5 2>&1 } \ && test -f conftest.class; then @@ -36914,23 +37653,23 @@ if { javac -version >/dev/null 2>/dev/null || test $? -le 2; } \ && ( if javac -help 2>&1 >/dev/null | grep at.dms.kjc.Main >/dev/null && javac -help 2>/dev/null | grep 'released.*2000' >/dev/null ; then exit 1; else exit 0; fi ); then rm -f conftest.class - if { echo "$as_me:36917: javac -d . conftest.java" >&5 + if { echo "$as_me:37656: javac -d . conftest.java" >&5 javac -d . conftest.java >&5 2>&1 } \ && test -f conftest.class \ && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5; then rm -f conftest.class rm -f conftestfail.class - if { echo "$as_me:36924: javac -source $source_version -d . conftest.java" >&5 + if { echo "$as_me:37663: javac -source $source_version -d . conftest.java" >&5 javac -source "$source_version" -d . conftest.java >&5 2>&1 } \ && test -f conftest.class \ && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5 \ - && { echo "$as_me:36929: javac -d . conftestfail.java" >&5 + && { echo "$as_me:37668: javac -d . conftestfail.java" >&5 javac -d . conftestfail.java >&5 2>&1 } \ && test -f conftestfail.class \ - && ! { echo "$as_me:36933: javac -source $source_version -d . conftestfail.java" >&5 + && ! { echo "$as_me:37672: javac -source $source_version -d . conftestfail.java" >&5 javac -source "$source_version" -d . conftestfail.java >&5 2>&1 }; then CONF_JAVAC="javac -source $source_version" @@ -36943,23 +37682,23 @@ fi else rm -f conftest.class - if { echo "$as_me:36946: javac -target $target_version -d . conftest.java" >&5 + if { echo "$as_me:37685: javac -target $target_version -d . conftest.java" >&5 javac -target "$target_version" -d . conftest.java >&5 2>&1 } \ && test -f conftest.class \ && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5; then rm -f conftest.class rm -f conftestfail.class - if { echo "$as_me:36953: javac -target $target_version -source $source_version -d . conftest.java" >&5 + if { echo "$as_me:37692: javac -target $target_version -source $source_version -d . conftest.java" >&5 javac -target "$target_version" -source "$source_version" -d . conftest.java >&5 2>&1 } \ && test -f conftest.class \ && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5 \ - && { echo "$as_me:36958: javac -target $target_version -d . conftestfail.java" >&5 + && { echo "$as_me:37697: javac -target $target_version -d . conftestfail.java" >&5 javac -target "$target_version" -d . conftestfail.java >&5 2>&1 } \ && test -f conftestfail.class \ - && ! { echo "$as_me:36962: javac -target $target_version -source $source_version -d . conftestfail.java" >&5 + && ! { echo "$as_me:37701: javac -target $target_version -source $source_version -d . conftestfail.java" >&5 javac -target "$target_version" -source "$source_version" -d . conftestfail.java >&5 2>&1 }; then CONF_JAVAC="javac -target $target_version -source $source_version" @@ -36972,7 +37711,7 @@ fi else rm -f conftest.class - if { echo "$as_me:36975: javac -target $target_version -source $source_version -d . conftest.java" >&5 + if { echo "$as_me:37714: javac -target $target_version -source $source_version -d . conftest.java" >&5 javac -target "$target_version" -source "$source_version" -d . conftest.java >&5 2>&1 } \ && test -f conftest.class \ @@ -37374,6 +38113,10 @@ as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${ENABLE_GCC_WARNINGS_TRUE}" && test -z "${ENABLE_GCC_WARNINGS_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_GCC_WARNINGS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${BISON_CXX_WORKS_TRUE}" && test -z "${BISON_CXX_WORKS_FALSE}"; then as_fn_error $? "conditional \"BISON_CXX_WORKS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -37484,6 +38227,10 @@ gltests_LTLIBOBJS=$gltests_ltlibobjs +if test -z "${CROSS_COMPILING_TRUE}" && test -z "${CROSS_COMPILING_FALSE}"; then + as_fn_error $? "conditional \"CROSS_COMPILING\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 @@ -37881,7 +38628,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by GNU Bison $as_me 3.0.2, which was +This file was extended by GNU Bison $as_me 3.0.4, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -37953,7 +38700,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -GNU Bison config.status 3.0.2 +GNU Bison config.status 3.0.4 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -Nru bison-3.0.2.dfsg/configure.ac bison-3.0.4.dfsg/configure.ac --- bison-3.0.2.dfsg/configure.ac 2013-11-05 13:30:26.000000000 +0000 +++ bison-3.0.4.dfsg/configure.ac 2015-01-22 15:57:01.000000000 +0000 @@ -1,6 +1,6 @@ # Configure template for GNU Bison. -*-Autoconf-*- # -# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# Copyright (C) 2001-2015 Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -26,7 +26,7 @@ AC_INIT([GNU Bison], m4_esyscmd([build-aux/git-version-gen .tarball-version]), [bug-bison@gnu.org]) -AC_SUBST([PACKAGE_COPYRIGHT_YEAR], [2013]) +AC_SUBST([PACKAGE_COPYRIGHT_YEAR], [2015]) AC_DEFINE_UNQUOTED([PACKAGE_COPYRIGHT_YEAR], [$PACKAGE_COPYRIGHT_YEAR], [The copyright year for this package]) @@ -71,14 +71,17 @@ CFLAGS=$save_CFLAGS]) AC_ARG_ENABLE([gcc-warnings], -[ --enable-gcc-warnings turn on lots of GCC warnings (not recommended)], +[ --enable-gcc-warnings turn on lots of GCC warnings (not recommended). + Also, issue synclines from the examples/ to + the corresponding source in the Texinfo doc.], [case $enable_gcc_warnings in yes|no) ;; *) AC_MSG_ERROR([invalid value for --gcc-warnings: $enable_gcc_warnings]);; esac], [enable_gcc_warnings=no]) +AM_CONDITIONAL([ENABLE_GCC_WARNINGS], [test "$enable_gcc_warnings" = yes]) if test "$enable_gcc_warnings" = yes; then - warn_common='-Wall-Wextra -Wno-sign-compare -Wcast-align -Wdocumentation + warn_common='-Wall -Wextra -Wno-sign-compare -Wcast-align -Wdocumentation -Wformat -Wpointer-arith -Wwrite-strings' warn_c='-Wbad-function-cast -Wshadow -Wstrict-prototypes' warn_cxx='-Wnoexcept' @@ -234,6 +237,9 @@ ;; esac +# Whether we cannot run the compiled bison. +AM_CONDITIONAL([CROSS_COMPILING], [test "$cross_compiling" = yes]) + AM_MISSING_PROG([AUTOM4TE], [autom4te]) # Needed by tests/atlocal.in. AC_SUBST([GCC]) diff -Nru bison-3.0.2.dfsg/data/bison.m4 bison-3.0.4.dfsg/data/bison.m4 --- bison-3.0.2.dfsg/data/bison.m4 2013-08-02 15:35:13.000000000 +0000 +++ bison-3.0.4.dfsg/data/bison.m4 2015-01-16 14:47:42.000000000 +0000 @@ -2,7 +2,7 @@ # Language-independent M4 Macros for Bison. -# Copyright (C) 2002, 2004-2013 Free Software Foundation, Inc. +# Copyright (C) 2002, 2004-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -437,7 +437,6 @@ # b4_symbol_action(SYMBOL-NUM, KIND) # ---------------------------------- # Run the action KIND (destructor or printer) for SYMBOL-NUM. -# Same as in C, but using references instead of pointers. m4_define([b4_symbol_action], [b4_symbol_if([$1], [has_$2], [b4_dollar_pushdef([(*yyvaluep)], @@ -1061,3 +1060,6 @@ [['%s' and '%s' cannot be used together]], [%yacc], [%define api.value.type "union"])])])]) + +# api.value.union.name. +b4_percent_define_check_kind([api.value.union.name], [keyword]) diff -Nru bison-3.0.2.dfsg/data/c-like.m4 bison-3.0.4.dfsg/data/c-like.m4 --- bison-3.0.2.dfsg/data/c-like.m4 2013-08-02 15:35:13.000000000 +0000 +++ bison-3.0.4.dfsg/data/c-like.m4 2015-01-16 14:47:42.000000000 +0000 @@ -2,7 +2,7 @@ # Common code for C-like languages (C, C++, Java, etc.) -# Copyright (C) 2012-2013 Free Software Foundation, Inc. +# Copyright (C) 2012-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff -Nru bison-3.0.2.dfsg/data/c.m4 bison-3.0.4.dfsg/data/c.m4 --- bison-3.0.2.dfsg/data/c.m4 2013-11-08 09:11:43.000000000 +0000 +++ bison-3.0.4.dfsg/data/c.m4 2015-01-16 14:47:42.000000000 +0000 @@ -2,7 +2,7 @@ # C M4 Macros for Bison. -# Copyright (C) 2002, 2004-2013 Free Software Foundation, Inc. +# Copyright (C) 2002, 2004-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -97,7 +97,8 @@ m4_define_default([b4_prefix], [b4_api_prefix]) # If the %union is not named, its name is YYSTYPE. -m4_define_default([b4_union_name], [b4_api_PREFIX[]STYPE]) +b4_percent_define_default([[api.value.union.name]], + [b4_api_PREFIX[][STYPE]]) ## ------------------------ ## @@ -560,15 +561,15 @@ # b4_symbol_type_register(SYMBOL-NUM) # ----------------------------------- # Symbol SYMBOL-NUM has a type (for variant) instead of a type-tag. -# Extend the definition of %union's body with a field of that type, -# and extend the symbol's "type" field to point to the field name, -# instead of the type name. +# Extend the definition of %union's body (b4_union_members) with a +# field of that type, and extend the symbol's "type" field to point to +# the field name, instead of the type name. m4_define([b4_symbol_type_register], [m4_define([b4_symbol($1, type_tag)], [b4_symbol_if([$1], [has_id], [b4_symbol([$1], [id])], [yytype_[]b4_symbol([$1], [number])])])dnl -m4_append([b4_user_union_members], +m4_append([b4_union_members], m4_expand([ b4_symbol_tag_comment([$1])dnl b4_symbol([$1], [type]) b4_symbol([$1], [type_tag]);])) @@ -608,10 +609,9 @@ ]) -# ---------------- # -# api.value.type. # -# ---------------- # - +# -------------------------- # +# api.value.type = variant. # +# -------------------------- # # b4_value_type_setup_variant # --------------------------- @@ -686,11 +686,13 @@ [m4_bmatch(b4_percent_define_get([[api.value.type]]), [union\|union-directive], [[#if ! defined ]b4_api_PREFIX[STYPE && ! defined ]b4_api_PREFIX[STYPE_IS_DECLARED -typedef union ]b4_union_name[ ]b4_api_PREFIX[STYPE; -union ]b4_union_name[ +]b4_percent_define_get_syncline([[api.value.union.name]])[ +union ]b4_percent_define_get([[api.value.union.name]])[ { ]b4_user_union_members[ }; +]b4_percent_define_get_syncline([[api.value.union.name]])[ +typedef union ]b4_percent_define_get([[api.value.union.name]])[ ]b4_api_PREFIX[STYPE; # define ]b4_api_PREFIX[STYPE_IS_TRIVIAL 1 # define ]b4_api_PREFIX[STYPE_IS_DECLARED 1 #endif diff -Nru bison-3.0.2.dfsg/data/c++.m4 bison-3.0.4.dfsg/data/c++.m4 --- bison-3.0.2.dfsg/data/c++.m4 2013-10-04 12:00:21.000000000 +0000 +++ bison-3.0.4.dfsg/data/c++.m4 2015-01-16 14:47:42.000000000 +0000 @@ -2,7 +2,7 @@ # C++ skeleton for Bison -# Copyright (C) 2002-2013 Free Software Foundation, Inc. +# Copyright (C) 2002-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -17,6 +17,11 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +# Sanity checks, before defaults installed by c.m4. +b4_percent_define_ifdef([[api.value.union.name]], + [b4_complain_at(b4_percent_define_get_loc([[api.value.union.name]]), + [named %union is invalid in C++])]) + m4_include(b4_pkgdatadir/[c.m4]) # b4_comment(TEXT, [PREFIX]) @@ -169,9 +174,12 @@ /// (External) token type, as returned by yylex. typedef token::yytokentype token_type; - /// Internal symbol number. + /// Symbol type: an internal symbol number. typedef int symbol_number_type; + /// The symbol type number to denote an empty symbol. + enum { empty_symbol = -2 }; + /// Internal symbol number for tokens (subsumed by symbol_number_type). typedef ]b4_int_type_for([b4_translate])[ token_number_type; @@ -204,8 +212,15 @@ const semantic_type& v]b4_locations_if([, const location_type& l])[); + /// Destroy the symbol. ~basic_symbol (); + /// Destroy contents, and record that is empty. + void clear (); + + /// Whether empty. + bool empty () const; + /// Destructive move, \a s is emptied into this. void move (basic_symbol& s); @@ -235,21 +250,23 @@ /// Constructor from (external) token numbers. by_type (kind_type t); + /// Record that this symbol is empty. + void clear (); + /// Steal the symbol type from \a that. void move (by_type& that); /// The (internal) type number (corresponding to \a type). - /// -1 when this symbol is empty. + /// \a empty when empty. symbol_number_type type_get () const; /// The token. token_type token () const; - enum { empty = 0 }; - /// The symbol type. - /// -1 when this symbol is empty. - token_number_type type; + /// \a empty_symbol when empty. + /// An int, not token_number_type, to be able to store empty_symbol. + int type; }; /// "External" symbols: returned by the scanner. @@ -318,9 +335,19 @@ template inline ]b4_parser_class_name[::basic_symbol::~basic_symbol () + { + clear (); + } + + template + inline + void + ]b4_parser_class_name[::basic_symbol::clear () {]b4_variant_if([[ // User destructor. symbol_number_type yytype = this->type_get (); + basic_symbol& yysym = *this; + (void) yysym; switch (yytype) { ]b4_symbol_foreach([b4_symbol_destructor])dnl @@ -330,6 +357,15 @@ // Type destructor. ]b4_symbol_variant([[yytype]], [[value]], [[template destroy]])])[ + Base::clear (); + } + + template + inline + bool + ]b4_parser_class_name[::basic_symbol::empty () const + { + return Base::type_get () == empty_symbol; } template @@ -347,7 +383,7 @@ // by_type. inline ]b4_parser_class_name[::by_type::by_type () - : type (empty) + : type (empty_symbol) {} inline @@ -362,10 +398,17 @@ inline void + ]b4_parser_class_name[::by_type::clear () + { + type = empty_symbol; + } + + inline + void ]b4_parser_class_name[::by_type::move (by_type& that) { type = that.type; - that.type = empty; + that.clear (); } inline diff -Nru bison-3.0.2.dfsg/data/c-skel.m4 bison-3.0.4.dfsg/data/c-skel.m4 --- bison-3.0.2.dfsg/data/c-skel.m4 2013-08-02 15:35:13.000000000 +0000 +++ bison-3.0.4.dfsg/data/c-skel.m4 2015-01-16 14:47:42.000000000 +0000 @@ -2,7 +2,7 @@ # C skeleton dispatching for Bison. -# Copyright (C) 2006-2007, 2009-2013 Free Software Foundation, Inc. +# Copyright (C) 2006-2007, 2009-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff -Nru bison-3.0.2.dfsg/data/c++-skel.m4 bison-3.0.4.dfsg/data/c++-skel.m4 --- bison-3.0.2.dfsg/data/c++-skel.m4 2013-08-02 15:35:13.000000000 +0000 +++ bison-3.0.4.dfsg/data/c++-skel.m4 2015-01-16 14:47:42.000000000 +0000 @@ -2,7 +2,7 @@ # C++ skeleton dispatching for Bison. -# Copyright (C) 2006-2007, 2009-2013 Free Software Foundation, Inc. +# Copyright (C) 2006-2007, 2009-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff -Nru bison-3.0.2.dfsg/data/glr.c bison-3.0.4.dfsg/data/glr.c --- bison-3.0.2.dfsg/data/glr.c 2013-11-14 15:01:22.000000000 +0000 +++ bison-3.0.4.dfsg/data/glr.c 2015-01-18 14:01:16.000000000 +0000 @@ -2,7 +2,7 @@ # GLR skeleton for Bison -# Copyright (C) 2002-2013 Free Software Foundation, Inc. +# Copyright (C) 2002-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -178,9 +178,42 @@ ## Output files. ## ## -------------- ## +# Unfortunately the order of generation between the header and the +# implementation file matters (for glr.c) because of the current +# implementation of api.value.type=union. In that case we still use a +# union for YYSTYPE, but we generate the contents of this union when +# setting up YYSTYPE. This is needed for other aspects, such as +# defining yy_symbol_value_print, since we need to now the name of the +# members of this union. +# +# To avoid this issue, just generate the header before the +# implementation file. But we should also make them more independant. + +# ----------------- # +# The header file. # +# ----------------- # + +# glr.cc produces its own header. +m4_if(b4_skeleton, ["glr.c"], +[b4_defines_if( +[b4_output_begin([b4_spec_defines_file]) +b4_copyright([Skeleton interface for Bison GLR parsers in C], + [2002-2015])[ + +]b4_cpp_guard_open([b4_spec_defines_file])[ +]b4_shared_declarations[ +]b4_cpp_guard_close([b4_spec_defines_file])[ +]b4_output_end() +])]) + + +# ------------------------- # +# The implementation file. # +# ------------------------- # + b4_output_begin([b4_parser_file_name]) b4_copyright([Skeleton implementation for Bison GLR parsers in C], - [2002-2013])[ + [2002-2015])[ /* C GLR parser skeleton written by Paul Hilfinger. */ @@ -2550,16 +2583,3 @@ ]b4_epilogue[]dnl b4_output_end() - -# glr.cc produces its own header. -m4_if(b4_skeleton, ["glr.c"], -[b4_defines_if( -[b4_output_begin([b4_spec_defines_file]) -b4_copyright([Skeleton interface for Bison GLR parsers in C], - [2002-2013])[ - -]b4_cpp_guard_open([b4_spec_defines_file])[ -]b4_shared_declarations[ -]b4_cpp_guard_close([b4_spec_defines_file])[ -]b4_output_end() -])]) diff -Nru bison-3.0.2.dfsg/data/glr.cc bison-3.0.4.dfsg/data/glr.cc --- bison-3.0.2.dfsg/data/glr.cc 2013-10-04 12:00:21.000000000 +0000 +++ bison-3.0.4.dfsg/data/glr.cc 2015-01-16 14:47:42.000000000 +0000 @@ -1,6 +1,6 @@ # C++ GLR skeleton for Bison -# Copyright (C) 2002-2013 Free Software Foundation, Inc. +# Copyright (C) 2002-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -329,7 +329,7 @@ b4_defines_if( [b4_output_begin([b4_spec_defines_file]) b4_copyright([Skeleton interface for Bison GLR parsers in C++], - [2002-2013])[ + [2002-2015])[ // C++ GLR parser skeleton written by Akim Demaille. diff -Nru bison-3.0.2.dfsg/data/java.m4 bison-3.0.4.dfsg/data/java.m4 --- bison-3.0.2.dfsg/data/java.m4 2013-08-02 15:35:13.000000000 +0000 +++ bison-3.0.4.dfsg/data/java.m4 2015-01-16 14:47:42.000000000 +0000 @@ -2,7 +2,7 @@ # Java language support for Bison -# Copyright (C) 2007-2013 Free Software Foundation, Inc. +# Copyright (C) 2007-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff -Nru bison-3.0.2.dfsg/data/java-skel.m4 bison-3.0.4.dfsg/data/java-skel.m4 --- bison-3.0.2.dfsg/data/java-skel.m4 2013-08-02 15:35:13.000000000 +0000 +++ bison-3.0.4.dfsg/data/java-skel.m4 2015-01-16 14:47:42.000000000 +0000 @@ -2,7 +2,7 @@ # Java skeleton dispatching for Bison. -# Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc. +# Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff -Nru bison-3.0.2.dfsg/data/lalr1.cc bison-3.0.4.dfsg/data/lalr1.cc --- bison-3.0.2.dfsg/data/lalr1.cc 2013-11-15 09:14:06.000000000 +0000 +++ bison-3.0.4.dfsg/data/lalr1.cc 2015-01-23 06:52:50.000000000 +0000 @@ -1,6 +1,6 @@ # C++ skeleton for Bison -# Copyright (C) 2002-2013 Free Software Foundation, Inc. +# Copyright (C) 2002-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -131,7 +131,7 @@ m4_pushdef([b4_copyright_years], - [2002-2013]) + [2002-2015]) m4_define([b4_parser_class_name], [b4_percent_define_get([[parser_class_name]])]) @@ -149,10 +149,11 @@ m4_define([b4_shared_declarations], [b4_percent_code_get([[requires]])[ ]b4_parse_assert_if([# include ])[ -# include +# include // std::abort # include # include -# include ]b4_defines_if([[ +# include +# include ]b4_defines_if([[ # include "stack.hh" ]b4_bison_locations_if([[# include "location.hh"]])])[ ]b4_variant_if([b4_variant_includes])[ @@ -214,9 +215,9 @@ /// Generate an error message. /// \param yystate the state where the error occurred. - /// \param yytoken the lookahead token type, or yyempty_. + /// \param yyla the lookahead token. virtual std::string yysyntax_error_ (state_type yystate, - symbol_number_type yytoken) const; + const symbol_type& yyla) const; /// Compute post-reduction state. /// \param yystate the current state @@ -288,16 +289,21 @@ /// Copy constructor. by_state (const by_state& other); + /// Record that this symbol is empty. + void clear (); + /// Steal the symbol type from \a that. void move (by_state& that); /// The (internal) type number (corresponding to \a state). - /// "empty" when empty. + /// \a empty_symbol when empty. symbol_number_type type_get () const; - enum { empty = 0 }; + /// The state number used to denote an empty symbol. + enum { empty_state = -1 }; /// The state. + /// \a empty when empty. state_type state; }; @@ -338,13 +344,12 @@ /// Pop \a n symbols the three stacks. void yypop_ (unsigned int n = 1); - // Constants. + /// Constants. enum { yyeof_ = 0, yylast_ = ]b4_last[, ///< Last index in yytable_. yynnts_ = ]b4_nterms_number[, ///< Number of nonterminal symbols. - yyempty_ = -2, yyfinal_ = ]b4_final_state_number[, ///< Termination state number. yyterror_ = 1, yyerrcode_ = 256, @@ -464,7 +469,7 @@ #endif // !]b4_api_PREFIX[DEBUG #define yyerrok (yyerrstatus_ = 0) -#define yyclearin (yyempty = true) +#define yyclearin (yyla.clear ()) #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab @@ -533,7 +538,7 @@ // by_state. inline ]b4_parser_class_name[::by_state::by_state () - : state (empty) + : state (empty_state) {} inline @@ -543,10 +548,17 @@ inline void + ]b4_parser_class_name[::by_state::clear () + { + state = empty_state; + } + + inline + void ]b4_parser_class_name[::by_state::move (by_state& that) { state = that.state; - that.state = empty; + that.clear (); } inline @@ -558,7 +570,10 @@ ]b4_parser_class_name[::symbol_number_type ]b4_parser_class_name[::by_state::type_get () const { - return state == empty ? 0 : yystos_[state]; + if (state == empty_state) + return empty_symbol; + else + return yystos_[state]; } inline @@ -574,7 +589,7 @@ [value], [move], [that.value])], [[value = that.value;]])[ // that is emptied. - that.type = empty; + that.type = empty_symbol; } inline @@ -611,6 +626,10 @@ std::ostream& yyoutput = yyo; YYUSE (yyoutput); symbol_number_type yytype = yysym.type_get (); + // Avoid a (spurious) G++ 4.8 warning about "array subscript is + // below array bounds". + if (yysym.empty ()) + std::abort (); yyo << (yytype < yyntokens_ ? "token" : "nterm") << ' ' << yytname_[yytype] << " ("]b4_locations_if([ << yysym.location << ": "])[; @@ -695,9 +714,6 @@ int ]b4_parser_class_name[::parse () { - /// Whether yyla contains a lookahead. - bool yyempty = true; - // State. int yyn; /// Length of the RHS of the rule being reduced. @@ -754,7 +770,7 @@ goto yydefault; // Read a lookahead token. - if (yyempty) + if (yyla.empty ()) { YYCDEBUG << "Reading a token: "; try @@ -768,7 +784,6 @@ error (yyexc); goto yyerrlab1; } - yyempty = false; } YY_SYMBOL_PRINT ("Next token is", yyla); @@ -788,9 +803,6 @@ goto yyreduce; } - // Discard the token being shifted. - yyempty = true; - // Count tokens shifted since error; after three, turn off error status. if (yyerrstatus_) --yyerrstatus_; @@ -873,8 +885,7 @@ { ++yynerrs_; error (]b4_join(b4_locations_if([yyla.location]), - [[yysyntax_error_ (yystack_[0].state, - yyempty ? yyempty_ : yyla.type_get ())]])[); + [[yysyntax_error_ (yystack_[0].state, yyla)]])[); } ]b4_locations_if([[ @@ -887,10 +898,10 @@ // Return failure if at end of input. if (yyla.type_get () == yyeof_) YYABORT; - else if (!yyempty) + else if (!yyla.empty ()) { yy_destroy_ ("Error: discarding", yyla); - yyempty = true; + yyla.clear (); } } @@ -966,7 +977,7 @@ goto yyreturn; yyreturn: - if (!yyempty) + if (!yyla.empty ()) yy_destroy_ ("Cleanup: discarding lookahead", yyla); /* Do not reclaim the symbols of the rule whose action triggered @@ -986,7 +997,7 @@ << std::endl; // Do not try to display the values of the reclaimed symbols, // as their printer might throw an exception. - if (!yyempty) + if (!yyla.empty ()) yy_destroy_ (YY_NULLPTR, yyla); while (1 < yystack_.size ()) @@ -1008,10 +1019,9 @@ // Generate an error message. std::string ]b4_parser_class_name[::yysyntax_error_ (]dnl -b4_error_verbose_if([state_type yystate, symbol_number_type yytoken], - [state_type, symbol_number_type])[) const +b4_error_verbose_if([state_type yystate, const symbol_type& yyla], + [state_type, const symbol_type&])[) const {]b4_error_verbose_if([[ - std::string yyres; // Number of reported tokens (one for the "unexpected", one per // "expected"). size_t yycount = 0; @@ -1025,7 +1035,7 @@ the only way this function was invoked is if the default action is an error action. In that case, don't check for expected tokens because there are none. - - The only way there can be no lookahead present (in yytoken) is + - The only way there can be no lookahead present (in yyla) is if this state is a consistent state with a default action. Thus, detecting the absence of a lookahead is sufficient to determine that there is no unexpected or expected token to @@ -1045,8 +1055,9 @@ token that will not be accepted due to an error action in a later state. */ - if (yytoken != yyempty_) + if (!yyla.empty ()) { + int yytoken = yyla.type_get (); yyarg[yycount++] = yytname_[yytoken]; int yyn = yypact_[yystate]; if (!yy_pact_value_is_default_ (yyn)) @@ -1089,6 +1100,7 @@ #undef YYCASE_ } + std::string yyres; // Argument number. size_t yyi = 0; for (char const* yyp = yyformat; *yyp; ++yyp) diff -Nru bison-3.0.2.dfsg/data/lalr1.java bison-3.0.4.dfsg/data/lalr1.java --- bison-3.0.2.dfsg/data/lalr1.java 2013-11-14 15:25:16.000000000 +0000 +++ bison-3.0.4.dfsg/data/lalr1.java 2015-01-16 14:47:42.000000000 +0000 @@ -1,6 +1,6 @@ # Java skeleton for Bison -*- autoconf -*- -# Copyright (C) 2007-2013 Free Software Foundation, Inc. +# Copyright (C) 2007-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -84,7 +84,7 @@ b4_output_begin([b4_parser_file_name]) b4_copyright([Skeleton implementation for Bison LALR(1) parsers in Java], - [2007-2013]) + [2007-2015]) b4_percent_define_ifdef([package], [package b4_percent_define_get([package]); ])[/* First part of user declarations. */ diff -Nru bison-3.0.2.dfsg/data/local.mk bison-3.0.4.dfsg/data/local.mk --- bison-3.0.2.dfsg/data/local.mk 2013-08-02 15:35:13.000000000 +0000 +++ bison-3.0.4.dfsg/data/local.mk 2015-01-16 14:47:42.000000000 +0000 @@ -1,4 +1,4 @@ -## Copyright (C) 2002, 2005-2013 Free Software Foundation, Inc. +## Copyright (C) 2002, 2005-2015 Free Software Foundation, Inc. ## This program is free software: you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by diff -Nru bison-3.0.2.dfsg/data/location.cc bison-3.0.4.dfsg/data/location.cc --- bison-3.0.2.dfsg/data/location.cc 2013-11-08 09:11:43.000000000 +0000 +++ bison-3.0.4.dfsg/data/location.cc 2015-01-16 14:47:42.000000000 +0000 @@ -1,6 +1,6 @@ # C++ skeleton for Bison -# Copyright (C) 2002-2013 Free Software Foundation, Inc. +# Copyright (C) 2002-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,7 +16,7 @@ # along with this program. If not, see . m4_pushdef([b4_copyright_years], - [2002-2013]) + [2002-2015]) # b4_position_define # ------------------ @@ -83,7 +83,7 @@ } }; - /// Add and assign a position. + /// Add \a width columns, in place. inline position& operator+= (position& res, int width) { @@ -91,21 +91,21 @@ return res; } - /// Add two position objects. + /// Add \a width columns. inline position operator+ (position res, int width) { return res += width; } - /// Add and assign a position. + /// Subtract \a width columns, in place. inline position& operator-= (position& res, int width) { return res += -width; } - /// Add two position objects. + /// Subtract \a width columns. inline position operator- (position res, int width) { @@ -216,36 +216,42 @@ position end; }; - /// Join two location objects to create a location. - inline location operator+ (location res, const location& end) + /// Join two locations, in place. + inline location& operator+= (location& res, const location& end) { res.end = end.end; return res; } - /// Change end position in place. + /// Join two locations. + inline location operator+ (location res, const location& end) + { + return res += end; + } + + /// Add \a width columns to the end position, in place. inline location& operator+= (location& res, int width) { res.columns (width); return res; } - /// Change end position. + /// Add \a width columns to the end position. inline location operator+ (location res, int width) { return res += width; } - /// Change end position in place. + /// Subtract \a width columns to the end position, in place. inline location& operator-= (location& res, int width) { return res += -width; } - /// Change end position. - inline location operator- (const location& begin, int width) + /// Subtract \a width columns to the end position. + inline location operator- (location res, int width) { - return begin + -width; + return res -= width; } ]b4_percent_define_flag_if([[define_location_comparison]], [[ /// Compare two location objects. @@ -273,8 +279,7 @@ operator<< (std::basic_ostream& ostr, const location& loc) { unsigned int end_col = 0 < loc.end.column ? loc.end.column - 1 : 0; - ostr << loc.begin// << "(" << loc.end << ") " -; + ostr << loc.begin; if (loc.end.filename && (!loc.begin.filename || *loc.begin.filename != *loc.end.filename)) diff -Nru bison-3.0.2.dfsg/data/README bison-3.0.4.dfsg/data/README --- bison-3.0.2.dfsg/data/README 2013-08-02 15:35:13.000000000 +0000 +++ bison-3.0.4.dfsg/data/README 2015-01-16 14:47:42.000000000 +0000 @@ -52,7 +52,7 @@ ----- -Copyright (C) 2002, 2008-2013 Free Software Foundation, Inc. +Copyright (C) 2002, 2008-2015 Free Software Foundation, Inc. This file is part of GNU Bison. diff -Nru bison-3.0.2.dfsg/data/stack.hh bison-3.0.4.dfsg/data/stack.hh --- bison-3.0.2.dfsg/data/stack.hh 2013-08-02 15:35:13.000000000 +0000 +++ bison-3.0.4.dfsg/data/stack.hh 2015-01-20 19:41:24.000000000 +0000 @@ -1,6 +1,6 @@ # C++ skeleton for Bison -# Copyright (C) 2002-2013 Free Software Foundation, Inc. +# Copyright (C) 2002-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,7 +16,7 @@ # along with this program. If not, see . m4_pushdef([b4_copyright_years], - [2002-2013]) + [2002-2015]) # b4_stack_define # --------------- @@ -32,12 +32,12 @@ stack () : seq_ () { + seq_.reserve (200); } stack (unsigned int n) : seq_ (n) - { - } + {} inline T& @@ -114,8 +114,7 @@ slice (const S& stack, unsigned int range) : stack_ (stack) , range_ (range) - { - } + {} inline const T& diff -Nru bison-3.0.2.dfsg/data/variant.hh bison-3.0.4.dfsg/data/variant.hh --- bison-3.0.2.dfsg/data/variant.hh 2013-11-08 09:11:43.000000000 +0000 +++ bison-3.0.4.dfsg/data/variant.hh 2015-01-16 14:47:42.000000000 +0000 @@ -1,6 +1,6 @@ # C++ skeleton for Bison -# Copyright (C) 2002-2013 Free Software Foundation, Inc. +# Copyright (C) 2002-2015 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -95,13 +95,13 @@ /// Empty construction. variant ()]b4_parse_assert_if([ - : yytname_ (YY_NULLPTR)])[ + : yytypeid_ (YY_NULLPTR)])[ {} /// Construct and fill. template variant (const T& t)]b4_parse_assert_if([ - : yytname_ (typeid (T).name ())])[ + : yytypeid_ (&typeid (T))])[ { YYASSERT (sizeof (T) <= S); new (yyas_ ()) T (t); @@ -110,7 +110,7 @@ /// Destruction, allowed only if empty. ~variant () {]b4_parse_assert_if([ - YYASSERT (!yytname_); + YYASSERT (!yytypeid_); ])[} /// Instantiate an empty \a T in here. @@ -118,9 +118,9 @@ T& build () {]b4_parse_assert_if([ - YYASSERT (!yytname_); + YYASSERT (!yytypeid_); YYASSERT (sizeof (T) <= S); - yytname_ = typeid (T).name ();])[ + yytypeid_ = & typeid (T);])[ return *new (yyas_ ()) T; } @@ -129,9 +129,9 @@ T& build (const T& t) {]b4_parse_assert_if([ - YYASSERT (!yytname_); + YYASSERT (!yytypeid_); YYASSERT (sizeof (T) <= S); - yytname_ = typeid (T).name ();])[ + yytypeid_ = & typeid (T);])[ return *new (yyas_ ()) T (t); } @@ -140,7 +140,7 @@ T& as () {]b4_parse_assert_if([ - YYASSERT (yytname_ == typeid (T).name ()); + YYASSERT (*yytypeid_ == typeid (T)); YYASSERT (sizeof (T) <= S);])[ return *yyas_ (); } @@ -150,7 +150,7 @@ const T& as () const {]b4_parse_assert_if([ - YYASSERT (yytname_ == typeid (T).name ()); + YYASSERT (*yytypeid_ == typeid (T)); YYASSERT (sizeof (T) <= S);])[ return *yyas_ (); } @@ -167,8 +167,8 @@ void swap (self_type& other) {]b4_parse_assert_if([ - YYASSERT (yytname_); - YYASSERT (yytname_ == other.yytname_);])[ + YYASSERT (yytypeid_); + YYASSERT (*yytypeid_ == *other.yytypeid_);])[ std::swap (as (), other.as ()); } @@ -198,7 +198,7 @@ destroy () { as ().~T ();]b4_parse_assert_if([ - yytname_ = YY_NULLPTR;])[ + yytypeid_ = YY_NULLPTR;])[ } private: @@ -233,7 +233,7 @@ } yybuffer_;]b4_parse_assert_if([ /// Whether the content is built: if defined, the name of the stored type. - const char *yytname_;])[ + const std::type_info *yytypeid_;])[ }; ]]) diff -Nru bison-3.0.2.dfsg/data/xslt/bison.xsl bison-3.0.4.dfsg/data/xslt/bison.xsl --- bison-3.0.2.dfsg/data/xslt/bison.xsl 2013-08-02 15:35:13.000000000 +0000 +++ bison-3.0.4.dfsg/data/xslt/bison.xsl 2015-01-16 14:47:42.000000000 +0000 @@ -3,7 +3,7 @@