summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2015-10-13 23:34:16 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2015-10-13 23:34:47 -0700
commite668176e7d89e885902287da18c69297bf04fed3 (patch)
treebc132a39e0052e1fe6a32359d3246108ef01e12e
parent2cc412cdc2635ecb99129271abe94bdd744742c2 (diff)
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.tex50
-rw-r--r--lib/binary-io.c1
-rw-r--r--lib/c-ctype.h531
-rw-r--r--lib/u64.c1
-rw-r--r--lib/unistd.c1
-rw-r--r--m4/gnulib-common.m443
-rw-r--r--m4/gnulib-comp.m45
7 files changed, 130 insertions, 502 deletions
diff --git a/doc/misc/texinfo.tex b/doc/misc/texinfo.tex
index bff8eb017a..46a9d1535d 100644
--- a/doc/misc/texinfo.tex
+++ b/doc/misc/texinfo.tex
@@ -3,7 +3,7 @@
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
-\def\texinfoversion{2015-09-20.17}
+\def\texinfoversion{2015-10-09.18}
%
% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@@ -530,14 +530,13 @@
%
\def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}}
+
+% \parseargdef - define a command taking an argument on the line
+%
% \parseargdef\foo{...}
% is roughly equivalent to
% \def\foo{\parsearg\Xfoo}
% \def\Xfoo#1{...}
-%
-% Actually, I use \csname\string\foo\endcsname, ie. \\foo, as it is my
-% favourite TeX trick. --kasal, 16nov03
-
\def\parseargdef#1{%
\expandafter \doparseargdef \csname\string#1\endcsname #1%
}
@@ -1416,6 +1415,7 @@ output) for that.)}
\normalturnoffactive
\def\@{@}%
\let\/=\empty
+ \let\xprocessmacroarg=\eatspaces % in case we are in a macro expansion
\makevalueexpandable
% do we want to go so far as to use \indexnofonts instead of just
% special-casing \var here?
@@ -4864,11 +4864,17 @@ end
\def\requireopenindexfile#1{%
\ifnum\csname #1indfile\endcsname=0
\expandafter\newwrite \csname#1indfile\endcsname
- \immediate\openout\csname#1indfile\endcsname \jobname.#1 % Open the file
+ \edef\suffix{#1}%
+ % A .fls suffix would conflict with the file extension for the output
+ % of -recorder, so use .f1s instead.
+ \ifx\suffix\indexisfl\def\suffix{f1}\fi
+ % Open the file
+ \immediate\openout\csname#1indfile\endcsname \jobname.\suffix
% Using \immediate here prevents an object entering into the current box,
% which could confound checks such as those in \safewhatsit for preceding
% skips.
\fi}
+\def\indexisfl{fl}
% Output \ as {\indexbackslash}, because \ is an escape character in
% the index files.
@@ -5059,7 +5065,9 @@ end
% as its first line, TeX doesn't complain about mismatched braces
% (because it thinks @} is a control sequence).
\catcode`\@ = 11
- \openin 1 \jobname.#1s
+ % See comment in \requireopenindexfile.
+ \def\indexname{#1}\ifx\indexname\indexisfl\def\indexname{f1}\fi
+ \openin 1 \jobname.\indexname s
\ifeof 1
% \enddoublecolumns gets confused if there is no text in the index,
% and it loses the chapter title and the aux file entries for the
@@ -5251,7 +5259,7 @@ end
% cursed by a Unix daemon.
\setbox\boxA = \hbox{#1}%
\ifdim\wd\boxA = 0pt
- \ %
+ \null\nobreak\hfill\ %
\else
%
\null\nobreak\indexdotfill % Have leaders before the page number.
@@ -5558,7 +5566,8 @@ end
\writetocentry{part}{#1}{}% but put it in the toc
\headingsoff % no headline or footline on the part page
% This outputs a mark at the end of the page that clears \thischapter
- % and \thissection, like is done in \startcontents.
+ % and \thissection, as is done in \startcontents.
+ \let\pchapsepmacro\relax
\chapmacro{}{Yomitfromtoc}{}%
\chapoddpage
\endgroup
@@ -9339,7 +9348,8 @@ directory should work if nowhere else does.}
% @documentencoding sets the definition of non-ASCII characters
% according to the specified encoding.
%
-\parseargdef\documentencoding{%
+\def\documentencoding{\parseargusing\filenamecatcodes\documentencodingzzz}
+\def\documentencodingzzz#1{%
% Encoding being declared for the document.
\def\declaredencoding{\csname #1.enc\endcsname}%
%
@@ -10066,6 +10076,9 @@ directory should work if nowhere else does.}
\DeclareUnicodeCharacter{02DB}{\ogonek{ }}
+ % Greek letters
+ \DeclareUnicodeCharacter{03C0}{\ensuremath\pi}
+
\DeclareUnicodeCharacter{1E02}{\dotaccent{B}}
\DeclareUnicodeCharacter{1E03}{\dotaccent{b}}
\DeclareUnicodeCharacter{1E04}{\udotaccent{B}}
@@ -10193,6 +10206,7 @@ directory should work if nowhere else does.}
\DeclareUnicodeCharacter{1EF8}{\~Y}
\DeclareUnicodeCharacter{1EF9}{\~y}
+ % Punctuation
\DeclareUnicodeCharacter{2013}{--}
\DeclareUnicodeCharacter{2014}{---}
\DeclareUnicodeCharacter{2018}{\quoteleft}
@@ -10204,18 +10218,34 @@ directory should work if nowhere else does.}
\DeclareUnicodeCharacter{2020}{\ensuremath\dagger}
\DeclareUnicodeCharacter{2021}{\ensuremath\ddagger}
\DeclareUnicodeCharacter{2022}{\bullet}
+ \DeclareUnicodeCharacter{202F}{\thinspace}
\DeclareUnicodeCharacter{2026}{\dots}
\DeclareUnicodeCharacter{2039}{\guilsinglleft}
\DeclareUnicodeCharacter{203A}{\guilsinglright}
+
\DeclareUnicodeCharacter{20AC}{\euro}
\DeclareUnicodeCharacter{2192}{\expansion}
\DeclareUnicodeCharacter{21D2}{\result}
+ % Mathematical symbols
+ \DeclareUnicodeCharacter{2200}{\ensuremath\forall}
+ \DeclareUnicodeCharacter{2203}{\ensuremath\exists}
+ \DeclareUnicodeCharacter{2208}{\ensuremath\in}
\DeclareUnicodeCharacter{2212}{\minus}
\DeclareUnicodeCharacter{2217}{\point}
+ \DeclareUnicodeCharacter{221E}{\ensuremath\infty}
\DeclareUnicodeCharacter{2225}{\ensuremath\parallel}
+ \DeclareUnicodeCharacter{2227}{\ensuremath\wedge}
+ \DeclareUnicodeCharacter{2229}{\ensuremath\cap}
\DeclareUnicodeCharacter{2261}{\equiv}
+ \DeclareUnicodeCharacter{2264}{\ensuremath\leq}
+ \DeclareUnicodeCharacter{2265}{\ensuremath\geq}
+ \DeclareUnicodeCharacter{2282}{\ensuremath\subset}
+ \DeclareUnicodeCharacter{2287}{\ensuremath\supseteq}
+
+ \global\mathchardef\checkmark="1370 % actually the square root sign
+ \DeclareUnicodeCharacter{2713}{\ensuremath\checkmark}
}% end of \utfeightchardefs
% US-ASCII character definitions.
diff --git a/lib/binary-io.c b/lib/binary-io.c
index 8bbdb44d12..d828bcd015 100644
--- a/lib/binary-io.c
+++ b/lib/binary-io.c
@@ -1,3 +1,4 @@
#include <config.h>
#define BINARY_IO_INLINE _GL_EXTERN_INLINE
#include "binary-io.h"
+typedef int dummy;
diff --git a/lib/c-ctype.h b/lib/c-ctype.h
index 50ebbb5829..15125308cb 100644
--- a/lib/c-ctype.h
+++ b/lib/c-ctype.h
@@ -78,82 +78,65 @@ extern "C" {
# error "Only ASCII and EBCDIC are supported"
#endif
-#define _C_CTYPE_SIGNED_EBCDIC ('A' < 0)
+#if 'A' < 0
+# error "EBCDIC and char is signed -- not supported"
+#endif
+
+/* Cases for control characters. */
+
+#define _C_CTYPE_CNTRL \
+ case '\a': case '\b': case '\f': case '\n': \
+ case '\r': case '\t': case '\v': \
+ _C_CTYPE_OTHER_CNTRL
+
+/* ASCII control characters other than those with \-letter escapes. */
#if C_CTYPE_ASCII
-# define _C_CTYPE_CNTRL \
+# define _C_CTYPE_OTHER_CNTRL \
case '\x00': case '\x01': case '\x02': case '\x03': \
- case '\x04': case '\x05': case '\x06': case '\x07': \
- case '\x08': case '\x09': case '\x0a': case '\x0b': \
- case '\x0c': case '\x0d': case '\x0e': case '\x0f': \
- case '\x10': case '\x11': case '\x12': case '\x13': \
- case '\x14': case '\x15': case '\x16': case '\x17': \
- case '\x18': case '\x19': case '\x1a': case '\x1b': \
- case '\x1c': case '\x1d': case '\x1e': case '\x1f': \
- case '\x7f'
+ case '\x04': case '\x05': case '\x06': case '\x0e': \
+ case '\x0f': case '\x10': case '\x11': case '\x12': \
+ case '\x13': case '\x14': case '\x15': case '\x16': \
+ case '\x17': case '\x18': case '\x19': case '\x1a': \
+ case '\x1b': case '\x1c': case '\x1d': case '\x1e': \
+ case '\x1f': case '\x7f'
#else
/* Use EBCDIC code page 1047's assignments for ASCII control chars;
assume all EBCDIC code pages agree about these assignments. */
-# define _C_CTYPE_CNTRL \
+# define _C_CTYPE_OTHER_CNTRL \
case '\x00': case '\x01': case '\x02': case '\x03': \
- case '\x05': case '\x07': case '\x0b': case '\x0c': \
- case '\x0d': case '\x0e': case '\x0f': case '\x10': \
- case '\x11': case '\x12': case '\x13': case '\x16': \
- case '\x18': case '\x19': case '\x1c': case '\x1d': \
- case '\x1e': case '\x1f': case '\x25': case '\x26': \
- case '\x27': case '\x2d': case '\x2e': case '\x2f': \
- case '\x32': case '\x37': case '\x3c': case '\x3d': \
- case '\x3f'
+ case '\x07': case '\x0e': case '\x0f': case '\x10': \
+ case '\x11': case '\x12': case '\x13': case '\x18': \
+ case '\x19': case '\x1c': case '\x1d': case '\x1e': \
+ case '\x1f': case '\x26': case '\x27': case '\x2d': \
+ case '\x2e': case '\x32': case '\x37': case '\x3c': \
+ case '\x3d': case '\x3f'
#endif
-/* Cases for hex letter digits, digits, lower, and upper, offset by N. */
+/* Cases for lowercase hex letters, and lowercase letters, all offset by N. */
-#define _C_CTYPE_A_THRU_F_N(n) \
+#define _C_CTYPE_LOWER_A_THRU_F_N(n) \
case 'a' + (n): case 'b' + (n): case 'c' + (n): case 'd' + (n): \
- case 'e' + (n): case 'f' + (n): \
- case 'A' + (n): case 'B' + (n): case 'C' + (n): case 'D' + (n): \
- case 'E' + (n): case 'F' + (n)
-#define _C_CTYPE_DIGIT_N(n) \
- case '0' + (n): case '1' + (n): case '2' + (n): case '3' + (n): \
- case '4' + (n): case '5' + (n): case '6' + (n): case '7' + (n): \
- case '8' + (n): case '9' + (n)
+ case 'e' + (n): case 'f' + (n)
#define _C_CTYPE_LOWER_N(n) \
- case 'a' + (n): case 'b' + (n): case 'c' + (n): case 'd' + (n): \
- case 'e' + (n): case 'f' + (n): case 'g' + (n): case 'h' + (n): \
- case 'i' + (n): case 'j' + (n): case 'k' + (n): case 'l' + (n): \
- case 'm' + (n): case 'n' + (n): case 'o' + (n): case 'p' + (n): \
- case 'q' + (n): case 'r' + (n): case 's' + (n): case 't' + (n): \
- case 'u' + (n): case 'v' + (n): case 'w' + (n): case 'x' + (n): \
- case 'y' + (n): case 'z' + (n)
-#define _C_CTYPE_UPPER_N(n) \
- case 'A' + (n): case 'B' + (n): case 'C' + (n): case 'D' + (n): \
- case 'E' + (n): case 'F' + (n): case 'G' + (n): case 'H' + (n): \
- case 'I' + (n): case 'J' + (n): case 'K' + (n): case 'L' + (n): \
- case 'M' + (n): case 'N' + (n): case 'O' + (n): case 'P' + (n): \
- case 'Q' + (n): case 'R' + (n): case 'S' + (n): case 'T' + (n): \
- case 'U' + (n): case 'V' + (n): case 'W' + (n): case 'X' + (n): \
- case 'Y' + (n): case 'Z' + (n)
-
-/* Given MACRO_N, expand to all the cases for the corresponding class. */
-#if _C_CTYPE_SIGNED_EBCDIC
-# define _C_CTYPE_CASES(macro_n) macro_n (0): macro_n (256)
-#else
-# define _C_CTYPE_CASES(macro_n) macro_n (0)
-#endif
-
-/* Cases for hex letter digits, digits, lower, and upper, with another
- case for unsigned char if the original char is negative. */
-
-#define _C_CTYPE_A_THRU_F _C_CTYPE_CASES (_C_CTYPE_A_THRU_F_N)
-#define _C_CTYPE_DIGIT _C_CTYPE_CASES (_C_CTYPE_DIGIT_N)
-#define _C_CTYPE_LOWER _C_CTYPE_CASES (_C_CTYPE_LOWER_N)
-#define _C_CTYPE_UPPER _C_CTYPE_CASES (_C_CTYPE_UPPER_N)
-
-/* The punct class differs because some punctuation characters may be
- negative while others are nonnegative. Instead of attempting to
- define _C_CTYPE_PUNCT, define just the plain chars here, and do any
- cases-plus-256 by hand after using this macro. */
-#define _C_CTYPE_PUNCT_PLAIN \
+ _C_CTYPE_LOWER_A_THRU_F_N(n): \
+ case 'g' + (n): case 'h' + (n): case 'i' + (n): case 'j' + (n): \
+ case 'k' + (n): case 'l' + (n): case 'm' + (n): case 'n' + (n): \
+ case 'o' + (n): case 'p' + (n): case 'q' + (n): case 'r' + (n): \
+ case 's' + (n): case 't' + (n): case 'u' + (n): case 'v' + (n): \
+ case 'w' + (n): case 'x' + (n): case 'y' + (n): case 'z' + (n)
+
+/* Cases for hex letters, digits, lower, punct, and upper. */
+
+#define _C_CTYPE_A_THRU_F \
+ _C_CTYPE_LOWER_A_THRU_F_N (0): \
+ _C_CTYPE_LOWER_A_THRU_F_N ('A' - 'a')
+#define _C_CTYPE_DIGIT \
+ case '0': case '1': case '2': case '3': \
+ case '4': case '5': case '6': case '7': \
+ case '8': case '9'
+#define _C_CTYPE_LOWER _C_CTYPE_LOWER_N (0)
+#define _C_CTYPE_PUNCT \
case '!': case '"': case '#': case '$': \
case '%': case '&': case '\'': case '(': \
case ')': case '*': case '+': case ',': \
@@ -162,6 +145,8 @@ extern "C" {
case '?': case '@': case '[': case '\\': \
case ']': case '^': case '_': case '`': \
case '{': case '|': case '}': case '~'
+#define _C_CTYPE_UPPER _C_CTYPE_LOWER_N ('A' - 'a')
+
/* Function definitions. */
@@ -189,7 +174,6 @@ c_isalnum (int c)
_C_CTYPE_LOWER:
_C_CTYPE_UPPER:
return true;
-
default:
return false;
}
@@ -203,7 +187,6 @@ c_isalpha (int c)
_C_CTYPE_LOWER:
_C_CTYPE_UPPER:
return true;
-
default:
return false;
}
@@ -220,107 +203,9 @@ c_isascii (int c)
_C_CTYPE_CNTRL:
_C_CTYPE_DIGIT:
_C_CTYPE_LOWER:
+ _C_CTYPE_PUNCT:
_C_CTYPE_UPPER:
-
- _C_CTYPE_PUNCT_PLAIN:
-#if '!' < 0
- case '!' + 256:
-#endif
-#if '"' < 0
- case '"' + 256:
-#endif
-#if '#' < 0
- case '#' + 256:
-#endif
-#if '$' < 0
- case '$' + 256:
-#endif
-#if '%' < 0
- case '%' + 256:
-#endif
-#if '&' < 0
- case '&' + 256:
-#endif
-#if '\'' < 0
- case '\'' + 256:
-#endif
-#if '(' < 0
- case '(' + 256:
-#endif
-#if ')' < 0
- case ')' + 256:
-#endif
-#if '*' < 0
- case '*' + 256:
-#endif
-#if '+' < 0
- case '+' + 256:
-#endif
-#if ',' < 0
- case ',' + 256:
-#endif
-#if '-' < 0
- case '-' + 256:
-#endif
-#if '.' < 0
- case '.' + 256:
-#endif
-#if '/' < 0
- case '/' + 256:
-#endif
-#if ':' < 0
- case ':' + 256:
-#endif
-#if ';' < 0
- case ';' + 256:
-#endif
-#if '<' < 0
- case '<' + 256:
-#endif
-#if '=' < 0
- case '=' + 256:
-#endif
-#if '>' < 0
- case '>' + 256:
-#endif
-#if '?' < 0
- case '?' + 256:
-#endif
-#if '@' < 0
- case '@' + 256:
-#endif
-#if '[' < 0
- case '[' + 256:
-#endif
-#if '\\' < 0
- case '\\' + 256:
-#endif
-#if ']' < 0
- case ']' + 256:
-#endif
-#if '^' < 0
- case '^' + 256:
-#endif
-#if '_' < 0
- case '_' + 256:
-#endif
-#if '`' < 0
- case '`' + 256:
-#endif
-#if '{' < 0
- case '{' + 256:
-#endif
-#if '|' < 0
- case '|' + 256:
-#endif
-#if '}' < 0
- case '}' + 256:
-#endif
-#if '~' < 0
- case '~' + 256:
-#endif
return true;
-
default:
return false;
}
@@ -363,107 +248,9 @@ c_isgraph (int c)
{
_C_CTYPE_DIGIT:
_C_CTYPE_LOWER:
+ _C_CTYPE_PUNCT:
_C_CTYPE_UPPER:
-
- _C_CTYPE_PUNCT_PLAIN:
-#if '!' < 0
- case '!' + 256:
-#endif
-#if '"' < 0
- case '"' + 256:
-#endif
-#if '#' < 0
- case '#' + 256:
-#endif
-#if '$' < 0
- case '$' + 256:
-#endif
-#if '%' < 0
- case '%' + 256:
-#endif
-#if '&' < 0
- case '&' + 256:
-#endif
-#if '\'' < 0
- case '\'' + 256:
-#endif
-#if '(' < 0
- case '(' + 256:
-#endif
-#if ')' < 0
- case ')' + 256:
-#endif
-#if '*' < 0
- case '*' + 256:
-#endif
-#if '+' < 0
- case '+' + 256:
-#endif
-#if ',' < 0
- case ',' + 256:
-#endif
-#if '-' < 0
- case '-' + 256:
-#endif
-#if '.' < 0
- case '.' + 256:
-#endif
-#if '/' < 0
- case '/' + 256:
-#endif
-#if ':' < 0
- case ':' + 256:
-#endif
-#if ';' < 0
- case ';' + 256:
-#endif
-#if '<' < 0
- case '<' + 256:
-#endif
-#if '=' < 0
- case '=' + 256:
-#endif
-#if '>' < 0
- case '>' + 256:
-#endif
-#if '?' < 0
- case '?' + 256:
-#endif
-#if '@' < 0
- case '@' + 256:
-#endif
-#if '[' < 0
- case '[' + 256:
-#endif
-#if '\\' < 0
- case '\\' + 256:
-#endif
-#if ']' < 0
- case ']' + 256:
-#endif
-#if '^' < 0
- case '^' + 256:
-#endif
-#if '_' < 0
- case '_' + 256:
-#endif
-#if '`' < 0
- case '`' + 256:
-#endif
-#if '{' < 0
- case '{' + 256:
-#endif
-#if '|' < 0
- case '|' + 256:
-#endif
-#if '}' < 0
- case '}' + 256:
-#endif
-#if '~' < 0
- case '~' + 256:
-#endif
return true;
-
default:
return false;
}
@@ -489,107 +276,9 @@ c_isprint (int c)
case ' ':
_C_CTYPE_DIGIT:
_C_CTYPE_LOWER:
+ _C_CTYPE_PUNCT:
_C_CTYPE_UPPER:
-
- _C_CTYPE_PUNCT_PLAIN:
-#if '!' < 0
- case '!' + 256:
-#endif
-#if '"' < 0
- case '"' + 256:
-#endif
-#if '#' < 0
- case '#' + 256:
-#endif
-#if '$' < 0
- case '$' + 256:
-#endif
-#if '%' < 0
- case '%' + 256:
-#endif
-#if '&' < 0
- case '&' + 256:
-#endif
-#if '\'' < 0
- case '\'' + 256:
-#endif
-#if '(' < 0
- case '(' + 256:
-#endif
-#if ')' < 0
- case ')' + 256:
-#endif
-#if '*' < 0
- case '*' + 256:
-#endif
-#if '+' < 0
- case '+' + 256:
-#endif
-#if ',' < 0
- case ',' + 256:
-#endif
-#if '-' < 0
- case '-' + 256:
-#endif
-#if '.' < 0
- case '.' + 256:
-#endif
-#if '/' < 0
- case '/' + 256:
-#endif
-#if ':' < 0
- case ':' + 256:
-#endif
-#if ';' < 0
- case ';' + 256:
-#endif
-#if '<' < 0
- case '<' + 256:
-#endif
-#if '=' < 0
- case '=' + 256:
-#endif
-#if '>' < 0
- case '>' + 256:
-#endif
-#if '?' < 0
- case '?' + 256:
-#endif
-#if '@' < 0
- case '@' + 256:
-#endif
-#if '[' < 0
- case '[' + 256:
-#endif
-#if '\\' < 0
- case '\\' + 256:
-#endif
-#if ']' < 0
- case ']' + 256:
-#endif
-#if '^' < 0
- case '^' + 256:
-#endif
-#if '_' < 0
- case '_' + 256:
-#endif
-#if '`' < 0
- case '`' + 256:
-#endif
-#if '{' < 0
- case '{' + 256:
-#endif
-#if '|' < 0
- case '|' + 256:
-#endif
-#if '}' < 0
- case '}' + 256:
-#endif
-#if '~' < 0
- case '~' + 256:
-#endif
return true;
-
default:
return false;
}
@@ -600,105 +289,8 @@ c_ispunct (int c)
{
switch (c)
{
- _C_CTYPE_PUNCT_PLAIN:
-#if '!' < 0
- case '!' + 256:
-#endif
-#if '"' < 0
- case '"' + 256:
-#endif
-#if '#' < 0
- case '#' + 256:
-#endif
-#if '$' < 0
- case '$' + 256:
-#endif
-#if '%' < 0
- case '%' + 256:
-#endif
-#if '&' < 0
- case '&' + 256:
-#endif
-#if '\'' < 0
- case '\'' + 256:
-#endif
-#if '(' < 0
- case '(' + 256:
-#endif
-#if ')' < 0
- case ')' + 256:
-#endif
-#if '*' < 0
- case '*' + 256:
-#endif
-#if '+' < 0
- case '+' + 256:
-#endif
-#if ',' < 0
- case ',' + 256:
-#endif
-#if '-' < 0
- case '-' + 256:
-#endif
-#if '.' < 0
- case '.' + 256:
-#endif
-#if '/' < 0
- case '/' + 256:
-#endif
-#if ':' < 0
- case ':' + 256:
-#endif
-#if ';' < 0
- case ';' + 256:
-#endif
-#if '<' < 0
- case '<' + 256:
-#endif
-#if '=' < 0
- case '=' + 256:
-#endif
-#if '>' < 0
- case '>' + 256:
-#endif
-#if '?' < 0
- case '?' + 256:
-#endif
-#if '@' < 0
- case '@' + 256:
-#endif
-#if '[' < 0
- case '[' + 256:
-#endif
-#if '\\' < 0
- case '\\' + 256:
-#endif
-#if ']' < 0
- case ']' + 256:
-#endif
-#if '^' < 0
- case '^' + 256:
-#endif
-#if '_' < 0
- case '_' + 256:
-#endif
-#if '`' < 0
- case '`' + 256:
-#endif
-#if '{' < 0
- case '{' + 256:
-#endif
-#if '|' < 0
- case '|' + 256:
-#endif
-#if '}' < 0
- case '}' + 256:
-#endif
-#if '~' < 0
- case '~' + 256:
-#endif
+ _C_CTYPE_PUNCT:
return true;
-
default:
return false;
}
@@ -736,7 +328,6 @@ c_isxdigit (int c)
_C_CTYPE_DIGIT:
_C_CTYPE_A_THRU_F:
return true;
-
default:
return false;
}
@@ -747,14 +338,8 @@ c_tolower (int c)
{
switch (c)
{
- _C_CTYPE_UPPER_N (0):
-#if _C_CTYPE_SIGNED_EBCDIC
- c += 256;
- /* Fall through. */
- _C_CTYPE_UPPER_N (256):
-#endif
+ _C_CTYPE_UPPER:
return c - 'A' + 'a';
-
default:
return c;
}
@@ -765,14 +350,8 @@ c_toupper (int c)
{
switch (c)
{
- _C_CTYPE_LOWER_N (0):
-#if _C_CTYPE_SIGNED_EBCDIC
- c += 256;
- /* Fall through. */
- _C_CTYPE_LOWER_N (256):
-#endif
+ _C_CTYPE_LOWER:
return c - 'a' + 'A';
-
default:
return c;
}
diff --git a/lib/u64.c b/lib/u64.c
index 04cf7a2994..1e3854ddcd 100644
--- a/lib/u64.c
+++ b/lib/u64.c
@@ -1,3 +1,4 @@
#include <config.h>
#define _GL_U64_INLINE _GL_EXTERN_INLINE
#include "u64.h"
+typedef int dummy;
diff --git a/lib/unistd.c b/lib/unistd.c
index 6c6a8e268c..72bad1c052 100644
--- a/lib/unistd.c
+++ b/lib/unistd.c
@@ -1,3 +1,4 @@
#include <config.h>
#define _GL_UNISTD_INLINE _GL_EXTERN_INLINE
#include "unistd.h"
+typedef int dummy;
diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4
index 40e82f6e27..50ef974205 100644
--- a/m4/gnulib-common.m4
+++ b/m4/gnulib-common.m4
@@ -253,9 +253,10 @@ AC_DEFUN([gl_PROG_AR_RANLIB],
[
dnl Minix 3 comes with two toolchains: The Amsterdam Compiler Kit compiler
dnl as "cc", and GCC as "gcc". They have different object file formats and
- dnl library formats. In particular, the GNU binutils programs ar, ranlib
+ dnl library formats. In particular, the GNU binutils programs ar and ranlib
dnl produce libraries that work only with gcc, not with cc.
AC_REQUIRE([AC_PROG_CC])
+ AC_BEFORE([$0], [AM_PROG_AR])
AC_CACHE_CHECK([for Minix Amsterdam compiler], [gl_cv_c_amsterdam_compiler],
[
AC_EGREP_CPP([Amsterdam],
@@ -267,25 +268,37 @@ Amsterdam
[gl_cv_c_amsterdam_compiler=yes],
[gl_cv_c_amsterdam_compiler=no])
])
- if test -z "$AR"; then
- if test $gl_cv_c_amsterdam_compiler = yes; then
+
+ dnl Don't compete with AM_PROG_AR's decision about AR/ARFLAGS if we are not
+ dnl building with __ACK__.
+ if test $gl_cv_c_amsterdam_compiler = yes; then
+ if test -z "$AR"; then
AR='cc -c.a'
- if test -z "$ARFLAGS"; then
- ARFLAGS='-o'
- fi
- else
- dnl Use the Automake-documented default values for AR and ARFLAGS,
- dnl but prefer ${host}-ar over ar (useful for cross-compiling).
- AC_CHECK_TOOL([AR], [ar], [ar])
- if test -z "$ARFLAGS"; then
- ARFLAGS='cr'
- fi
fi
- else
if test -z "$ARFLAGS"; then
- ARFLAGS='cr'
+ ARFLAGS='-o'
fi
+ else
+ dnl AM_PROG_AR was added in automake v1.11.2. AM_PROG_AR does not AC_SUBST
+ dnl ARFLAGS variable (it is filed into Makefile.in directly by automake
+ dnl script on-demand, if not specified by ./configure of course).
+ dnl Don't AC_REQUIRE the AM_PROG_AR otherwise the code for __ACK__ above
+ dnl will be ignored. Also, pay attention to call AM_PROG_AR in else block
+ dnl because AM_PROG_AR is written so it could re-set AR variable even for
+ dnl __ACK__. It may seem like its easier to avoid calling the macro here,
+ dnl but we need to AC_SUBST both AR/ARFLAGS (thus those must have some good
+ dnl default value and automake should usually know them).
+ m4_ifdef([AM_PROG_AR], [AM_PROG_AR], [:])
+ fi
+
+ dnl In case the code above has not helped with setting AR/ARFLAGS, use
+ dnl Automake-documented default values for AR and ARFLAGS, but prefer
+ dnl ${host}-ar over ar (useful for cross-compiling).
+ AC_CHECK_TOOL([AR], [ar], [ar])
+ if test -z "$ARFLAGS"; then
+ ARFLAGS='cr'
fi
+
AC_SUBST([AR])
AC_SUBST([ARFLAGS])
if test -z "$RANLIB"; then
diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4
index c48d2e5be5..349c0dce4e 100644
--- a/m4/gnulib-comp.m4
+++ b/m4/gnulib-comp.m4
@@ -37,7 +37,11 @@ AC_DEFUN([gl_EARLY],
m4_pattern_allow([^gl_ES$])dnl a valid locale name
m4_pattern_allow([^gl_LIBOBJS$])dnl a variable
m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable
+
+ # Pre-early section.
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
AC_REQUIRE([gl_PROG_AR_RANLIB])
+
# Code from module absolute-header:
# Code from module acl-permissions:
# Code from module alloca-opt:
@@ -67,7 +71,6 @@ AC_DEFUN([gl_EARLY],
# Code from module euidaccess:
# Code from module execinfo:
# Code from module extensions:
- AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
# Code from module extern-inline:
# Code from module faccessat:
# Code from module fcntl: