Commit 0d49078a authored by Paul Eggert's avatar Paul Eggert

Update from Gnulib

This incorporates:
2019-02-24 nstrftime: support the ‘+’ flag
2019-02-24 stat, lstat: fix conflict with relocatable-prog-wrapper
2019-02-23 nstrftime: tweak arg order
2019-02-21 nstrftime: merge glibc strftime changes
2019-02-02 vla: add commentary about VLA_ELEMS
* build-aux/config.guess, doc/misc/texinfo.tex, lib/fstatat.c:
* lib/lstat.c, lib/nstrftime.c, lib/vla.h:
Copy from Gnulib.
parent cedc3410
Pipeline #857 failed with stage
in 52 minutes and 48 seconds
......@@ -2,7 +2,7 @@
# Attempt to guess a canonical system name.
# Copyright 1992-2019 Free Software Foundation, Inc.
timestamp='2019-01-15'
timestamp='2019-02-19'
# 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
......@@ -1113,7 +1113,7 @@ EOF
*Pentium) UNAME_MACHINE=i586 ;;
*Pent*|*Celeron) UNAME_MACHINE=i686 ;;
esac
echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}"
echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}"
exit ;;
i*86:*:3.2:*)
if test -f /usr/options/cb.name; then
......
......@@ -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{2019-02-01.12}
\def\texinfoversion{2019-02-23.16}
%
% Copyright 1985, 1986, 1988, 1990-2019 Free Software Foundation, Inc.
......@@ -5872,7 +5872,9 @@
\divide\doublecolumnhsize by 2
\hsize = \doublecolumnhsize
%
% Double the \vsize as well.
% Get the available space for the double columns -- the normal
% (undoubled) page height minus any material left over from the
% previous page.
\advance\vsize by -\ht\partialpage
\vsize = 2\vsize
%
......@@ -5886,16 +5888,13 @@
\def\doublecolumnout{%
%
\splittopskip=\topskip \splitmaxdepth=\maxdepth
% Get the available space for the double columns -- the normal
% (undoubled) page height minus any material left over from the
% previous page.
\dimen@ = \vsize
\divide\dimen@ by 2
%
% box0 will be the left-hand column, box2 the right.
\setbox0=\vsplit\PAGE to\dimen@ \setbox2=\vsplit\PAGE to\dimen@
\global\advance\vsize by 2\ht\partialpage
\onepageout\pagesofar
\onepageout\pagesofar % empty except for the first time we are called
\unvbox\PAGE
\penalty\outputpenalty
}
......@@ -5978,13 +5977,14 @@
\def\balancecolumns{%
\setbox0 = \vbox{\unvbox\PAGE}% like \box255 but more efficient, see p.120.
\dimen@ = \ht0
\advance\dimen@ by \topskip
\advance\dimen@ by-\baselineskip
\ifdim\dimen@<5\baselineskip
\ifdim\dimen@<7\baselineskip
% Don't split a short final column in two.
\setbox2=\vbox{}%
\global\setbox\balancedcolumns=\vbox{\pagesofar}%
\else
% double the leading vertical space
\advance\dimen@ by \topskip
\advance\dimen@ by-\baselineskip
\divide\dimen@ by 2 % target to split to
\dimen@ii = \dimen@
\splittopskip = \topskip
......@@ -11191,21 +11191,14 @@
\relax
}
% define all Unicode characters we know about, for the sake of @U.
% Define all Unicode characters we know about. This makes UTF-8 the default
% input encoding and allows @U to work.
\iftxinativeunicodecapable
\nativeunicodechardefsatu
\else
\utfeightchardefs
\fi
% Make non-ASCII characters printable again for compatibility with
% existing Texinfo documents that may use them, even without declaring a
% document encoding.
%
\setnonasciicharscatcode \other
\message{formatting,}
\newdimen\defaultparindent \defaultparindent = 15pt
......
......@@ -36,10 +36,14 @@ orig_fstatat (int fd, char const *filename, struct stat *buf, int flags)
}
#endif
#ifdef __osf__
/* Write "sys/stat.h" here, not <sys/stat.h>, otherwise OSF/1 5.1 DTK cc
eliminates this include because of the preliminary #include <sys/stat.h>
above. */
#include "sys/stat.h"
# include "sys/stat.h"
#else
# include <sys/stat.h>
#endif
#include "stat-time.h"
......
......@@ -42,10 +42,14 @@ orig_lstat (const char *filename, struct stat *buf)
}
/* Specification. */
# ifdef __osf__
/* Write "sys/stat.h" here, not <sys/stat.h>, otherwise OSF/1 5.1 DTK cc
eliminates this include because of the preliminary #include <sys/stat.h>
above. */
# include "sys/stat.h"
# include "sys/stat.h"
# else
# include <sys/stat.h>
# endif
# include "stat-time.h"
......
This diff is collapsed.
......@@ -17,6 +17,20 @@
Written by Paul Eggert. */
/* The VLA_ELEMS macro does not allocate variable-length arrays (VLAs),
so it does not have the security or performance issues commonly
associated with VLAs. VLA_ELEMS is for exploiting a C11 feature
where a function can start like this:
double scan_array (int n, double v[static n])
to require a caller to pass a vector V with at least N elements;
this allows better static checking and performance in some cases.
In C11 this feature means that V is a VLA, so the feature is
supported only if __STDC_NO_VLA__ is defined, and for compatibility
to platforms that do not support VLAs, VLA_ELEMS (n) expands to
nothing when __STDC_NO_VLA__ is not defined. */
/* A function's argument must point to an array with at least N elements.
Example: 'int main (int argc, char *argv[VLA_ELEMS (argc)]);'. */
......@@ -25,3 +39,15 @@
#else
# define VLA_ELEMS(n) static n
#endif
/* Although C99 requires support for variable-length arrays (VLAs),
some C compilers never supported VLAs and VLAs are optional in C11.
VLAs are controversial because their allocation may be unintended
or awkward to support, and large VLAs might cause security or
performance problems. GCC can diagnose the use of VLAs via the
-Wvla and -Wvla-larger-than warnings options, and defining the
macro GNULIB_NO_VLA disables the allocation of VLAs in Gnulib code.
The VLA_ELEMS macro is unaffected by GNULIB_NO_VLA, since it does
not allocate VLAs. Programs that use VLA_ELEMS should be compiled
with 'gcc -Wvla-larger-than' instead of with 'gcc -Wvla'. */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment