diff options
| author | Paul Eggert | 2020-05-09 08:47:05 -0700 |
|---|---|---|
| committer | Paul Eggert | 2020-05-09 08:50:57 -0700 |
| commit | ebfb2c4d1bc8f68a75b02a76ec90eb225123c099 (patch) | |
| tree | 789194d7ff4743ec48ea9d47a8c7ee08471cecdf | |
| parent | ae3c510696f02f01d03052f070e5ce65b4018a45 (diff) | |
| download | emacs-ebfb2c4d1bc8f68a75b02a76ec90eb225123c099.tar.gz emacs-ebfb2c4d1bc8f68a75b02a76ec90eb225123c099.zip | |
Update from Gnulib
This incorporates:
2020-05-09 stdio: don't redefine _GL_ATTRIBUTE_FORMAT
2020-05-09 dirent, stdlib, string: don't redefine _GL_ATTRIBUTE_PURE
2020-05-08 limits-h: define LONG_BIT correctly on Haiku/x86_64
2020-05-08 ignore-value tests: use module 'attribute'
2020-05-06 attribute: minor style fixes
* build-aux/config.sub, doc/misc/texinfo.tex, lib/attribute.h:
* lib/dirent.in.h, lib/limits.in.h, lib/stdio.in.h, lib/stdlib.in.h:
* lib/string.in.h, m4/gnulib-common.m4:
Copy from Gnulib.
| -rwxr-xr-x | build-aux/config.sub | 4 | ||||
| -rw-r--r-- | doc/misc/texinfo.tex | 56 | ||||
| -rw-r--r-- | lib/attribute.h | 12 | ||||
| -rw-r--r-- | lib/dirent.in.h | 10 | ||||
| -rw-r--r-- | lib/limits.in.h | 23 | ||||
| -rw-r--r-- | lib/stdio.in.h | 10 | ||||
| -rw-r--r-- | lib/stdlib.in.h | 10 | ||||
| -rw-r--r-- | lib/string.in.h | 10 | ||||
| -rw-r--r-- | m4/gnulib-common.m4 | 10 |
9 files changed, 93 insertions, 52 deletions
diff --git a/build-aux/config.sub b/build-aux/config.sub index a0d12275ac5..973a2980ac3 100755 --- a/build-aux/config.sub +++ b/build-aux/config.sub | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | # Configuration validation subroutine script. | 2 | # Configuration validation subroutine script. |
| 3 | # Copyright 1992-2020 Free Software Foundation, Inc. | 3 | # Copyright 1992-2020 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | timestamp='2020-04-24' | 5 | timestamp='2020-05-04' |
| 6 | 6 | ||
| 7 | # This file is free software; you can redistribute it and/or modify it | 7 | # This file is free software; you can redistribute it and/or modify it |
| 8 | # under the terms of the GNU General Public License as published by | 8 | # under the terms of the GNU General Public License as published by |
| @@ -1366,7 +1366,7 @@ case $os in | |||
| 1366 | | skyos* | haiku* | rdos* | toppers* | drops* | es* \ | 1366 | | skyos* | haiku* | rdos* | toppers* | drops* | es* \ |
| 1367 | | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ | 1367 | | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ |
| 1368 | | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ | 1368 | | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ |
| 1369 | | nsk* | powerunix*) | 1369 | | nsk* | powerunix* | genode*) |
| 1370 | # Remember, each alternative MUST END IN *, to match a version number. | 1370 | # Remember, each alternative MUST END IN *, to match a version number. |
| 1371 | ;; | 1371 | ;; |
| 1372 | qnx*) | 1372 | qnx*) |
diff --git a/doc/misc/texinfo.tex b/doc/misc/texinfo.tex index 427494cbbfc..2b7b31b34a9 100644 --- a/doc/misc/texinfo.tex +++ b/doc/misc/texinfo.tex | |||
| @@ -3,9 +3,9 @@ | |||
| 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{2020-05-02.00} | 6 | \def\texinfoversion{2020-05-07.17} |
| 7 | % | 7 | % |
| 8 | % Copyright 1985, 1986, 1988, 1990-2019 Free Software Foundation, Inc. | 8 | % Copyright 1985, 1986, 1988, 1990-2020 Free Software Foundation, Inc. |
| 9 | % | 9 | % |
| 10 | % This texinfo.tex file is free software: you can redistribute it and/or | 10 | % This texinfo.tex file is free software: you can redistribute it and/or |
| 11 | % modify it under the terms of the GNU General Public License as | 11 | % modify it under the terms of the GNU General Public License as |
| @@ -1430,7 +1430,13 @@ output) for that.)} | |||
| 1430 | % subentries, which we calculated on our first read of the .toc above. | 1430 | % subentries, which we calculated on our first read of the .toc above. |
| 1431 | % | 1431 | % |
| 1432 | % We use the node names as the destinations. | 1432 | % We use the node names as the destinations. |
| 1433 | % | ||
| 1434 | % Currently we prefix the section name with the section number | ||
| 1435 | % for chapter and appendix headings only in order to avoid too much | ||
| 1436 | % horizontal space being required in the PDF viewer. | ||
| 1433 | \def\numchapentry##1##2##3##4{% | 1437 | \def\numchapentry##1##2##3##4{% |
| 1438 | \dopdfoutline{##2 ##1}{count-\expnumber{chap##2}}{##3}{##4}}% | ||
| 1439 | \def\unnchapentry##1##2##3##4{% | ||
| 1434 | \dopdfoutline{##1}{count-\expnumber{chap##2}}{##3}{##4}}% | 1440 | \dopdfoutline{##1}{count-\expnumber{chap##2}}{##3}{##4}}% |
| 1435 | \def\numsecentry##1##2##3##4{% | 1441 | \def\numsecentry##1##2##3##4{% |
| 1436 | \dopdfoutline{##1}{count-\expnumber{sec##2}}{##3}{##4}}% | 1442 | \dopdfoutline{##1}{count-\expnumber{sec##2}}{##3}{##4}}% |
| @@ -1672,9 +1678,13 @@ output) for that.)} | |||
| 1672 | % Therefore, we read toc only once. | 1678 | % Therefore, we read toc only once. |
| 1673 | % | 1679 | % |
| 1674 | % We use node names as destinations. | 1680 | % We use node names as destinations. |
| 1681 | % | ||
| 1682 | % Currently we prefix the section name with the section number | ||
| 1683 | % for chapter and appendix headings only in order to avoid too much | ||
| 1684 | % horizontal space being required in the PDF viewer. | ||
| 1675 | \def\partentry##1##2##3##4{}% ignore parts in the outlines | 1685 | \def\partentry##1##2##3##4{}% ignore parts in the outlines |
| 1676 | \def\numchapentry##1##2##3##4{% | 1686 | \def\numchapentry##1##2##3##4{% |
| 1677 | \dopdfoutline{##1}{1}{##3}{##4}}% | 1687 | \dopdfoutline{##2 ##1}{1}{##3}{##4}}% |
| 1678 | \def\numsecentry##1##2##3##4{% | 1688 | \def\numsecentry##1##2##3##4{% |
| 1679 | \dopdfoutline{##1}{2}{##3}{##4}}% | 1689 | \dopdfoutline{##1}{2}{##3}{##4}}% |
| 1680 | \def\numsubsecentry##1##2##3##4{% | 1690 | \def\numsubsecentry##1##2##3##4{% |
| @@ -1686,7 +1696,8 @@ output) for that.)} | |||
| 1686 | \let\appsecentry\numsecentry% | 1696 | \let\appsecentry\numsecentry% |
| 1687 | \let\appsubsecentry\numsubsecentry% | 1697 | \let\appsubsecentry\numsubsecentry% |
| 1688 | \let\appsubsubsecentry\numsubsubsecentry% | 1698 | \let\appsubsubsecentry\numsubsubsecentry% |
| 1689 | \let\unnchapentry\numchapentry% | 1699 | \def\unnchapentry##1##2##3##4{% |
| 1700 | \dopdfoutline{##1}{1}{##3}{##4}}% | ||
| 1690 | \let\unnsecentry\numsecentry% | 1701 | \let\unnsecentry\numsecentry% |
| 1691 | \let\unnsubsecentry\numsubsecentry% | 1702 | \let\unnsubsecentry\numsubsecentry% |
| 1692 | \let\unnsubsubsecentry\numsubsubsecentry% | 1703 | \let\unnsubsubsecentry\numsubsubsecentry% |
| @@ -2499,7 +2510,7 @@ end | |||
| 2499 | \def\it{\fam=\itfam \setfontstyle{it}} | 2510 | \def\it{\fam=\itfam \setfontstyle{it}} |
| 2500 | \def\sl{\fam=\slfam \setfontstyle{sl}} | 2511 | \def\sl{\fam=\slfam \setfontstyle{sl}} |
| 2501 | \def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf} | 2512 | \def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf} |
| 2502 | \def\tt{\fam=\ttfam \setfontstyle{tt}} | 2513 | \def\tt{\fam=\ttfam \setfontstyle{tt}}\def\ttstylename{tt} |
| 2503 | 2514 | ||
| 2504 | % Texinfo sort of supports the sans serif font style, which plain TeX does not. | 2515 | % Texinfo sort of supports the sans serif font style, which plain TeX does not. |
| 2505 | % So we set up a \sf. | 2516 | % So we set up a \sf. |
| @@ -3512,7 +3523,7 @@ end | |||
| 3512 | 3523 | ||
| 3513 | % @pounds{} is a sterling sign, which Knuth put in the CM italic font. | 3524 | % @pounds{} is a sterling sign, which Knuth put in the CM italic font. |
| 3514 | % | 3525 | % |
| 3515 | \def\pounds{{\it\$}} | 3526 | \def\pounds{\ifmonospace{\ecfont\char"BF}\else{\it\$}\fi} |
| 3516 | 3527 | ||
| 3517 | % @euro{} comes from a separate font, depending on the current style. | 3528 | % @euro{} comes from a separate font, depending on the current style. |
| 3518 | % We use the free feym* fonts from the eurosym package by Henrik | 3529 | % We use the free feym* fonts from the eurosym package by Henrik |
| @@ -3661,11 +3672,19 @@ end | |||
| 3661 | \fi | 3672 | \fi |
| 3662 | 3673 | ||
| 3663 | % Quotes. | 3674 | % Quotes. |
| 3664 | \chardef\quotedblleft="5C | ||
| 3665 | \chardef\quotedblright=`\" | ||
| 3666 | \chardef\quoteleft=`\` | 3675 | \chardef\quoteleft=`\` |
| 3667 | \chardef\quoteright=`\' | 3676 | \chardef\quoteright=`\' |
| 3668 | 3677 | ||
| 3678 | % only change font for tt for correct kerning and to avoid using | ||
| 3679 | % \ecfont unless necessary. | ||
| 3680 | \def\quotedblleft{% | ||
| 3681 | \ifmonospace{\ecfont\char"10}\else{\char"5C}\fi | ||
| 3682 | } | ||
| 3683 | |||
| 3684 | \def\quotedblright{% | ||
| 3685 | \ifmonospace{\ecfont\char"11}\else{\char`\"}\fi | ||
| 3686 | } | ||
| 3687 | |||
| 3669 | 3688 | ||
| 3670 | \message{page headings,} | 3689 | \message{page headings,} |
| 3671 | 3690 | ||
| @@ -7447,13 +7466,9 @@ might help (with 'rm \jobname.?? \jobname.??s')% | |||
| 7447 | \newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount | 7466 | \newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount |
| 7448 | % | 7467 | % |
| 7449 | % We typeset each line of the verbatim in an \hbox, so we can handle | 7468 | % We typeset each line of the verbatim in an \hbox, so we can handle |
| 7450 | % tabs. The \global is in case the verbatim line starts with an accent, | 7469 | % tabs. |
| 7451 | % or some other command that starts with a begin-group. Otherwise, the | ||
| 7452 | % entire \verbbox would disappear at the corresponding end-group, before | ||
| 7453 | % it is typeset. Meanwhile, we can't have nested verbatim commands | ||
| 7454 | % (can we?), so the \global won't be overwriting itself. | ||
| 7455 | \newbox\verbbox | 7470 | \newbox\verbbox |
| 7456 | \def\starttabbox{\global\setbox\verbbox=\hbox\bgroup} | 7471 | \def\starttabbox{\setbox\verbbox=\hbox\bgroup} |
| 7457 | % | 7472 | % |
| 7458 | \begingroup | 7473 | \begingroup |
| 7459 | \catcode`\^^I=\active | 7474 | \catcode`\^^I=\active |
| @@ -7464,7 +7479,8 @@ might help (with 'rm \jobname.?? \jobname.??s')% | |||
| 7464 | \divide\dimen\verbbox by\tabw | 7479 | \divide\dimen\verbbox by\tabw |
| 7465 | \multiply\dimen\verbbox by\tabw % compute previous multiple of \tabw | 7480 | \multiply\dimen\verbbox by\tabw % compute previous multiple of \tabw |
| 7466 | \advance\dimen\verbbox by\tabw % advance to next multiple of \tabw | 7481 | \advance\dimen\verbbox by\tabw % advance to next multiple of \tabw |
| 7467 | \wd\verbbox=\dimen\verbbox \box\verbbox \starttabbox | 7482 | \wd\verbbox=\dimen\verbbox |
| 7483 | \leavevmode\box\verbbox \starttabbox | ||
| 7468 | }% | 7484 | }% |
| 7469 | } | 7485 | } |
| 7470 | \endgroup | 7486 | \endgroup |
| @@ -7474,9 +7490,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% | |||
| 7474 | \let\nonarrowing = t% | 7490 | \let\nonarrowing = t% |
| 7475 | \nonfillstart | 7491 | \nonfillstart |
| 7476 | \tt % easiest (and conventionally used) font for verbatim | 7492 | \tt % easiest (and conventionally used) font for verbatim |
| 7477 | % The \leavevmode here is for blank lines. Otherwise, we would | 7493 | \def\par{\egroup\box\verbbox\endgraf\starttabbox}% |
| 7478 | % never \starttabbox and the \egroup would end verbatim mode. | ||
| 7479 | \def\par{\leavevmode\egroup\box\verbbox\endgraf}% | ||
| 7480 | \tabexpand | 7494 | \tabexpand |
| 7481 | \setupmarkupstyle{verbatim}% | 7495 | \setupmarkupstyle{verbatim}% |
| 7482 | % Respect line breaks, | 7496 | % Respect line breaks, |
| @@ -7484,7 +7498,6 @@ might help (with 'rm \jobname.?? \jobname.??s')% | |||
| 7484 | % make each space count. | 7498 | % make each space count. |
| 7485 | % Must do in this order: | 7499 | % Must do in this order: |
| 7486 | \obeylines \uncatcodespecials \sepspaces | 7500 | \obeylines \uncatcodespecials \sepspaces |
| 7487 | \everypar{\starttabbox}% | ||
| 7488 | } | 7501 | } |
| 7489 | 7502 | ||
| 7490 | % Do the @verb magic: verbatim text is quoted by unique | 7503 | % Do the @verb magic: verbatim text is quoted by unique |
| @@ -7519,9 +7532,12 @@ might help (with 'rm \jobname.?? \jobname.??s')% | |||
| 7519 | % ignore everything up to the first ^^M, that's the newline at the end | 7532 | % ignore everything up to the first ^^M, that's the newline at the end |
| 7520 | % of the @verbatim input line itself. Otherwise we get an extra blank | 7533 | % of the @verbatim input line itself. Otherwise we get an extra blank |
| 7521 | % line in the output. | 7534 | % line in the output. |
| 7522 | \xdef\doverbatim#1^^M#2@end verbatim{#2\noexpand\end\gobble verbatim}% | 7535 | \xdef\doverbatim#1^^M#2@end verbatim{% |
| 7536 | \starttabbox#2\egroup\noexpand\end\gobble verbatim}% | ||
| 7523 | % We really want {...\end verbatim} in the body of the macro, but | 7537 | % We really want {...\end verbatim} in the body of the macro, but |
| 7524 | % without the active space; thus we have to use \xdef and \gobble. | 7538 | % without the active space; thus we have to use \xdef and \gobble. |
| 7539 | % The \egroup ends the \verbbox started at the end of the last line in | ||
| 7540 | % the block. | ||
| 7525 | \endgroup | 7541 | \endgroup |
| 7526 | % | 7542 | % |
| 7527 | \envdef\verbatim{% | 7543 | \envdef\verbatim{% |
diff --git a/lib/attribute.h b/lib/attribute.h index 8ef9a399ade..c5919d97005 100644 --- a/lib/attribute.h +++ b/lib/attribute.h | |||
| @@ -33,26 +33,26 @@ | |||
| 33 | /* Selected GCC attributes; see: | 33 | /* Selected GCC attributes; see: |
| 34 | https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html | 34 | https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html |
| 35 | These names begin with 'ATTRIBUTE_' to avoid name clashes. */ | 35 | These names begin with 'ATTRIBUTE_' to avoid name clashes. */ |
| 36 | #define ATTRIBUTE_ALLOC_SIZE(args) _GL_ATTRIBUTE_ALLOC_SIZE(args) | 36 | #define ATTRIBUTE_ALLOC_SIZE(args) _GL_ATTRIBUTE_ALLOC_SIZE (args) |
| 37 | #define ATTRIBUTE_ALWAYS_INLINE _GL_ATTRIBUTE_ALWAYS_INLINE | 37 | #define ATTRIBUTE_ALWAYS_INLINE _GL_ATTRIBUTE_ALWAYS_INLINE |
| 38 | #define ATTRIBUTE_ARTIFICIAL _GL_ATTRIBUTE_ARTIFICIAL | 38 | #define ATTRIBUTE_ARTIFICIAL _GL_ATTRIBUTE_ARTIFICIAL |
| 39 | #define ATTRIBUTE_COLD _GL_ATTRIBUTE_COLD | 39 | #define ATTRIBUTE_COLD _GL_ATTRIBUTE_COLD |
| 40 | #define ATTRIBUTE_CONST _GL_ATTRIBUTE_CONST | 40 | #define ATTRIBUTE_CONST _GL_ATTRIBUTE_CONST |
| 41 | #define ATTRIBUTE_DEPRECATED _GL_ATTRIBUTE_DEPRECATED | 41 | #define ATTRIBUTE_DEPRECATED _GL_ATTRIBUTE_DEPRECATED |
| 42 | #define ATTRIBUTE_ERROR(msg) _GL_ATTRIBUTE_ERROR(msg) | 42 | #define ATTRIBUTE_ERROR(msg) _GL_ATTRIBUTE_ERROR (msg) |
| 43 | #define ATTRIBUTE_EXTERNALLY_VISIBLE _GL_ATTRIBUTE_EXTERNALLY_VISIBLE | 43 | #define ATTRIBUTE_EXTERNALLY_VISIBLE _GL_ATTRIBUTE_EXTERNALLY_VISIBLE |
| 44 | #define ATTRIBUTE_FORMAT(spec) _GL_ATTRIBUTE_FORMAT(spec) | 44 | #define ATTRIBUTE_FORMAT(spec) _GL_ATTRIBUTE_FORMAT (spec) |
| 45 | #define ATTRIBUTE_LEAF _GL_ATTRIBUTE_LEAF | 45 | #define ATTRIBUTE_LEAF _GL_ATTRIBUTE_LEAF |
| 46 | #define ATTRIBUTE_MAY_ALIAS _GL_ATTRIBUTE_MAY_ALIAS | 46 | #define ATTRIBUTE_MAY_ALIAS _GL_ATTRIBUTE_MAY_ALIAS |
| 47 | #define ATTRIBUTE_MALLOC _GL_ATTRIBUTE_MALLOC | 47 | #define ATTRIBUTE_MALLOC _GL_ATTRIBUTE_MALLOC |
| 48 | #define ATTRIBUTE_NOINLINE _GL_ATTRIBUTE_NOINLINE | 48 | #define ATTRIBUTE_NOINLINE _GL_ATTRIBUTE_NOINLINE |
| 49 | #define ATTRIBUTE_NONNULL(args) _GL_ATTRIBUTE_NONNULL(args) | 49 | #define ATTRIBUTE_NONNULL(args) _GL_ATTRIBUTE_NONNULL (args) |
| 50 | #define ATTRIBUTE_NONSTRING _GL_ATTRIBUTE_NONSTRING | 50 | #define ATTRIBUTE_NONSTRING _GL_ATTRIBUTE_NONSTRING |
| 51 | #define ATTRIBUTE_NOTHROW _GL_ATTRIBUTE_NOTHROW | 51 | #define ATTRIBUTE_NOTHROW _GL_ATTRIBUTE_NOTHROW |
| 52 | #define ATTRIBUTE_PACKED _GL_ATTRIBUTE_PACKED | 52 | #define ATTRIBUTE_PACKED _GL_ATTRIBUTE_PACKED |
| 53 | #define ATTRIBUTE_PURE _GL_ATTRIBUTE_PURE | 53 | #define ATTRIBUTE_PURE _GL_ATTRIBUTE_PURE |
| 54 | #define ATTRIBUTE_RETURNS_NONNULL _GL_ATTRIBUTE_RETURNS_NONNULL | 54 | #define ATTRIBUTE_RETURNS_NONNULL _GL_ATTRIBUTE_RETURNS_NONNULL |
| 55 | #define ATTRIBUTE_SENTINEL(pos) _GL_ATTRIBUTE_SENTINEL(pos) | 55 | #define ATTRIBUTE_SENTINEL(pos) _GL_ATTRIBUTE_SENTINEL (pos) |
| 56 | #define ATTRIBUTE_WARNING(msg) _GL_ATTRIBUTE_WARNING(msg) | 56 | #define ATTRIBUTE_WARNING(msg) _GL_ATTRIBUTE_WARNING (msg) |
| 57 | 57 | ||
| 58 | #endif /* _GL_ATTRIBUTE_H */ | 58 | #endif /* _GL_ATTRIBUTE_H */ |
diff --git a/lib/dirent.in.h b/lib/dirent.in.h index f7c26810158..6fa44f0d28d 100644 --- a/lib/dirent.in.h +++ b/lib/dirent.in.h | |||
| @@ -57,10 +57,12 @@ typedef struct gl_directory DIR; | |||
| 57 | 57 | ||
| 58 | /* The __attribute__ feature is available in gcc versions 2.5 and later. | 58 | /* The __attribute__ feature is available in gcc versions 2.5 and later. |
| 59 | The attribute __pure__ was added in gcc 2.96. */ | 59 | The attribute __pure__ was added in gcc 2.96. */ |
| 60 | #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) | 60 | #ifndef _GL_ATTRIBUTE_PURE |
| 61 | # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) | 61 | # if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) |
| 62 | #else | 62 | # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) |
| 63 | # define _GL_ATTRIBUTE_PURE /* empty */ | 63 | # else |
| 64 | # define _GL_ATTRIBUTE_PURE /* empty */ | ||
| 65 | # endif | ||
| 64 | #endif | 66 | #endif |
| 65 | 67 | ||
| 66 | /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ | 68 | /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ |
diff --git a/lib/limits.in.h b/lib/limits.in.h index 90c273fa178..d25c5237060 100644 --- a/lib/limits.in.h +++ b/lib/limits.in.h | |||
| @@ -15,16 +15,32 @@ | |||
| 15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU 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 | #ifndef _@GUARD_PREFIX@_LIMITS_H | ||
| 19 | |||
| 20 | #if __GNUC__ >= 3 | 18 | #if __GNUC__ >= 3 |
| 21 | @PRAGMA_SYSTEM_HEADER@ | 19 | @PRAGMA_SYSTEM_HEADER@ |
| 22 | #endif | 20 | #endif |
| 23 | @PRAGMA_COLUMNS@ | 21 | @PRAGMA_COLUMNS@ |
| 24 | 22 | ||
| 25 | /* The include_next requires a split double-inclusion guard. */ | 23 | #if defined _GL_ALREADY_INCLUDING_LIMITS_H |
| 24 | /* Special invocation convention: | ||
| 25 | On Haiku/x86_64, we have a sequence of nested includes | ||
| 26 | <limits.h> -> <syslimits.h> -> <limits.h>. | ||
| 27 | In this situation, LONG_MAX and INT_MAX are not yet defined, | ||
| 28 | therefore we should not attempt to define LONG_BIT. */ | ||
| 29 | |||
| 26 | #@INCLUDE_NEXT@ @NEXT_LIMITS_H@ | 30 | #@INCLUDE_NEXT@ @NEXT_LIMITS_H@ |
| 27 | 31 | ||
| 32 | #else | ||
| 33 | /* Normal invocation convention. */ | ||
| 34 | |||
| 35 | #ifndef _@GUARD_PREFIX@_LIMITS_H | ||
| 36 | |||
| 37 | # define _GL_ALREADY_INCLUDING_LIMITS_H | ||
| 38 | |||
| 39 | /* The include_next requires a split double-inclusion guard. */ | ||
| 40 | # @INCLUDE_NEXT@ @NEXT_LIMITS_H@ | ||
| 41 | |||
| 42 | # undef _GL_ALREADY_INCLUDING_LIMITS_H | ||
| 43 | |||
| 28 | #ifndef _@GUARD_PREFIX@_LIMITS_H | 44 | #ifndef _@GUARD_PREFIX@_LIMITS_H |
| 29 | #define _@GUARD_PREFIX@_LIMITS_H | 45 | #define _@GUARD_PREFIX@_LIMITS_H |
| 30 | 46 | ||
| @@ -102,3 +118,4 @@ | |||
| 102 | 118 | ||
| 103 | #endif /* _@GUARD_PREFIX@_LIMITS_H */ | 119 | #endif /* _@GUARD_PREFIX@_LIMITS_H */ |
| 104 | #endif /* _@GUARD_PREFIX@_LIMITS_H */ | 120 | #endif /* _@GUARD_PREFIX@_LIMITS_H */ |
| 121 | #endif | ||
diff --git a/lib/stdio.in.h b/lib/stdio.in.h index 4a95f323a9a..6c338dd6c0b 100644 --- a/lib/stdio.in.h +++ b/lib/stdio.in.h | |||
| @@ -62,10 +62,12 @@ | |||
| 62 | We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because | 62 | We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because |
| 63 | gnulib and libintl do '#define printf __printf__' when they override | 63 | gnulib and libintl do '#define printf __printf__' when they override |
| 64 | the 'printf' function. */ | 64 | the 'printf' function. */ |
| 65 | #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) | 65 | #ifndef _GL_ATTRIBUTE_FORMAT |
| 66 | # define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) | 66 | # if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) |
| 67 | #else | 67 | # define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) |
| 68 | # define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ | 68 | # else |
| 69 | # define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ | ||
| 70 | # endif | ||
| 69 | #endif | 71 | #endif |
| 70 | 72 | ||
| 71 | /* _GL_ATTRIBUTE_FORMAT_PRINTF | 73 | /* _GL_ATTRIBUTE_FORMAT_PRINTF |
diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h index ec5f124a366..59f9e6c71d1 100644 --- a/lib/stdlib.in.h +++ b/lib/stdlib.in.h | |||
| @@ -101,10 +101,12 @@ struct random_data | |||
| 101 | 101 | ||
| 102 | /* The __attribute__ feature is available in gcc versions 2.5 and later. | 102 | /* The __attribute__ feature is available in gcc versions 2.5 and later. |
| 103 | The attribute __pure__ was added in gcc 2.96. */ | 103 | The attribute __pure__ was added in gcc 2.96. */ |
| 104 | #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) | 104 | #ifndef _GL_ATTRIBUTE_PURE |
| 105 | # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) | 105 | # if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) |
| 106 | #else | 106 | # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) |
| 107 | # define _GL_ATTRIBUTE_PURE /* empty */ | 107 | # else |
| 108 | # define _GL_ATTRIBUTE_PURE /* empty */ | ||
| 109 | # endif | ||
| 108 | #endif | 110 | #endif |
| 109 | 111 | ||
| 110 | /* The definition of _Noreturn is copied here. */ | 112 | /* The definition of _Noreturn is copied here. */ |
diff --git a/lib/string.in.h b/lib/string.in.h index 596c99bf2e2..96e132f37d7 100644 --- a/lib/string.in.h +++ b/lib/string.in.h | |||
| @@ -54,10 +54,12 @@ | |||
| 54 | 54 | ||
| 55 | /* The __attribute__ feature is available in gcc versions 2.5 and later. | 55 | /* The __attribute__ feature is available in gcc versions 2.5 and later. |
| 56 | The attribute __pure__ was added in gcc 2.96. */ | 56 | The attribute __pure__ was added in gcc 2.96. */ |
| 57 | #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) | 57 | #ifndef _GL_ATTRIBUTE_PURE |
| 58 | # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) | 58 | # if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) |
| 59 | #else | 59 | # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) |
| 60 | # define _GL_ATTRIBUTE_PURE /* empty */ | 60 | # else |
| 61 | # define _GL_ATTRIBUTE_PURE /* empty */ | ||
| 62 | # endif | ||
| 61 | #endif | 63 | #endif |
| 62 | 64 | ||
| 63 | /* NetBSD 5.0 declares strsignal in <unistd.h>, not in <string.h>. */ | 65 | /* NetBSD 5.0 declares strsignal in <unistd.h>, not in <string.h>. */ |
diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4 index b0010d0e351..f4ba5e3a00d 100644 --- a/m4/gnulib-common.m4 +++ b/m4/gnulib-common.m4 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # gnulib-common.m4 serial 49 | 1 | # gnulib-common.m4 serial 50 |
| 2 | dnl Copyright (C) 2007-2020 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2007-2020 Free Software Foundation, Inc. |
| 3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
| 4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
| @@ -96,7 +96,7 @@ AC_DEFUN([gl_COMMON_BODY], [ | |||
| 96 | # define _GL_ATTR_returns_nonnull _GL_GNUC_PREREQ (4, 9) | 96 | # define _GL_ATTR_returns_nonnull _GL_GNUC_PREREQ (4, 9) |
| 97 | # define _GL_ATTR_sentinel _GL_GNUC_PREREQ (4, 0) | 97 | # define _GL_ATTR_sentinel _GL_GNUC_PREREQ (4, 0) |
| 98 | # define _GL_ATTR_unused _GL_GNUC_PREREQ (2, 7) | 98 | # define _GL_ATTR_unused _GL_GNUC_PREREQ (2, 7) |
| 99 | # define _GL_ATTR_warn_unused_result_GL_GNUC_PREREQ (3, 4) | 99 | # define _GL_ATTR_warn_unused_result _GL_GNUC_PREREQ (3, 4) |
| 100 | #endif | 100 | #endif |
| 101 | 101 | ||
| 102 | ]dnl There is no _GL_ATTRIBUTE_ALIGNED; use stdalign's _Alignas instead. | 102 | ]dnl There is no _GL_ATTRIBUTE_ALIGNED; use stdalign's _Alignas instead. |
| @@ -122,7 +122,7 @@ AC_DEFUN([gl_COMMON_BODY], [ | |||
| 122 | /* Avoid __attribute__ ((cold)) on MinGW; see thread starting at | 122 | /* Avoid __attribute__ ((cold)) on MinGW; see thread starting at |
| 123 | <https://lists.gnu.org/r/emacs-devel/2019-04/msg01152.html>. */ | 123 | <https://lists.gnu.org/r/emacs-devel/2019-04/msg01152.html>. */ |
| 124 | #if _GL_HAS_ATTRIBUTE (cold) && !defined __MINGW32__ | 124 | #if _GL_HAS_ATTRIBUTE (cold) && !defined __MINGW32__ |
| 125 | # define _GL_ATTRIBUTE_COLD __attribute__ ((cold)) | 125 | # define _GL_ATTRIBUTE_COLD __attribute__ ((__cold__)) |
| 126 | #else | 126 | #else |
| 127 | # define _GL_ATTRIBUTE_COLD | 127 | # define _GL_ATTRIBUTE_COLD |
| 128 | #endif | 128 | #endif |
| @@ -142,8 +142,8 @@ AC_DEFUN([gl_COMMON_BODY], [ | |||
| 142 | #endif | 142 | #endif |
| 143 | 143 | ||
| 144 | #if _GL_HAS_ATTRIBUTE (error) | 144 | #if _GL_HAS_ATTRIBUTE (error) |
| 145 | # define _GL_ATTRIBUTE_ERROR(msg) __attribute__((__error__ (msg))) | 145 | # define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__error__ (msg))) |
| 146 | # define _GL_ATTRIBUTE_WARNING(msg) __attribute__((__warning__ (msg))) | 146 | # define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__warning__ (msg))) |
| 147 | #else | 147 | #else |
| 148 | # define _GL_ATTRIBUTE_ERROR(msg) | 148 | # define _GL_ATTRIBUTE_ERROR(msg) |
| 149 | # define _GL_ATTRIBUTE_WARNING(msg) | 149 | # define _GL_ATTRIBUTE_WARNING(msg) |