1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-05 19:31:02 -08:00

Merge from gnulib

This incorporates:
2017-06-11 getopt-posix: port to glibc 2.25.90
2017-06-04 same-inode: port better to VMS 8.2 and later
* doc/misc/texinfo.tex, lib/getopt-pfx-core.h, lib/getopt-pfx-ext.h:
* m4/sys_types_h.m4: Copy from gnulib.
This commit is contained in:
Paul Eggert 2017-06-11 17:29:21 -07:00
parent bb534f6afe
commit 07ab837491
4 changed files with 42 additions and 25 deletions

View file

@ -3,7 +3,7 @@
% Load plain if necessary, i.e., if running under initex. % Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
% %
\def\texinfoversion{2017-05-14.14} \def\texinfoversion{2017-06-04.19}
% %
% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@ -5493,17 +5493,15 @@ end
\let\indexlbrace\{ % Likewise, set these sequences for braces \let\indexlbrace\{ % Likewise, set these sequences for braces
\let\indexrbrace\} % used in the sort key. \let\indexrbrace\} % used in the sort key.
\begindoublecolumns \begindoublecolumns
\let\entrywidowpenalty=\indexwidowpenalty \let\dotheinsertentrybox\dotheinsertentryboxwithpenalty
% %
% Read input from the index file line by line. % Read input from the index file line by line.
\loopdo \loopdo
\ifeof1 \ifeof1 \else
\let\firsttoken\relax
\else
\read 1 to \nextline \read 1 to \nextline
\edef\act{\gdef\noexpand\firsttoken{\getfirsttoken\nextline}}%
\act
\fi \fi
%
\indexinputprocessing
\thisline \thisline
% %
\ifeof1\else \ifeof1\else
@ -5515,12 +5513,20 @@ end
\fi \fi
\closein 1 \closein 1
\endgroup} \endgroup}
\def\loopdo#1\repeat{\def\body{#1}\loopdoxxx}
\def\loopdoxxx{\let\next=\relax\body\let\next=\loopdoxxx\fi\next}
\def\indexinputprocessing{%
\ifeof1
\let\firsttoken\relax
\else
\edef\act{\gdef\noexpand\firsttoken{\getfirsttoken\nextline}}%
\act
\fi
}
\def\getfirsttoken#1{\expandafter\getfirsttokenx#1\endfirsttoken} \def\getfirsttoken#1{\expandafter\getfirsttokenx#1\endfirsttoken}
\long\def\getfirsttokenx#1#2\endfirsttoken{\noexpand#1} \long\def\getfirsttokenx#1#2\endfirsttoken{\noexpand#1}
\def\loopdo#1\repeat{\def\body{#1}\loopdoxxx}
\def\loopdoxxx{\let\next=\relax\body\let\next=\loopdoxxx\fi\next}
% These macros are used by the sorted index file itself. % These macros are used by the sorted index file itself.
% Change them to control the appearance of the index. % Change them to control the appearance of the index.
@ -5597,7 +5603,7 @@ end
% For pdfTeX and XeTeX. % For pdfTeX and XeTeX.
% The redefinition of \domark stops marks being added in \pdflink to % The redefinition of \domark stops marks being added in \pdflink to
% preserve coloured links across page boundaries. Otherwise the marks % preserve coloured links across page boundaries. Otherwise the marks
% would get in the way of \lastbox in \insertindexentrybox. % would get in the way of \lastbox in \insertentrybox.
\let\domark\relax \let\domark\relax
% %
% Start a new paragraph if necessary, so our assignments below can't % Start a new paragraph if necessary, so our assignments below can't
@ -5658,9 +5664,9 @@ end
\fi \fi
\egroup % end \boxA \egroup % end \boxA
\ifdim\wd\boxB = 0pt \ifdim\wd\boxB = 0pt
\global\setbox\entryindexbox=\vbox{\unhbox\boxA}% \global\setbox\entrybox=\vbox{\unhbox\boxA}%
\else \else
\global\setbox\entryindexbox=\vbox\bgroup \global\setbox\entrybox=\vbox\bgroup
% We want the text of the entries to be aligned to the left, and the % We want the text of the entries to be aligned to the left, and the
% page numbers to be aligned to the right. % page numbers to be aligned to the right.
% %
@ -5722,19 +5728,20 @@ end
\egroup % The \vbox \egroup % The \vbox
\fi \fi
\endgroup \endgroup
% delay text of entry until after penalty \dotheinsertentrybox
\bgroup\aftergroup\insertindexentrybox
\entrywidowpenalty
}} }}
\newskip\thinshrinkable \newskip\thinshrinkable
\skip\thinshrinkable=.15em minus .15em \skip\thinshrinkable=.15em minus .15em
\newbox\entryindexbox \newbox\entrybox
\def\insertindexentrybox{% \def\insertentrybox{%
\ourunvbox\entryindexbox \ourunvbox\entrybox
} }
% default definition
\let\dotheinsertentrybox\insertentrybox
% Use \lastbox to take apart vbox box by box, and add each sub-box % Use \lastbox to take apart vbox box by box, and add each sub-box
% to the current vertical list. % to the current vertical list.
\def\ourunvbox#1{% \def\ourunvbox#1{%
@ -5757,21 +5764,18 @@ end
\newbox\delayedbox \newbox\delayedbox
\newbox\interbox \newbox\interbox
% Default is no penalty
\let\entrywidowpenalty\egroup
% Used from \printindex. \firsttoken should be the first token % Used from \printindex. \firsttoken should be the first token
% after the \entry. If it's not another \entry, we are at the last % after the \entry. If it's not another \entry, we are at the last
% line of a group of index entries, so insert a penalty to discourage % line of a group of index entries, so insert a penalty to discourage
% widowed index entries. % widowed index entries.
\long\def\indexwidowpenalty{% \def\dotheinsertentryboxwithpenalty{%
\def\isentry{\entry}%
\ifx\firsttoken\isentry \ifx\firsttoken\isentry
\else \else
\penalty 9000 \penalty 9000
\fi \fi
\egroup % now comes the box added with \aftergroup \insertentrybox
} }
\def\isentry{\entry}%
% Like plain.tex's \dotfill, except uses up at least 1 em. % Like plain.tex's \dotfill, except uses up at least 1 em.
% The filll stretch here overpowers both the fil and fill stretch to push % The filll stretch here overpowers both the fil and fill stretch to push

