aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2016-04-11 09:02:00 -0700
committerPaul Eggert2016-04-11 09:03:22 -0700
commitb134c206bc07dbbb9e74b3be2db269c4f1196e40 (patch)
tree1e6633483030e7fca0dc19ac0a63efe420f58e8d
parentbb30fa951c23911f5c3a14d9d46d1a3260a50fe0 (diff)
downloademacs-b134c206bc07dbbb9e74b3be2db269c4f1196e40.tar.gz
emacs-b134c206bc07dbbb9e74b3be2db269c4f1196e40.zip
Sync with gnulib
This is for picky compilers whose stdint.h fails our C11 tests. Problem reported for clang by Philipp Stephani (Bug#23261). This incorporates: 2016-04-11 stdint: port to strict C11 left shift * doc/misc/texinfo.tex, lib/stdint.in.h: Copy from gnulib.
-rw-r--r--doc/misc/texinfo.tex70
-rw-r--r--lib/stdint.in.h9
2 files changed, 66 insertions, 13 deletions
diff --git a/doc/misc/texinfo.tex b/doc/misc/texinfo.tex
index 75017af5035..d164d451b89 100644
--- a/doc/misc/texinfo.tex
+++ b/doc/misc/texinfo.tex
@@ -3,7 +3,7 @@
3% Load plain if necessary, i.e., if running under initex. 3% Load plain if necessary, i.e., if running under initex.
4\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi 4\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
5% 5%
6\def\texinfoversion{2016-03-25.17} 6\def\texinfoversion{2016-03-29.15}
7% 7%
8% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, 8% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
9% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 9% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@@ -1550,8 +1550,7 @@ output) for that.)}
1550 \fi 1550 \fi
1551 \turnoffactive 1551 \turnoffactive
1552 \makevalueexpandable 1552 \makevalueexpandable
1553 % In the case of XeTeX, xdvipdfmx converts strings to UTF-16. 1553 \txiescapepdf\pdfdestname
1554 % Therefore \txiescapepdf is not necessary.
1555 \safewhatsit{\pdfdest name{\pdfdestname} xyz}% 1554 \safewhatsit{\pdfdest name{\pdfdestname} xyz}%
1556 }} 1555 }}
1557 % 1556 %
@@ -1566,9 +1565,12 @@ output) for that.)}
1566 \fi 1565 \fi
1567 { 1566 {
1568 \turnoffactive 1567 \turnoffactive
1569 % In the case of XeTeX, xdvipdfmx converts strings to UTF-16. 1568 \txiescapepdf\pdfoutlinedest
1570 % Therefore \txiescapepdf is not necessary. 1569 \edef\pdfoutlinetext{#1}%
1571 \special{pdf:out [-] #2 << /Title (#1) /A << /S /GoTo /D (name\pdfoutlinedest) >> >> }% 1570 \txiescapepdf\pdfoutlinetext
1571 %
1572 \special{pdf:out [-] #2 << /Title (\pdfoutlinetext) /A
1573 << /S /GoTo /D (name\pdfoutlinedest) >> >> }%
1572 } 1574 }
1573 } 1575 }
1574 % 1576 %
@@ -1624,6 +1626,20 @@ output) for that.)}
1624 % ``\special{pdf:dest ...}'' can not handle non-ASCII strings. 1626 % ``\special{pdf:dest ...}'' can not handle non-ASCII strings.
1625 % It fixed by xdvipdfmx 20160106 (TeX Live SVN r39753). 1627 % It fixed by xdvipdfmx 20160106 (TeX Live SVN r39753).
1626% 1628%
1629 \def\skipspaces#1{\def\PP{#1}\def\D{|}%
1630 \ifx\PP\D\let\nextsp\relax
1631 \else\let\nextsp\skipspaces
1632 \addtokens{\filename}{\PP}%
1633 \advance\filenamelength by 1
1634 \fi
1635 \nextsp}
1636 \def\getfilename#1{%
1637 \filenamelength=0
1638 % If we don't expand the argument now, \skipspaces will get
1639 % snagged on things like "@value{foo}".
1640 \edef\temp{#1}%
1641 \expandafter\skipspaces\temp|\relax
1642 }
1627 % make a live url in pdf output. 1643 % make a live url in pdf output.
1628 \def\pdfurl#1{% 1644 \def\pdfurl#1{%
1629 \begingroup 1645 \begingroup
@@ -8760,6 +8776,7 @@ end
8760 % 8776 %
8761 % Make link in pdf output. 8777 % Make link in pdf output.
8762 \ifpdf 8778 \ifpdf
8779 % For pdfTeX and LuaTeX
8763 {\indexnofonts 8780 {\indexnofonts
8764 \turnoffactive 8781 \turnoffactive
8765 \makevalueexpandable 8782 \makevalueexpandable
@@ -8786,6 +8803,47 @@ end
8786 \fi 8803 \fi
8787 }% 8804 }%
8788 \setcolor{\linkcolor}% 8805 \setcolor{\linkcolor}%
8806 \else
8807 \ifx\XeTeXrevision\thisisundefined
8808 \else
8809 % For XeTeX
8810 {\indexnofonts
8811 \turnoffactive
8812 \makevalueexpandable
8813 % This expands tokens, so do it after making catcode changes, so _
8814 % etc. don't get their TeX definitions. This ignores all spaces in
8815 % #4, including (wrongly) those in the middle of the filename.
8816 \getfilename{#4}%
8817 %
8818 % This (wrongly) does not take account of leading or trailing
8819 % spaces in #1, which should be ignored.
8820 \iftxiuseunicodedestname
8821 \def\pdfxrefdest{#1}% Pass through Unicode characters.
8822 \else
8823 \edef\pdfxrefdest{#1}% Replace Unicode characters to ASCII.
8824 \fi
8825 \ifx\pdfxrefdest\empty
8826 \def\pdfxrefdest{Top}% no empty targets
8827 \else
8828 \txiescapepdf\pdfxrefdest % escape PDF special chars
8829 \fi
8830 %
8831 \leavevmode
8832 \ifnum\filenamelength>0
8833 % By the default settings,
8834 % XeTeX (xdvipdfmx) replaces link destination names with integers.
8835 % In this case, the replaced destination names of
8836 % remote PDF cannot be known. In order to avoid replacement,
8837 % you can use commandline option `-C 0x0010' for xdvipdfmx.
8838 \special{pdf:bann << /Border [0 0 0] /Type /Annot /Subtype /Link /A
8839 << /S /GoToR /F (\the\filename.pdf) /D (name\pdfxrefdest) >> >>}%
8840 \else
8841 \special{pdf:bann << /Border [0 0 0] /Type /Annot /Subtype /Link /A
8842 << /S /GoTo /D (name\pdfxrefdest) >> >>}%
8843 \fi
8844 }%
8845 \setcolor{\linkcolor}%
8846 \fi
8789 \fi 8847 \fi
8790 {% 8848 {%
8791 % Have to otherify everything special to allow the \csname to 8849 % Have to otherify everything special to allow the \csname to
diff --git a/lib/stdint.in.h b/lib/stdint.in.h
index 0bb9ad41b29..cf65ec62e97 100644
--- a/lib/stdint.in.h
+++ b/lib/stdint.in.h
@@ -118,15 +118,10 @@
118 picky compilers. */ 118 picky compilers. */
119 119
120#define _STDINT_MIN(signed, bits, zero) \ 120#define _STDINT_MIN(signed, bits, zero) \
121 ((signed) ? (- ((zero) + 1) << ((bits) ? (bits) - 1 : 0)) : (zero)) 121 ((signed) ? ~ _STDINT_MAX (signed, bits, zero) : (zero))
122 122
123#define _STDINT_MAX(signed, bits, zero) \ 123#define _STDINT_MAX(signed, bits, zero) \
124 ((signed) \ 124 (((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1)
125 ? ~ _STDINT_MIN (signed, bits, zero) \
126 : /* The expression for the unsigned case. The subtraction of (signed) \
127 is a nop in the unsigned case and avoids "signed integer overflow" \
128 warnings in the signed case. */ \
129 ((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1)
130 125
131#if !GNULIB_defined_stdint_types 126#if !GNULIB_defined_stdint_types
132 127