summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2012-04-24 17:30:37 -0600
committerEric Blake <eblake@redhat.com>2012-04-24 20:15:05 -0600
commit84e20e9164b7e7ccc189eb68c5f839ec28d276ae (patch)
tree94b9cb5229a5dc962b30d508b4e0a8b829256aed
parentf35498d15cd291a476594ed1b12b8d198310efb0 (diff)
downloadautoconf-84e20e9164b7e7ccc189eb68c5f839ec28d276ae.tar.gz
maint: resync files from upstream
The files in lib/Autom4te/ are intentionally not synced at this point, since this recent Automake patch: https://lists.gnu.org/archive/html/automake-patches/2012-03/msg00111.html was buggy regarding '-' as stdout, and also exposes some latent bugs in autoconf where we use raw 'open' instead of XFile::open. * build-aux/announce-gen: Resync via 'make fetch'. * build-aux/config.sub: Likewise. * build-aux/git-version-gen: Likewise. * build-aux/gnupload: Likewise. * build-aux/move-if-change: Likewise. * build-aux/texinfo.tex: Likewise. * doc/standards.texi: Likewise. * maint.mk: Likewise.
-rwxr-xr-xbuild-aux/announce-gen5
-rwxr-xr-xbuild-aux/config.sub8
-rwxr-xr-xbuild-aux/git-version-gen5
-rwxr-xr-xbuild-aux/gnupload2
-rwxr-xr-xbuild-aux/move-if-change2
-rw-r--r--build-aux/texinfo.tex101
-rw-r--r--doc/standards.texi27
-rw-r--r--maint.mk14
8 files changed, 118 insertions, 46 deletions
diff --git a/build-aux/announce-gen b/build-aux/announce-gen
index 3ca90a9a..8c6ed368 100755
--- a/build-aux/announce-gen
+++ b/build-aux/announce-gen
@@ -3,7 +3,7 @@ eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}'
if 0;
# Generate a release announcement message.
-my $VERSION = '2012-01-06 07:46'; # UTC
+my $VERSION = '2012-04-19 14:36'; # 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
@@ -30,7 +30,8 @@ use strict;
use Getopt::Long;
use Digest::MD5;
-use Digest::SHA1;
+eval { require Digest::SHA; }
+ or eval 'use Digest::SHA1';
use POSIX qw(strftime);
(my $ME = $0) =~ s|.*/||;
diff --git a/build-aux/config.sub b/build-aux/config.sub
index c894da45..59bb593f 100755
--- a/build-aux/config.sub
+++ b/build-aux/config.sub
@@ -4,7 +4,7 @@
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# 2011, 2012 Free Software Foundation, Inc.
-timestamp='2012-02-10'
+timestamp='2012-04-18'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -225,6 +225,12 @@ case $os in
-isc*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
+ -lynx*178)
+ os=-lynxos178
+ ;;
+ -lynx*5)
+ os=-lynxos5
+ ;;
-lynx*)
os=-lynxos
;;
diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen
index d5542a22..0fa90636 100755
--- a/build-aux/git-version-gen
+++ b/build-aux/git-version-gen
@@ -1,6 +1,6 @@
#!/bin/sh
# Print a version string.
-scriptversion=2012-01-06.07; # UTC
+scriptversion=2012-03-18.17; # UTC
# Copyright (C) 2007-2012 Free Software Foundation, Inc.
#
@@ -92,6 +92,8 @@ Options:
Running without arguments will suffice in most cases."
+prefix=v
+
while test $# -gt 0; do
case $1 in
--help) echo "$usage"; exit 0;;
@@ -120,7 +122,6 @@ if test -z "$tarball_version_file"; then
fi
tag_sed_script="${tag_sed_script:-s/x/x/}"
-prefix="${prefix:-v}"
nl='
'
diff --git a/build-aux/gnupload b/build-aux/gnupload
index 51e17c65..b71ddfda 100755
--- a/build-aux/gnupload
+++ b/build-aux/gnupload
@@ -3,7 +3,7 @@
scriptversion=2012-01-15.15; # UTC
-# Copyright (C) 2004-2010, 2012 Free Software Foundation, Inc.
+# Copyright (C) 2004-2012 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 --git a/build-aux/move-if-change b/build-aux/move-if-change
index 4d014470..8cae2b39 100755
--- a/build-aux/move-if-change
+++ b/build-aux/move-if-change
@@ -8,7 +8,7 @@ VERSION='2012-01-06 07:23'; # UTC
# If you change this file with Emacs, please let the write hook
# do its job. Otherwise, update this string manually.
-# Copyright (C) 2002-2007, 2009-2012 Free Software Foundation, Inc.
+# Copyright (C) 2002-2012 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 --git a/build-aux/texinfo.tex b/build-aux/texinfo.tex
index bee50a81..e4dca02c 100644
--- a/build-aux/texinfo.tex
+++ b/build-aux/texinfo.tex
@@ -3,7 +3,7 @@
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
-\def\texinfoversion{2012-02-28.16}
+\def\texinfoversion{2012-04-06.11}
%
% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@@ -1372,7 +1372,13 @@ output) for that.)}
\fi
\fi
\nextsp}
- \def\getfilename#1{\filenamelength=0\expandafter\skipspaces#1|\relax}
+ \def\getfilename#1{%
+ \filenamelength=0
+ % If we don't expand the argument now, \skipspaces will get
+ % snagged on things like "@value{foo}".
+ \edef\temp{#1}%
+ \expandafter\skipspaces\temp|\relax
+ }
\ifnum\pdftexversion < 14
\let \startlink \pdfannotlink
\else
@@ -4445,6 +4451,7 @@ end
\definedummyword\guillemetright
\definedummyword\guilsinglleft
\definedummyword\guilsinglright
+ \definedummyword\lbracechar
\definedummyword\leq
\definedummyword\minus
\definedummyword\ogonek
@@ -4457,6 +4464,7 @@ end
\definedummyword\quoteleft
\definedummyword\quoteright
\definedummyword\quotesinglbase
+ \definedummyword\rbracechar
\definedummyword\result
\definedummyword\textdegree
%
@@ -4508,6 +4516,7 @@ end
\definedummyword\t
%
% Commands that take arguments.
+ \definedummyword\abbr
\definedummyword\acronym
\definedummyword\anchor
\definedummyword\cite
@@ -4519,7 +4528,9 @@ end
\definedummyword\emph
\definedummyword\env
\definedummyword\file
+ \definedummyword\image
\definedummyword\indicateurl
+ \definedummyword\inforef
\definedummyword\kbd
\definedummyword\key
\definedummyword\math
@@ -4566,7 +4577,10 @@ end
% 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}%
+ %
\def\}{|b}%
+ \def\rbracechar{|b}%
%
% Non-English letters.
\def\AA{AA}%
@@ -7801,7 +7815,7 @@ end
\fi\fi
}
-
+%
% @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is
% the node name, #2 the name of the Info cross-reference, #3 the printed
% node name, #4 the name of the Info file, #5 the name of the printed
@@ -7811,16 +7825,21 @@ end
\def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]}
\def\ref#1{\xrefX[#1,,,,,,,]}
%
-\newbox\topbox
+\newbox\toprefbox
\newbox\printedrefnamebox
+\newbox\infofilenamebox
\newbox\printedmanualbox
%
\def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup
\unsepspaces
%
+ % Get args without leading/trailing spaces.
\def\printedrefname{\ignorespaces #3}%
\setbox\printedrefnamebox = \hbox{\printedrefname\unskip}%
%
+ \def\infofilename{\ignorespaces #4}%
+ \setbox\infofilenamebox = \hbox{\infofilename\unskip}%
+ %
\def\printedmanual{\ignorespaces #5}%
\setbox\printedmanualbox = \hbox{\printedmanual\unskip}%
%
@@ -7853,12 +7872,20 @@ end
\ifpdf
{\indexnofonts
\turnoffactive
+ \makevalueexpandable
% This expands tokens, so do it after making catcode changes, so _
- % etc. don't get their TeX definitions.
+ % etc. don't get their TeX definitions. This ignores all spaces in
+ % #4, including (wrongly) those in the middle of the filename.
\getfilename{#4}%
%
+ % This (wrongly) does not take account of leading or trailing
+ % spaces in #1, which should be ignored.
\edef\pdfxrefdest{#1}%
- \txiescapepdf\pdfxrefdest
+ \ifx\pdfxrefdest\empty
+ \def\pdfxrefdest{Top}% no empty targets
+ \else
+ \txiescapepdf\pdfxrefdest % escape PDF special chars
+ \fi
%
\leavevmode
\startlink attr{/Border [0 0 0]}%
@@ -7891,7 +7918,7 @@ end
\printedrefname
\fi
%
- % if the user also gave the printed manual name (fifth arg), append
+ % If the user also gave the printed manual name (fifth arg), append
% "in MANUALNAME".
\ifdim \wd\printedmanualbox > 0pt
\space \putwordin{} \cite{\printedmanual}%
@@ -7906,32 +7933,20 @@ end
% this is a loss. Therefore, we give the text of the node name
% again, so it is as if TeX is seeing it for the first time.
%
- % Cross-manual reference. Only include the "Section ``foo'' in" if
- % the foo is neither missing or Top. Thus, @xref{,,,foo,The Foo Manual}
- % outputs simply "see The Foo Manual".
\ifdim \wd\printedmanualbox > 0pt
- % What is the 7sp about? The idea is that we also want to omit
- % the Section part if we would be printing "Top", since they are
- % clearly trying to refer to the whole manual. But, this being
- % TeX, we can't easily compare strings while ignoring the possible
- % spaces before and after in the input. By adding the arbitrary
- % 7sp, we make it much less likely that a real node name would
- % happen to have the same width as "Top" (e.g., in a monospaced font).
- % I hope it will never happen in practice.
+ % Cross-manual reference with a printed manual name.
%
- % For the same basic reason, we retypeset the "Top" at every
- % reference, since the current font is indeterminate.
+ \crossmanualxref{\cite{\printedmanual\unskip}}%
+ %
+ \else\ifdim \wd\infofilenamebox > 0pt
+ % Cross-manual reference with only an info filename (arg 4), no
+ % printed manual name (arg 5). This is essentially the same as
+ % the case above; we output the filename, since we have nothing else.
%
- \setbox\topbox = \hbox{Top\kern7sp}%
- \setbox2 = \hbox{\ignorespaces \printedrefname \unskip \kern7sp}%
- \ifdim \wd2 > 7sp
- \ifdim \wd2 = \wd\topbox \else
- \putwordSection{} ``\printedrefname'' \putwordin{}\space
- \fi
- \fi
- \cite{\printedmanual}%
+ \crossmanualxref{\code{\infofilename\unskip}}%
+ %
\else
- % Reference in this manual.
+ % Reference within this manual.
%
% _ (for example) has to be the character _ for the purposes of the
% control sequence corresponding to the node, but it has to expand
@@ -7952,11 +7967,37 @@ end
%
% output the `page 3'.
\turnoffactive \putwordpage\tie\refx{#1-pg}{}%
- \fi
+ \fi\fi
\fi
\endlink
\endgroup}
+% Output a cross-manual xref to #1. Used just above (twice).
+%
+% Only include the text "Section ``foo'' in" if the foo is neither
+% missing or Top. Thus, @xref{,,,foo,The Foo Manual} outputs simply
+% "see The Foo Manual", the idea being to refer to the whole manual.
+%
+% But, this being TeX, we can't easily compare our node name against the
+% string "Top" while ignoring the possible spaces before and after in
+% the input. By adding the arbitrary 7sp below, we make it much less
+% likely that a real node name would have the same width as "Top" (e.g.,
+% in a monospaced font). Hopefully it will never happen in practice.
+%
+% For the same basic reason, we retypeset the "Top" at every
+% reference, since the current font is indeterminate.
+%
+\def\crossmanualxref#1{%
+ \setbox\toprefbox = \hbox{Top\kern7sp}%
+ \setbox2 = \hbox{\ignorespaces \printedrefname \unskip \kern7sp}%
+ \ifdim \wd2 > 7sp % nonempty?
+ \ifdim \wd2 = \wd\toprefbox \else % same as Top?
+ \putwordSection{} ``\printedrefname'' \putwordin{}\space
+ \fi
+ \fi
+ #1%
+}
+
% This macro is called from \xrefX for the `[nodename]' part of xref
% output. It's a separate macro only so it can be changed more easily,
% since square brackets don't work well in some documents. Particularly
diff --git a/doc/standards.texi b/doc/standards.texi
index 4ba94269..69a400ea 100644
--- a/doc/standards.texi
+++ b/doc/standards.texi
@@ -3,7 +3,7 @@
@setfilename standards.info
@settitle GNU Coding Standards
@c This date is automagically updated when you save this file:
-@set lastupdate February 5, 2012
+@set lastupdate April 7, 2012
@c %**end of header
@dircategory GNU organization
@@ -2384,6 +2384,7 @@ when writing GNU software.
@cindex open brace
@cindex braces, in C source
+@cindex function definitions, formatting
It is important to put the open-brace that starts the body of a C
function in column one, so that they will start a defun. Several
tools look for open-braces in column one to find the beginnings of C
@@ -2430,6 +2431,20 @@ lots_of_args (int an_integer, long a_long, short a_short,
@dots{}
@end example
+@cindex @code{struct} types, formatting
+@cindex @code{enum} types, formatting
+For @code{struct} and @code{enum} types, likewise put the braces in
+column one, unless the whole contents fits on one line:
+
+@example
+struct foo
+@{
+ int a, b;
+@}
+@exdent @r{or}
+struct foo @{ int a, b; @}
+@end example
+
The rest of this section gives our recommendations for other aspects of
C formatting style, which is also the default style of the @code{indent}
program in version 1.2 and newer. It corresponds to the options
@@ -2576,7 +2591,7 @@ about the value rather than the variable itself. Thus, ``the inode
number NODE_NUM'' rather than ``an inode''.
There is usually no purpose in restating the name of the function in
-the comment before it, because the reader can see that for himself.
+the comment before it, because readers can see that for themselves.
There might be an exception when the comment is so long that the function
itself would be off the bottom of the screen.
@@ -2655,10 +2670,10 @@ Don't make the program ugly just to placate static analysis tools such
as @command{lint}, @command{clang}, and GCC with extra warnings
options such as @option{-Wconversion} and @option{-Wundef}. These
tools can help find bugs and unclear code, but they can also generate
-so many false alarms that that it hurts readability to silence them
-with unnecessary casts, wrappers, and other complications. For
-example, please don't insert casts to @code{void} or calls to
-do-nothing functions merely to pacify a lint checker.
+so many false alarms that it hurts readability to silence them with
+unnecessary casts, wrappers, and other complications. For example,
+please don't insert casts to @code{void} or calls to do-nothing
+functions merely to pacify a lint checker.
Declarations of external functions and functions to appear later in the
source file should all go in one place near the beginning of the file
diff --git a/maint.mk b/maint.mk
index a97e0bd5..1c7af036 100644
--- a/maint.mk
+++ b/maint.mk
@@ -279,7 +279,7 @@ define _sc_search_regexp
if test -n "$$files"; then \
if test -n "$$prohibit"; then \
grep $$with_grep_options $(_ignore_case) -nE "$$prohibit" $$files \
- | grep -vE "$${exclude-^$$}" \
+ | grep -vE "$${exclude:-^$$}" \
&& { msg="$$halt" $(_sc_say_and_exit) } || :; \
else \
grep $$with_grep_options $(_ignore_case) -LE "$$require" $$files \
@@ -455,7 +455,8 @@ sc_prohibit_quotearg_without_use:
# Don't include quote.h unless you use one of its functions.
sc_prohibit_quote_without_use:
- @h='quote.h' re='\<quote(_n)? *\(' $(_sc_header_without_use)
+ @h='quote.h' re='\<quote((_n)? *\(|_quoting_options\>)' \
+ $(_sc_header_without_use)
# Don't include this header unless you use one of its functions.
sc_prohibit_long_options_without_use:
@@ -931,8 +932,15 @@ sc_prohibit_doubled_word:
# A regular expression matching undesirable combinations of words like
# "can not"; this matches them even when the two words appear on different
# lines, but not when there is an intervening delimiter like "#" or "*".
+# Similarly undesirable, "See @xref{...}", since an @xref should start
+# a sentence. Explicitly prohibit any prefix of "see" or "also".
+# Also prohibit a prefix matching "\w+ +".
+# @pxref gets the same see/also treatment and should be parenthesized;
+# presume it must *not* start a sentence.
+bad_xref_re_ ?= (?:[\w,:;] +|(?:see|also)\s+)\@xref\{
+bad_pxref_re_ ?= (?:[.!?]|(?:see|also))\s+\@pxref\{
prohibit_undesirable_word_seq_RE_ ?= \
- /\bcan\s+not\b/gims
+ /(?:\bcan\s+not\b|$(bad_xref_re_)|$(bad_pxref_re_))/gims
prohibit_undesirable_word_seq_ = \
-e 'while ($(prohibit_undesirable_word_seq_RE_))' \
$(perl_filename_lineno_text_)