diff options
| author | Paul Eggert | 2015-10-13 23:34:16 -0700 |
|---|---|---|
| committer | Paul Eggert | 2015-10-13 23:34:47 -0700 |
| commit | e668176e7d89e885902287da18c69297bf04fed3 (patch) | |
| tree | bc132a39e0052e1fe6a32359d3246108ef01e12e | |
| parent | 2cc412cdc2635ecb99129271abe94bdd744742c2 (diff) | |
| download | emacs-e668176e7d89e885902287da18c69297bf04fed3.tar.gz emacs-e668176e7d89e885902287da18c69297bf04fed3.zip | |
Merge from gnulib
This incorporates:
2015-10-13 binary-io, u64, unistd: port to strict C
2015-09-26 c-ctype: do not worry about EBCDIC + char signed
2015-09-25 c-ctype: port better to z/OS EBCDIC
2015-09-25 gnulib-common.m4: fix gl_PROG_AR_RANLIB/AM_PROG_AR clash
* doc/misc/texinfo.tex, lib/binary-io.c, lib/c-ctype.h, lib/u64.c:
* lib/unistd.c, m4/gnulib-common.m4, m4/gnulib-comp.m4:
Copy from gnulib.
| -rw-r--r-- | doc/misc/texinfo.tex | 50 | ||||
| -rw-r--r-- | lib/binary-io.c | 1 | ||||
| -rw-r--r-- | lib/c-ctype.h | 531 | ||||
| -rw-r--r-- | lib/u64.c | 1 | ||||
| -rw-r--r-- | lib/unistd.c | 1 | ||||
| -rw-r--r-- | m4/gnulib-common.m4 | 43 | ||||
| -rw-r--r-- | m4/gnulib-comp.m4 | 5 |
7 files changed, 130 insertions, 502 deletions
diff --git a/doc/misc/texinfo.tex b/doc/misc/texinfo.tex index bff8eb017a0..46a9d1535df 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{2015-09-20.17} | 6 | \def\texinfoversion{2015-10-09.18} |
| 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, |
| @@ -530,14 +530,13 @@ | |||
| 530 | % | 530 | % |
| 531 | \def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}} | 531 | \def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}} |
| 532 | 532 | ||
| 533 | |||
| 534 | % \parseargdef - define a command taking an argument on the line | ||
| 535 | % | ||
| 533 | % \parseargdef\foo{...} | 536 | % \parseargdef\foo{...} |
| 534 | % is roughly equivalent to | 537 | % is roughly equivalent to |
| 535 | % \def\foo{\parsearg\Xfoo} | 538 | % \def\foo{\parsearg\Xfoo} |
| 536 | % \def\Xfoo#1{...} | 539 | % \def\Xfoo#1{...} |
| 537 | % | ||
| 538 | % Actually, I use \csname\string\foo\endcsname, ie. \\foo, as it is my | ||
| 539 | % favourite TeX trick. --kasal, 16nov03 | ||
| 540 | |||
| 541 | \def\parseargdef#1{% | 540 | \def\parseargdef#1{% |
| 542 | \expandafter \doparseargdef \csname\string#1\endcsname #1% | 541 | \expandafter \doparseargdef \csname\string#1\endcsname #1% |
| 543 | } | 542 | } |
| @@ -1416,6 +1415,7 @@ output) for that.)} | |||
| 1416 | \normalturnoffactive | 1415 | \normalturnoffactive |
| 1417 | \def\@{@}% | 1416 | \def\@{@}% |
| 1418 | \let\/=\empty | 1417 | \let\/=\empty |
| 1418 | \let\xprocessmacroarg=\eatspaces % in case we are in a macro expansion | ||
| 1419 | \makevalueexpandable | 1419 | \makevalueexpandable |
| 1420 | % do we want to go so far as to use \indexnofonts instead of just | 1420 | % do we want to go so far as to use \indexnofonts instead of just |
| 1421 | % special-casing \var here? | 1421 | % special-casing \var here? |
| @@ -4864,11 +4864,17 @@ end | |||
| 4864 | \def\requireopenindexfile#1{% | 4864 | \def\requireopenindexfile#1{% |
| 4865 | \ifnum\csname #1indfile\endcsname=0 | 4865 | \ifnum\csname #1indfile\endcsname=0 |
| 4866 | \expandafter\newwrite \csname#1indfile\endcsname | 4866 | \expandafter\newwrite \csname#1indfile\endcsname |
| 4867 | \immediate\openout\csname#1indfile\endcsname \jobname.#1 % Open the file | 4867 | \edef\suffix{#1}% |
| 4868 | % A .fls suffix would conflict with the file extension for the output | ||
| 4869 | % of -recorder, so use .f1s instead. | ||
| 4870 | \ifx\suffix\indexisfl\def\suffix{f1}\fi | ||
| 4871 | % Open the file | ||
| 4872 | \immediate\openout\csname#1indfile\endcsname \jobname.\suffix | ||
| 4868 | % Using \immediate here prevents an object entering into the current box, | 4873 | % Using \immediate here prevents an object entering into the current box, |
| 4869 | % which could confound checks such as those in \safewhatsit for preceding | 4874 | % which could confound checks such as those in \safewhatsit for preceding |
| 4870 | % skips. | 4875 | % skips. |
| 4871 | \fi} | 4876 | \fi} |
| 4877 | \def\indexisfl{fl} | ||
| 4872 | 4878 | ||
| 4873 | % Output \ as {\indexbackslash}, because \ is an escape character in | 4879 | % Output \ as {\indexbackslash}, because \ is an escape character in |
| 4874 | % the index files. | 4880 | % the index files. |
| @@ -5059,7 +5065,9 @@ end | |||
| 5059 | % as its first line, TeX doesn't complain about mismatched braces | 5065 | % as its first line, TeX doesn't complain about mismatched braces |
| 5060 | % (because it thinks @} is a control sequence). | 5066 | % (because it thinks @} is a control sequence). |
| 5061 | \catcode`\@ = 11 | 5067 | \catcode`\@ = 11 |
| 5062 | \openin 1 \jobname.#1s | 5068 | % See comment in \requireopenindexfile. |
| 5069 | \def\indexname{#1}\ifx\indexname\indexisfl\def\indexname{f1}\fi | ||
| 5070 | \openin 1 \jobname.\indexname s | ||
| 5063 | \ifeof 1 | 5071 | \ifeof 1 |
| 5064 | % \enddoublecolumns gets confused if there is no text in the index, | 5072 | % \enddoublecolumns gets confused if there is no text in the index, |
| 5065 | % and it loses the chapter title and the aux file entries for the | 5073 | % and it loses the chapter title and the aux file entries for the |
| @@ -5251,7 +5259,7 @@ end | |||
| 5251 | % cursed by a Unix daemon. | 5259 | % cursed by a Unix daemon. |
| 5252 | \setbox\boxA = \hbox{#1}% | 5260 | \setbox\boxA = \hbox{#1}% |
| 5253 | \ifdim\wd\boxA = 0pt | 5261 | \ifdim\wd\boxA = 0pt |
| 5254 | \ % | 5262 | \null\nobreak\hfill\ % |
| 5255 | \else | 5263 | \else |
| 5256 | % | 5264 | % |
| 5257 | \null\nobreak\indexdotfill % Have leaders before the page number. | 5265 | \null\nobreak\indexdotfill % Have leaders before the page number. |
| @@ -5558,7 +5566,8 @@ end | |||
| 5558 | \writetocentry{part}{#1}{}% but put it in the toc | 5566 | \writetocentry{part}{#1}{}% but put it in the toc |
| 5559 | \headingsoff % no headline or footline on the part page | 5567 | \headingsoff % no headline or footline on the part page |
| 5560 | % This outputs a mark at the end of the page that clears \thischapter | 5568 | % This outputs a mark at the end of the page that clears \thischapter |
| 5561 | % and \thissection, like is done in \startcontents. | 5569 | % and \thissection, as is done in \startcontents. |
| 5570 | \let\pchapsepmacro\relax | ||
| 5562 | \chapmacro{}{Yomitfromtoc}{}% | 5571 | \chapmacro{}{Yomitfromtoc}{}% |
| 5563 | \chapoddpage | 5572 | \chapoddpage |
| 5564 | \endgroup | 5573 | \endgroup |
| @@ -9339,7 +9348,8 @@ directory should work if nowhere else does.} | |||
| 9339 | % @documentencoding sets the definition of non-ASCII characters | 9348 | % @documentencoding sets the definition of non-ASCII characters |
| 9340 | % according to the specified encoding. | 9349 | % according to the specified encoding. |
| 9341 | % | 9350 | % |
| 9342 | \parseargdef\documentencoding{% | 9351 | \def\documentencoding{\parseargusing\filenamecatcodes\documentencodingzzz} |
| 9352 | \def\documentencodingzzz#1{% | ||
| 9343 | % Encoding being declared for the document. | 9353 | % Encoding being declared for the document. |
| 9344 | \def\declaredencoding{\csname #1.enc\endcsname}% | 9354 | \def\declaredencoding{\csname #1.enc\endcsname}% |
| 9345 | % | 9355 | % |
| @@ -10066,6 +10076,9 @@ directory should work if nowhere else does.} | |||
| 10066 | 10076 | ||
| 10067 | \DeclareUnicodeCharacter{02DB}{\ogonek{ }} | 10077 | \DeclareUnicodeCharacter{02DB}{\ogonek{ }} |
| 10068 | 10078 | ||
| 10079 | % Greek letters | ||
| 10080 | \DeclareUnicodeCharacter{03C0}{\ensuremath\pi} | ||
| 10081 | |||
| 10069 | \DeclareUnicodeCharacter{1E02}{\dotaccent{B}} | 10082 | \DeclareUnicodeCharacter{1E02}{\dotaccent{B}} |
| 10070 | \DeclareUnicodeCharacter{1E03}{\dotaccent{b}} | 10083 | \DeclareUnicodeCharacter{1E03}{\dotaccent{b}} |
| 10071 | \DeclareUnicodeCharacter{1E04}{\udotaccent{B}} | 10084 | \DeclareUnicodeCharacter{1E04}{\udotaccent{B}} |
| @@ -10193,6 +10206,7 @@ directory should work if nowhere else does.} | |||
| 10193 | \DeclareUnicodeCharacter{1EF8}{\~Y} | 10206 | \DeclareUnicodeCharacter{1EF8}{\~Y} |
| 10194 | \DeclareUnicodeCharacter{1EF9}{\~y} | 10207 | \DeclareUnicodeCharacter{1EF9}{\~y} |
| 10195 | 10208 | ||
| 10209 | % Punctuation | ||
| 10196 | \DeclareUnicodeCharacter{2013}{--} | 10210 | \DeclareUnicodeCharacter{2013}{--} |
| 10197 | \DeclareUnicodeCharacter{2014}{---} | 10211 | \DeclareUnicodeCharacter{2014}{---} |
| 10198 | \DeclareUnicodeCharacter{2018}{\quoteleft} | 10212 | \DeclareUnicodeCharacter{2018}{\quoteleft} |
| @@ -10204,18 +10218,34 @@ directory should work if nowhere else does.} | |||
| 10204 | \DeclareUnicodeCharacter{2020}{\ensuremath\dagger} | 10218 | \DeclareUnicodeCharacter{2020}{\ensuremath\dagger} |
| 10205 | \DeclareUnicodeCharacter{2021}{\ensuremath\ddagger} | 10219 | \DeclareUnicodeCharacter{2021}{\ensuremath\ddagger} |
| 10206 | \DeclareUnicodeCharacter{2022}{\bullet} | 10220 | \DeclareUnicodeCharacter{2022}{\bullet} |
| 10221 | \DeclareUnicodeCharacter{202F}{\thinspace} | ||
| 10207 | \DeclareUnicodeCharacter{2026}{\dots} | 10222 | \DeclareUnicodeCharacter{2026}{\dots} |
| 10208 | \DeclareUnicodeCharacter{2039}{\guilsinglleft} | 10223 | \DeclareUnicodeCharacter{2039}{\guilsinglleft} |
| 10209 | \DeclareUnicodeCharacter{203A}{\guilsinglright} | 10224 | \DeclareUnicodeCharacter{203A}{\guilsinglright} |
| 10225 | |||
| 10210 | \DeclareUnicodeCharacter{20AC}{\euro} | 10226 | \DeclareUnicodeCharacter{20AC}{\euro} |
| 10211 | 10227 | ||
| 10212 | \DeclareUnicodeCharacter{2192}{\expansion} | 10228 | \DeclareUnicodeCharacter{2192}{\expansion} |
| 10213 | \DeclareUnicodeCharacter{21D2}{\result} | 10229 | \DeclareUnicodeCharacter{21D2}{\result} |
| 10214 | 10230 | ||
| 10231 | % Mathematical symbols | ||
| 10232 | \DeclareUnicodeCharacter{2200}{\ensuremath\forall} | ||
| 10233 | \DeclareUnicodeCharacter{2203}{\ensuremath\exists} | ||
| 10234 | \DeclareUnicodeCharacter{2208}{\ensuremath\in} | ||
| 10215 | \DeclareUnicodeCharacter{2212}{\minus} | 10235 | \DeclareUnicodeCharacter{2212}{\minus} |
| 10216 | \DeclareUnicodeCharacter{2217}{\point} | 10236 | \DeclareUnicodeCharacter{2217}{\point} |
| 10237 | \DeclareUnicodeCharacter{221E}{\ensuremath\infty} | ||
| 10217 | \DeclareUnicodeCharacter{2225}{\ensuremath\parallel} | 10238 | \DeclareUnicodeCharacter{2225}{\ensuremath\parallel} |
| 10239 | \DeclareUnicodeCharacter{2227}{\ensuremath\wedge} | ||
| 10240 | \DeclareUnicodeCharacter{2229}{\ensuremath\cap} | ||
| 10218 | \DeclareUnicodeCharacter{2261}{\equiv} | 10241 | \DeclareUnicodeCharacter{2261}{\equiv} |
| 10242 | \DeclareUnicodeCharacter{2264}{\ensuremath\leq} | ||
| 10243 | \DeclareUnicodeCharacter{2265}{\ensuremath\geq} | ||
| 10244 | \DeclareUnicodeCharacter{2282}{\ensuremath\subset} | ||
| 10245 | \DeclareUnicodeCharacter{2287}{\ensuremath\supseteq} | ||
| 10246 | |||
| 10247 | \global\mathchardef\checkmark="1370 % actually the square root sign | ||
| 10248 | \DeclareUnicodeCharacter{2713}{\ensuremath\checkmark} | ||
| 10219 | }% end of \utfeightchardefs | 10249 | }% end of \utfeightchardefs |
| 10220 | 10250 | ||
| 10221 | % US-ASCII character definitions. | 10251 | % US-ASCII character definitions. |
diff --git a/lib/binary-io.c b/lib/binary-io.c index 8bbdb44d121..d828bcd0153 100644 --- a/lib/binary-io.c +++ b/lib/binary-io.c | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | #include <config.h> | 1 | #include <config.h> |
| 2 | #define BINARY_IO_INLINE _GL_EXTERN_INLINE | 2 | #define BINARY_IO_INLINE _GL_EXTERN_INLINE |
| 3 | #include "binary-io.h" | 3 | #include "binary-io.h" |
| 4 | typedef int dummy; | ||
diff --git a/lib/c-ctype.h b/lib/c-ctype.h index 50ebbb58293..15125308cb6 100644 --- a/lib/c-ctype.h +++ b/lib/c-ctype.h | |||
| @@ -78,82 +78,65 @@ extern "C" { | |||
| 78 | # error "Only ASCII and EBCDIC are supported" | 78 | # error "Only ASCII and EBCDIC are supported" |
| 79 | #endif | 79 | #endif |
| 80 | 80 | ||
| 81 | #define _C_CTYPE_SIGNED_EBCDIC ('A' < 0) | 81 | #if 'A' < 0 |
| 82 | # error "EBCDIC and char is signed -- not supported" | ||
| 83 | #endif | ||
| 84 | |||
| 85 | /* Cases for control characters. */ | ||
| 86 | |||
| 87 | #define _C_CTYPE_CNTRL \ | ||
| 88 | case '\a': case '\b': case '\f': case '\n': \ | ||
| 89 | case '\r': case '\t': case '\v': \ | ||
| 90 | _C_CTYPE_OTHER_CNTRL | ||
| 91 | |||
| 92 | /* ASCII control characters other than those with \-letter escapes. */ | ||
| 82 | 93 | ||
| 83 | #if C_CTYPE_ASCII | 94 | #if C_CTYPE_ASCII |
| 84 | # define _C_CTYPE_CNTRL \ | 95 | # define _C_CTYPE_OTHER_CNTRL \ |
| 85 | case '\x00': case '\x01': case '\x02': case '\x03': \ | 96 | case '\x00': case '\x01': case '\x02': case '\x03': \ |
| 86 | case '\x04': case '\x05': case '\x06': case '\x07': \ | 97 | case '\x04': case '\x05': case '\x06': case '\x0e': \ |
| 87 | case '\x08': case '\x09': case '\x0a': case '\x0b': \ | 98 | case '\x0f': case '\x10': case '\x11': case '\x12': \ |
| 88 | case '\x0c': case '\x0d': case '\x0e': case '\x0f': \ | 99 | case '\x13': case '\x14': case '\x15': case '\x16': \ |
| 89 | case '\x10': case '\x11': case '\x12': case '\x13': \ | 100 | case '\x17': case '\x18': case '\x19': case '\x1a': \ |
| 90 | case '\x14': case '\x15': case '\x16': case '\x17': \ | 101 | case '\x1b': case '\x1c': case '\x1d': case '\x1e': \ |
| 91 | case '\x18': case '\x19': case '\x1a': case '\x1b': \ | 102 | case '\x1f': case '\x7f' |
| 92 | case '\x1c': case '\x1d': case '\x1e': case '\x1f': \ | ||
| 93 | case '\x7f' | ||
| 94 | #else | 103 | #else |
| 95 | /* Use EBCDIC code page 1047's assignments for ASCII control chars; | 104 | /* Use EBCDIC code page 1047's assignments for ASCII control chars; |
| 96 | assume all EBCDIC code pages agree about these assignments. */ | 105 | assume all EBCDIC code pages agree about these assignments. */ |
| 97 | # define _C_CTYPE_CNTRL \ | 106 | # define _C_CTYPE_OTHER_CNTRL \ |
| 98 | case '\x00': case '\x01': case '\x02': case '\x03': \ | 107 | case '\x00': case '\x01': case '\x02': case '\x03': \ |
| 99 | case '\x05': case '\x07': case '\x0b': case '\x0c': \ | 108 | case '\x07': case '\x0e': case '\x0f': case '\x10': \ |
| 100 | case '\x0d': case '\x0e': case '\x0f': case '\x10': \ | 109 | case '\x11': case '\x12': case '\x13': case '\x18': \ |
| 101 | case '\x11': case '\x12': case '\x13': case '\x16': \ | 110 | case '\x19': case '\x1c': case '\x1d': case '\x1e': \ |
| 102 | case '\x18': case '\x19': case '\x1c': case '\x1d': \ | 111 | case '\x1f': case '\x26': case '\x27': case '\x2d': \ |
| 103 | case '\x1e': case '\x1f': case '\x25': case '\x26': \ | 112 | case '\x2e': case '\x32': case '\x37': case '\x3c': \ |
| 104 | case '\x27': case '\x2d': case '\x2e': case '\x2f': \ | 113 | case '\x3d': case '\x3f' |
| 105 | case '\x32': case '\x37': case '\x3c': case '\x3d': \ | ||
| 106 | case '\x3f' | ||
| 107 | #endif | 114 | #endif |
| 108 | 115 | ||
| 109 | /* Cases for hex letter digits, digits, lower, and upper, offset by N. */ | 116 | /* Cases for lowercase hex letters, and lowercase letters, all offset by N. */ |
| 110 | 117 | ||
| 111 | #define _C_CTYPE_A_THRU_F_N(n) \ | 118 | #define _C_CTYPE_LOWER_A_THRU_F_N(n) \ |
| 112 | case 'a' + (n): case 'b' + (n): case 'c' + (n): case 'd' + (n): \ | 119 | case 'a' + (n): case 'b' + (n): case 'c' + (n): case 'd' + (n): \ |
| 113 | case 'e' + (n): case 'f' + (n): \ | 120 | case 'e' + (n): case 'f' + (n) |
| 114 | case 'A' + (n): case 'B' + (n): case 'C' + (n): case 'D' + (n): \ | ||
| 115 | case 'E' + (n): case 'F' + (n) | ||
| 116 | #define _C_CTYPE_DIGIT_N(n) \ | ||
| 117 | case '0' + (n): case '1' + (n): case '2' + (n): case '3' + (n): \ | ||
| 118 | case '4' + (n): case '5' + (n): case '6' + (n): case '7' + (n): \ | ||
| 119 | case '8' + (n): case '9' + (n) | ||
| 120 | #define _C_CTYPE_LOWER_N(n) \ | 121 | #define _C_CTYPE_LOWER_N(n) \ |
| 121 | case 'a' + (n): case 'b' + (n): case 'c' + (n): case 'd' + (n): \ | 122 | _C_CTYPE_LOWER_A_THRU_F_N(n): \ |
| 122 | case 'e' + (n): case 'f' + (n): case 'g' + (n): case 'h' + (n): \ | 123 | case 'g' + (n): case 'h' + (n): case 'i' + (n): case 'j' + (n): \ |
| 123 | case 'i' + (n): case 'j' + (n): case 'k' + (n): case 'l' + (n): \ | 124 | case 'k' + (n): case 'l' + (n): case 'm' + (n): case 'n' + (n): \ |
| 124 | case 'm' + (n): case 'n' + (n): case 'o' + (n): case 'p' + (n): \ | 125 | case 'o' + (n): case 'p' + (n): case 'q' + (n): case 'r' + (n): \ |
| 125 | case 'q' + (n): case 'r' + (n): case 's' + (n): case 't' + (n): \ | 126 | case 's' + (n): case 't' + (n): case 'u' + (n): case 'v' + (n): \ |
| 126 | case 'u' + (n): case 'v' + (n): case 'w' + (n): case 'x' + (n): \ | 127 | case 'w' + (n): case 'x' + (n): case 'y' + (n): case 'z' + (n) |
| 127 | case 'y' + (n): case 'z' + (n) | 128 | |
| 128 | #define _C_CTYPE_UPPER_N(n) \ | 129 | /* Cases for hex letters, digits, lower, punct, and upper. */ |
| 129 | case 'A' + (n): case 'B' + (n): case 'C' + (n): case 'D' + (n): \ | 130 | |
| 130 | case 'E' + (n): case 'F' + (n): case 'G' + (n): case 'H' + (n): \ | 131 | #define _C_CTYPE_A_THRU_F \ |
| 131 | case 'I' + (n): case 'J' + (n): case 'K' + (n): case 'L' + (n): \ | 132 | _C_CTYPE_LOWER_A_THRU_F_N (0): \ |
| 132 | case 'M' + (n): case 'N' + (n): case 'O' + (n): case 'P' + (n): \ | 133 | _C_CTYPE_LOWER_A_THRU_F_N ('A' - 'a') |
| 133 | case 'Q' + (n): case 'R' + (n): case 'S' + (n): case 'T' + (n): \ | 134 | #define _C_CTYPE_DIGIT \ |
| 134 | case 'U' + (n): case 'V' + (n): case 'W' + (n): case 'X' + (n): \ | 135 | case '0': case '1': case '2': case '3': \ |
| 135 | case 'Y' + (n): case 'Z' + (n) | 136 | case '4': case '5': case '6': case '7': \ |
| 136 | 137 | case '8': case '9' | |
| 137 | /* Given MACRO_N, expand to all the cases for the corresponding class. */ | 138 | #define _C_CTYPE_LOWER _C_CTYPE_LOWER_N (0) |
| 138 | #if _C_CTYPE_SIGNED_EBCDIC | 139 | #define _C_CTYPE_PUNCT \ |
| 139 | # define _C_CTYPE_CASES(macro_n) macro_n (0): macro_n (256) | ||
| 140 | #else | ||
| 141 | # define _C_CTYPE_CASES(macro_n) macro_n (0) | ||
| 142 | #endif | ||
| 143 | |||
| 144 | /* Cases for hex letter digits, digits, lower, and upper, with another | ||
| 145 | case for unsigned char if the original char is negative. */ | ||
| 146 | |||
| 147 | #define _C_CTYPE_A_THRU_F _C_CTYPE_CASES (_C_CTYPE_A_THRU_F_N) | ||
| 148 | #define _C_CTYPE_DIGIT _C_CTYPE_CASES (_C_CTYPE_DIGIT_N) | ||
| 149 | #define _C_CTYPE_LOWER _C_CTYPE_CASES (_C_CTYPE_LOWER_N) | ||
| 150 | #define _C_CTYPE_UPPER _C_CTYPE_CASES (_C_CTYPE_UPPER_N) | ||
| 151 | |||
| 152 | /* The punct class differs because some punctuation characters may be | ||
| 153 | negative while others are nonnegative. Instead of attempting to | ||
| 154 | define _C_CTYPE_PUNCT, define just the plain chars here, and do any | ||
| 155 | cases-plus-256 by hand after using this macro. */ | ||
| 156 | #define _C_CTYPE_PUNCT_PLAIN \ | ||
| 157 | case '!': case '"': case '#': case '$': \ | 140 | case '!': case '"': case '#': case '$': \ |
| 158 | case '%': case '&': case '\'': case '(': \ | 141 | case '%': case '&': case '\'': case '(': \ |
| 159 | case ')': case '*': case '+': case ',': \ | 142 | case ')': case '*': case '+': case ',': \ |
| @@ -162,6 +145,8 @@ extern "C" { | |||
| 162 | case '?': case '@': case '[': case '\\': \ | 145 | case '?': case '@': case '[': case '\\': \ |
| 163 | case ']': case '^': case '_': case '`': \ | 146 | case ']': case '^': case '_': case '`': \ |
| 164 | case '{': case '|': case '}': case '~' | 147 | case '{': case '|': case '}': case '~' |
| 148 | #define _C_CTYPE_UPPER _C_CTYPE_LOWER_N ('A' - 'a') | ||
| 149 | |||
| 165 | 150 | ||
| 166 | /* Function definitions. */ | 151 | /* Function definitions. */ |
| 167 | 152 | ||
| @@ -189,7 +174,6 @@ c_isalnum (int c) | |||
| 189 | _C_CTYPE_LOWER: | 174 | _C_CTYPE_LOWER: |
| 190 | _C_CTYPE_UPPER: | 175 | _C_CTYPE_UPPER: |
| 191 | return true; | 176 | return true; |
| 192 | |||
| 193 | default: | 177 | default: |
| 194 | return false; | 178 | return false; |
| 195 | } | 179 | } |
| @@ -203,7 +187,6 @@ c_isalpha (int c) | |||
| 203 | _C_CTYPE_LOWER: | 187 | _C_CTYPE_LOWER: |
| 204 | _C_CTYPE_UPPER: | 188 | _C_CTYPE_UPPER: |
| 205 | return true; | 189 | return true; |
| 206 | |||
| 207 | default: | 190 | default: |
| 208 | return false; | 191 | return false; |
| 209 | } | 192 | } |
| @@ -220,107 +203,9 @@ c_isascii (int c) | |||
| 220 | _C_CTYPE_CNTRL: | 203 | _C_CTYPE_CNTRL: |
| 221 | _C_CTYPE_DIGIT: | 204 | _C_CTYPE_DIGIT: |
| 222 | _C_CTYPE_LOWER: | 205 | _C_CTYPE_LOWER: |
| 206 | _C_CTYPE_PUNCT: | ||
| 223 | _C_CTYPE_UPPER: | 207 | _C_CTYPE_UPPER: |
| 224 | |||
| 225 | _C_CTYPE_PUNCT_PLAIN: | ||
| 226 | #if '!' < 0 | ||
| 227 | case '!' + 256: | ||
| 228 | #endif | ||
| 229 | #if '"' < 0 | ||
| 230 | case '"' + 256: | ||
| 231 | #endif | ||
| 232 | #if '#' < 0 | ||
| 233 | case '#' + 256: | ||
| 234 | #endif | ||
| 235 | #if '$' < 0 | ||
| 236 | case '$' + 256: | ||
| 237 | #endif | ||
| 238 | #if '%' < 0 | ||
| 239 | case '%' + 256: | ||
| 240 | #endif | ||
| 241 | #if '&' < 0 | ||
| 242 | case '&' + 256: | ||
| 243 | #endif | ||
| 244 | #if '\'' < 0 | ||
| 245 | case '\'' + 256: | ||
| 246 | #endif | ||
| 247 | #if '(' < 0 | ||
| 248 | case '(' + 256: | ||
| 249 | #endif | ||
| 250 | #if ')' < 0 | ||
| 251 | case ')' + 256: | ||
| 252 | #endif | ||
| 253 | #if '*' < 0 | ||
| 254 | case '*' + 256: | ||
| 255 | #endif | ||
| 256 | #if '+' < 0 | ||
| 257 | case '+' + 256: | ||
| 258 | #endif | ||
| 259 | #if ',' < 0 | ||
| 260 | case ',' + 256: | ||
| 261 | #endif | ||
| 262 | #if '-' < 0 | ||
| 263 | case '-' + 256: | ||
| 264 | #endif | ||
| 265 | #if '.' < 0 | ||
| 266 | case '.' + 256: | ||
| 267 | #endif | ||
| 268 | #if '/' < 0 | ||
| 269 | case '/' + 256: | ||
| 270 | #endif | ||
| 271 | #if ':' < 0 | ||
| 272 | case ':' + 256: | ||
| 273 | #endif | ||
| 274 | #if ';' < 0 | ||
| 275 | case ';' + 256: | ||
| 276 | #endif | ||
| 277 | #if '<' < 0 | ||
| 278 | case '<' + 256: | ||
| 279 | #endif | ||
| 280 | #if '=' < 0 | ||
| 281 | case '=' + 256: | ||
| 282 | #endif | ||
| 283 | #if '>' < 0 | ||
| 284 | case '>' + 256: | ||
| 285 | #endif | ||
| 286 | #if '?' < 0 | ||
| 287 | case '?' + 256: | ||
| 288 | #endif | ||
| 289 | #if '@' < 0 | ||
| 290 | case '@' + 256: | ||
| 291 | #endif | ||
| 292 | #if '[' < 0 | ||
| 293 | case '[' + 256: | ||
| 294 | #endif | ||
| 295 | #if '\\' < 0 | ||
| 296 | case '\\' + 256: | ||
| 297 | #endif | ||
| 298 | #if ']' < 0 | ||
| 299 | case ']' + 256: | ||
| 300 | #endif | ||
| 301 | #if '^' < 0 | ||
| 302 | case '^' + 256: | ||
| 303 | #endif | ||
| 304 | #if '_' < 0 | ||
| 305 | case '_' + 256: | ||
| 306 | #endif | ||
| 307 | #if '`' < 0 | ||
| 308 | case '`' + 256: | ||
| 309 | #endif | ||
| 310 | #if '{' < 0 | ||
| 311 | case '{' + 256: | ||
| 312 | #endif | ||
| 313 | #if '|' < 0 | ||
| 314 | case '|' + 256: | ||
| 315 | #endif | ||
| 316 | #if '}' < 0 | ||
| 317 | case '}' + 256: | ||
| 318 | #endif | ||
| 319 | #if '~' < 0 | ||
| 320 | case '~' + 256: | ||
| 321 | #endif | ||
| 322 | return true; | 208 | return true; |
| 323 | |||
| 324 | default: | 209 | default: |
| 325 | return false; | 210 | return false; |
| 326 | } | 211 | } |
| @@ -363,107 +248,9 @@ c_isgraph (int c) | |||
| 363 | { | 248 | { |
| 364 | _C_CTYPE_DIGIT: | 249 | _C_CTYPE_DIGIT: |
| 365 | _C_CTYPE_LOWER: | 250 | _C_CTYPE_LOWER: |
| 251 | _C_CTYPE_PUNCT: | ||
| 366 | _C_CTYPE_UPPER: | 252 | _C_CTYPE_UPPER: |
| 367 | |||
| 368 | _C_CTYPE_PUNCT_PLAIN: | ||
| 369 | #if '!' < 0 | ||
| 370 | case '!' + 256: | ||
| 371 | #endif | ||
| 372 | #if '"' < 0 | ||
| 373 | case '"' + 256: | ||
| 374 | #endif | ||
| 375 | #if '#' < 0 | ||
| 376 | case '#' + 256: | ||
| 377 | #endif | ||
| 378 | #if '$' < 0 | ||
| 379 | case '$' + 256: | ||
| 380 | #endif | ||
| 381 | #if '%' < 0 | ||
| 382 | case '%' + 256: | ||
| 383 | #endif | ||
| 384 | #if '&' < 0 | ||
| 385 | case '&' + 256: | ||
| 386 | #endif | ||
| 387 | #if '\'' < 0 | ||
| 388 | case '\'' + 256: | ||
| 389 | #endif | ||
| 390 | #if '(' < 0 | ||
| 391 | case '(' + 256: | ||
| 392 | #endif | ||
| 393 | #if ')' < 0 | ||
| 394 | case ')' + 256: | ||
| 395 | #endif | ||
| 396 | #if '*' < 0 | ||
| 397 | case '*' + 256: | ||
| 398 | #endif | ||
| 399 | #if '+' < 0 | ||
| 400 | case '+' + 256: | ||
| 401 | #endif | ||
| 402 | #if ',' < 0 | ||
| 403 | case ',' + 256: | ||
| 404 | #endif | ||
| 405 | #if '-' < 0 | ||
| 406 | case '-' + 256: | ||
| 407 | #endif | ||
| 408 | #if '.' < 0 | ||
| 409 | case '.' + 256: | ||
| 410 | #endif | ||
| 411 | #if '/' < 0 | ||
| 412 | case '/' + 256: | ||
| 413 | #endif | ||
| 414 | #if ':' < 0 | ||
| 415 | case ':' + 256: | ||
| 416 | #endif | ||
| 417 | #if ';' < 0 | ||
| 418 | case ';' + 256: | ||
| 419 | #endif | ||
| 420 | #if '<' < 0 | ||
| 421 | case '<' + 256: | ||
| 422 | #endif | ||
| 423 | #if '=' < 0 | ||
| 424 | case '=' + 256: | ||
| 425 | #endif | ||
| 426 | #if '>' < 0 | ||
| 427 | case '>' + 256: | ||
| 428 | #endif | ||
| 429 | #if '?' < 0 | ||
| 430 | case '?' + 256: | ||
| 431 | #endif | ||
| 432 | #if '@' < 0 | ||
| 433 | case '@' + 256: | ||
| 434 | #endif | ||
| 435 | #if '[' < 0 | ||
| 436 | case '[' + 256: | ||
| 437 | #endif | ||
| 438 | #if '\\' < 0 | ||
| 439 | case '\\' + 256: | ||
| 440 | #endif | ||
| 441 | #if ']' < 0 | ||
| 442 | case ']' + 256: | ||
| 443 | #endif | ||
| 444 | #if '^' < 0 | ||
| 445 | case '^' + 256: | ||
| 446 | #endif | ||
| 447 | #if '_' < 0 | ||
| 448 | case '_' + 256: | ||
| 449 | #endif | ||
| 450 | #if '`' < 0 | ||
| 451 | case '`' + 256: | ||
| 452 | #endif | ||
| 453 | #if '{' < 0 | ||
| 454 | case '{' + 256: | ||
| 455 | #endif | ||
| 456 | #if '|' < 0 | ||
| 457 | case '|' + 256: | ||
| 458 | #endif | ||
| 459 | #if '}' < 0 | ||
| 460 | case '}' + 256: | ||
| 461 | #endif | ||
| 462 | #if '~' < 0 | ||
| 463 | case '~' + 256: | ||
| 464 | #endif | ||
| 465 | return true; | 253 | return true; |
| 466 | |||
| 467 | default: | 254 | default: |
| 468 | return false; | 255 | return false; |
| 469 | } | 256 | } |
| @@ -489,107 +276,9 @@ c_isprint (int c) | |||
| 489 | case ' ': | 276 | case ' ': |
| 490 | _C_CTYPE_DIGIT: | 277 | _C_CTYPE_DIGIT: |
| 491 | _C_CTYPE_LOWER: | 278 | _C_CTYPE_LOWER: |
| 279 | _C_CTYPE_PUNCT: | ||
| 492 | _C_CTYPE_UPPER: | 280 | _C_CTYPE_UPPER: |
| 493 | |||
| 494 | _C_CTYPE_PUNCT_PLAIN: | ||
| 495 | #if '!' < 0 | ||
| 496 | case '!' + 256: | ||
| 497 | #endif | ||
| 498 | #if '"' < 0 | ||
| 499 | case '"' + 256: | ||
| 500 | #endif | ||
| 501 | #if '#' < 0 | ||
| 502 | case '#' + 256: | ||
| 503 | #endif | ||
| 504 | #if '$' < 0 | ||
| 505 | case '$' + 256: | ||
| 506 | #endif | ||
| 507 | #if '%' < 0 | ||
| 508 | case '%' + 256: | ||
| 509 | #endif | ||
| 510 | #if '&' < 0 | ||
| 511 | case '&' + 256: | ||
| 512 | #endif | ||
| 513 | #if '\'' < 0 | ||
| 514 | case '\'' + 256: | ||
| 515 | #endif | ||
| 516 | #if '(' < 0 | ||
| 517 | case '(' + 256: | ||
| 518 | #endif | ||
| 519 | #if ')' < 0 | ||
| 520 | case ')' + 256: | ||
| 521 | #endif | ||
| 522 | #if '*' < 0 | ||
| 523 | case '*' + 256: | ||
| 524 | #endif | ||
| 525 | #if '+' < 0 | ||
| 526 | case '+' + 256: | ||
| 527 | #endif | ||
| 528 | #if ',' < 0 | ||
| 529 | case ',' + 256: | ||
| 530 | #endif | ||
| 531 | #if '-' < 0 | ||
| 532 | case '-' + 256: | ||
| 533 | #endif | ||
| 534 | #if '.' < 0 | ||
| 535 | case '.' + 256: | ||
| 536 | #endif | ||
| 537 | #if '/' < 0 | ||
| 538 | case '/' + 256: | ||
| 539 | #endif | ||
| 540 | #if ':' < 0 | ||
| 541 | case ':' + 256: | ||
| 542 | #endif | ||
| 543 | #if ';' < 0 | ||
| 544 | case ';' + 256: | ||
| 545 | #endif | ||
| 546 | #if '<' < 0 | ||
| 547 | case '<' + 256: | ||
| 548 | #endif | ||
| 549 | #if '=' < 0 | ||
| 550 | case '=' + 256: | ||
| 551 | #endif | ||
| 552 | #if '>' < 0 | ||
| 553 | case '>' + 256: | ||
| 554 | #endif | ||
| 555 | #if '?' < 0 | ||
| 556 | case '?' + 256: | ||
| 557 | #endif | ||
| 558 | #if '@' < 0 | ||
| 559 | case '@' + 256: | ||
| 560 | #endif | ||
| 561 | #if '[' < 0 | ||
| 562 | case '[' + 256: | ||
| 563 | #endif | ||
| 564 | #if '\\' < 0 | ||
| 565 | case '\\' + 256: | ||
| 566 | #endif | ||
| 567 | #if ']' < 0 | ||
| 568 | case ']' + 256: | ||
| 569 | #endif | ||
| 570 | #if '^' < 0 | ||
| 571 | case '^' + 256: | ||
| 572 | #endif | ||
| 573 | #if '_' < 0 | ||
| 574 | case '_' + 256: | ||
| 575 | #endif | ||
| 576 | #if '`' < 0 | ||
| 577 | case '`' + 256: | ||
| 578 | #endif | ||
| 579 | #if '{' < 0 | ||
| 580 | case '{' + 256: | ||
| 581 | #endif | ||
| 582 | #if '|' < 0 | ||
| 583 | case '|' + 256: | ||
| 584 | #endif | ||
| 585 | #if '}' < 0 | ||
| 586 | case '}' + 256: | ||
| 587 | #endif | ||
| 588 | #if '~' < 0 | ||
| 589 | case '~' + 256: | ||
| 590 | #endif | ||
| 591 | return true; | 281 | return true; |
| 592 | |||
| 593 | default: | 282 | default: |
| 594 | return false; | 283 | return false; |
| 595 | } | 284 | } |
| @@ -600,105 +289,8 @@ c_ispunct (int c) | |||
| 600 | { | 289 | { |
| 601 | switch (c) | 290 | switch (c) |
| 602 | { | 291 | { |
| 603 | _C_CTYPE_PUNCT_PLAIN: | 292 | _C_CTYPE_PUNCT: |
| 604 | #if '!' < 0 | ||
| 605 | case '!' + 256: | ||
| 606 | #endif | ||
| 607 | #if '"' < 0 | ||
| 608 | case '"' + 256: | ||
| 609 | #endif | ||
| 610 | #if '#' < 0 | ||
| 611 | case '#' + 256: | ||
| 612 | #endif | ||
| 613 | #if '$' < 0 | ||
| 614 | case '$' + 256: | ||
| 615 | #endif | ||
| 616 | #if '%' < 0 | ||
| 617 | case '%' + 256: | ||
| 618 | #endif | ||
| 619 | #if '&' < 0 | ||
| 620 | case '&' + 256: | ||
| 621 | #endif | ||
| 622 | #if '\'' < 0 | ||
| 623 | case '\'' + 256: | ||
| 624 | #endif | ||
| 625 | #if '(' < 0 | ||
| 626 | case '(' + 256: | ||
| 627 | #endif | ||
| 628 | #if ')' < 0 | ||
| 629 | case ')' + 256: | ||
| 630 | #endif | ||
| 631 | #if '*' < 0 | ||
| 632 | case '*' + 256: | ||
| 633 | #endif | ||
| 634 | #if '+' < 0 | ||
| 635 | case '+' + 256: | ||
| 636 | #endif | ||
| 637 | #if ',' < 0 | ||
| 638 | case ',' + 256: | ||
| 639 | #endif | ||
| 640 | #if '-' < 0 | ||
| 641 | case '-' + 256: | ||
| 642 | #endif | ||
| 643 | #if '.' < 0 | ||
| 644 | case '.' + 256: | ||
| 645 | #endif | ||
| 646 | #if '/' < 0 | ||
| 647 | case '/' + 256: | ||
| 648 | #endif | ||
| 649 | #if ':' < 0 | ||
| 650 | case ':' + 256: | ||
| 651 | #endif | ||
| 652 | #if ';' < 0 | ||
| 653 | case ';' + 256: | ||
| 654 | #endif | ||
| 655 | #if '<' < 0 | ||
| 656 | case '<' + 256: | ||
| 657 | #endif | ||
| 658 | #if '=' < 0 | ||
| 659 | case '=' + 256: | ||
| 660 | #endif | ||
| 661 | #if '>' < 0 | ||
| 662 | case '>' + 256: | ||
| 663 | #endif | ||
| 664 | #if '?' < 0 | ||
| 665 | case '?' + 256: | ||
| 666 | #endif | ||
| 667 | #if '@' < 0 | ||
| 668 | case '@' + 256: | ||
| 669 | #endif | ||
| 670 | #if '[' < 0 | ||
| 671 | case '[' + 256: | ||
| 672 | #endif | ||
| 673 | #if '\\' < 0 | ||
| 674 | case '\\' + 256: | ||
| 675 | #endif | ||
| 676 | #if ']' < 0 | ||
| 677 | case ']' + 256: | ||
| 678 | #endif | ||
| 679 | #if '^' < 0 | ||
| 680 | case '^' + 256: | ||
| 681 | #endif | ||
| 682 | #if '_' < 0 | ||
| 683 | case '_' + 256: | ||
| 684 | #endif | ||
| 685 | #if '`' < 0 | ||
| 686 | case '`' + 256: | ||
| 687 | #endif | ||
| 688 | #if '{' < 0 | ||
| 689 | case '{' + 256: | ||
| 690 | #endif | ||
| 691 | #if '|' < 0 | ||
| 692 | case '|' + 256: | ||
| 693 | #endif | ||
| 694 | #if '}' < 0 | ||
| 695 | case '}' + 256: | ||
| 696 | #endif | ||
| 697 | #if '~' < 0 | ||
| 698 | case '~' + 256: | ||
| 699 | #endif | ||
| 700 | return true; | 293 | return true; |
| 701 | |||
| 702 | default: | 294 | default: |
| 703 | return false; | 295 | return false; |
| 704 | } | 296 | } |
| @@ -736,7 +328,6 @@ c_isxdigit (int c) | |||
| 736 | _C_CTYPE_DIGIT: | 328 | _C_CTYPE_DIGIT: |
| 737 | _C_CTYPE_A_THRU_F: | 329 | _C_CTYPE_A_THRU_F: |
| 738 | return true; | 330 | return true; |
| 739 | |||
| 740 | default: | 331 | default: |
| 741 | return false; | 332 | return false; |
| 742 | } | 333 | } |
| @@ -747,14 +338,8 @@ c_tolower (int c) | |||
| 747 | { | 338 | { |
| 748 | switch (c) | 339 | switch (c) |
| 749 | { | 340 | { |
| 750 | _C_CTYPE_UPPER_N (0): | 341 | _C_CTYPE_UPPER: |
| 751 | #if _C_CTYPE_SIGNED_EBCDIC | ||
| 752 | c += 256; | ||
| 753 | /* Fall through. */ | ||
| 754 | _C_CTYPE_UPPER_N (256): | ||
| 755 | #endif | ||
| 756 | return c - 'A' + 'a'; | 342 | return c - 'A' + 'a'; |
| 757 | |||
| 758 | default: | 343 | default: |
| 759 | return c; | 344 | return c; |
| 760 | } | 345 | } |
| @@ -765,14 +350,8 @@ c_toupper (int c) | |||
| 765 | { | 350 | { |
| 766 | switch (c) | 351 | switch (c) |
| 767 | { | 352 | { |
| 768 | _C_CTYPE_LOWER_N (0): | 353 | _C_CTYPE_LOWER: |
| 769 | #if _C_CTYPE_SIGNED_EBCDIC | ||
| 770 | c += 256; | ||
| 771 | /* Fall through. */ | ||
| 772 | _C_CTYPE_LOWER_N (256): | ||
| 773 | #endif | ||
| 774 | return c - 'a' + 'A'; | 354 | return c - 'a' + 'A'; |
| 775 | |||
| 776 | default: | 355 | default: |
| 777 | return c; | 356 | return c; |
| 778 | } | 357 | } |
| @@ -1,3 +1,4 @@ | |||
| 1 | #include <config.h> | 1 | #include <config.h> |
| 2 | #define _GL_U64_INLINE _GL_EXTERN_INLINE | 2 | #define _GL_U64_INLINE _GL_EXTERN_INLINE |
| 3 | #include "u64.h" | 3 | #include "u64.h" |
| 4 | typedef int dummy; | ||
diff --git a/lib/unistd.c b/lib/unistd.c index 6c6a8e268c0..72bad1c0527 100644 --- a/lib/unistd.c +++ b/lib/unistd.c | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | #include <config.h> | 1 | #include <config.h> |
| 2 | #define _GL_UNISTD_INLINE _GL_EXTERN_INLINE | 2 | #define _GL_UNISTD_INLINE _GL_EXTERN_INLINE |
| 3 | #include "unistd.h" | 3 | #include "unistd.h" |
| 4 | typedef int dummy; | ||
diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4 index 40e82f6e27f..50ef974205f 100644 --- a/m4/gnulib-common.m4 +++ b/m4/gnulib-common.m4 | |||
| @@ -253,9 +253,10 @@ AC_DEFUN([gl_PROG_AR_RANLIB], | |||
| 253 | [ | 253 | [ |
| 254 | dnl Minix 3 comes with two toolchains: The Amsterdam Compiler Kit compiler | 254 | dnl Minix 3 comes with two toolchains: The Amsterdam Compiler Kit compiler |
| 255 | dnl as "cc", and GCC as "gcc". They have different object file formats and | 255 | dnl as "cc", and GCC as "gcc". They have different object file formats and |
| 256 | dnl library formats. In particular, the GNU binutils programs ar, ranlib | 256 | dnl library formats. In particular, the GNU binutils programs ar and ranlib |
| 257 | dnl produce libraries that work only with gcc, not with cc. | 257 | dnl produce libraries that work only with gcc, not with cc. |
| 258 | AC_REQUIRE([AC_PROG_CC]) | 258 | AC_REQUIRE([AC_PROG_CC]) |
| 259 | AC_BEFORE([$0], [AM_PROG_AR]) | ||
| 259 | AC_CACHE_CHECK([for Minix Amsterdam compiler], [gl_cv_c_amsterdam_compiler], | 260 | AC_CACHE_CHECK([for Minix Amsterdam compiler], [gl_cv_c_amsterdam_compiler], |
| 260 | [ | 261 | [ |
| 261 | AC_EGREP_CPP([Amsterdam], | 262 | AC_EGREP_CPP([Amsterdam], |
| @@ -267,25 +268,37 @@ Amsterdam | |||
| 267 | [gl_cv_c_amsterdam_compiler=yes], | 268 | [gl_cv_c_amsterdam_compiler=yes], |
| 268 | [gl_cv_c_amsterdam_compiler=no]) | 269 | [gl_cv_c_amsterdam_compiler=no]) |
| 269 | ]) | 270 | ]) |
| 270 | if test -z "$AR"; then | 271 | |
| 271 | if test $gl_cv_c_amsterdam_compiler = yes; then | 272 | dnl Don't compete with AM_PROG_AR's decision about AR/ARFLAGS if we are not |
| 273 | dnl building with __ACK__. | ||
| 274 | if test $gl_cv_c_amsterdam_compiler = yes; then | ||
| 275 | if test -z "$AR"; then | ||
| 272 | AR='cc -c.a' | 276 | AR='cc -c.a' |
| 273 | if test -z "$ARFLAGS"; then | ||
| 274 | ARFLAGS='-o' | ||
| 275 | fi | ||
| 276 | else | ||
| 277 | dnl Use the Automake-documented default values for AR and ARFLAGS, | ||
| 278 | dnl but prefer ${host}-ar over ar (useful for cross-compiling). | ||
| 279 | AC_CHECK_TOOL([AR], [ar], [ar]) | ||
| 280 | if test -z "$ARFLAGS"; then | ||
| 281 | ARFLAGS='cr' | ||
| 282 | fi | ||
| 283 | fi | 277 | fi |
| 284 | else | ||
| 285 | if test -z "$ARFLAGS"; then | 278 | if test -z "$ARFLAGS"; then |
| 286 | ARFLAGS='cr' | 279 | ARFLAGS='-o' |
| 287 | fi | 280 | fi |
| 281 | else | ||
| 282 | dnl AM_PROG_AR was added in automake v1.11.2. AM_PROG_AR does not AC_SUBST | ||
| 283 | dnl ARFLAGS variable (it is filed into Makefile.in directly by automake | ||
| 284 | dnl script on-demand, if not specified by ./configure of course). | ||
| 285 | dnl Don't AC_REQUIRE the AM_PROG_AR otherwise the code for __ACK__ above | ||
| 286 | dnl will be ignored. Also, pay attention to call AM_PROG_AR in else block | ||
| 287 | dnl because AM_PROG_AR is written so it could re-set AR variable even for | ||
| 288 | dnl __ACK__. It may seem like its easier to avoid calling the macro here, | ||
| 289 | dnl but we need to AC_SUBST both AR/ARFLAGS (thus those must have some good | ||
| 290 | dnl default value and automake should usually know them). | ||
| 291 | m4_ifdef([AM_PROG_AR], [AM_PROG_AR], [:]) | ||
| 292 | fi | ||
| 293 | |||
| 294 | dnl In case the code above has not helped with setting AR/ARFLAGS, use | ||
| 295 | dnl Automake-documented default values for AR and ARFLAGS, but prefer | ||
| 296 | dnl ${host}-ar over ar (useful for cross-compiling). | ||
| 297 | AC_CHECK_TOOL([AR], [ar], [ar]) | ||
| 298 | if test -z "$ARFLAGS"; then | ||
| 299 | ARFLAGS='cr' | ||
| 288 | fi | 300 | fi |
| 301 | |||
| 289 | AC_SUBST([AR]) | 302 | AC_SUBST([AR]) |
| 290 | AC_SUBST([ARFLAGS]) | 303 | AC_SUBST([ARFLAGS]) |
| 291 | if test -z "$RANLIB"; then | 304 | if test -z "$RANLIB"; then |
diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4 index c48d2e5be5c..349c0dce4e2 100644 --- a/m4/gnulib-comp.m4 +++ b/m4/gnulib-comp.m4 | |||
| @@ -37,7 +37,11 @@ AC_DEFUN([gl_EARLY], | |||
| 37 | m4_pattern_allow([^gl_ES$])dnl a valid locale name | 37 | m4_pattern_allow([^gl_ES$])dnl a valid locale name |
| 38 | m4_pattern_allow([^gl_LIBOBJS$])dnl a variable | 38 | m4_pattern_allow([^gl_LIBOBJS$])dnl a variable |
| 39 | m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable | 39 | m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable |
| 40 | |||
| 41 | # Pre-early section. | ||
| 42 | AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) | ||
| 40 | AC_REQUIRE([gl_PROG_AR_RANLIB]) | 43 | AC_REQUIRE([gl_PROG_AR_RANLIB]) |
| 44 | |||
| 41 | # Code from module absolute-header: | 45 | # Code from module absolute-header: |
| 42 | # Code from module acl-permissions: | 46 | # Code from module acl-permissions: |
| 43 | # Code from module alloca-opt: | 47 | # Code from module alloca-opt: |
| @@ -67,7 +71,6 @@ AC_DEFUN([gl_EARLY], | |||
| 67 | # Code from module euidaccess: | 71 | # Code from module euidaccess: |
| 68 | # Code from module execinfo: | 72 | # Code from module execinfo: |
| 69 | # Code from module extensions: | 73 | # Code from module extensions: |
| 70 | AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) | ||
| 71 | # Code from module extern-inline: | 74 | # Code from module extern-inline: |
| 72 | # Code from module faccessat: | 75 | # Code from module faccessat: |
| 73 | # Code from module fcntl: | 76 | # Code from module fcntl: |