aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/misc/texinfo.tex114
-rw-r--r--lib/endian.c2
-rw-r--r--lib/intprops-internal.h9
-rw-r--r--lib/limits.in.h6
-rw-r--r--lib/signal.in.h6
-rw-r--r--lib/stdbit.c2
-rw-r--r--lib/stdbit.in.h3
-rw-r--r--lib/stdio.in.h6
-rw-r--r--lib/stdlib.c2
-rw-r--r--lib/stdlib.in.h9
-rw-r--r--lib/string.in.h6
-rw-r--r--lib/unistd.c2
-rw-r--r--m4/stdint.m44
-rw-r--r--m4/stdlib_h.m453
14 files changed, 136 insertions, 88 deletions
diff --git a/doc/misc/texinfo.tex b/doc/misc/texinfo.tex
index 93d592193a0..456696f4c9e 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{2024-02-10.22} 6\def\texinfoversion{2024-11-04.20}
7% 7%
8% Copyright 1985, 1986, 1988, 1990-2024 Free Software Foundation, Inc. 8% Copyright 1985, 1986, 1988, 1990-2024 Free Software Foundation, Inc.
9% 9%
@@ -951,7 +951,11 @@ where each line of input produces a line of output.}
951\let\setfilename=\comment 951\let\setfilename=\comment
952 952
953% @bye. 953% @bye.
954\outer\def\bye{\chappager\pagelabels\tracingstats=1\ptexend} 954\outer\def\bye{%
955 \chappager\pagelabels
956 % possibly set in \printindex
957 \ifx\byeerror\relax\else\errmessage{\byeerror}\fi
958 \tracingstats=1\ptexend}
955 959
956 960
957\message{pdf,} 961\message{pdf,}
@@ -3126,11 +3130,12 @@ end
3126% at the end of the line, or no break at all here. 3130% at the end of the line, or no break at all here.
3127% Changing the value of the penalty and/or the amount of stretch affects how 3131% Changing the value of the penalty and/or the amount of stretch affects how
3128% preferable one choice is over the other. 3132% preferable one choice is over the other.
3133% Check test cases in doc/texinfo-tex-test.texi before making any changes.
3129\def\urefallowbreak{% 3134\def\urefallowbreak{%
3130 \penalty0\relax 3135 \penalty0\relax
3131 \hskip 0pt plus 2 em\relax 3136 \hskip 0pt plus 3 em\relax
3132 \penalty1000\relax 3137 \penalty1000\relax
3133 \hskip 0pt plus -2 em\relax 3138 \hskip 0pt plus -3 em\relax
3134} 3139}
3135 3140
3136\urefbreakstyle after 3141\urefbreakstyle after
@@ -5438,6 +5443,9 @@ $$%
5438 \closein 1 5443 \closein 1
5439\endgroup} 5444\endgroup}
5440 5445
5446% Checked in @bye
5447\let\byeerror\relax
5448
5441% If the index file starts with a backslash, forgo reading the index 5449% If the index file starts with a backslash, forgo reading the index
5442% file altogether. If somebody upgrades texinfo.tex they may still have 5450% file altogether. If somebody upgrades texinfo.tex they may still have
5443% old index files using \ as the escape character. Reading this would 5451% old index files using \ as the escape character. Reading this would
@@ -5446,7 +5454,9 @@ $$%
5446 \ifflagclear{txiindexescapeisbackslash}{% 5454 \ifflagclear{txiindexescapeisbackslash}{%
5447 \uccode`\~=`\\ \uppercase{\if\noexpand~}\noexpand#1 5455 \uccode`\~=`\\ \uppercase{\if\noexpand~}\noexpand#1
5448 \ifflagclear{txiskipindexfileswithbackslash}{% 5456 \ifflagclear{txiskipindexfileswithbackslash}{%
5449\errmessage{% 5457 % Delay the error message until the very end to give a chance
5458 % for the whole index to be output as input for texindex.
5459 \global\def\byeerror{%
5450ERROR: A sorted index file in an obsolete format was skipped. 5460ERROR: A sorted index file in an obsolete format was skipped.
5451To fix this problem, please upgrade your version of 'texi2dvi' 5461To fix this problem, please upgrade your version of 'texi2dvi'
5452or 'texi2pdf' to that at <https://ftp.gnu.org/gnu/texinfo>. 5462or 'texi2pdf' to that at <https://ftp.gnu.org/gnu/texinfo>.
@@ -5567,7 +5577,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
5567% \entry typesets a paragraph consisting of the text (#1), dot leaders, and 5577% \entry typesets a paragraph consisting of the text (#1), dot leaders, and
5568% then page number (#2) flushed to the right margin. It is used for index 5578% then page number (#2) flushed to the right margin. It is used for index
5569% and table of contents entries. The paragraph is indented by \leftskip. 5579% and table of contents entries. The paragraph is indented by \leftskip.
5570% 5580% If \tocnodetarget is set, link text to the referenced node.
5571\def\entry{% 5581\def\entry{%
5572 \begingroup 5582 \begingroup
5573 % 5583 %
@@ -5608,7 +5618,13 @@ might help (with 'rm \jobname.?? \jobname.??s')%
5608 \global\setbox\boxA=\hbox\bgroup 5618 \global\setbox\boxA=\hbox\bgroup
5609 \ifpdforxetex 5619 \ifpdforxetex
5610 \iflinkentrytext 5620 \iflinkentrytext
5611 \pdflinkpage{#1}{\unhbox\boxA}% 5621 \ifx\tocnodetarget\empty
5622 \unhbox\boxA
5623 \else
5624 \startxreflink{\tocnodetarget}{}%
5625 \unhbox\boxA
5626 \endlink
5627 \fi
5612 \else 5628 \else
5613 \unhbox\boxA 5629 \unhbox\boxA
5614 \fi 5630 \fi
@@ -5625,11 +5641,18 @@ might help (with 'rm \jobname.?? \jobname.??s')%
5625 % 5641 %
5626 \null\nobreak\indexdotfill % Have leaders before the page number. 5642 \null\nobreak\indexdotfill % Have leaders before the page number.
5627 % 5643 %
5644 \hskip\skip\thinshrinkable
5628 \ifpdforxetex 5645 \ifpdforxetex
5629 \pdfgettoks#1.% 5646 \ifx\tocnodetarget\empty
5630 \hskip\skip\thinshrinkable\the\toksA 5647 \pdfgettoks#1.%
5648 \the\toksA
5649 \else
5650 % Should just be a single page number in toc
5651 \startxreflink{\tocnodetarget}{}%
5652 #1\endlink
5653 \fi
5631 \else 5654 \else
5632 \hskip\skip\thinshrinkable #1% 5655 #1%
5633 \fi 5656 \fi
5634 \fi 5657 \fi
5635 \egroup % end \boxA 5658 \egroup % end \boxA
@@ -6892,7 +6915,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
6892 \vskip 0pt plus 5\baselineskip 6915 \vskip 0pt plus 5\baselineskip
6893 \penalty-300 6916 \penalty-300
6894 \vskip 0pt plus -5\baselineskip 6917 \vskip 0pt plus -5\baselineskip
6895 \dochapentry{#1}{\numeralbox}{}% 6918 \dochapentry{#1}{\numeralbox}{#3}{}%
6896} 6919}
6897% 6920%
6898% Parts, in the short toc. 6921% Parts, in the short toc.
@@ -6905,12 +6928,12 @@ might help (with 'rm \jobname.?? \jobname.??s')%
6905% Chapters, in the main contents. 6928% Chapters, in the main contents.
6906\def\numchapentry#1#2#3#4{% 6929\def\numchapentry#1#2#3#4{%
6907 \retrievesecnowidth\secnowidthchap{#2}% 6930 \retrievesecnowidth\secnowidthchap{#2}%
6908 \dochapentry{#1}{#2}{#4}% 6931 \dochapentry{#1}{#2}{#3}{#4}%
6909} 6932}
6910 6933
6911% Chapters, in the short toc. 6934% Chapters, in the short toc.
6912\def\shortchapentry#1#2#3#4{% 6935\def\shortchapentry#1#2#3#4{%
6913 \tocentry{#1}{\shortchaplabel{#2}}{#4}% 6936 \tocentry{#1}{\shortchaplabel{#2}}{#3}{#4}%
6914} 6937}
6915 6938
6916% Appendices, in the main contents. 6939% Appendices, in the main contents.
@@ -6923,79 +6946,77 @@ might help (with 'rm \jobname.?? \jobname.??s')%
6923% 6946%
6924\def\appentry#1#2#3#4{% 6947\def\appentry#1#2#3#4{%
6925 \retrievesecnowidth\secnowidthchap{#2}% 6948 \retrievesecnowidth\secnowidthchap{#2}%
6926 \dochapentry{\appendixbox{#2}\hskip.7em#1}{}{#4}% 6949 \dochapentry{\appendixbox{#2}\hskip.7em#1}{}{#3}{#4}%
6927} 6950}
6928 6951
6929% Unnumbered chapters. 6952% Unnumbered chapters.
6930\def\unnchapentry#1#2#3#4{\dochapentry{#1}{}{#4}} 6953\def\unnchapentry#1#2#3#4{\dochapentry{#1}{}{#3}{#4}}
6931\def\shortunnchapentry#1#2#3#4{\tocentry{#1}{}{#4}} 6954\def\shortunnchapentry#1#2#3#4{\tocentry{#1}{}{#3}{#4}}
6932 6955
6933% Sections. 6956% Sections.
6934\def\numsecentry#1#2#3#4{\dosecentry{#1}{#2}{#4}}
6935
6936\def\numsecentry#1#2#3#4{% 6957\def\numsecentry#1#2#3#4{%
6937 \retrievesecnowidth\secnowidthsec{#2}% 6958 \retrievesecnowidth\secnowidthsec{#2}%
6938 \dosecentry{#1}{#2}{#4}% 6959 \dosecentry{#1}{#2}{#3}{#4}%
6939} 6960}
6940\let\appsecentry=\numsecentry 6961\let\appsecentry=\numsecentry
6941\def\unnsecentry#1#2#3#4{% 6962\def\unnsecentry#1#2#3#4{%
6942 \retrievesecnowidth\secnowidthsec{#2}% 6963 \retrievesecnowidth\secnowidthsec{#2}%
6943 \dosecentry{#1}{}{#4}% 6964 \dosecentry{#1}{}{#3}{#4}%
6944} 6965}
6945 6966
6946% Subsections. 6967% Subsections.
6947\def\numsubsecentry#1#2#3#4{% 6968\def\numsubsecentry#1#2#3#4{%
6948 \retrievesecnowidth\secnowidthssec{#2}% 6969 \retrievesecnowidth\secnowidthssec{#2}%
6949 \dosubsecentry{#1}{#2}{#4}% 6970 \dosubsecentry{#1}{#2}{#3}{#4}%
6950} 6971}
6951\let\appsubsecentry=\numsubsecentry 6972\let\appsubsecentry=\numsubsecentry
6952\def\unnsubsecentry#1#2#3#4{% 6973\def\unnsubsecentry#1#2#3#4{%
6953 \retrievesecnowidth\secnowidthssec{#2}% 6974 \retrievesecnowidth\secnowidthssec{#2}%
6954 \dosubsecentry{#1}{}{#4}% 6975 \dosubsecentry{#1}{}{#3}{#4}%
6955} 6976}
6956 6977
6957% And subsubsections. 6978% And subsubsections.
6958\def\numsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{#2}{#4}} 6979\def\numsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{#2}{#3}{#4}}
6959\let\appsubsubsecentry=\numsubsubsecentry 6980\let\appsubsubsecentry=\numsubsubsecentry
6960\def\unnsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{}{#4}} 6981\def\unnsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{}{#3}{#4}}
6961 6982
6962% This parameter controls the indentation of the various levels. 6983% This parameter controls the indentation of the various levels.
6963% Same as \defaultparindent. 6984% Same as \defaultparindent.
6964\newdimen\tocindent \tocindent = 15pt 6985\newdimen\tocindent \tocindent = 15pt
6965 6986
6966% Now for the actual typesetting. In all these, #1 is the text, #2 is 6987% Now for the actual typesetting. In all these, #1 is the text, #2 is
6967% a section number if present, and #3 is the page number. 6988% a section number if present, #3 is the node, and #4 is the page number.
6968% 6989%
6969% If the toc has to be broken over pages, we want it to be at chapters 6990% If the toc has to be broken over pages, we want it to be at chapters
6970% if at all possible; hence the \penalty. 6991% if at all possible; hence the \penalty.
6971\def\dochapentry#1#2#3{% 6992\def\dochapentry#1#2#3#4{%
6972 \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip 6993 \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip
6973 \begingroup 6994 \begingroup
6974 % Move the page numbers slightly to the right 6995 % Move the page numbers slightly to the right
6975 \advance\entryrightmargin by -0.05em 6996 \advance\entryrightmargin by -0.05em
6976 \chapentryfonts 6997 \chapentryfonts
6977 \extrasecnoskip=0.4em % separate chapter number more 6998 \extrasecnoskip=0.4em % separate chapter number more
6978 \tocentry{#1}{#2}{#3}% 6999 \tocentry{#1}{#2}{#3}{#4}%
6979 \endgroup 7000 \endgroup
6980 \nobreak\vskip .25\baselineskip plus.1\baselineskip 7001 \nobreak\vskip .25\baselineskip plus.1\baselineskip
6981} 7002}
6982 7003
6983\def\dosecentry#1#2#3{\begingroup 7004\def\dosecentry#1#2#3#4{\begingroup
6984 \secnowidth=\secnowidthchap 7005 \secnowidth=\secnowidthchap
6985 \secentryfonts \leftskip=\tocindent 7006 \secentryfonts \leftskip=\tocindent
6986 \tocentry{#1}{#2}{#3}% 7007 \tocentry{#1}{#2}{#3}{#4}%
6987\endgroup} 7008\endgroup}
6988 7009
6989\def\dosubsecentry#1#2#3{\begingroup 7010\def\dosubsecentry#1#2#3#4{\begingroup
6990 \secnowidth=\secnowidthsec 7011 \secnowidth=\secnowidthsec
6991 \subsecentryfonts \leftskip=2\tocindent 7012 \subsecentryfonts \leftskip=2\tocindent
6992 \tocentry{#1}{#2}{#3}% 7013 \tocentry{#1}{#2}{#3}{#4}%
6993\endgroup} 7014\endgroup}
6994 7015
6995\def\dosubsubsecentry#1#2#3{\begingroup 7016\def\dosubsubsecentry#1#2#3#4{\begingroup
6996 \secnowidth=\secnowidthssec 7017 \secnowidth=\secnowidthssec
6997 \subsubsecentryfonts \leftskip=3\tocindent 7018 \subsubsecentryfonts \leftskip=3\tocindent
6998 \tocentry{#1}{#2}{#3}% 7019 \tocentry{#1}{#2}{#3}{#4}%
6999\endgroup} 7020\endgroup}
7000 7021
7001% Used for the maximum width of a section number so we can align 7022% Used for the maximum width of a section number so we can align
@@ -7005,12 +7026,15 @@ might help (with 'rm \jobname.?? \jobname.??s')%
7005\newdimen\extrasecnoskip 7026\newdimen\extrasecnoskip
7006\extrasecnoskip=0pt 7027\extrasecnoskip=0pt
7007 7028
7008% \tocentry{TITLE}{SEC NO}{PAGE} 7029\let\tocnodetarget\empty
7030
7031% \tocentry{TITLE}{SEC NO}{NODE}{PAGE}
7009% 7032%
7010\def\tocentry#1#2#3{% 7033\def\tocentry#1#2#3#4{%
7034 \def\tocnodetarget{#3}%
7011 \def\secno{#2}% 7035 \def\secno{#2}%
7012 \ifx\empty\secno 7036 \ifx\empty\secno
7013 \entry{#1}{#3}% 7037 \entry{#1}{#4}%
7014 \else 7038 \else
7015 \ifdim 0pt=\secnowidth 7039 \ifdim 0pt=\secnowidth
7016 \setbox0=\hbox{#2\hskip\labelspace\hskip\extrasecnoskip}% 7040 \setbox0=\hbox{#2\hskip\labelspace\hskip\extrasecnoskip}%
@@ -7021,7 +7045,7 @@ might help (with 'rm \jobname.?? \jobname.??s')%
7021 #2\hskip\labelspace\hskip\extrasecnoskip\hfill}% 7045 #2\hskip\labelspace\hskip\extrasecnoskip\hfill}%
7022 \fi 7046 \fi
7023 \entrycontskip=\wd0 7047 \entrycontskip=\wd0
7024 \entry{\box0 #1}{#3}% 7048 \entry{\box0 #1}{#4}%
7025 \fi 7049 \fi
7026} 7050}
7027\newdimen\labelspace 7051\newdimen\labelspace
@@ -10515,6 +10539,16 @@ directory should work if nowhere else does.}
10515 \catcode"#1=\other 10539 \catcode"#1=\other
10516} 10540}
10517 10541
10542% Suppress ligature creation from adjacent characters.
10543\ifx\luatexversion\thisisundefined
10544 \def\nolig{{}}
10545\else
10546 % Braces do not suppress ligature creation in LuaTeX, e.g. in of{}fice
10547 % to suppress the "ff" ligature. Using a kern appears to be the only
10548 % workaround.
10549 \def\nolig{\kern0pt{}}
10550\fi
10551
10518% https://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_M 10552% https://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_M
10519% U+0000..U+007F = https://en.wikipedia.org/wiki/Basic_Latin_(Unicode_block) 10553% U+0000..U+007F = https://en.wikipedia.org/wiki/Basic_Latin_(Unicode_block)
10520% U+0080..U+00FF = https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block) 10554% U+0080..U+00FF = https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)
@@ -11132,8 +11166,8 @@ directory should work if nowhere else does.}
11132 % Punctuation 11166 % Punctuation
11133 \DeclareUnicodeCharacter{2013}{--}% 11167 \DeclareUnicodeCharacter{2013}{--}%
11134 \DeclareUnicodeCharacter{2014}{---}% 11168 \DeclareUnicodeCharacter{2014}{---}%
11135 \DeclareUnicodeCharacter{2018}{\quoteleft{}}% 11169 \DeclareUnicodeCharacter{2018}{\quoteleft\nolig}%
11136 \DeclareUnicodeCharacter{2019}{\quoteright{}}% 11170 \DeclareUnicodeCharacter{2019}{\quoteright\nolig}%
11137 \DeclareUnicodeCharacter{201A}{\quotesinglbase{}}% 11171 \DeclareUnicodeCharacter{201A}{\quotesinglbase{}}%
11138 \DeclareUnicodeCharacter{201C}{\quotedblleft{}}% 11172 \DeclareUnicodeCharacter{201C}{\quotedblleft{}}%
11139 \DeclareUnicodeCharacter{201D}{\quotedblright{}}% 11173 \DeclareUnicodeCharacter{201D}{\quotedblright{}}%
@@ -11168,7 +11202,7 @@ directory should work if nowhere else does.}
11168 \DeclareUnicodeCharacter{2287}{\ensuremath\supseteq}% 11202 \DeclareUnicodeCharacter{2287}{\ensuremath\supseteq}%
11169 % 11203 %
11170 \DeclareUnicodeCharacter{2016}{\ensuremath\Vert}% 11204 \DeclareUnicodeCharacter{2016}{\ensuremath\Vert}%
11171 \DeclareUnicodeCharacter{2032}{\ensuremath\prime}% 11205 \DeclareUnicodeCharacter{2032}{\ensuremath{^\prime}}%
11172 \DeclareUnicodeCharacter{210F}{\ensuremath\hbar}% 11206 \DeclareUnicodeCharacter{210F}{\ensuremath\hbar}%
11173 \DeclareUnicodeCharacter{2111}{\ensuremath\Im}% 11207 \DeclareUnicodeCharacter{2111}{\ensuremath\Im}%
11174 \DeclareUnicodeCharacter{2113}{\ensuremath\ell}% 11208 \DeclareUnicodeCharacter{2113}{\ensuremath\ell}%
diff --git a/lib/endian.c b/lib/endian.c
index 3e7e56f523d..089f5f7825e 100644
--- a/lib/endian.c
+++ b/lib/endian.c
@@ -17,7 +17,7 @@
17 17
18/* Written by Collin Funk. */ 18/* Written by Collin Funk. */
19 19
20#define _GL_ENDIAN_INLINE _GL_EXTERN_INLINE
20#include <config.h> 21#include <config.h>
21 22
22#define _GL_ENDIAN_INLINE _GL_EXTERN_INLINE
23#include <endian.h> 23#include <endian.h>
diff --git a/lib/intprops-internal.h b/lib/intprops-internal.h
index c8cc0e20194..0b7e1f539aa 100644
--- a/lib/intprops-internal.h
+++ b/lib/intprops-internal.h
@@ -77,10 +77,11 @@
77 77
78/* Does the __typeof__ keyword work? This could be done by 78/* Does the __typeof__ keyword work? This could be done by
79 'configure', but for now it's easier to do it by hand. */ 79 'configure', but for now it's easier to do it by hand. */
80#if (2 <= __GNUC__ \ 80#if ((defined __GNUC__ && 2 <= __GNUC__) \
81 || (4 <= __clang_major__) \ 81 || (defined __clang_major__ && 4 <= __clang_major__) \
82 || (1210 <= __IBMC__ && defined __IBM__TYPEOF__) \ 82 || (defined __IBMC__ && 1210 <= __IBMC__ && defined __IBM__TYPEOF__) \
83 || (0x5110 <= __SUNPRO_C && !__STDC__)) 83 || (defined __SUNPRO_C && 0x5110 <= __SUNPRO_C && !__STDC__) \
84 || (defined _MSC_VER && 1939 <= _MSC_VER))
84# define _GL_HAVE___TYPEOF__ 1 85# define _GL_HAVE___TYPEOF__ 1
85#else 86#else
86# define _GL_HAVE___TYPEOF__ 0 87# define _GL_HAVE___TYPEOF__ 0
diff --git a/lib/limits.in.h b/lib/limits.in.h
index c65eb4c1cfe..3347e369fb5 100644
--- a/lib/limits.in.h
+++ b/lib/limits.in.h
@@ -20,7 +20,7 @@
20#endif 20#endif
21@PRAGMA_COLUMNS@ 21@PRAGMA_COLUMNS@
22 22
23#if defined _GL_ALREADY_INCLUDING_LIMITS_H 23#if defined _@GUARD_PREFIX@_ALREADY_INCLUDING_LIMITS_H
24/* Special invocation convention: 24/* Special invocation convention:
25 On Haiku/x86_64, we have a sequence of nested includes 25 On Haiku/x86_64, we have a sequence of nested includes
26 <limits.h> -> <syslimits.h> -> <limits.h>. 26 <limits.h> -> <syslimits.h> -> <limits.h>.
@@ -34,12 +34,12 @@
34 34
35#ifndef _@GUARD_PREFIX@_LIMITS_H 35#ifndef _@GUARD_PREFIX@_LIMITS_H
36 36
37# define _GL_ALREADY_INCLUDING_LIMITS_H 37# define _@GUARD_PREFIX@_ALREADY_INCLUDING_LIMITS_H
38 38
39/* The include_next requires a split double-inclusion guard. */ 39/* The include_next requires a split double-inclusion guard. */
40# @INCLUDE_NEXT@ @NEXT_LIMITS_H@ 40# @INCLUDE_NEXT@ @NEXT_LIMITS_H@
41 41
42# undef _GL_ALREADY_INCLUDING_LIMITS_H 42# undef _@GUARD_PREFIX@_ALREADY_INCLUDING_LIMITS_H
43 43
44#ifndef _@GUARD_PREFIX@_LIMITS_H 44#ifndef _@GUARD_PREFIX@_LIMITS_H
45#define _@GUARD_PREFIX@_LIMITS_H 45#define _@GUARD_PREFIX@_LIMITS_H
diff --git a/lib/signal.in.h b/lib/signal.in.h
index 6239b90adf3..18c88f0c1d7 100644
--- a/lib/signal.in.h
+++ b/lib/signal.in.h
@@ -20,7 +20,7 @@
20#endif 20#endif
21@PRAGMA_COLUMNS@ 21@PRAGMA_COLUMNS@
22 22
23#if defined __need_sig_atomic_t || defined __need_sigset_t || defined _GL_ALREADY_INCLUDING_SIGNAL_H || (defined _SIGNAL_H && !defined __SIZEOF_PTHREAD_MUTEX_T) 23#if defined __need_sig_atomic_t || defined __need_sigset_t || defined _@GUARD_PREFIX@_ALREADY_INCLUDING_SIGNAL_H || (defined _SIGNAL_H && !defined __SIZEOF_PTHREAD_MUTEX_T)
24/* Special invocation convention: 24/* Special invocation convention:
25 - Inside glibc header files. 25 - Inside glibc header files.
26 - On glibc systems we have a sequence of nested includes 26 - On glibc systems we have a sequence of nested includes
@@ -39,7 +39,7 @@
39 39
40#ifndef _@GUARD_PREFIX@_SIGNAL_H 40#ifndef _@GUARD_PREFIX@_SIGNAL_H
41 41
42#define _GL_ALREADY_INCLUDING_SIGNAL_H 42#define _@GUARD_PREFIX@_ALREADY_INCLUDING_SIGNAL_H
43 43
44/* Define pid_t, uid_t. 44/* Define pid_t, uid_t.
45 Also, mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. 45 Also, mingw defines sigset_t not in <signal.h>, but in <sys/types.h>.
@@ -50,7 +50,7 @@
50/* The include_next requires a split double-inclusion guard. */ 50/* The include_next requires a split double-inclusion guard. */
51#@INCLUDE_NEXT@ @NEXT_SIGNAL_H@ 51#@INCLUDE_NEXT@ @NEXT_SIGNAL_H@
52 52
53#undef _GL_ALREADY_INCLUDING_SIGNAL_H 53#undef _@GUARD_PREFIX@_ALREADY_INCLUDING_SIGNAL_H
54 54
55#ifndef _@GUARD_PREFIX@_SIGNAL_H 55#ifndef _@GUARD_PREFIX@_SIGNAL_H
56#define _@GUARD_PREFIX@_SIGNAL_H 56#define _@GUARD_PREFIX@_SIGNAL_H
diff --git a/lib/stdbit.c b/lib/stdbit.c
index 4801e74d281..b9c52698e91 100644
--- a/lib/stdbit.c
+++ b/lib/stdbit.c
@@ -17,7 +17,7 @@
17 17
18/* Written by Paul Eggert. */ 18/* Written by Paul Eggert. */
19 19
20#define _GL_STDBIT_INLINE _GL_EXTERN_INLINE
20#include <config.h> 21#include <config.h>
21 22
22#define _GL_STDBIT_INLINE _GL_EXTERN_INLINE
23#include <stdbit.h> 23#include <stdbit.h>
diff --git a/lib/stdbit.in.h b/lib/stdbit.in.h
index 20b9f4f4662..91d237d7ad0 100644
--- a/lib/stdbit.in.h
+++ b/lib/stdbit.in.h
@@ -77,7 +77,8 @@ _GL_INLINE_HEADER_BEGIN
77#if ((defined __GNUC__ && 2 <= __GNUC__) \ 77#if ((defined __GNUC__ && 2 <= __GNUC__) \
78 || (defined __clang_major__ && 4 <= __clang_major__) \ 78 || (defined __clang_major__ && 4 <= __clang_major__) \
79 || (defined __IBMC__ && 1210 <= __IBMC__ && defined __IBM__TYPEOF__) \ 79 || (defined __IBMC__ && 1210 <= __IBMC__ && defined __IBM__TYPEOF__) \
80 || (defined __SUNPRO_C && 0x5110 <= __SUNPRO_C && !__STDC__)) 80 || (defined __SUNPRO_C && 0x5110 <= __SUNPRO_C && !__STDC__) \
81 || (defined _MSC_VER && 1939 <= _MSC_VER))
81# define _GL_STDBIT_TYPEOF_CAST(a, b) ((__typeof__ (a)) (b)) 82# define _GL_STDBIT_TYPEOF_CAST(a, b) ((__typeof__ (a)) (b))
82#elif 202311 <= __STDC_VERSION__ 83#elif 202311 <= __STDC_VERSION__
83# define _GL_STDBIT_TYPEOF_CAST(a, b) ((typeof (a)) (b)) 84# define _GL_STDBIT_TYPEOF_CAST(a, b) ((typeof (a)) (b))
diff --git a/lib/stdio.in.h b/lib/stdio.in.h
index e77798d9b25..ed260d308b0 100644
--- a/lib/stdio.in.h
+++ b/lib/stdio.in.h
@@ -20,7 +20,7 @@
20#endif 20#endif
21@PRAGMA_COLUMNS@ 21@PRAGMA_COLUMNS@
22 22
23#if defined __need_FILE || defined __need___FILE || defined _GL_ALREADY_INCLUDING_STDIO_H 23#if defined __need_FILE || defined __need___FILE || defined _@GUARD_PREFIX@_ALREADY_INCLUDING_STDIO_H || defined _GL_SKIP_GNULIB_STDIO_H
24/* Special invocation convention: 24/* Special invocation convention:
25 - Inside glibc header files. 25 - Inside glibc header files.
26 - On OSF/1 5.1 we have a sequence of nested includes 26 - On OSF/1 5.1 we have a sequence of nested includes
@@ -48,12 +48,12 @@
48# endif 48# endif
49#endif 49#endif
50 50
51#define _GL_ALREADY_INCLUDING_STDIO_H 51#define _@GUARD_PREFIX@_ALREADY_INCLUDING_STDIO_H
52 52
53/* The include_next requires a split double-inclusion guard. */ 53/* The include_next requires a split double-inclusion guard. */
54#@INCLUDE_NEXT@ @NEXT_STDIO_H@ 54#@INCLUDE_NEXT@ @NEXT_STDIO_H@
55 55
56#undef _GL_ALREADY_INCLUDING_STDIO_H 56#undef _@GUARD_PREFIX@_ALREADY_INCLUDING_STDIO_H
57 57
58#ifdef _GL_DEFINED__POSIX_C_SOURCE 58#ifdef _GL_DEFINED__POSIX_C_SOURCE
59# undef _GL_DEFINED__POSIX_C_SOURCE 59# undef _GL_DEFINED__POSIX_C_SOURCE
diff --git a/lib/stdlib.c b/lib/stdlib.c
index 521d64627dc..6f70fa4bbda 100644
--- a/lib/stdlib.c
+++ b/lib/stdlib.c
@@ -15,7 +15,7 @@
15 You should have received a copy of the GNU Lesser General Public License 15 You should have received a copy of the GNU Lesser General Public License
16 along with this program. If not, see <https://www.gnu.org/licenses/>. */ 16 along with this program. If not, see <https://www.gnu.org/licenses/>. */
17 17
18#define _GL_STDLIB_INLINE _GL_EXTERN_INLINE
18#include <config.h> 19#include <config.h>
19 20
20#define _GL_STDLIB_INLINE _GL_EXTERN_INLINE
21#include <stdlib.h> 21#include <stdlib.h>
diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h
index adbef69131b..14f45cc21e5 100644
--- a/lib/stdlib.in.h
+++ b/lib/stdlib.in.h
@@ -746,15 +746,20 @@ _GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - "
746# endif 746# endif
747#endif 747#endif
748 748
749/* Return maximum number of bytes of a multibyte character. */ 749/* Return maximum number of bytes in a multibyte character in the
750 current locale. */
750#if @REPLACE_MB_CUR_MAX@ 751#if @REPLACE_MB_CUR_MAX@
751# if !GNULIB_defined_MB_CUR_MAX 752# if !GNULIB_defined_MB_CUR_MAX
752_GL_STDLIB_INLINE int 753_GL_STDLIB_INLINE size_t
753gl_MB_CUR_MAX (void) 754gl_MB_CUR_MAX (void)
754{ 755{
756# if 0 < @REPLACE_MB_CUR_MAX@
757 return @REPLACE_MB_CUR_MAX@;
758# else
755 /* Turn the value 3 to the value 4, as needed for the UTF-8 encoding. */ 759 /* Turn the value 3 to the value 4, as needed for the UTF-8 encoding. */
756 int gl_mb_cur_max = MB_CUR_MAX; 760 int gl_mb_cur_max = MB_CUR_MAX;
757 return gl_mb_cur_max == 3 ? 4 : gl_mb_cur_max; 761 return gl_mb_cur_max == 3 ? 4 : gl_mb_cur_max;
762# endif
758} 763}
759# undef MB_CUR_MAX 764# undef MB_CUR_MAX
760# define MB_CUR_MAX gl_MB_CUR_MAX () 765# define MB_CUR_MAX gl_MB_CUR_MAX ()
diff --git a/lib/string.in.h b/lib/string.in.h
index f5a6d8b3267..72cd7566e65 100644
--- a/lib/string.in.h
+++ b/lib/string.in.h
@@ -20,7 +20,7 @@
20#endif 20#endif
21@PRAGMA_COLUMNS@ 21@PRAGMA_COLUMNS@
22 22
23#if defined _GL_ALREADY_INCLUDING_STRING_H 23#if defined _@GUARD_PREFIX@_ALREADY_INCLUDING_STRING_H
24/* Special invocation convention: 24/* Special invocation convention:
25 - On OS X/NetBSD we have a sequence of nested includes 25 - On OS X/NetBSD we have a sequence of nested includes
26 <string.h> -> <strings.h> -> "string.h" 26 <string.h> -> <strings.h> -> "string.h"
@@ -34,12 +34,12 @@
34 34
35#ifndef _@GUARD_PREFIX@_STRING_H 35#ifndef _@GUARD_PREFIX@_STRING_H
36 36
37#define _GL_ALREADY_INCLUDING_STRING_H 37#define _@GUARD_PREFIX@_ALREADY_INCLUDING_STRING_H
38 38
39/* The include_next requires a split double-inclusion guard. */ 39/* The include_next requires a split double-inclusion guard. */
40#@INCLUDE_NEXT@ @NEXT_STRING_H@ 40#@INCLUDE_NEXT@ @NEXT_STRING_H@
41 41
42#undef _GL_ALREADY_INCLUDING_STRING_H 42#undef _@GUARD_PREFIX@_ALREADY_INCLUDING_STRING_H
43 43
44#ifndef _@GUARD_PREFIX@_STRING_H 44#ifndef _@GUARD_PREFIX@_STRING_H
45#define _@GUARD_PREFIX@_STRING_H 45#define _@GUARD_PREFIX@_STRING_H
diff --git a/lib/unistd.c b/lib/unistd.c
index f3b3f7bd2fe..b25112eb91e 100644
--- a/lib/unistd.c
+++ b/lib/unistd.c
@@ -15,8 +15,8 @@
15 You should have received a copy of the GNU Lesser General Public License 15 You should have received a copy of the GNU Lesser General Public License
16 along with this program. If not, see <https://www.gnu.org/licenses/>. */ 16 along with this program. If not, see <https://www.gnu.org/licenses/>. */
17 17
18#define _GL_UNISTD_INLINE _GL_EXTERN_INLINE
18#include <config.h> 19#include <config.h>
19 20
20#define _GL_UNISTD_INLINE _GL_EXTERN_INLINE
21#include <unistd.h> 21#include <unistd.h>
22typedef int dummy; 22typedef int dummy;
diff --git a/m4/stdint.m4 b/m4/stdint.m4
index 0a078e64d58..1f3062a8900 100644
--- a/m4/stdint.m4
+++ b/m4/stdint.m4
@@ -1,5 +1,5 @@
1# stdint.m4 1# stdint.m4
2# serial 63 2# serial 64
3dnl Copyright (C) 2001-2024 Free Software Foundation, Inc. 3dnl Copyright (C) 2001-2024 Free Software Foundation, Inc.
4dnl This file is free software; the Free Software Foundation 4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it, 5dnl gives unlimited permission to copy and/or distribute it,
@@ -158,7 +158,7 @@ uintmax_t j = UINTMAX_MAX;
158 || defined __clang__) 158 || defined __clang__)
159int k = _Generic (SIZE_MAX, size_t: 0); 159int k = _Generic (SIZE_MAX, size_t: 0);
160#elif (2 <= __GNUC__ || 4 <= __clang_major__ || defined __IBM__TYPEOF__ \ 160#elif (2 <= __GNUC__ || 4 <= __clang_major__ || defined __IBM__TYPEOF__ \
161 || (0x5110 <= __SUNPRO_C && !__STDC__)) 161 || (0x5110 <= __SUNPRO_C && !__STDC__) || 1939 <= _MSC_VER)
162extern size_t k; 162extern size_t k;
163extern __typeof__ (SIZE_MAX) k; 163extern __typeof__ (SIZE_MAX) k;
164#endif 164#endif
diff --git a/m4/stdlib_h.m4 b/m4/stdlib_h.m4
index 87b63ff54e3..ba56a9480b3 100644
--- a/m4/stdlib_h.m4
+++ b/m4/stdlib_h.m4
@@ -1,5 +1,5 @@
1# stdlib_h.m4 1# stdlib_h.m4
2# serial 82 2# serial 84
3dnl Copyright (C) 2007-2024 Free Software Foundation, Inc. 3dnl Copyright (C) 2007-2024 Free Software Foundation, Inc.
4dnl This file is free software; the Free Software Foundation 4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it, 5dnl gives unlimited permission to copy and/or distribute it,
@@ -41,20 +41,21 @@ AC_DEFUN_ONCE([gl_STDLIB_H],
41 AC_REQUIRE([gt_LOCALE_EN_UTF8]) 41 AC_REQUIRE([gt_LOCALE_EN_UTF8])
42 AC_CACHE_CHECK([whether MB_CUR_MAX is correct], 42 AC_CACHE_CHECK([whether MB_CUR_MAX is correct],
43 [gl_cv_macro_MB_CUR_MAX_good], 43 [gl_cv_macro_MB_CUR_MAX_good],
44 [ 44 [AC_LINK_IFELSE(
45 dnl Initial guess, used when cross-compiling or when no suitable locale 45 [AC_LANG_PROGRAM([[#include <stdlib.h>
46 dnl is present. 46 ]],
47changequote(,)dnl 47 [[return !!MB_CUR_MAX;]])
48 case "$host_os" in 48 ],
49 # Guess no on Solaris and Haiku. 49 [dnl Initial guess, used when cross-compiling or when no suitable locale
50 solaris* | haiku*) gl_cv_macro_MB_CUR_MAX_good="guessing no" ;; 50 dnl is present.
51 # Guess yes otherwise. 51 # Guess no on Solaris and Haiku, yes otherwise.
52 *) gl_cv_macro_MB_CUR_MAX_good="guessing yes" ;; 52 AS_CASE([$host_os],
53 esac 53 [solaris* | haiku*],
54changequote([,])dnl 54 [gl_cv_macro_MB_CUR_MAX_good="guessing no"],
55 if test "$LOCALE_EN_UTF8" != none; then 55 [gl_cv_macro_MB_CUR_MAX_good="guessing yes"])
56 AC_RUN_IFELSE( 56 if test "$LOCALE_EN_UTF8" != none; then
57 [AC_LANG_SOURCE([[ 57 AC_RUN_IFELSE(
58 [AC_LANG_SOURCE([[
58#include <locale.h> 59#include <locale.h>
59#include <stdlib.h> 60#include <stdlib.h>
60int main () 61int main ()
@@ -67,15 +68,21 @@ int main ()
67 } 68 }
68 return result; 69 return result;
69}]])], 70}]])],
70 [gl_cv_macro_MB_CUR_MAX_good=yes], 71 [gl_cv_macro_MB_CUR_MAX_good=yes],
71 [gl_cv_macro_MB_CUR_MAX_good=no], 72 [gl_cv_macro_MB_CUR_MAX_good=no],
72 [:]) 73 [:])
73 fi 74 fi
75 ],
76 [gl_cv_macro_MB_CUR_MAX_good="link failed - so no"])
74 ]) 77 ])
75 case "$gl_cv_macro_MB_CUR_MAX_good" in 78 AS_CASE([$gl_cv_macro_MB_CUR_MAX_good],
76 *yes) ;; 79 [*yes],
77 *) REPLACE_MB_CUR_MAX=1 ;; 80 [],
78 esac 81 ["link failed - so no"],
82 [# 4 suffices as a workaround in Android NDK 16,
83 # the only known platform with the bug.
84 REPLACE_MB_CUR_MAX=4],
85 [REPLACE_MB_CUR_MAX="(-1)"])
79 86
80 AC_CHECK_DECLS_ONCE([ecvt]) 87 AC_CHECK_DECLS_ONCE([ecvt])
81 if test $ac_cv_have_decl_ecvt = no; then 88 if test $ac_cv_have_decl_ecvt = no; then