View file

@ -47,6 +47,11 @@
# define opterr __GETOPT_ID (opterr) # define opterr __GETOPT_ID (opterr)
# define optind __GETOPT_ID (optind) # define optind __GETOPT_ID (optind)
# define optopt __GETOPT_ID (optopt) # define optopt __GETOPT_ID (optopt)
/* The system's getopt.h may have already included getopt-core.h to
declare the unprefixed identifiers. Undef _GETOPT_CORE_H so that
getopt-core.h declares them with prefixes. */
# undef _GETOPT_CORE_H
#endif #endif
#include <getopt-core.h> #include <getopt-core.h>

View file

@ -45,6 +45,11 @@
# define getopt_long_only __GETOPT_ID (getopt_long_only) # define getopt_long_only __GETOPT_ID (getopt_long_only)
# define option __GETOPT_ID (option) # define option __GETOPT_ID (option)
# define _getopt_internal __GETOPT_ID (getopt_internal) # define _getopt_internal __GETOPT_ID (getopt_internal)
/* The system's getopt.h may have already included getopt-ext.h to
declare the unprefixed identifiers. Undef _GETOPT_EXT_H so that
getopt-ext.h declares them with prefixes. */
# undef _GETOPT_EXT_H
#endif #endif
/* Standalone applications get correct prototypes for getopt_long and /* Standalone applications get correct prototypes for getopt_long and

View file

@ -1,4 +1,4 @@
# sys_types_h.m4 serial 7 # sys_types_h.m4 serial 8
dnl Copyright (C) 2011-2017 Free Software Foundation, Inc. dnl Copyright (C) 2011-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it, dnl gives unlimited permission to copy and/or distribute it,
@ -6,6 +6,9 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN_ONCE([gl_SYS_TYPES_H], AC_DEFUN_ONCE([gl_SYS_TYPES_H],
[ [
dnl Use sane struct stat types in OpenVMS 8.2 and later.
AC_DEFINE([_USE_STD_STAT], 1, [For standard stat data types on VMS.])
AC_REQUIRE([gl_SYS_TYPES_H_DEFAULTS]) AC_REQUIRE([gl_SYS_TYPES_H_DEFAULTS])
gl_NEXT_HEADERS([sys/types.h]) gl_NEXT_HEADERS([sys/types.h])