1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00

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.
This commit is contained in:
Paul Eggert 2015-10-13 23:34:16 -07:00
parent 2cc412cdc2
commit e668176e7d
7 changed files with 129 additions and 501 deletions

View file

@ -3,7 +3,7 @@
% Load plain if necessary, i.e., if running under initex. % Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi \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, % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@ -530,14 +530,13 @@
% %
\def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}} \def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}}
% \parseargdef - define a command taking an argument on the line
%
% \parseargdef\foo{...} % \parseargdef\foo{...}
% is roughly equivalent to % is roughly equivalent to
% \def\foo{\parsearg\Xfoo} % \def\foo{\parsearg\Xfoo}
% \def\Xfoo#1{...} % \def\Xfoo#1{...}
%
% Actually, I use \csname\string\foo\endcsname, ie. \\foo, as it is my
% favourite TeX trick. --kasal, 16nov03
\def\parseargdef#1{% \def\parseargdef#1{%
\expandafter \doparseargdef \csname\string#1\endcsname #1% \expandafter \doparseargdef \csname\string#1\endcsname #1%
} }
@ -1416,6 +1415,7 @@ output) for that.)}
\normalturnoffactive \normalturnoffactive
\def\@{@}% \def\@{@}%
\let\/=\empty \let\/=\empty
\let\xprocessmacroarg=\eatspaces % in case we are in a macro expansion
\makevalueexpandable \makevalueexpandable
% do we want to go so far as to use \indexnofonts instead of just % do we want to go so far as to use \indexnofonts instead of just
% special-casing \var here? % special-casing \var here?
@ -4864,11 +4864,17 @@ end
\def\requireopenindexfile#1{% \def\requireopenindexfile#1{%
\ifnum\csname #1indfile\endcsname=0 \ifnum\csname #1indfile\endcsname=0
\expandafter\newwrite \csname#1indfile\endcsname \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, % Using \immediate here prevents an object entering into the current box,
% which could confound checks such as those in \safewhatsit for preceding % which could confound checks such as those in \safewhatsit for preceding
% skips. % skips.
\fi} \fi}
\def\indexisfl{fl}
% Output \ as {\indexbackslash}, because \ is an escape character in % Output \ as {\indexbackslash}, because \ is an escape character in
% the index files. % the index files.
@ -5059,7 +5065,9 @@ end
% as its first line, TeX doesn't complain about mismatched braces % as its first line, TeX doesn't complain about mismatched braces
% (because it thinks @} is a control sequence). % (because it thinks @} is a control sequence).
\catcode`\@ = 11 \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 \ifeof 1
% \enddoublecolumns gets confused if there is no text in the index, % \enddoublecolumns gets confused if there is no text in the index,
% and it loses the chapter title and the aux file entries for the % and it loses the chapter title and the aux file entries for the
@ -5251,7 +5259,7 @@ end
% cursed by a Unix daemon. % cursed by a Unix daemon.
\setbox\boxA = \hbox{#1}% \setbox\boxA = \hbox{#1}%
\ifdim\wd\boxA = 0pt \ifdim\wd\boxA = 0pt
\ % \null\nobreak\hfill\ %
\else \else
% %
\null\nobreak\indexdotfill % Have leaders before the page number. \null\nobreak\indexdotfill % Have leaders before the page number.
@ -5558,7 +5566,8 @@ end
\writetocentry{part}{#1}{}% but put it in the toc \writetocentry{part}{#1}{}% but put it in the toc
\headingsoff % no headline or footline on the part page \headingsoff % no headline or footline on the part page
% This outputs a mark at the end of the page that clears \thischapter % 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}{}% \chapmacro{}{Yomitfromtoc}{}%
\chapoddpage \chapoddpage
\endgroup \endgroup
@ -9339,7 +9348,8 @@ directory should work if nowhere else does.}
% @documentencoding sets the definition of non-ASCII characters % @documentencoding sets the definition of non-ASCII characters
% according to the specified encoding. % according to the specified encoding.
% %
\parseargdef\documentencoding{% \def\documentencoding{\parseargusing\filenamecatcodes\documentencodingzzz}
\def\documentencodingzzz#1{%
% Encoding being declared for the document. % Encoding being declared for the document.
\def\declaredencoding{\csname #1.enc\endcsname}% \def\declaredencoding{\csname #1.enc\endcsname}%
% %
@ -10066,6 +10076,9 @@ directory should work if nowhere else does.}
\DeclareUnicodeCharacter{02DB}{\ogonek{ }} \DeclareUnicodeCharacter{02DB}{\ogonek{ }}
% Greek letters
\DeclareUnicodeCharacter{03C0}{\ensuremath\pi}
\DeclareUnicodeCharacter{1E02}{\dotaccent{B}} \DeclareUnicodeCharacter{1E02}{\dotaccent{B}}
\DeclareUnicodeCharacter{1E03}{\dotaccent{b}} \DeclareUnicodeCharacter{1E03}{\dotaccent{b}}
\DeclareUnicodeCharacter{1E04}{\udotaccent{B}} \DeclareUnicodeCharacter{1E04}{\udotaccent{B}}
@ -10193,6 +10206,7 @@ directory should work if nowhere else does.}
\DeclareUnicodeCharacter{1EF8}{\~Y} \DeclareUnicodeCharacter{1EF8}{\~Y}
\DeclareUnicodeCharacter{1EF9}{\~y} \DeclareUnicodeCharacter{1EF9}{\~y}
% Punctuation
\DeclareUnicodeCharacter{2013}{--} \DeclareUnicodeCharacter{2013}{--}
\DeclareUnicodeCharacter{2014}{---} \DeclareUnicodeCharacter{2014}{---}
\DeclareUnicodeCharacter{2018}{\quoteleft} \DeclareUnicodeCharacter{2018}{\quoteleft}
@ -10204,18 +10218,34 @@ directory should work if nowhere else does.}
\DeclareUnicodeCharacter{2020}{\ensuremath\dagger} \DeclareUnicodeCharacter{2020}{\ensuremath\dagger}
\DeclareUnicodeCharacter{2021}{\ensuremath\ddagger} \DeclareUnicodeCharacter{2021}{\ensuremath\ddagger}
\DeclareUnicodeCharacter{2022}{\bullet} \DeclareUnicodeCharacter{2022}{\bullet}
\DeclareUnicodeCharacter{202F}{\thinspace}
\DeclareUnicodeCharacter{2026}{\dots} \DeclareUnicodeCharacter{2026}{\dots}
\DeclareUnicodeCharacter{2039}{\guilsinglleft} \DeclareUnicodeCharacter{2039}{\guilsinglleft}
\DeclareUnicodeCharacter{203A}{\guilsinglright} \DeclareUnicodeCharacter{203A}{\guilsinglright}
\DeclareUnicodeCharacter{20AC}{\euro} \DeclareUnicodeCharacter{20AC}{\euro}
\DeclareUnicodeCharacter{2192}{\expansion} \DeclareUnicodeCharacter{2192}{\expansion}
\DeclareUnicodeCharacter{21D2}{\result} \DeclareUnicodeCharacter{21D2}{\result}
% Mathematical symbols
\DeclareUnicodeCharacter{2200}{\ensuremath\forall}
\DeclareUnicodeCharacter{2203}{\ensuremath\exists}
\DeclareUnicodeCharacter{2208}{\ensuremath\in}
\DeclareUnicodeCharacter{2212}{\minus} \DeclareUnicodeCharacter{2212}{\minus}
\DeclareUnicodeCharacter{2217}{\point} \DeclareUnicodeCharacter{2217}{\point}
\DeclareUnicodeCharacter{221E}{\ensuremath\infty}
\DeclareUnicodeCharacter{2225}{\ensuremath\parallel} \DeclareUnicodeCharacter{2225}{\ensuremath\parallel}
\DeclareUnicodeCharacter{2227}{\ensuremath\wedge}
\DeclareUnicodeCharacter{2229}{\ensuremath\cap}
\DeclareUnicodeCharacter{2261}{\equiv} \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 }% end of \utfeightchardefs
% US-ASCII character definitions. % US-ASCII character definitions.

View file

@ -1,3 +1,4 @@
#include <config.h> #include <config.h>
#define BINARY_IO_INLINE _GL_EXTERN_INLINE #define BINARY_IO_INLINE _GL_EXTERN_INLINE
#include "binary-io.h" #include "binary-io.h"
typedef int dummy;

View file

@ -78,82 +78,65 @@ extern "C" {
# error "Only ASCII and EBCDIC are supported" # error "Only ASCII and EBCDIC are supported"
#endif #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 #if C_CTYPE_ASCII
# define _C_CTYPE_CNTRL \ # define _C_CTYPE_OTHER_CNTRL \
case '\x00': case '\x01': case '\x02': case '\x03': \ case '\x00': case '\x01': case '\x02': case '\x03': \
case '\x04': case '\x05': case '\x06': case '\x07': \ case '\x04': case '\x05': case '\x06': case '\x0e': \
case '\x08': case '\x09': case '\x0a': case '\x0b': \ case '\x0f': case '\x10': case '\x11': case '\x12': \
case '\x0c': case '\x0d': case '\x0e': case '\x0f': \ case '\x13': case '\x14': case '\x15': case '\x16': \
case '\x10': case '\x11': case '\x12': case '\x13': \ case '\x17': case '\x18': case '\x19': case '\x1a': \
case '\x14': case '\x15': case '\x16': case '\x17': \ case '\x1b': case '\x1c': case '\x1d': case '\x1e': \
case '\x18': case '\x19': case '\x1a': case '\x1b': \ case '\x1f': case '\x7f'
case '\x1c': case '\x1d': case '\x1e': case '\x1f': \
case '\x7f'
#else #else
/* Use EBCDIC code page 1047's assignments for ASCII control chars; /* Use EBCDIC code page 1047's assignments for ASCII control chars;
assume all EBCDIC code pages agree about these assignments. */ 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 '\x00': case '\x01': case '\x02': case '\x03': \
case '\x05': case '\x07': case '\x0b': case '\x0c': \ case '\x07': case '\x0e': case '\x0f': case '\x10': \
case '\x0d': case '\x0e': case '\x0f': case '\x10': \ case '\x11': case '\x12': case '\x13': case '\x18': \
case '\x11': case '\x12': case '\x13': case '\x16': \ case '\x19': case '\x1c': case '\x1d': case '\x1e': \
case '\x18': case '\x19': case '\x1c': case '\x1d': \ case '\x1f': case '\x26': case '\x27': case '\x2d': \
case '\x1e': case '\x1f': case '\x25': case '\x26': \ case '\x2e': case '\x32': case '\x37': case '\x3c': \
case '\x27': case '\x2d': case '\x2e': case '\x2f': \ case '\x3d': case '\x3f'
case '\x32': case '\x37': case '\x3c': case '\x3d': \
case '\x3f'
#endif #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 'a' + (n): case 'b' + (n): case 'c' + (n): case 'd' + (n): \
case 'e' + (n): case 'f' + (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)
#define _C_CTYPE_LOWER_N(n) \ #define _C_CTYPE_LOWER_N(n) \
case 'a' + (n): case 'b' + (n): case 'c' + (n): case 'd' + (n): \ _C_CTYPE_LOWER_A_THRU_F_N(n): \
case 'e' + (n): case 'f' + (n): case 'g' + (n): case 'h' + (n): \ case 'g' + (n): case 'h' + (n): case 'i' + (n): case 'j' + (n): \
case 'i' + (n): case 'j' + (n): case 'k' + (n): case 'l' + (n): \ case 'k' + (n): case 'l' + (n): case 'm' + (n): case 'n' + (n): \
case 'm' + (n): case 'n' + (n): case 'o' + (n): case 'p' + (n): \ case 'o' + (n): case 'p' + (n): case 'q' + (n): case 'r' + (n): \
case 'q' + (n): case 'r' + (n): case 's' + (n): case 't' + (n): \ case 's' + (n): case 't' + (n): case 'u' + (n): case 'v' + (n): \
case 'u' + (n): case 'v' + (n): case 'w' + (n): case 'x' + (n): \ case 'w' + (n): case 'x' + (n): case 'y' + (n): case 'z' + (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. */ /* Cases for hex letters, digits, lower, punct, and upper. */
#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 #define _C_CTYPE_A_THRU_F \
case for unsigned char if the original char is negative. */ _C_CTYPE_LOWER_A_THRU_F_N (0): \
_C_CTYPE_LOWER_A_THRU_F_N ('A' - 'a')
#define _C_CTYPE_A_THRU_F _C_CTYPE_CASES (_C_CTYPE_A_THRU_F_N) #define _C_CTYPE_DIGIT \
#define _C_CTYPE_DIGIT _C_CTYPE_CASES (_C_CTYPE_DIGIT_N) case '0': case '1': case '2': case '3': \
#define _C_CTYPE_LOWER _C_CTYPE_CASES (_C_CTYPE_LOWER_N) case '4': case '5': case '6': case '7': \
#define _C_CTYPE_UPPER _C_CTYPE_CASES (_C_CTYPE_UPPER_N) case '8': case '9'
#define _C_CTYPE_LOWER _C_CTYPE_LOWER_N (0)
/* The punct class differs because some punctuation characters may be #define _C_CTYPE_PUNCT \
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 \
case '!': case '"': case '#': case '$': \ case '!': case '"': case '#': case '$': \
case '%': case '&': case '\'': case '(': \ 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 '`': \ case ']': case '^': case '_': case '`': \
case '{': case '|': case '}': case '~' case '{': case '|': case '}': case '~'
#define _C_CTYPE_UPPER _C_CTYPE_LOWER_N ('A' - 'a')
/* Function definitions. */ /* Function definitions. */
@ -189,7 +174,6 @@ c_isalnum (int c)
_C_CTYPE_LOWER: _C_CTYPE_LOWER:
_C_CTYPE_UPPER: _C_CTYPE_UPPER:
return true; return true;
default: default:
return false; return false;
} }
@ -203,7 +187,6 @@ c_isalpha (int c)
_C_CTYPE_LOWER: _C_CTYPE_LOWER:
_C_CTYPE_UPPER: _C_CTYPE_UPPER:
return true; return true;
default: default:
return false; return false;
} }
@ -220,107 +203,9 @@ c_isascii (int c)
_C_CTYPE_CNTRL: _C_CTYPE_CNTRL:
_C_CTYPE_DIGIT: _C_CTYPE_DIGIT:
_C_CTYPE_LOWER: _C_CTYPE_LOWER:
_C_CTYPE_PUNCT:
_C_CTYPE_UPPER: _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; return true;
default: default:
return false; return false;
} }
@ -363,107 +248,9 @@ c_isgraph (int c)
{ {
_C_CTYPE_DIGIT: _C_CTYPE_DIGIT:
_C_CTYPE_LOWER: _C_CTYPE_LOWER:
_C_CTYPE_PUNCT:
_C_CTYPE_UPPER: _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; return true;
default: default:
return false; return false;
} }
@ -489,107 +276,9 @@ c_isprint (int c)
case ' ': case ' ':
_C_CTYPE_DIGIT: _C_CTYPE_DIGIT:
_C_CTYPE_LOWER: _C_CTYPE_LOWER:
_C_CTYPE_PUNCT:
_C_CTYPE_UPPER: _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; return true;
default: default:
return false; return false;
} }
@ -600,105 +289,8 @@ c_ispunct (int c)
{ {
switch (c) switch (c)
{ {
_C_CTYPE_PUNCT_PLAIN: _C_CTYPE_PUNCT:
#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; return true;
default: default:
return false; return false;
} }
@ -736,7 +328,6 @@ c_isxdigit (int c)
_C_CTYPE_DIGIT: _C_CTYPE_DIGIT:
_C_CTYPE_A_THRU_F: _C_CTYPE_A_THRU_F:
return true; return true;
default: default:
return false; return false;
} }
@ -747,14 +338,8 @@ c_tolower (int c)
{ {
switch (c) switch (c)
{ {
_C_CTYPE_UPPER_N (0): _C_CTYPE_UPPER:
#if _C_CTYPE_SIGNED_EBCDIC
c += 256;
/* Fall through. */
_C_CTYPE_UPPER_N (256):
#endif
return c - 'A' + 'a'; return c - 'A' + 'a';
default: default:
return c; return c;
} }
@ -765,14 +350,8 @@ c_toupper (int c)
{ {
switch (c) switch (c)
{ {
_C_CTYPE_LOWER_N (0): _C_CTYPE_LOWER:
#if _C_CTYPE_SIGNED_EBCDIC
c += 256;
/* Fall through. */
_C_CTYPE_LOWER_N (256):
#endif
return c - 'a' + 'A'; return c - 'a' + 'A';
default: default:
return c; return c;
} }

View file

@ -1,3 +1,4 @@
#include <config.h> #include <config.h>
#define _GL_U64_INLINE _GL_EXTERN_INLINE #define _GL_U64_INLINE _GL_EXTERN_INLINE
#include "u64.h" #include "u64.h"
typedef int dummy;

View file

@ -1,3 +1,4 @@
#include <config.h> #include <config.h>
#define _GL_UNISTD_INLINE _GL_EXTERN_INLINE #define _GL_UNISTD_INLINE _GL_EXTERN_INLINE
#include "unistd.h" #include "unistd.h"
typedef int dummy;

View file

@ -253,9 +253,10 @@ AC_DEFUN([gl_PROG_AR_RANLIB],
[ [
dnl Minix 3 comes with two toolchains: The Amsterdam Compiler Kit compiler 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 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. dnl produce libraries that work only with gcc, not with cc.
AC_REQUIRE([AC_PROG_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_CACHE_CHECK([for Minix Amsterdam compiler], [gl_cv_c_amsterdam_compiler],
[ [
AC_EGREP_CPP([Amsterdam], AC_EGREP_CPP([Amsterdam],
@ -267,25 +268,37 @@ Amsterdam
[gl_cv_c_amsterdam_compiler=yes], [gl_cv_c_amsterdam_compiler=yes],
[gl_cv_c_amsterdam_compiler=no]) [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' AR='cc -c.a'
if test -z "$ARFLAGS"; then fi
ARFLAGS='-o' if test -z "$ARFLAGS"; then
fi ARFLAGS='-o'
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 fi
else else
if test -z "$ARFLAGS"; then dnl AM_PROG_AR was added in automake v1.11.2. AM_PROG_AR does not AC_SUBST
ARFLAGS='cr' dnl ARFLAGS variable (it is filed into Makefile.in directly by automake
fi 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 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([AR])
AC_SUBST([ARFLAGS]) AC_SUBST([ARFLAGS])
if test -z "$RANLIB"; then if test -z "$RANLIB"; then

View file

@ -37,7 +37,11 @@ AC_DEFUN([gl_EARLY],
m4_pattern_allow([^gl_ES$])dnl a valid locale name m4_pattern_allow([^gl_ES$])dnl a valid locale name
m4_pattern_allow([^gl_LIBOBJS$])dnl a variable m4_pattern_allow([^gl_LIBOBJS$])dnl a variable
m4_pattern_allow([^gl_LTLIBOBJS$])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]) AC_REQUIRE([gl_PROG_AR_RANLIB])
# Code from module absolute-header: # Code from module absolute-header:
# Code from module acl-permissions: # Code from module acl-permissions:
# Code from module alloca-opt: # Code from module alloca-opt:
@ -67,7 +71,6 @@ AC_DEFUN([gl_EARLY],
# Code from module euidaccess: # Code from module euidaccess:
# Code from module execinfo: # Code from module execinfo:
# Code from module extensions: # Code from module extensions:
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
# Code from module extern-inline: # Code from module extern-inline:
# Code from module faccessat: # Code from module faccessat:
# Code from module fcntl: # Code from module fcntl: