1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-23 07:19:15 +00:00

Sync with gnulib

This incorporates:
2016-04-03 stdint: detect good enough pre-C++11 stdint.h in C++ mode
2016-04-01 stddef: support configuring with g++
* doc/misc/texinfo.tex, lib/stddef.in.h, m4/stdint.m4:
Copy from gnulib.
This commit is contained in:
Paul Eggert 2016-04-03 23:12:04 -07:00
parent c4963f9a90
commit f501116ea8
3 changed files with 105 additions and 8 deletions

View File

@ -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{2016-03-22.15}
\def\texinfoversion{2016-03-25.17}
%
% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@ -1645,6 +1645,32 @@
/Subtype /Link /A << /S /URI /URI (#1) >> >>}%
\endgroup}
\def\endlink{\setcolor{\maincolor}\special{pdf:eann}}
\def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}}
\def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks}
\def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks}
\def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}}
\def\maketoks{%
\expandafter\poptoks\the\toksA|ENDTOKS|\relax
\ifx\first0\adn0
\else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3
\else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6
\else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9
\else
\ifnum0=\countA\else\makelink\fi
\ifx\first.\let\next=\done\else
\let\next=\maketoks
\addtokens{\toksB}{\the\toksD}
\ifx\first,\addtokens{\toksB}{\space}\fi
\fi
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
\next}
\def\makelink{\addtokens{\toksB}%
{\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0}
\def\pdflink#1{%
\special{pdf:bann << /Border [0 0 0]
/Type /Annot /Subtype /Link /A << /S /GoTo /D (name#1) >> >>}%
\setcolor{\linkcolor}#1\endlink}
\def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st}
%
%
% @image support
@ -2857,6 +2883,7 @@
\setbox0 = \hbox{\ignorespaces #2}% look for second arg
\ifdim\wd0 > 0pt
\ifpdf
% For pdfTeX and LuaTeX
\ifurefurlonlylink
% PDF plus option to not display url, show just arg
\unhbox0
@ -2866,7 +2893,19 @@
\unhbox0\ (\urefcode{#1})%
\fi
\else
\unhbox0\ (\urefcode{#1})% DVI, always show arg and url
\ifx\XeTeXrevision\thisisundefined
\unhbox0\ (\urefcode{#1})% DVI, always show arg and url
\else
% For XeTeX
\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
\fi
\fi
\else
\urefcode{#1}% only url given, so show it
@ -2967,7 +3006,18 @@
\endlink
\endgroup}
\else
\let\email=\uref
\ifx\XeTeXrevision\thisisundefined
\let\email=\uref
\else
\def\email#1{\doemail#1,,\finish}
\def\doemail#1,#2,#3\finish{\begingroup
\unsepspaces
\pdfurl{mailto:#1}%
\setbox0 = \hbox{\ignorespaces #2}%
\ifdim\wd0>0pt\unhbox0\else\code{#1}\fi
\endlink
\endgroup}
\fi
\fi
% @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always),
@ -5479,7 +5529,14 @@
% preserve coloured links across page boundaries. Otherwise the marks
% would get in the way of \lastbox in \insertindexentrybox.
\else
\hskip\skip\thinshrinkable #1%
\ifx\XeTeXrevision\thisisundefined
\hskip\skip\thinshrinkable #1%
\else
\pdfgettoks#1.%
\bgroup\let\domark\relax
\hskip\skip\thinshrinkable\the\toksA
\egroup
\fi
\fi
\fi
\egroup % end \boxA
@ -5614,7 +5671,11 @@
\ifpdf
\pdfgettoks#2.\ \the\toksA % The page number ends the paragraph.
\else
#2
\ifx\XeTeXrevision\thisisundefined
#2
\else
\pdfgettoks#2.\ \the\toksA % The page number ends the paragraph.
\fi
\fi
\par
}}
@ -11029,6 +11090,13 @@
% whatever layout pdftex was dumped with.
\pdfhorigin = 1 true in
\pdfvorigin = 1 true in
\else
\ifx\XeTeXrevision\thisisundefined
\else
\pdfpageheight #7\relax
\pdfpagewidth #8\relax
% XeTeX does not have \pdfhorigin and \pdfvorigin.
\fi
\fi
%
\setleading{\textleading}

View File

@ -81,8 +81,10 @@
# define wchar_t int
#endif
/* Some platforms lack max_align_t. */
#if !@HAVE_MAX_ALIGN_T@
/* Some platforms lack max_align_t. The check for _GCC_MAX_ALIGN_T is
a hack in case the configure-time test was done with g++ even though
we are currently compiling with gcc. */
#if ! (@HAVE_MAX_ALIGN_T@ || defined _GCC_MAX_ALIGN_T)
/* On the x86, the maximum storage alignment of double, long, etc. is 4,
but GCC's C11 ABI for x86 says that max_align_t has an alignment of 8,
and the C11 standard allows this. Work around this problem by

View File

@ -1,4 +1,4 @@
# stdint.m4 serial 43
# stdint.m4 serial 44
dnl Copyright (C) 2001-2016 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@ -70,6 +70,8 @@ AC_DEFUN_ONCE([gl_STDINT_H],
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
#define __STDC_CONSTANT_MACROS 1
#define __STDC_LIMIT_MACROS 1
#include <stdint.h>
/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
#if !(defined WCHAR_MIN && defined WCHAR_MAX)
@ -218,6 +220,8 @@ struct s {
AC_RUN_IFELSE([
AC_LANG_PROGRAM([[
#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
#define __STDC_CONSTANT_MACROS 1
#define __STDC_LIMIT_MACROS 1
#include <stdint.h>
]
gl_STDINT_INCLUDES
@ -279,6 +283,29 @@ static const char *macro_values[] =
])
fi
if test "$gl_cv_header_working_stdint_h" = yes; then
dnl Now see whether the system <stdint.h> works without
dnl __STDC_CONSTANT_MACROS/__STDC_LIMIT_MACROS defined.
AC_CACHE_CHECK([whether stdint.h predates C++11],
[gl_cv_header_stdint_predates_cxx11_h],
[gl_cv_header_stdint_predates_cxx11_h=yes
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
#include <stdint.h>
]
gl_STDINT_INCLUDES
[
intmax_t im = INTMAX_MAX;
int32_t i32 = INT32_C (0x7fffffff);
]])],
[gl_cv_header_stdint_predates_cxx11_h=no])])
if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then
AC_DEFINE([__STDC_CONSTANT_MACROS], [1],
[Define to 1 if the system <stdint.h> predates C++11.])
AC_DEFINE([__STDC_LIMIT_MACROS], [1],
[Define to 1 if the system <stdint.h> predates C++11.])
fi
STDINT_H=
else
dnl Check for <sys/inttypes.h>, and for