[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
sync from gnulib to coreutils, mostly for <ctype.h> and <dirent.h>
From: |
Paul Eggert |
Subject: |
sync from gnulib to coreutils, mostly for <ctype.h> and <dirent.h> |
Date: |
Sun, 09 Jul 2006 10:13:42 -0700 |
I installed this to sync from gnulib to coreutils. Most of this is
for <ctype.h>, where gnulib no longer cares about the obsolete pre-C89
bugs with things like isprint (255).
2006-07-09 Paul Eggert <address@hidden>
Adjust to recent updates from gnulib.
* build-aux/*, lib/*, m4/*: Update from gnulib.
* lib/Makefile.am (stdint.h): FULL_PATH_STDINT_H -> ABSOLUTE_STDINT_H,
to accommodate update from gnulib.
* src/dd.c (apply_translations): Use toupper rather than
islower followed by toupper; it's simpler and typically
faster now that we assume at least C89 semantics. Similarly
for tolower.
* src/sort.c (inittables): Likewise.
* src/expand.c (expand): Don't assume that isprint etc. return
booleans (needed for pre-C99 hosts).
* src/fmt.c (check_punctuation): Likewise.
* src/ptx.c (initialize_regex, fix_output_parameters): Likewise.
* src/tr.c (is_char_class_member): Likewise.
* src/unexpand.c (unexpand): Likewise.
* src/join.c (is_blank): Remove; no longer needed. All uses
replaced by isblank (to_uchar (...)).
* src/pinky.c (create_fullname): Don't assume char is unsigned.
* src/printf.c (print_esc): Likewise.
* src/ptx.c (SKIP_NON_WHITE, SKIP_WHITE, SKIP_WHITE_BACKWARDS):
(copy_unescaped_string): Likewise.
* src/stat.c (print_it): Likewise.
* src/system.h (_D_EXACT_NAMELEN): Renamed from NLENGTH, for
convenience on GNU systems. All uses changed. Don't bother
looking for any dirent.h substitute other than ndir.h.
(D_INO): Remove unnecessary parentheses.
(IN_CTYPE_DOMAIN, ISGRAPH, ISPRINT, ISALNUM, ISALPHA):
(ISCNTRL, ISLOWER, ISPUNCT, ISSPACE, ISUPPER, ISXDIGIT):
(ISDIGIT_LOCALE, TOLOWER, TOUPPER): Remove. All uses changed
to ctype.h equivalents.
(isblank): Renamed from ISBLANK. Check for HAVE_DECL_ISBLANK too.
All uses changed.
Index: build-aux/ChangeLog
===================================================================
RCS file: /fetish/cu/build-aux/ChangeLog,v
retrieving revision 1.17
diff -p -u -r1.17 ChangeLog
--- build-aux/ChangeLog 29 May 2006 06:55:36 -0000 1.17
+++ build-aux/ChangeLog 9 Jul 2006 16:33:53 -0000
@@ -1,3 +1,7 @@
+2006-07-08 Paul Eggert <address@hidden>
+
+ * config.guess, config.sub, texinfo.tex: Update from gnulib.
+
2006-05-29 Jim Meyering <address@hidden>
* config.guess, config.rpath, config.sub, install-sh:
Index: build-aux/config.guess
===================================================================
RCS file: /fetish/cu/build-aux/config.guess,v
retrieving revision 1.18
diff -p -u -r1.18 config.guess
--- build-aux/config.guess 29 May 2006 06:55:37 -0000 1.18
+++ build-aux/config.guess 9 Jul 2006 16:33:53 -0000
@@ -4,7 +4,7 @@
# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
# Inc.
-timestamp='2006-05-13'
+timestamp='2006-07-02'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -211,7 +211,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
exit ;;
macppc:MirBSD:*:*)
- echo powerppc-unknown-mirbsd${UNAME_RELEASE}
+ echo powerpc-unknown-mirbsd${UNAME_RELEASE}
exit ;;
*:MirBSD:*:*)
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
@@ -790,10 +790,10 @@ EOF
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit ;;
- x86:Interix*:[345]*)
+ x86:Interix*:[3456]*)
echo i586-pc-interix${UNAME_RELEASE}
exit ;;
- EM64T:Interix*:[345]*)
+ EM64T:Interix*:[3456]*)
echo x86_64-unknown-interix${UNAME_RELEASE}
exit ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
@@ -831,6 +831,9 @@ EOF
arm*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
+ avr32*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
cris:Linux:*:*)
echo cris-axis-linux-gnu
exit ;;
Index: build-aux/config.sub
===================================================================
RCS file: /fetish/cu/build-aux/config.sub,v
retrieving revision 1.11
diff -p -u -r1.11 config.sub
--- build-aux/config.sub 29 May 2006 06:55:37 -0000 1.11
+++ build-aux/config.sub 9 Jul 2006 16:33:53 -0000
@@ -4,7 +4,7 @@
# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
# Inc.
-timestamp='2006-05-13'
+timestamp='2006-07-02'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -241,7 +241,7 @@ case $basic_machine in
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] |
alpha64pca5[67] \
| am33_2.0 \
- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr |
avr32 \
| bfin \
| c4x | clipper \
| d10v | d30v | dlx | dsp16xx \
@@ -317,7 +317,7 @@ case $basic_machine in
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
- | avr-* \
+ | avr-* | avr32-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
| clipper-* | craynv-* | cydra-* \
@@ -1214,7 +1214,7 @@ case $os in
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos*)
+ | -skyos* | -haiku* | -rdos* | -toppers*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
Index: build-aux/install-sh
===================================================================
RCS file: /fetish/cu/build-aux/install-sh,v
retrieving revision 1.8
diff -p -u -r1.8 install-sh
--- build-aux/install-sh 29 May 2006 06:55:37 -0000 1.8
+++ build-aux/install-sh 9 Jul 2006 16:33:53 -0000
@@ -39,8 +39,7 @@ scriptversion=2006-05-11.20
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
-# from scratch. It can only install one file at a time, a restriction
-# shared with many OS's install programs.
+# from scratch.
nl='
'
@@ -50,6 +49,11 @@ IFS=" "" $nl"
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
+if test -z "$doit"; then
+ doit_exec=exec
+else
+ doit_exec=$doit
+fi
# Put in absolute file names if you don't have them in your path;
# or use environment vars.
@@ -66,17 +70,9 @@ mkdirprog="${MKDIRPROG-mkdir}"
posix_glob=
posix_mkdir=
-# Symbolic mode for testing mkdir with directories.
-# It is the same as 755, but also tests that "u+" works.
-test_mode=u=rwx,g=rx,o=rx,u+wx
-
# Desired mode of installed file.
mode=0755
-# Desired mode of newly created intermediate directories.
-# It is empty if not known yet.
-intermediate_mode=
-
chmodcmd=$chmodprog
chowncmd=
chgrpcmd=
@@ -133,6 +129,12 @@ while test $# -ne 0; do
-m) mode=$2
shift
shift
+ case $mode in
+ *' '* | *' '* | *'
+'* | *'*'* | *'?'* | *'['*)
+ echo "$0: invalid mode: $mode" >&2
+ exit 1;;
+ esac
continue;;
-o) chowncmd="$chownprog $2"
@@ -191,7 +193,32 @@ if test $# -eq 0; then
exit 0
fi
-test -n "$dir_arg" || trap '(exit $?); exit' 1 2 13 15
+if test -z "$dir_arg"; then
+ trap '(exit $?); exit' 1 2 13 15
+
+ # Set umask so as not to create temps with too-generous modes.
+ # However, 'strip' requires both read and write access to temps.
+ case $mode in
+ # Optimize common cases.
+ *644) cp_umask=133;;
+ *755) cp_umask=22;;
+
+ *[0-7])
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw='% 200'
+ fi
+ cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+ *)
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw=,u+rw
+ fi
+ cp_umask=$mode$u_plus_rw;;
+ esac
+fi
for src
do
@@ -274,46 +301,67 @@ do
if test $dstdir_status != 0; then
case $posix_mkdir in
'')
- posix_mkdir=false
- if $mkdirprog -m $test_mode -p -- / >/dev/null 2>&1; then
- posix_mkdir=true
- else
- # Remove any dirs left behind by ancient mkdir implementations.
- rmdir ./-m "$test_mode" ./-p ./-- 2>/dev/null
- fi ;;
- esac
-
- if
- $posix_mkdir && {
+ # Create intermediate dirs using mode 755 as modified by the umask.
+ # This is like FreeBSD 'install' as of 1997-10-28.
+ umask=`umask`
+ case $stripcmd.$umask in
+ # Optimize common cases.
+ *[2367][2367]) mkdir_umask=$umask;;
+ .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+ *[0-7])
+ mkdir_umask=`expr $umask + 22 \
+ - $umask % 100 % 40 + $umask % 20 \
+ - $umask % 10 % 4 + $umask % 2
+ `;;
+ *) mkdir_umask=$umask,go-w;;
+ esac
# With -d, create the new directory with the user-specified mode.
- # Otherwise, create it using the same intermediate mode that
- # mkdir -p would use when creating intermediate directories.
- # POSIX says that this mode is "$(umask -S),u+wx", so use that
- # if umask -S works.
-
+ # Otherwise, rely on $mkdir_umask.
if test -n "$dir_arg"; then
- mkdir_mode=$mode
+ mkdir_mode=-m$mode
else
- case $intermediate_mode in
- '')
- if umask_S=`(umask -S) 2>/dev/null`; then
- intermediate_mode=$umask_S,u+wx
- else
- intermediate_mode=$test_mode
- fi ;;
- esac
- mkdir_mode=$intermediate_mode
+ mkdir_mode=
fi
- $mkdirprog -m "$mkdir_mode" -p -- "$dstdir"
- }
+ posix_mkdir=false
+ case $umask in
+ *[123567][0-7][0-7])
+ # POSIX mkdir -p sets u+wx bits regardless of umask, which
+ # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+ ;;
+ *)
+ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+ if (umask $mkdir_umask &&
+ exec $mkdirprog $mkdir_mode -p -- / "$tmpdir/d") >/dev/null 2>&1
+ then
+ # Check for bugs in HP-UX 11.23 and IRIX 6.5 mkdir.
+ case `ls -ld "$tmpdir"` in
+ d????-??-* ) posix_mkdir=:;;
+ esac
+ rmdir "$tmpdir/d" "$tmpdir"
+ else
+ # Remove any dirs left behind by ancient mkdir implementations.
+ rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+ fi
+ trap '' 0;;
+ esac;;
+ esac
+
+ if
+ $posix_mkdir && (
+ umask $mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+ )
then :
else
- # mkdir does not conform to POSIX, or it failed possibly due to
- # a race condition. Create the directory the slow way, step by
- # step, checking for races as we go.
+ # The umask is ridiculous, or mkdir does not conform to POSIX,
+ # or it failed possibly due to a race condition. Create the
+ # directory the slow way, step by step, checking for races as we go.
case $dstdir in
/*) prefix=/ ;;
@@ -349,7 +397,8 @@ do
prefixes=
else
if $posix_mkdir; then
- $mkdirprog -m "$mkdir_mode" -p -- "$dstdir" && break
+ (umask=$mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
# Don't fail if two instances are running concurrently.
test -d "$prefix" || exit 1
else
@@ -365,7 +414,9 @@ do
if test -n "$prefixes"; then
# Don't fail if two instances are running concurrently.
- eval "\$mkdirprog $prefixes" || test -d "$dstdir" || exit 1
+ (umask $mkdir_umask &&
+ eval "\$doit_exec \$mkdirprog $prefixes") ||
+ test -d "$dstdir" || exit 1
obsolete_mkdir_used=true
fi
fi
@@ -375,7 +426,7 @@ do
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
- test -z "$chmodcmd" || $doit $chmodcmd "$mode" "$dst"; } || exit 1
+ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
else
# Make a couple of temp file names in the proper directory.
@@ -386,7 +437,7 @@ do
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
# Copy the file name to the temp name.
- $doit $cpprog "$src" "$dsttmp" &&
+ (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
# and set any options; do chmod last to preserve setuid bits.
#
@@ -397,7 +448,7 @@ do
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
&& { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
- && { test -z "$chmodcmd" || $doit $chmodcmd "$mode" "$dsttmp"; } &&
+ && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
# Now rename the file to the real destination.
{ $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \
Index: build-aux/texinfo.tex
===================================================================
RCS file: /fetish/cu/build-aux/texinfo.tex,v
retrieving revision 1.16
diff -p -u -r1.16 texinfo.tex
--- build-aux/texinfo.tex 29 May 2006 06:55:37 -0000 1.16
+++ build-aux/texinfo.tex 9 Jul 2006 16:33:55 -0000
@@ -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{2006-05-28.17}
+\def\texinfoversion{2006-06-19.13}
%
% Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free
@@ -4005,9 +4005,9 @@ where each line of input produces a line
\endgroup
}
-% Like \dotfill except takes at least 1 em.
+% Like plain.tex's \dotfill, except uses up at least 1 em.
\def\indexdotfill{\cleaders
- \hbox{$\mathsurround=0pt \mkern1.5mu ${\it .}$ \mkern1.5mu$}\hskip 1em plus
1fill}
+ \hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus 1fill}
\def\primary #1{\line{#1\hfil}}
@@ -4581,14 +4581,17 @@ where each line of input produces a line
\ifx\temptype\Ynothingkeyword
\setbox0 = \hbox{}%
\def\toctype{unnchap}%
+ \gdef\thischapternum{}%
\gdef\thischapter{#1}%
\else\ifx\temptype\Yomitfromtockeyword
\setbox0 = \hbox{}% contents like unnumbered, but no toc entry
\def\toctype{omit}%
+ \gdef\thischapternum{}%
\gdef\thischapter{}%
\else\ifx\temptype\Yappendixkeyword
\setbox0 = \hbox{\putwordAppendix{} #3\enspace}%
\def\toctype{app}%
+ \xdef\thischapternum{\appendixletter}%
% We don't substitute the actual chapter name into \thischapter
% because we don't want its macros evaluated now. And we don't
% use \thissection because that changes with each section.
@@ -4598,6 +4601,7 @@ where each line of input produces a line
\else
\setbox0 = \hbox{#3\enspace}%
\def\toctype{numchap}%
+ \xdef\thischapternum{\the\chapno}%
\xdef\thischapter{\putwordChapter{} \the\chapno:
\noexpand\thischaptername}%
\fi\fi\fi
Index: lib/ChangeLog
===================================================================
RCS file: /fetish/cu/lib/ChangeLog,v
retrieving revision 1.1203
diff -p -u -r1.1203 ChangeLog
--- lib/ChangeLog 8 Jul 2006 09:58:20 -0000 1.1203
+++ lib/ChangeLog 9 Jul 2006 16:33:57 -0000
@@ -1,3 +1,86 @@
+2006-07-08 Paul Eggert <address@hidden>
+
+ * Makefile.am (stdint.h): FULL_PATH_STDINT_H -> ABSOLUTE_STDINT_H,
+ to accommodate update from gnulib.
+
+ Update from gnulib, as follows:
+
+ 2006-07-06 Jim Hyslop <address@hidden> (tiny change)
+
+ * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
+ '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
+ brackets. Other minor changes to suppress some compiler
+ warnings.
+
+ 2006-07-06 Paul Eggert <address@hidden>
+
+ * getloadavg.c: Use __VMS, not VMS.
+ * getopt.c: Likewise.
+ * getpagesize.h: Likewise.
+
+ 2006-07-06 Derek R. Price <address@hidden>
+ and Paul Eggert <address@hidden>
+
+ * backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
+ Don't worry about this obsolete case any more.
+ (HAVE_DIR): Remove. All uses removed; we now assume you can read
+ directories.
+ * dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
+ worry about this obsolete case any more.
+ * fts.c: Likewise.
+ * getcwd.c: Likewise.
+ * savedir.c: Likewise.
+
+ 2006-07-06 Paul Eggert <address@hidden>
+
+ * fnmatch.c (ISBLANK): Remove. All uses changed to isblank.
+ (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
+ (ISGRAPH): Remove. All uses changed to isgraph.
+ (FOLD) [!defined _LIBC]: Remove special case.
+ * getdate.y (lookup_word): Remove no-longer-needed call to islower.
+ * regext_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
+ HAVE_ISBLANK.
+ * strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special case.
+
+ 2006-07-06 Ralf Wildenhues <address@hidden>
+
+ * strtod.c (strtod): cast the argument of tolower to unsigned char.
+
+ 2006-07-05 Paul Eggert <address@hidden>
+
+ * memcasecmp.c: Include <limits.h>.
+ (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
+ * strtod.c (strtod): Don't assume isspace works on negative chars.
+ Don't assume isdigit succeeds only on '0' through '9'.
+
+ 2006-07-05 Derek R. Price <address@hidden>
+
+ * exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
+ All uses of is_space replaced by isspace.
+ * exit.h: Don't talk about STDC_HEADERS.
+ * fnmatch.c (ISASCII): Remove; no longer needed. All uses removed.
+ (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
+ (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed. All uses
+ replaced by isprint etc.
+ * getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
+ * getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
+ * memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
+ * strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
+ * strtol.c (IN_CTYPE_DOMAIN): Likewise.
+ * xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
+
+ 2006-07-05 Eric Blake <address@hidden>
+
+ * getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
+ missing from netdb.h.
+ * getaddrinfo.c (includes): Include inet_ntop and snprintf.
+
+ 2006-06-27 Bruno Haible <address@hidden>
+
+ Assume ANSI C header files and <ctype.h> functions.
+ * mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
+ (mbsnwidth): Use isprint, iscntrl instead.
+
2006-07-08 Jim Meyering <address@hidden>
* getndelim2.h (getndelim2): Remove doubled "after" in comment.
Index: lib/Makefile.am
===================================================================
RCS file: /fetish/cu/lib/Makefile.am,v
retrieving revision 1.246
diff -p -u -r1.246 Makefile.am
--- lib/Makefile.am 4 Jul 2006 05:37:11 -0000 1.246
+++ lib/Makefile.am 9 Jul 2006 16:33:57 -0000
@@ -141,7 +141,7 @@ stdint.h: stdint_.h
sed -e 's/@''HAVE_WCHAR_H''@/$(HAVE_WCHAR_H)/g' \
-e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \
-e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \
- -e 's|@''FULL_PATH_STDINT_H''@|$(FULL_PATH_STDINT_H)|g' \
+ -e 's|@''ABSOLUTE_STDINT_H''@|$(ABSOLUTE_STDINT_H)|g' \
-e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \
-e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \
-e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \
Index: lib/backupfile.c
===================================================================
RCS file: /fetish/cu/lib/backupfile.c,v
retrieving revision 1.50
diff -p -u -r1.50 backupfile.c
--- lib/backupfile.c 26 Mar 2006 12:15:59 -0000 1.50
+++ lib/backupfile.c 9 Jul 2006 16:33:57 -0000
@@ -47,21 +47,7 @@
#else
# define dirent direct
# define NLENGTH(direct) ((size_t) (direct)->d_namlen)
-# if HAVE_SYS_NDIR_H
-# include <sys/ndir.h>
-# endif
-# if HAVE_SYS_DIR_H
-# include <sys/dir.h>
-# endif
-# if HAVE_NDIR_H
-# include <ndir.h>
-# endif
-#endif
-
-#if HAVE_DIRENT_H || HAVE_NDIR_H || HAVE_SYS_DIR_H || HAVE_SYS_NDIR_H
-# define HAVE_DIR 1
-#else
-# define HAVE_DIR 0
+# include <ndir.h>
#endif
#if D_INO_IN_DIRENT
@@ -95,11 +81,11 @@
#endif
/* ISDIGIT differs from isdigit, as follows:
- - Its arg may be any int or unsigned int; it need not be an unsigned char.
- - It's guaranteed to evaluate its argument exactly once.
+ - Its arg may be any int or unsigned int; it need not be an unsigned char
+ or EOF.
- It's typically faster.
POSIX says that only '0' through '9' are digits. Prefer ISDIGIT to
- ISDIGIT_LOCALE unless it's important to use the locale's definition
+ ISDIGIT unless it's important to use the locale's definition
of `digit' even when the host does not conform to POSIX. */
#define ISDIGIT(c) ((unsigned int) (c) - '0' <= 9)
@@ -166,8 +152,6 @@ check_extension (char *file, size_t file
}
}
-#if HAVE_DIR
-
/* Returned values for NUMBERED_BACKUP. */
enum numbered_backup_result
@@ -282,7 +266,6 @@ numbered_backup (char **buffer, size_t b
*buffer = buf;
return result;
}
-#endif /* HAVE_DIR */
/* Return the name of the new backup file for the existing file FILE,
allocated with malloc. Report an error and fail if out of memory.
@@ -301,14 +284,13 @@ find_backup_file_name (char const *file,
size_t simple_backup_suffix_size = strlen (simple_backup_suffix) + 1;
size_t backup_suffix_size_guess = simple_backup_suffix_size;
enum { GUESS = sizeof ".~12345~" };
- if (HAVE_DIR && backup_suffix_size_guess < GUESS)
+ if (backup_suffix_size_guess < GUESS)
backup_suffix_size_guess = GUESS;
ssize = filelen + backup_suffix_size_guess + 1;
s = xmalloc (ssize);
memcpy (s, file, filelen + 1);
-#if HAVE_DIR
if (backup_type != simple_backups)
switch (numbered_backup (&s, ssize, filelen))
{
@@ -323,7 +305,6 @@ find_backup_file_name (char const *file,
simple = (backup_type == numbered_existing_backups);
break;
}
-#endif
if (simple)
memcpy (s + filelen, simple_backup_suffix, simple_backup_suffix_size);
Index: lib/dirfd.h
===================================================================
RCS file: /fetish/cu/lib/dirfd.h,v
retrieving revision 1.5
diff -p -u -r1.5 dirfd.h
--- lib/dirfd.h 22 Sep 2005 06:05:39 -0000 1.5
+++ lib/dirfd.h 9 Jul 2006 16:33:57 -0000
@@ -1,5 +1,5 @@
/* Declare dirfd, if necessary.
- Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -21,18 +21,10 @@
#if HAVE_DIRENT_H
# include <dirent.h>
-#else /* not HAVE_DIRENT_H */
+#else
# define dirent direct
-# if HAVE_SYS_NDIR_H
-# include <sys/ndir.h>
-# endif /* HAVE_SYS_NDIR_H */
-# if HAVE_SYS_DIR_H
-# include <sys/dir.h>
-# endif /* HAVE_SYS_DIR_H */
-# if HAVE_NDIR_H
-# include <ndir.h>
-# endif /* HAVE_NDIR_H */
-#endif /* HAVE_DIRENT_H */
+# include <ndir.h>
+#endif
#ifndef HAVE_DECL_DIRFD
"this configure-time declaration test was not run"
Index: lib/exclude.c
===================================================================
RCS file: /fetish/cu/lib/exclude.c,v
retrieving revision 1.28
diff -p -u -r1.28 exclude.c
--- lib/exclude.c 4 Jul 2006 05:39:07 -0000 1.28
+++ lib/exclude.c 9 Jul 2006 16:33:57 -0000
@@ -43,18 +43,6 @@
# include "unlocked-io.h"
#endif
-#if STDC_HEADERS || (! defined isascii && ! HAVE_ISASCII)
-# define IN_CTYPE_DOMAIN(c) true
-#else
-# define IN_CTYPE_DOMAIN(c) isascii (c)
-#endif
-
-static inline bool
-is_space (unsigned char c)
-{
- return IN_CTYPE_DOMAIN (c) && isspace (c);
-}
-
/* Non-GNU systems lack these options, so we don't need to check them. */
#ifndef FNM_CASEFOLD
# define FNM_CASEFOLD 0
@@ -244,12 +232,12 @@ add_exclude_file (void (*add_func) (stru
{
char *pattern_end = p;
- if (is_space (line_end))
+ if (isspace ((unsigned char) line_end))
{
for (; ; pattern_end--)
if (pattern_end == pattern)
goto next_pattern;
- else if (! is_space (pattern_end[-1]))
+ else if (! isspace ((unsigned char) pattern_end[-1]))
break;
}
Index: lib/exit.h
===================================================================
RCS file: /fetish/cu/lib/exit.h,v
retrieving revision 1.2
diff -p -u -r1.2 exit.h
--- lib/exit.h 14 May 2005 07:58:06 -0000 1.2
+++ lib/exit.h 9 Jul 2006 16:33:57 -0000
@@ -21,7 +21,7 @@
/* Get exit() declaration. */
#include <stdlib.h>
-/* Some systems do not define EXIT_*, even with STDC_HEADERS. */
+/* Some systems do not define EXIT_*, despite otherwise supporting C89. */
#ifndef EXIT_SUCCESS
# define EXIT_SUCCESS 0
#endif
Index: lib/fnmatch.c
===================================================================
RCS file: /fetish/cu/lib/fnmatch.c,v
retrieving revision 1.33
diff -p -u -r1.33 fnmatch.c
--- lib/fnmatch.c 27 Jan 2006 18:41:50 -0000 1.33
+++ lib/fnmatch.c 9 Jul 2006 16:33:57 -0000
@@ -86,34 +86,10 @@ extern int fnmatch (const char *pattern,
#if defined _LIBC || !defined __GNU_LIBRARY__ || !HAVE_FNMATCH_GNU
-# if defined STDC_HEADERS || !defined isascii
-# define ISASCII(c) 1
-# else
-# define ISASCII(c) isascii(c)
-# endif
-
-# ifdef isblank
-# define ISBLANK(c) (ISASCII (c) && isblank (c))
-# else
-# define ISBLANK(c) ((c) == ' ' || (c) == '\t')
-# endif
-# ifdef isgraph
-# define ISGRAPH(c) (ISASCII (c) && isgraph (c))
-# else
-# define ISGRAPH(c) (ISASCII (c) && isprint (c) && !isspace (c))
+# if ! (defined isblank || HAVE_DECL_ISBLANK)
+# define isblank(c) ((c) == ' ' || (c) == '\t')
# endif
-# define ISPRINT(c) (ISASCII (c) && isprint (c))
-# define ISDIGIT(c) (ISASCII (c) && isdigit (c))
-# define ISALNUM(c) (ISASCII (c) && isalnum (c))
-# define ISALPHA(c) (ISASCII (c) && isalpha (c))
-# define ISCNTRL(c) (ISASCII (c) && iscntrl (c))
-# define ISLOWER(c) (ISASCII (c) && islower (c))
-# define ISPUNCT(c) (ISASCII (c) && ispunct (c))
-# define ISSPACE(c) (ISASCII (c) && isspace (c))
-# define ISUPPER(c) (ISASCII (c) && isupper (c))
-# define ISXDIGIT(c) (ISASCII (c) && isxdigit (c))
-
# define STREQ(s1, s2) ((strcmp (s1, s2) == 0))
# if defined _LIBC || WIDE_CHAR_SUPPORT
@@ -169,11 +145,7 @@ static int posixly_correct;
# endif
/* Note that this evaluates C many times. */
-# ifdef _LIBC
-# define FOLD(c) ((flags & FNM_CASEFOLD) ? tolower (c) : (c))
-# else
-# define FOLD(c) ((flags & FNM_CASEFOLD) && ISUPPER (c) ? tolower (c) : (c))
-# endif
+# define FOLD(c) ((flags & FNM_CASEFOLD) ? tolower (c) : (c))
# define CHAR char
# define UCHAR unsigned char
# define INT int
Index: lib/fnmatch_loop.c
===================================================================
RCS file: /fetish/cu/lib/fnmatch_loop.c,v
retrieving revision 1.11
diff -p -u -r1.11 fnmatch_loop.c
--- lib/fnmatch_loop.c 27 Jan 2006 18:41:50 -0000 1.11
+++ lib/fnmatch_loop.c 9 Jul 2006 16:33:57 -0000
@@ -288,18 +288,18 @@ FCT (const CHAR *pattern, const CHAR *st
goto matched;
# endif
#else
- if ((STREQ (str, L_("alnum")) && ISALNUM ((UCHAR) *n))
- || (STREQ (str, L_("alpha")) && ISALPHA ((UCHAR) *n))
- || (STREQ (str, L_("blank")) && ISBLANK ((UCHAR) *n))
- || (STREQ (str, L_("cntrl")) && ISCNTRL ((UCHAR) *n))
- || (STREQ (str, L_("digit")) && ISDIGIT ((UCHAR) *n))
- || (STREQ (str, L_("graph")) && ISGRAPH ((UCHAR) *n))
- || (STREQ (str, L_("lower")) && ISLOWER ((UCHAR) *n))
- || (STREQ (str, L_("print")) && ISPRINT ((UCHAR) *n))
- || (STREQ (str, L_("punct")) && ISPUNCT ((UCHAR) *n))
- || (STREQ (str, L_("space")) && ISSPACE ((UCHAR) *n))
- || (STREQ (str, L_("upper")) && ISUPPER ((UCHAR) *n))
- || (STREQ (str, L_("xdigit")) && ISXDIGIT ((UCHAR) *n)))
+ if ((STREQ (str, L_("alnum")) && isalnum ((UCHAR) *n))
+ || (STREQ (str, L_("alpha")) && isalpha ((UCHAR) *n))
+ || (STREQ (str, L_("blank")) && isblank ((UCHAR) *n))
+ || (STREQ (str, L_("cntrl")) && iscntrl ((UCHAR) *n))
+ || (STREQ (str, L_("digit")) && isdigit ((UCHAR) *n))
+ || (STREQ (str, L_("graph")) && isgraph ((UCHAR) *n))
+ || (STREQ (str, L_("lower")) && islower ((UCHAR) *n))
+ || (STREQ (str, L_("print")) && isprint ((UCHAR) *n))
+ || (STREQ (str, L_("punct")) && ispunct ((UCHAR) *n))
+ || (STREQ (str, L_("space")) && isspace ((UCHAR) *n))
+ || (STREQ (str, L_("upper")) && isupper ((UCHAR) *n))
+ || (STREQ (str, L_("xdigit")) && isxdigit ((UCHAR) *n)))
goto matched;
#endif
c = *p++;
Index: lib/fts.c
===================================================================
RCS file: /fetish/cu/lib/fts.c,v
retrieving revision 1.52
diff -p -u -r1.52 fts.c
--- lib/fts.c 20 May 2006 22:18:16 -0000 1.52
+++ lib/fts.c 9 Jul 2006 16:33:57 -0000
@@ -78,26 +78,17 @@ static char sccsid[] = "@(#)fts.c 8.6 (B
# include "unistd--.h"
#endif
-#if defined _LIBC
+#if HAVE_DIRENT_H || _LIBC
# include <dirent.h>
-# define NAMLEN(dirent) _D_EXACT_NAMLEN (dirent)
-#else
-# if HAVE_DIRENT_H
-# include <dirent.h>
-# define NAMLEN(dirent) strlen ((dirent)->d_name)
+# ifdef _D_EXACT_NAMLEN
+# define NAMLEN(dirent) _D_EXACT_NAMLEN (dirent)
# else
-# define dirent direct
-# define NAMLEN(dirent) (dirent)->d_namlen
-# if HAVE_SYS_NDIR_H
-# include <sys/ndir.h>
-# endif
-# if HAVE_SYS_DIR_H
-# include <sys/dir.h>
-# endif
-# if HAVE_NDIR_H
-# include <ndir.h>
-# endif
+# define NAMLEN(dirent) strlen ((dirent)->d_name)
# endif
+#else
+# define dirent direct
+# define NAMLEN(dirent) (dirent)->d_namlen
+# include <ndir.h>
#endif
#ifdef _LIBC
Index: lib/getaddrinfo.c
===================================================================
RCS file: /fetish/cu/lib/getaddrinfo.c,v
retrieving revision 1.3
diff -p -u -r1.3 getaddrinfo.c
--- lib/getaddrinfo.c 4 Jul 2006 05:39:07 -0000 1.3
+++ lib/getaddrinfo.c 9 Jul 2006 16:33:57 -0000
@@ -38,6 +38,8 @@
#define _(String) gettext (String)
#define N_(String) String
+#include "inet_ntop.h"
+#include "snprintf.h"
#include "strdup.h"
#if defined _WIN32 || defined __WIN32__
@@ -45,11 +47,11 @@
#endif
#ifdef WIN32_NATIVE
-typedef int WSAAPI (*getaddrinfo_func) (const char*, const char*,
+typedef int (WSAAPI *getaddrinfo_func) (const char*, const char*,
const struct addrinfo*,
struct addrinfo**);
-typedef void WSAAPI (*freeaddrinfo_func) (struct addrinfo*);
-typedef int WSAAPI (*getnameinfo_func) (const struct sockaddr*,
+typedef void (WSAAPI *freeaddrinfo_func) (struct addrinfo*);
+typedef int (WSAAPI *getnameinfo_func) (const struct sockaddr*,
socklen_t, char*, DWORD,
char*, DWORD, int);
@@ -72,9 +74,9 @@ use_win32_p (void)
if (h)
{
- getaddrinfo_ptr = GetProcAddress (h, "getaddrinfo");
- freeaddrinfo_ptr = GetProcAddress (h, "freeaddrinfo");
- getnameinfo_ptr = GetProcAddress (h, "getnameinfo");
+ getaddrinfo_ptr = (getaddrinfo_func) GetProcAddress (h, "getaddrinfo");
+ freeaddrinfo_ptr = (freeaddrinfo_func) GetProcAddress (h,
"freeaddrinfo");
+ getnameinfo_ptr = (getnameinfo_func) GetProcAddress (h, "getnameinfo");
}
/* If either is missing, something is odd. */
@@ -294,7 +296,10 @@ freeaddrinfo (struct addrinfo *ai)
{
#ifdef WIN32_NATIVE
if (use_win32_p ())
- return freeaddrinfo_ptr (ai);
+ {
+ freeaddrinfo_ptr (ai);
+ return;
+ }
#endif
while (ai)
@@ -314,7 +319,7 @@ int getnameinfo(const struct sockaddr *r
char *restrict service, socklen_t servicelen,
int flags)
{
-#if WIN32_NATIVE
+#ifdef WIN32_NATIVE
if (use_win32_p ())
return getnameinfo_ptr (sa, salen, node, nodelen,
service, servicelen, flags);
Index: lib/getaddrinfo.h
===================================================================
RCS file: /fetish/cu/lib/getaddrinfo.h,v
retrieving revision 1.7
diff -p -u -r1.7 getaddrinfo.h
--- lib/getaddrinfo.h 4 Jul 2006 05:39:07 -0000 1.7
+++ lib/getaddrinfo.h 9 Jul 2006 16:33:57 -0000
@@ -142,4 +142,12 @@ extern int getnameinfo(const struct sock
# endif
+/* Possible flags for getnameinfo. */
+# ifndef NI_NUMERICHOST
+# define NI_NUMERICHOST 1
+# endif
+# ifndef NI_NUMERICSERV
+# define NI_NUMERICSERV 2
+# endif
+
#endif /* GETADDRINFO_H */
Index: lib/getcwd.c
===================================================================
RCS file: /fetish/cu/lib/getcwd.c,v
retrieving revision 1.20
diff -p -u -r1.20 getcwd.c
--- lib/getcwd.c 19 Mar 2006 18:27:51 -0000 1.20
+++ lib/getcwd.c 9 Jul 2006 16:33:57 -0000
@@ -38,23 +38,13 @@
#if HAVE_DIRENT_H || _LIBC
# include <dirent.h>
-# ifndef _D_EXACT_NAMLEN
-# define _D_EXACT_NAMLEN(d) strlen ((d)->d_name)
-# endif
#else
# define dirent direct
-# if HAVE_SYS_NDIR_H
-# include <sys/ndir.h>
-# endif
-# if HAVE_SYS_DIR_H
-# include <sys/dir.h>
-# endif
-# if HAVE_NDIR_H
-# include <ndir.h>
-# endif
+# define _D_EXACT_NAMLEN(d) (d)->d_namlen
+# include <ndir.h>
#endif
#ifndef _D_EXACT_NAMLEN
-# define _D_EXACT_NAMLEN(d) ((d)->d_namlen)
+# define _D_EXACT_NAMLEN(d) strlen ((d)->d_name)
#endif
#ifndef _D_ALLOC_NAMLEN
# define _D_ALLOC_NAMLEN(d) (_D_EXACT_NAMLEN (d) + 1)
Index: lib/getdate.y
===================================================================
RCS file: /fetish/cu/lib/getdate.y,v
retrieving revision 1.103
diff -p -u -r1.103 getdate.y
--- lib/getdate.y 11 Jun 2006 07:11:33 -0000 1.103
+++ lib/getdate.y 9 Jul 2006 16:33:57 -0000
@@ -68,19 +68,10 @@
#include "setenv.h"
#include "xalloc.h"
-#if STDC_HEADERS || (! defined isascii && ! HAVE_ISASCII)
-# define IN_CTYPE_DOMAIN(c) 1
-#else
-# define IN_CTYPE_DOMAIN(c) isascii (c)
-#endif
-
-#define ISSPACE(c) (IN_CTYPE_DOMAIN (c) && isspace (c))
-#define ISALPHA(c) (IN_CTYPE_DOMAIN (c) && isalpha (c))
-#define ISLOWER(c) (IN_CTYPE_DOMAIN (c) && islower (c))
/* ISDIGIT differs from isdigit, as follows:
- - Its arg may be any int or unsigned int; it need not be an unsigned char.
- - It's guaranteed to evaluate its argument exactly once.
+ - Its arg may be any int or unsigned int; it need not be an unsigned char
+ or EOF.
- It's typically faster.
POSIX says that only '0' through '9' are digits. Prefer ISDIGIT to
isdigit unless it's important to use the locale's definition
@@ -896,8 +887,7 @@ lookup_word (parser_control const *pc, c
for (p = word; *p; p++)
{
unsigned char ch = *p;
- if (ISLOWER (ch))
- *p = toupper (ch);
+ *p = toupper (ch);
}
for (tp = meridian_table; tp->name; tp++)
@@ -962,7 +952,7 @@ yylex (YYSTYPE *lvalp, parser_control *p
for (;;)
{
- while (c = *pc->input, ISSPACE (c))
+ while (c = *pc->input, isspace (c))
pc->input++;
if (ISDIGIT (c) || c == '-' || c == '+')
@@ -973,7 +963,7 @@ yylex (YYSTYPE *lvalp, parser_control *p
if (c == '-' || c == '+')
{
sign = c == '-' ? -1 : 1;
- while (c = *++pc->input, ISSPACE (c))
+ while (c = *++pc->input, isspace (c))
continue;
if (! ISDIGIT (c))
/* skip the '-' sign */
@@ -1077,7 +1067,7 @@ yylex (YYSTYPE *lvalp, parser_control *p
}
}
- if (ISALPHA (c))
+ if (isalpha (c))
{
char buff[20];
char *p = buff;
@@ -1089,7 +1079,7 @@ yylex (YYSTYPE *lvalp, parser_control *p
*p++ = c;
c = *++pc->input;
}
- while (ISALPHA (c) || c == '.');
+ while (isalpha (c) || c == '.');
*p = '\0';
tp = lookup_word (pc, buff);
@@ -1201,7 +1191,7 @@ get_date (struct timespec *result, char
if (! tmp)
return false;
- while (c = *p, ISSPACE (c))
+ while (c = *p, isspace (c))
p++;
if (strncmp (p, "TZ=\"", 4) == 0)
Index: lib/getloadavg.c
===================================================================
RCS file: /fetish/cu/lib/getloadavg.c,v
retrieving revision 1.34
diff -p -u -r1.34 getloadavg.c
--- lib/getloadavg.c 8 Jul 2005 23:41:43 -0000 1.34
+++ lib/getloadavg.c 9 Jul 2006 16:33:58 -0000
@@ -358,7 +358,7 @@
# ifdef LOAD_AVE_TYPE
-# ifndef VMS
+# ifndef __VMS
# ifndef __linux__
# ifndef NLIST_STRUCT
# include <a.out.h>
@@ -385,7 +385,7 @@
# endif /* LDAV_SYMBOL */
# endif /* __linux__ */
-# else /* VMS */
+# else /* __VMS */
# ifndef eunice
# include <iodef.h>
@@ -393,7 +393,7 @@
# else /* eunice */
# include <vms/iodef.h>
# endif /* eunice */
-# endif /* VMS */
+# endif /* __VMS */
# ifndef LDAV_CVT
# define LDAV_CVT(n) ((double) (n))
@@ -473,9 +473,9 @@ static bool getloadavg_initialized;
/* Offset in kmem to seek to read load average, or 0 means invalid. */
static long offset;
-# if !defined (VMS) && !defined (sgi) && !defined (__linux__)
+# if ! defined __VMS && ! defined sgi && ! defined __linux__
static struct nlist nl[2];
-# endif /* Not VMS or sgi */
+# endif
# ifdef SUNOS_5
static kvm_t *kd;
@@ -813,7 +813,7 @@ getloadavg (double loadavg[], int nelem)
: (load_ave.tl_avenrun.l[elem] / (double) load_ave.tl_lscale));
# endif /* OSF_ALPHA */
-# if !defined (LDAV_DONE) && defined (VMS)
+# if ! defined LDAV_DONE && defined __VMS
/* VMS specific code -- read from the Load Ave driver. */
LOAD_AVE_TYPE load_ave[3];
@@ -851,9 +851,9 @@ getloadavg (double loadavg[], int nelem)
if (!getloadavg_initialized)
return -1;
-# endif /* VMS */
+# endif /* ! defined LDAV_DONE && defined __VMS */
-# if !defined (LDAV_DONE) && defined (LOAD_AVE_TYPE) && !defined (VMS)
+# if ! defined LDAV_DONE && defined LOAD_AVE_TYPE && ! defined __VMS
/* UNIX-specific code -- read the average from /dev/kmem. */
@@ -953,7 +953,7 @@ getloadavg (double loadavg[], int nelem)
if (offset == 0 || !getloadavg_initialized)
return -1;
-# endif /* LOAD_AVE_TYPE and not VMS */
+# endif /* ! defined LDAV_DONE && defined LOAD_AVE_TYPE && ! defined __VMS */
# if !defined (LDAV_DONE) && defined (LOAD_AVE_TYPE) /* Including VMS. */
if (nelem > 0)
Index: lib/getopt.c
===================================================================
RCS file: /fetish/cu/lib/getopt.c,v
retrieving revision 1.49
diff -p -u -r1.49 getopt.c
--- lib/getopt.c 24 Jan 2006 07:52:03 -0000 1.49
+++ lib/getopt.c 9 Jul 2006 16:33:58 -0000
@@ -31,7 +31,7 @@
#include <string.h>
#include <unistd.h>
-#ifdef VMS
+#ifdef __VMS
# include <unixlib.h>
#endif
Index: lib/getpagesize.h
===================================================================
RCS file: /fetish/cu/lib/getpagesize.h,v
retrieving revision 1.8
diff -p -u -r1.8 getpagesize.h
--- lib/getpagesize.h 2 Jul 2005 08:41:46 -0000 1.8
+++ lib/getpagesize.h 9 Jul 2006 16:33:58 -0000
@@ -21,12 +21,12 @@
#include <unistd.h>
#if !defined getpagesize && defined _SC_PAGESIZE
-# if !(defined VMS && __VMS_VER < 70000000)
+# if ! (defined __VMS && __VMS_VER < 70000000)
# define getpagesize() sysconf (_SC_PAGESIZE)
# endif
#endif
-#if !defined getpagesize && defined VMS
+#if !defined getpagesize && defined __VMS
# ifdef __ALPHA
# define getpagesize() 8192
# else
Index: lib/getusershell.c
===================================================================
RCS file: /fetish/cu/lib/getusershell.c,v
retrieving revision 1.21
diff -p -u -r1.21 getusershell.c
--- lib/getusershell.c 3 Jul 2005 07:15:09 -0000 1.21
+++ lib/getusershell.c 9 Jul 2006 16:33:58 -0000
@@ -1,7 +1,7 @@
/* getusershell.c -- Return names of valid user shells.
- Copyright (C) 1991, 1997, 2000, 2001, 2003, 2004, 2005 Free Software
- Foundation, Inc.
+ Copyright (C) 1991, 1997, 2000, 2001, 2003, 2004, 2005, 2006 Free
+ Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -43,14 +43,6 @@
# include "unlocked-io.h"
#endif
-#if defined (STDC_HEADERS) || (!defined (isascii) && !defined (HAVE_ISASCII))
-# define IN_CTYPE_DOMAIN(c) 1
-#else
-# define IN_CTYPE_DOMAIN(c) isascii(c)
-#endif
-
-#define ISSPACE(c) (IN_CTYPE_DOMAIN (c) && isspace (c))
-
static size_t readname (char **, size_t *, FILE *);
#if ! defined ADDITIONAL_DEFAULT_SHELLS && defined __MSDOS__
@@ -152,14 +144,14 @@ readname (char **name, size_t *size, FIL
size_t name_index = 0;
/* Skip blank space. */
- while ((c = getc (stream)) != EOF && ISSPACE (c))
+ while ((c = getc (stream)) != EOF && isspace (c))
/* Do nothing. */ ;
for (;;)
{
if (*size <= name_index)
*name = x2nrealloc (*name, size, sizeof **name);
- if (c == EOF || ISSPACE (c))
+ if (c == EOF || isspace (c))
break;
(*name)[name_index++] = c;
c = getc (stream);
Index: lib/mbswidth.c
===================================================================
RCS file: /fetish/cu/lib/mbswidth.c,v
retrieving revision 1.14
diff -p -u -r1.14 mbswidth.c
--- lib/mbswidth.c 4 Jul 2006 05:39:07 -0000 1.14
+++ lib/mbswidth.c 9 Jul 2006 16:33:58 -0000
@@ -60,18 +60,6 @@
# endif
#endif
-/* Get ISPRINT. */
-#if defined (STDC_HEADERS) || (!defined (isascii) && !defined (HAVE_ISASCII))
-# define IN_CTYPE_DOMAIN(c) 1
-#else
-# define IN_CTYPE_DOMAIN(c) isascii(c)
-#endif
-/* Undefine to protect against the definition in wctype.h of Solaris 2.6. */
-#undef ISPRINT
-#define ISPRINT(c) (IN_CTYPE_DOMAIN (c) && isprint (c))
-#undef ISCNTRL
-#define ISCNTRL(c) (IN_CTYPE_DOMAIN (c) && iscntrl (c))
-
/* Returns the number of columns needed to represent the multibyte
character string pointed to by STRING. If a non-printable character
occurs, and MBSW_REJECT_UNPRINTABLE is specified, -1 is returned.
@@ -195,10 +183,10 @@ mbsnwidth (const char *string, size_t nb
{
unsigned char c = (unsigned char) *p++;
- if (ISPRINT (c))
+ if (isprint (c))
width++;
else if (!(flags & MBSW_REJECT_UNPRINTABLE))
- width += (ISCNTRL (c) ? 0 : 1);
+ width += (iscntrl (c) ? 0 : 1);
else
return -1;
}
Index: lib/memcasecmp.c
===================================================================
RCS file: /fetish/cu/lib/memcasecmp.c,v
retrieving revision 1.12
diff -p -u -r1.12 memcasecmp.c
--- lib/memcasecmp.c 22 Sep 2005 06:05:39 -0000 1.12
+++ lib/memcasecmp.c 9 Jul 2006 16:33:58 -0000
@@ -1,5 +1,5 @@
/* Case-insensitive buffer comparator.
- Copyright (C) 1996, 1997, 2000, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 2000, 2003, 2006 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -21,23 +21,11 @@
# include <config.h>
#endif
-#include <ctype.h>
-
-#if defined STDC_HEADERS || (!defined isascii && !defined HAVE_ISASCII)
-# define IN_CTYPE_DOMAIN(Char) 1
-#else
-# define IN_CTYPE_DOMAIN(Char) isascii (Char)
-#endif
-#define ISLOWER(Char) (IN_CTYPE_DOMAIN (Char) && islower (Char))
-
-#if _LIBC || STDC_HEADERS
-# define TOUPPER(Char) toupper (Char)
-#else
-# define TOUPPER(Char) (ISLOWER (Char) ? toupper (Char) : (Char))
-#endif
-
#include "memcasecmp.h"
+#include <ctype.h>
+#include <limits.h>
+
/* Like memcmp, but ignore differences in case.
Convert to upper case (not lower) before comparing so that
join -i works with sort -f. */
@@ -52,7 +40,10 @@ memcasecmp (const void *vs1, const void
{
unsigned char u1 = s1[i];
unsigned char u2 = s2[i];
- int diff = TOUPPER (u1) - TOUPPER (u2);
+ int U1 = toupper (u1);
+ int U2 = toupper (u2);
+ int diff = (UCHAR_MAX <= INT_MAX ? U1 - U2
+ : U1 < U2 ? -1 : U2 < U1);
if (diff)
return diff;
}
Index: lib/posixtm.c
===================================================================
RCS file: /fetish/cu/lib/posixtm.c,v
retrieving revision 1.23
diff -p -u -r1.23 posixtm.c
--- lib/posixtm.c 1 Nov 2005 23:41:56 -0000 1.23
+++ lib/posixtm.c 9 Jul 2006 16:33:58 -0000
@@ -44,11 +44,11 @@
#endif
/* ISDIGIT differs from isdigit, as follows:
- - Its arg may be any int or unsigned int; it need not be an unsigned char.
- - It's guaranteed to evaluate its argument exactly once.
+ - Its arg may be any int or unsigned int; it need not be an unsigned char
+ or EOF.
- It's typically faster.
POSIX says that only '0' through '9' are digits. Prefer ISDIGIT to
- ISDIGIT_LOCALE unless it's important to use the locale's definition
+ isdigit unless it's important to use the locale's definition
of `digit' even when the host does not conform to POSIX. */
#define ISDIGIT(c) ((unsigned int) (c) - '0' <= 9)
Index: lib/regex_internal.h
===================================================================
RCS file: /fetish/cu/lib/regex_internal.h,v
retrieving revision 1.8
diff -p -u -r1.8 regex_internal.h
--- lib/regex_internal.h 10 Apr 2006 06:46:08 -0000 1.8
+++ lib/regex_internal.h 9 Jul 2006 16:33:58 -0000
@@ -56,7 +56,7 @@
#endif
/* In case that the system doesn't have isblank(). */
-#if !defined _LIBC && !defined HAVE_ISBLANK && !defined isblank
+#if !defined _LIBC && !HAVE_DECL_ISBLANK && !defined isblank
# define isblank(ch) ((ch) == ' ' || (ch) == '\t')
#endif
Index: lib/savedir.c
===================================================================
RCS file: /fetish/cu/lib/savedir.c,v
retrieving revision 1.30
diff -p -u -r1.30 savedir.c
--- lib/savedir.c 28 Jun 2006 22:24:54 -0000 1.30
+++ lib/savedir.c 9 Jul 2006 16:33:58 -0000
@@ -33,15 +33,7 @@
# include <dirent.h>
#else
# define dirent direct
-# if HAVE_SYS_NDIR_H
-# include <sys/ndir.h>
-# endif
-# if HAVE_SYS_DIR_H
-# include <sys/dir.h>
-# endif
-# if HAVE_NDIR_H
-# include <ndir.h>
-# endif
+# include <ndir.h>
#endif
#include <stddef.h>
Index: lib/sig2str.c
===================================================================
RCS file: /fetish/cu/lib/sig2str.c,v
retrieving revision 1.8
diff -p -u -r1.8 sig2str.c
--- lib/sig2str.c 22 Sep 2005 06:05:39 -0000 1.8
+++ lib/sig2str.c 9 Jul 2006 16:33:58 -0000
@@ -247,11 +247,11 @@ static struct numname { int num; char co
#define NUMNAME_ENTRIES (sizeof numname_table / sizeof numname_table[0])
/* ISDIGIT differs from isdigit, as follows:
- - Its arg may be any int or unsigned int; it need not be an unsigned char.
- - It's guaranteed to evaluate its argument exactly once.
+ - Its arg may be any int or unsigned int; it need not be an unsigned char
+ or EOF.
- It's typically faster.
POSIX says that only '0' through '9' are digits. Prefer ISDIGIT to
- ISDIGIT_LOCALE unless it's important to use the locale's definition
+ isdigit unless it's important to use the locale's definition
of `digit' even when the host does not conform to POSIX. */
#define ISDIGIT(c) ((unsigned int) (c) - '0' <= 9)
Index: lib/stdint_.h
===================================================================
RCS file: /fetish/cu/lib/stdint_.h,v
retrieving revision 1.5
diff -p -u -r1.5 stdint_.h
--- lib/stdint_.h 4 Jul 2006 04:50:34 -0000 1.5
+++ lib/stdint_.h 9 Jul 2006 16:33:58 -0000
@@ -43,14 +43,14 @@
Include it before <inttypes.h>, since any "#include <stdint.h>"
in <inttypes.h> would reinclude us, skipping our contents because
_GL_STDINT_H is defined. */
-# include @FULL_PATH_STDINT_H@
+# include @ABSOLUTE_STDINT_H@
#endif
/* <sys/types.h> defines some of the stdint.h types as well, on glibc,
IRIX 6.5, and OpenBSD 3.8 (via <machine/types.h>).
MacOS X 10.4.6 <sys/types.h> includes <stdint.h> (which is us), but
relies on the system <stdint.h> definitions, so include
- <sys/types.h> after @address@hidden */
+ <sys/types.h> after @address@hidden */
#if @HAVE_SYS_TYPES_H@
# include <sys/types.h>
#endif
Index: lib/strftime.c
===================================================================
RCS file: /fetish/cu/lib/strftime.c,v
retrieving revision 1.95
diff -p -u -r1.95 strftime.c
--- lib/strftime.c 29 Jun 2006 21:45:51 -0000 1.95
+++ lib/strftime.c 9 Jul 2006 16:33:58 -0000
@@ -278,17 +278,12 @@ extern char *tzname[];
# define TOLOWER(Ch, L) towlower (Ch)
# endif
#else
-# ifdef _LIBC
-# ifdef USE_IN_EXTENDED_LOCALE_MODEL
-# define TOUPPER(Ch, L) __toupper_l (Ch, L)
-# define TOLOWER(Ch, L) __tolower_l (Ch, L)
-# else
-# define TOUPPER(Ch, L) toupper (Ch)
-# define TOLOWER(Ch, L) tolower (Ch)
-# endif
+# ifdef USE_IN_EXTENDED_LOCALE_MODEL
+# define TOUPPER(Ch, L) __toupper_l (Ch, L)
+# define TOLOWER(Ch, L) __tolower_l (Ch, L)
# else
-# define TOUPPER(Ch, L) (islower (Ch) ? toupper (Ch) : (Ch))
-# define TOLOWER(Ch, L) (isupper (Ch) ? tolower (Ch) : (Ch))
+# define TOUPPER(Ch, L) toupper (Ch)
+# define TOLOWER(Ch, L) tolower (Ch)
# endif
#endif
/* We don't use `isdigit' here since the locale dependent
Index: lib/strnumcmp-in.h
===================================================================
RCS file: /fetish/cu/lib/strnumcmp-in.h,v
retrieving revision 1.4
diff -p -u -r1.4 strnumcmp-in.h
--- lib/strnumcmp-in.h 25 Sep 2005 06:14:33 -0000 1.4
+++ lib/strnumcmp-in.h 9 Jul 2006 16:33:58 -0000
@@ -1,7 +1,7 @@
/* Compare numeric strings. This is an internal include file.
Copyright (C) 1988, 1991, 1992, 1993, 1995, 1996, 1998, 1999, 2000,
- 2003, 2004, 2005 Free Software Foundation, Inc.
+ 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -30,11 +30,11 @@
# define NUMERIC_ZERO '0'
/* ISDIGIT differs from isdigit, as follows:
- - Its arg may be any int or unsigned int; it need not be an unsigned char.
- - It's guaranteed to evaluate its argument exactly once.
+ - Its arg may be any int or unsigned int; it need not be an unsigned char
+ or EOF.
- It's typically faster.
POSIX says that only '0' through '9' are digits. Prefer ISDIGIT to
- ISDIGIT_LOCALE unless it's important to use the locale's definition
+ isdigit unless it's important to use the locale's definition
of `digit' even when the host does not conform to POSIX. */
# define ISDIGIT(c) ((unsigned int) (c) - '0' <= 9)
Index: lib/strtod.c
===================================================================
RCS file: /fetish/cu/lib/strtod.c,v
retrieving revision 1.19
diff -p -u -r1.19 strtod.c
--- lib/strtod.c 4 Jul 2006 05:39:07 -0000 1.19
+++ lib/strtod.c 9 Jul 2006 16:33:58 -0000
@@ -22,16 +22,6 @@
#include <ctype.h>
-#if defined (STDC_HEADERS) || (!defined (isascii) && !defined (HAVE_ISASCII))
-# define IN_CTYPE_DOMAIN(c) 1
-#else
-# define IN_CTYPE_DOMAIN(c) isascii(c)
-#endif
-
-#define ISSPACE(c) (IN_CTYPE_DOMAIN (c) && isspace (c))
-#define ISDIGIT(c) (IN_CTYPE_DOMAIN (c) && isdigit (c))
-#define TOLOWER(c) (IN_CTYPE_DOMAIN (c) ? tolower(c) : (c))
-
#include <math.h>
#include <float.h>
@@ -64,7 +54,7 @@ strtod (const char *nptr, char **endptr)
s = nptr;
/* Eat whitespace. */
- while (ISSPACE (*s))
+ while (isspace ((unsigned char) *s))
++s;
/* Get the sign. */
@@ -78,7 +68,7 @@ strtod (const char *nptr, char **endptr)
exponent = 0;
for (;; ++s)
{
- if (ISDIGIT (*s))
+ if ('0' <= *s && *s <= '9')
{
got_digit = 1;
@@ -111,7 +101,7 @@ strtod (const char *nptr, char **endptr)
if (!got_digit)
goto noconv;
- if (TOLOWER (*s) == 'e')
+ if (tolower ((unsigned char) *s) == 'e')
{
/* Get the exponent specified after the `e' or `E'. */
int save = errno;
Index: lib/strtol.c
===================================================================
RCS file: /fetish/cu/lib/strtol.c,v
retrieving revision 1.24
diff -p -u -r1.24 strtol.c
--- lib/strtol.c 4 Jul 2006 05:39:07 -0000 1.24
+++ lib/strtol.c 9 Jul 2006 16:33:58 -0000
@@ -208,11 +208,6 @@
# define TOUPPER(Ch) towupper (Ch)
# endif
#else
-# if defined STDC_HEADERS || (!defined isascii && !defined HAVE_ISASCII)
-# define IN_CTYPE_DOMAIN(c) 1
-# else
-# define IN_CTYPE_DOMAIN(c) isascii(c)
-# endif
# define L_(Ch) Ch
# define UCHAR_TYPE unsigned char
# define STRING_TYPE char
@@ -221,9 +216,9 @@
# define ISALPHA(Ch) __isalpha_l ((Ch), loc)
# define TOUPPER(Ch) __toupper_l ((Ch), loc)
# else
-# define ISSPACE(Ch) (IN_CTYPE_DOMAIN (Ch) && isspace (Ch))
-# define ISALPHA(Ch) (IN_CTYPE_DOMAIN (Ch) && isalpha (Ch))
-# define TOUPPER(Ch) (IN_CTYPE_DOMAIN (Ch) ? toupper (Ch) : (Ch))
+# define ISSPACE(Ch) isspace (Ch)
+# define ISALPHA(Ch) isalpha (Ch)
+# define TOUPPER(Ch) toupper (Ch)
# endif
#endif
Index: lib/strverscmp.c
===================================================================
RCS file: /fetish/cu/lib/strverscmp.c,v
retrieving revision 1.17
diff -p -u -r1.17 strverscmp.c
--- lib/strverscmp.c 22 Sep 2005 06:05:39 -0000 1.17
+++ lib/strverscmp.c 9 Jul 2006 16:33:58 -0000
@@ -37,11 +37,11 @@
/* ISDIGIT differs from isdigit, as follows:
- - Its arg may be any int or unsigned int; it need not be an unsigned char.
- - It's guaranteed to evaluate its argument exactly once.
+ - Its arg may be any int or unsigned int; it need not be an unsigned char
+ or EOF.
- It's typically faster.
POSIX says that only '0' through '9' are digits. Prefer ISDIGIT to
- ISDIGIT_LOCALE unless it's important to use the locale's definition
+ isdigit unless it's important to use the locale's definition
of `digit' even when the host does not conform to POSIX. */
#define ISDIGIT(c) ((unsigned int) (c) - '0' <= 9)
Index: lib/userspec.c
===================================================================
RCS file: /fetish/cu/lib/userspec.c,v
retrieving revision 1.50
diff -p -u -r1.50 userspec.c
--- lib/userspec.c 22 Sep 2005 06:05:39 -0000 1.50
+++ lib/userspec.c 9 Jul 2006 16:33:58 -0000
@@ -76,11 +76,11 @@
#endif
/* ISDIGIT differs from isdigit, as follows:
- - Its arg may be any int or unsigned int; it need not be an unsigned char.
- - It's guaranteed to evaluate its argument exactly once.
+ - Its arg may be any int or unsigned int; it need not be an unsigned char
+ or EOF.
- It's typically faster.
POSIX says that only '0' through '9' are digits. Prefer ISDIGIT to
- ISDIGIT_LOCALE unless it's important to use the locale's definition
+ isdigit unless it's important to use the locale's definition
of `digit' even when the host does not conform to POSIX. */
#define ISDIGIT(c) ((unsigned int) (c) - '0' <= 9)
Index: lib/xstrtol.c
===================================================================
RCS file: /fetish/cu/lib/xstrtol.c,v
retrieving revision 1.38
diff -p -u -r1.38 xstrtol.c
--- lib/xstrtol.c 22 Sep 2005 06:05:39 -0000 1.38
+++ lib/xstrtol.c 9 Jul 2006 16:33:58 -0000
@@ -1,6 +1,6 @@
/* A more useful interface to strtol.
- Copyright (C) 1995, 1996, 1998, 1999, 2000, 2001, 2003, 2004, 2005
+ Copyright (C) 1995, 1996, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -51,14 +51,6 @@
# define STRTOL_T_MAXIMUM TYPE_MAXIMUM (__strtol_t)
#endif
-#if defined (STDC_HEADERS) || (!defined (isascii) && !defined (HAVE_ISASCII))
-# define IN_CTYPE_DOMAIN(c) 1
-#else
-# define IN_CTYPE_DOMAIN(c) isascii(c)
-#endif
-
-#define ISSPACE(c) (IN_CTYPE_DOMAIN (c) && isspace (c))
-
#if !HAVE_DECL_STRTOIMAX && !defined strtoimax
intmax_t strtoimax ();
#endif
@@ -112,7 +104,7 @@ __xstrtol (const char *s, char **ptr, in
{
const char *q = s;
unsigned char ch = *q;
- while (ISSPACE (ch))
+ while (isspace (ch))
ch = *++q;
if (ch == '-')
return LONGINT_INVALID;
Index: m4/backupfile.m4
===================================================================
RCS file: /fetish/cu/m4/backupfile.m4,v
retrieving revision 1.9
diff -p -u -r1.9 backupfile.m4
--- m4/backupfile.m4 22 Sep 2005 06:05:39 -0000 1.9
+++ m4/backupfile.m4 9 Jul 2006 16:33:58 -0000
@@ -1,5 +1,5 @@
-# backupfile.m4 serial 9
-dnl Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+# backupfile.m4 serial 10
+dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -10,7 +10,7 @@ AC_DEFUN([gl_BACKUPFILE],
AC_LIBOBJ([backupfile])
dnl Prerequisites of lib/backupfile.c.
- AC_REQUIRE([AC_HEADER_DIRENT])
+ AC_CHECK_HEADERS_ONCE([dirent.h])
AC_REQUIRE([gl_CHECK_TYPE_STRUCT_DIRENT_D_INO])
AC_REQUIRE([gl_AC_DOS])
AC_REQUIRE([AC_SYS_LONG_FILE_NAMES])
Index: m4/calloc.m4
===================================================================
RCS file: /fetish/cu/m4/calloc.m4,v
retrieving revision 1.6
diff -p -u -r1.6 calloc.m4
--- m4/calloc.m4 22 Sep 2005 06:05:39 -0000 1.6
+++ m4/calloc.m4 9 Jul 2006 16:33:58 -0000
@@ -1,6 +1,6 @@
-# calloc.m4 serial 5
+# calloc.m4 serial 6
-# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -16,8 +16,7 @@
# -------------------------------------
# If `calloc (0, 0)' is properly handled, run IF-WORKS, otherwise, IF-NOT.
AC_DEFUN([_AC_FUNC_CALLOC_IF],
-[AC_REQUIRE([AC_HEADER_STDC])dnl
-AC_REQUIRE([AC_TYPE_SIZE_T])dnl
+[AC_REQUIRE([AC_TYPE_SIZE_T])dnl
AC_CACHE_CHECK([for GNU libc compatible calloc], ac_cv_func_calloc_0_nonnull,
[AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
[exit (!calloc (0, 0) || calloc ((size_t) -1 / 8 + 1, 8));])],
Index: m4/check-decl.m4
===================================================================
RCS file: /fetish/cu/m4/check-decl.m4,v
retrieving revision 1.34
diff -p -u -r1.34 check-decl.m4
--- m4/check-decl.m4 22 Sep 2005 06:59:24 -0000 1.34
+++ m4/check-decl.m4 9 Jul 2006 16:33:58 -0000
@@ -61,6 +61,8 @@ AC_DEFUN([gl_CHECK_DECLS],
strtoul,
strtoull,
ttyname], , , $headers)
+
+ AC_CHECK_DECLS([isblank], [], [], [#include <ctype.h>])
])
dnl FIXME: when autoconf has support for it.
Index: m4/d-ino.m4
===================================================================
RCS file: /fetish/cu/m4/d-ino.m4,v
retrieving revision 1.8
diff -p -u -r1.8 d-ino.m4
--- m4/d-ino.m4 23 Jan 2005 09:07:57 -0000 1.8
+++ m4/d-ino.m4 9 Jul 2006 16:33:58 -0000
@@ -1,11 +1,11 @@
-#serial 7
+#serial 8
dnl From Jim Meyering.
dnl
dnl Check whether struct dirent has a member named d_ino.
dnl
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004 Free Software
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2006 Free Software
# Foundation, Inc.
# This file is free software; the Free Software Foundation
@@ -13,7 +13,7 @@ dnl
# with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_CHECK_TYPE_STRUCT_DIRENT_D_INO],
- [AC_REQUIRE([AC_HEADER_DIRENT])dnl
+ [AC_CHECK_HEADERS_ONCE([dirent.h])dnl
AC_CACHE_CHECK([for d_ino member in directory struct],
jm_cv_struct_dirent_d_ino,
[AC_TRY_LINK(dnl
@@ -21,18 +21,10 @@ AC_DEFUN([gl_CHECK_TYPE_STRUCT_DIRENT_D_
#include <sys/types.h>
#ifdef HAVE_DIRENT_H
# include <dirent.h>
-#else /* not HAVE_DIRENT_H */
+#else
# define dirent direct
-# ifdef HAVE_SYS_NDIR_H
-# include <sys/ndir.h>
-# endif /* HAVE_SYS_NDIR_H */
-# ifdef HAVE_SYS_DIR_H
-# include <sys/dir.h>
-# endif /* HAVE_SYS_DIR_H */
-# ifdef HAVE_NDIR_H
-# include <ndir.h>
-# endif /* HAVE_NDIR_H */
-#endif /* HAVE_DIRENT_H */
+# include <ndir.h>
+#endif
],
[struct dirent dp; dp.d_ino = 0;],
Index: m4/d-type.m4
===================================================================
RCS file: /fetish/cu/m4/d-type.m4,v
retrieving revision 1.9
diff -p -u -r1.9 d-type.m4
--- m4/d-type.m4 23 Jan 2005 09:07:57 -0000 1.9
+++ m4/d-type.m4 9 Jul 2006 16:33:58 -0000
@@ -1,11 +1,11 @@
-#serial 8
+#serial 9
dnl From Jim Meyering.
dnl
dnl Check whether struct dirent has a member named d_type.
dnl
-# Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004 Free Software
+# Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2006 Free Software
# Foundation, Inc.
#
# This file is free software; the Free Software Foundation
@@ -13,7 +13,7 @@ dnl
# with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE],
- [AC_REQUIRE([AC_HEADER_DIRENT])dnl
+ [AC_CHECK_HEADERS_ONCE([dirent.h])dnl
AC_CACHE_CHECK([for d_type member in directory struct],
jm_cv_struct_dirent_d_type,
[AC_TRY_LINK(dnl
@@ -21,18 +21,10 @@ AC_DEFUN([gl_CHECK_TYPE_STRUCT_DIRENT_D_
#include <sys/types.h>
#ifdef HAVE_DIRENT_H
# include <dirent.h>
-#else /* not HAVE_DIRENT_H */
+#else
# define dirent direct
-# ifdef HAVE_SYS_NDIR_H
-# include <sys/ndir.h>
-# endif /* HAVE_SYS_NDIR_H */
-# ifdef HAVE_SYS_DIR_H
-# include <sys/dir.h>
-# endif /* HAVE_SYS_DIR_H */
-# ifdef HAVE_NDIR_H
-# include <ndir.h>
-# endif /* HAVE_NDIR_H */
-#endif /* HAVE_DIRENT_H */
+# include <ndir.h>
+#endif
],
[struct dirent dp; dp.d_type = 0;],
Index: m4/dirfd.m4
===================================================================
RCS file: /fetish/cu/m4/dirfd.m4,v
retrieving revision 1.19
diff -p -u -r1.19 dirfd.m4
--- m4/dirfd.m4 4 Jul 2006 05:39:08 -0000 1.19
+++ m4/dirfd.m4 9 Jul 2006 16:33:58 -0000
@@ -1,4 +1,4 @@
-#serial 11 -*- Autoconf -*-
+#serial 12 -*- Autoconf -*-
dnl Find out how to get the file descriptor associated with an open DIR*.
@@ -17,23 +17,15 @@ AC_DEFUN([gl_FUNC_DIRFD],
dnl Work around a bug of AC_EGREP_CPP in autoconf-2.57.
AC_REQUIRE([AC_PROG_CPP])
AC_REQUIRE([AC_PROG_EGREP])
- AC_REQUIRE([AC_HEADER_DIRENT])
+ AC_CHECK_HEADERS_ONCE([dirent.h])dnl
dirfd_headers='
#if HAVE_DIRENT_H
# include <dirent.h>
-#else /* not HAVE_DIRENT_H */
+#else
# define dirent direct
-# if HAVE_SYS_NDIR_H
-# include <sys/ndir.h>
-# endif /* HAVE_SYS_NDIR_H */
-# if HAVE_SYS_DIR_H
-# include <sys/dir.h>
-# endif /* HAVE_SYS_DIR_H */
-# if HAVE_NDIR_H
-# include <ndir.h>
-# endif /* HAVE_NDIR_H */
-#endif /* HAVE_DIRENT_H */
+# include <ndir.h>
+#endif
'
AC_CHECK_FUNCS(dirfd)
AC_CHECK_DECLS([dirfd], , , $dirfd_headers)
Index: m4/exclude.m4
===================================================================
RCS file: /fetish/cu/m4/exclude.m4,v
retrieving revision 1.4
diff -p -u -r1.4 exclude.m4
--- m4/exclude.m4 29 Jan 2005 00:16:39 -0000 1.4
+++ m4/exclude.m4 9 Jul 2006 16:33:58 -0000
@@ -1,5 +1,5 @@
-# exclude.m4 serial 5
-dnl Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
+# exclude.m4 serial 6
+dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -8,9 +8,4 @@ AC_DEFUN([gl_EXCLUDE],
[
AC_LIBSOURCES([exclude.c, exclude.h])
AC_LIBOBJ([exclude])
-
- dnl Prerequisites of lib/exclude.c.
- AC_REQUIRE([AC_C_INLINE])
- AC_REQUIRE([AC_HEADER_STDC])
- AC_CHECK_FUNCS_ONCE(isascii)
])
Index: m4/fileblocks.m4
===================================================================
RCS file: /fetish/cu/m4/fileblocks.m4,v
retrieving revision 1.3
diff -p -u -r1.3 fileblocks.m4
--- m4/fileblocks.m4 22 Sep 2005 06:05:39 -0000 1.3
+++ m4/fileblocks.m4 9 Jul 2006 16:33:58 -0000
@@ -1,5 +1,5 @@
-# fileblocks.m4 serial 3
-dnl Copyright (C) 2002, 2005 Free Software Foundation, Inc.
+# fileblocks.m4 serial 4
+dnl Copyright (C) 2002, 2005, 2006 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -16,4 +16,5 @@ AC_DEFUN([gl_FILEBLOCKS],
# Prerequisites of lib/fileblocks.c.
AC_DEFUN([gl_PREREQ_FILEBLOCKS], [
AC_CHECK_HEADERS_ONCE(sys/param.h)
+ :
])
Index: m4/fnmatch.m4
===================================================================
RCS file: /fetish/cu/m4/fnmatch.m4,v
retrieving revision 1.22
diff -p -u -r1.22 fnmatch.m4
--- m4/fnmatch.m4 28 Jun 2006 21:59:41 -0000 1.22
+++ m4/fnmatch.m4 9 Jul 2006 16:33:58 -0000
@@ -63,7 +63,7 @@ AS_IF([test $$2 = yes], [$3], [$4])
AC_DEFUN([_AC_LIBOBJ_FNMATCH],
[AC_REQUIRE([AC_FUNC_ALLOCA])dnl
AC_REQUIRE([AC_TYPE_MBSTATE_T])dnl
-AC_CHECK_DECLS([getenv])
+AC_CHECK_DECLS([isblank], [], [], [#include <ctype.h>])
AC_CHECK_FUNCS([btowc mbsrtowcs mempcpy wmemchr wmemcpy wmempcpy])
AC_CHECK_HEADERS([wchar.h wctype.h])
AC_LIBOBJ([fnmatch])
Index: m4/fts.m4
===================================================================
RCS file: /fetish/cu/m4/fts.m4,v
retrieving revision 1.10
diff -p -u -r1.10 fts.m4
--- m4/fts.m4 17 Jan 2006 17:27:27 -0000 1.10
+++ m4/fts.m4 9 Jul 2006 16:33:58 -0000
@@ -1,4 +1,4 @@
-#serial 7
+#serial 8
dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -30,6 +30,5 @@ AC_DEFUN([gl_FUNC_FTS_CORE],
AC_REQUIRE([gl_FUNC_OPENAT])
# Checks for header files.
- AC_REQUIRE([AC_HEADER_DIRENT])
- AC_CHECK_HEADERS_ONCE([sys/param.h])
+ AC_CHECK_HEADERS_ONCE([dirent.h sys/param.h])dnl
])
Index: m4/getcwd.m4
===================================================================
RCS file: /fetish/cu/m4/getcwd.m4,v
retrieving revision 1.11
diff -p -u -r1.11 getcwd.m4
--- m4/getcwd.m4 18 Jun 2006 21:52:04 -0000 1.11
+++ m4/getcwd.m4 9 Jul 2006 16:33:58 -0000
@@ -61,7 +61,7 @@ AC_DEFUN([gl_FUNC_GETCWD],
AC_DEFUN([gl_PREREQ_GETCWD],
[
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
- AC_REQUIRE([AC_HEADER_DIRENT])
+ AC_CHECK_HEADERS_ONCE([dirent.h])dnl
AC_REQUIRE([gl_CHECK_TYPE_STRUCT_DIRENT_D_INO])
:
])
Index: m4/getdate.m4
===================================================================
RCS file: /fetish/cu/m4/getdate.m4,v
retrieving revision 1.8
diff -p -u -r1.8 getdate.m4
--- m4/getdate.m4 21 Jul 2005 22:00:06 -0000 1.8
+++ m4/getdate.m4 9 Jul 2006 16:33:58 -0000
@@ -1,5 +1,5 @@
-# getdate.m4 serial 8
-dnl Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+# getdate.m4 serial 9
+dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -29,8 +29,6 @@ AC_DEFUN([gl_GETDATE],
dnl Prerequisites of lib/getdate.y.
AC_REQUIRE([gl_BISON])
AC_REQUIRE([gl_C_COMPOUND_LITERALS])
- AC_REQUIRE([AC_HEADER_STDC])
- AC_CHECK_FUNCS_ONCE(isascii)
AC_STRUCT_TIMEZONE
AC_REQUIRE([gl_CLOCK_TIME])
AC_REQUIRE([gl_TM_GMTOFF])
Index: m4/getpass.m4
===================================================================
RCS file: /fetish/cu/m4/getpass.m4,v
retrieving revision 1.9
diff -p -u -r1.9 getpass.m4
--- m4/getpass.m4 4 Jul 2006 05:39:08 -0000 1.9
+++ m4/getpass.m4 9 Jul 2006 16:33:58 -0000
@@ -1,4 +1,4 @@
-# getpass.m4 serial 7
+# getpass.m4 serial 8
dnl Copyright (C) 2002-2003, 2005-2006 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -42,4 +42,5 @@ AC_DEFUN([gl_PREREQ_GETPASS], [
AC_CHECK_DECLS_ONCE([fputs_unlocked])
AC_CHECK_DECLS_ONCE([funlockfile])
AC_CHECK_DECLS_ONCE([putc_unlocked])
+ :
])
Index: m4/getusershell.m4
===================================================================
RCS file: /fetish/cu/m4/getusershell.m4,v
retrieving revision 1.3
diff -p -u -r1.3 getusershell.m4
--- m4/getusershell.m4 23 Jan 2005 09:07:57 -0000 1.3
+++ m4/getusershell.m4 9 Jul 2006 16:33:58 -0000
@@ -1,5 +1,5 @@
-# getusershell.m4 serial 3
-dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# getusershell.m4 serial 4
+dnl Copyright (C) 2002, 2003, 2006 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -7,13 +7,4 @@ dnl with or without modifications, as lo
AC_DEFUN([gl_FUNC_GETUSERSHELL],
[
AC_REPLACE_FUNCS(getusershell)
- if test $ac_cv_func_getusershell = no; then
- gl_PREREQ_GETUSERSHELL
- fi
-])
-
-# Prerequisites of lib/getusershell.c.
-AC_DEFUN([gl_PREREQ_GETUSERSHELL], [
- AC_REQUIRE([AC_HEADER_STDC])
- AC_CHECK_FUNCS_ONCE(isascii)
])
Index: m4/jm-macros.m4
===================================================================
RCS file: /fetish/cu/m4/jm-macros.m4,v
retrieving revision 1.240
diff -p -u -r1.240 jm-macros.m4
--- m4/jm-macros.m4 28 Jun 2006 21:59:07 -0000 1.240
+++ m4/jm-macros.m4 9 Jul 2006 16:33:58 -0000
@@ -1,4 +1,4 @@
-#serial 99 -*- autoconf -*-
+#serial 100 -*- autoconf -*-
dnl Misc type-related macros for coreutils.
@@ -231,8 +231,6 @@ AC_DEFUN([gl_CHECK_ALL_TYPES],
AC_REQUIRE([AC_C_LONG_DOUBLE])
AC_REQUIRE([gl_CHECK_ALL_HEADERS])
- AC_REQUIRE([AC_HEADER_DIRENT])
- AC_REQUIRE([AC_HEADER_STDC])
AC_CHECK_MEMBERS(
[struct stat.st_author,
struct stat.st_blksize],,,
@@ -265,6 +263,4 @@ AC_DEFUN([gl_CHECK_ALL_TYPES],
AC_REQUIRE([gl_AC_TYPE_UNSIGNED_LONG_LONG])
AC_REQUIRE([AC_HEADER_MAJOR])
- AC_REQUIRE([AC_HEADER_DIRENT])
-
])
Index: m4/memcasecmp.m4
===================================================================
RCS file: /fetish/cu/m4/memcasecmp.m4,v
retrieving revision 1.2
diff -p -u -r1.2 memcasecmp.m4
--- m4/memcasecmp.m4 21 Mar 2005 20:14:56 -0000 1.2
+++ m4/memcasecmp.m4 9 Jul 2006 16:33:58 -0000
@@ -1,5 +1,5 @@
-#serial 3
-dnl Copyright (C) 2005 Free Software Foundation, Inc.
+#serial 4
+dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -8,8 +8,4 @@ AC_DEFUN([gl_MEMCASECMP],
[
AC_LIBSOURCES([memcasecmp.c, memcasecmp.h])
AC_LIBOBJ([memcasecmp])
-
- dnl Prerequisites of lib/memcasecmp.c.
- AC_REQUIRE([AC_HEADER_STDC])
- AC_CHECK_FUNCS_ONCE(isascii)
])
Index: m4/mkstemp.m4
===================================================================
RCS file: /fetish/cu/m4/mkstemp.m4,v
retrieving revision 1.20
diff -p -u -r1.20 mkstemp.m4
--- m4/mkstemp.m4 22 Sep 2005 06:05:40 -0000 1.20
+++ m4/mkstemp.m4 9 Jul 2006 16:33:58 -0000
@@ -1,6 +1,6 @@
-#serial 12
+#serial 13
-# Copyright (C) 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -67,6 +67,5 @@ AC_DEFUN([gl_PREREQ_TEMPNAME],
[
AC_CHECK_HEADERS_ONCE(sys/time.h)
AC_CHECK_FUNCS(__secure_getenv gettimeofday)
- AC_CHECK_DECLS_ONCE(getenv)
AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])
])
Index: m4/regex.m4
===================================================================
RCS file: /fetish/cu/m4/regex.m4,v
retrieving revision 1.48
diff -p -u -r1.48 regex.m4
--- m4/regex.m4 8 Jul 2006 12:08:59 -0000 1.48
+++ m4/regex.m4 9 Jul 2006 16:33:58 -0000
@@ -166,5 +166,6 @@ AC_DEFUN([gl_PREREQ_REGEX],
AC_REQUIRE([gl_C_RESTRICT])
AC_REQUIRE([AM_LANGINFO_CODESET])
AC_CHECK_HEADERS_ONCE([locale.h wchar.h wctype.h])
- AC_CHECK_FUNCS_ONCE([isblank mbrtowc mempcpy wcrtomb wcscoll])
+ AC_CHECK_FUNCS_ONCE([mbrtowc mempcpy wcrtomb wcscoll])
+ AC_CHECK_DECLS([isblank], [], [], [#include <ctype.h>])
])
Index: m4/savedir.m4
===================================================================
RCS file: /fetish/cu/m4/savedir.m4,v
retrieving revision 1.5
diff -p -u -r1.5 savedir.m4
--- m4/savedir.m4 28 Jun 2006 22:24:14 -0000 1.5
+++ m4/savedir.m4 9 Jul 2006 16:33:58 -0000
@@ -1,4 +1,4 @@
-# savedir.m4 serial 5
+# savedir.m4 serial 7
dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -10,5 +10,5 @@ AC_DEFUN([gl_SAVEDIR],
AC_LIBOBJ([savedir])
dnl Prerequisites of lib/savedir.c.
- AC_REQUIRE([AC_HEADER_DIRENT])
+ AC_CHECK_HEADERS_ONCE([dirent.h])dnl
])
Index: m4/sockpfaf.m4
===================================================================
RCS file: /fetish/cu/m4/sockpfaf.m4,v
retrieving revision 1.2
diff -p -u -r1.2 sockpfaf.m4
--- m4/sockpfaf.m4 4 Jul 2006 05:39:08 -0000 1.2
+++ m4/sockpfaf.m4 9 Jul 2006 16:33:58 -0000
@@ -1,4 +1,4 @@
-# sockpfaf.m4 serial 3
+# sockpfaf.m4 serial 4
dnl Copyright (C) 2004, 2006 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -13,7 +13,8 @@ dnl From Bruno Haible.
AC_DEFUN([gl_SOCKET_FAMILIES],
[
- AC_CHECK_HEADERS_ONCE(sys/socket.h netinet/in.h winsock2.h)
+ AC_REQUIRE([gl_HEADER_SYS_SOCKET])
+ AC_CHECK_HEADERS_ONCE([netinet/in.h])
AC_MSG_CHECKING(for IPv4 sockets)
AC_CACHE_VAL(gl_cv_socket_ipv4,
Index: m4/stdint.m4
===================================================================
RCS file: /fetish/cu/m4/stdint.m4,v
retrieving revision 1.3
diff -p -u -r1.3 stdint.m4
--- m4/stdint.m4 2 Jul 2006 09:14:28 -0000 1.3
+++ m4/stdint.m4 9 Jul 2006 16:33:58 -0000
@@ -1,4 +1,4 @@
-# stdint.m4 serial 13
+# stdint.m4 serial 14
dnl Copyright (C) 2001-2002, 2004-2006 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -49,9 +49,9 @@ AC_DEFUN([gl_STDINT_H],
dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_stdint_h.
if test $ac_cv_header_stdint_h = yes; then
- gl_FULL_HEADER_PATH([stdint.h])
- FULL_PATH_STDINT_H="<$gl_cv_full_path_stdint_h>"
- AC_SUBST([FULL_PATH_STDINT_H])
+ gl_ABSOLUTE_HEADER([stdint.h])
+ ABSOLUTE_STDINT_H="<$gl_cv_absolute_stdint_h>"
+ AC_SUBST([ABSOLUTE_STDINT_H])
HAVE_STDINT_H=1
else
HAVE_STDINT_H=0
@@ -59,7 +59,7 @@ AC_DEFUN([gl_STDINT_H],
AC_SUBST([HAVE_STDINT_H])
dnl Now see whether we need a substitute <stdint.h>. Use
- dnl FULL_PATH_STDINT_H, not <stdint.h>, so that it also works during
+ dnl ABSOLUTE_STDINT_H, not <stdint.h>, so that it also works during
dnl a "config.status --recheck" if a stdint.h has been
dnl created in the build directory.
if test $ac_cv_header_stdint_h = yes; then
@@ -70,7 +70,7 @@ AC_DEFUN([gl_STDINT_H],
AC_LANG_PROGRAM([[
#include <stddef.h>
#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
-#include FULL_PATH_STDINT_H
+#include ABSOLUTE_STDINT_H
#ifdef INT8_MAX
int8_t a1 = INT8_MAX;
#endif
Index: m4/strndup.m4
===================================================================
RCS file: /fetish/cu/m4/strndup.m4,v
retrieving revision 1.6
diff -p -u -r1.6 strndup.m4
--- m4/strndup.m4 10 Jun 2006 09:01:42 -0000 1.6
+++ m4/strndup.m4 9 Jul 2006 16:33:59 -0000
@@ -1,4 +1,4 @@
-# strndup.m4 serial 6
+# strndup.m4 serial 7
dnl Copyright (C) 2002-2003, 2005-2006 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -27,13 +27,15 @@ AC_DEFUN([gl_FUNC_STRNDUP],
return s[13] != '\0';]])],
[gl_cv_func_strndup=yes],
[gl_cv_func_strndup=no],
- [AC_EGREP_CPP([too risky], [
+ [AC_CHECK_FUNC([strndup],
+ [AC_EGREP_CPP([too risky], [
#ifdef _AIX
- too risky
+ too risky
#endif
- ],
- [gl_cv_func_strndup=no],
- [gl_cv_func_strndup=yes])])])
+ ],
+ [gl_cv_func_strndup=no],
+ [gl_cv_func_strndup=yes])],
+ [gl_cv_func_strndup=no])])])
if test $gl_cv_func_strndup = yes; then
AC_DEFINE([HAVE_STRNDUP], 1,
[Define if you have the strndup() function and it works.])
Index: m4/strtod.m4
===================================================================
RCS file: /fetish/cu/m4/strtod.m4,v
retrieving revision 1.5
diff -p -u -r1.5 strtod.m4
--- m4/strtod.m4 23 Jan 2005 09:07:57 -0000 1.5
+++ m4/strtod.m4 9 Jul 2006 16:33:59 -0000
@@ -1,5 +1,5 @@
-# strtod.m4 serial 4
-dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
+# strtod.m4 serial 5
+dnl Copyright (C) 2002, 2003, 2006 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -16,7 +16,4 @@ AC_DEFUN([gl_FUNC_STRTOD],
# Prerequisites of lib/strtod.c.
# The need for pow() is already handled by AC_FUNC_STRTOD.
-AC_DEFUN([gl_PREREQ_STRTOD], [
- AC_REQUIRE([AC_HEADER_STDC])
- AC_CHECK_FUNCS_ONCE(isascii)
-])
+AC_DEFUN([gl_PREREQ_STRTOD], [:])
Index: m4/strtol.m4
===================================================================
RCS file: /fetish/cu/m4/strtol.m4,v
retrieving revision 1.3
diff -p -u -r1.3 strtol.m4
--- m4/strtol.m4 23 Jan 2005 09:07:57 -0000 1.3
+++ m4/strtol.m4 9 Jul 2006 16:33:59 -0000
@@ -1,5 +1,5 @@
-# strtol.m4 serial 3
-dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# strtol.m4 serial 4
+dnl Copyright (C) 2002, 2003, 2006 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -7,13 +7,4 @@ dnl with or without modifications, as lo
AC_DEFUN([gl_FUNC_STRTOL],
[
AC_REPLACE_FUNCS(strtol)
- if test $ac_cv_func_strtol = no; then
- gl_PREREQ_STRTOL
- fi
-])
-
-# Prerequisites of lib/strtol.c.
-AC_DEFUN([gl_PREREQ_STRTOL], [
- AC_REQUIRE([AC_HEADER_STDC])
- AC_CHECK_FUNCS_ONCE(isascii)
])
Index: m4/strtoul.m4
===================================================================
RCS file: /fetish/cu/m4/strtoul.m4,v
retrieving revision 1.2
diff -p -u -r1.2 strtoul.m4
--- m4/strtoul.m4 23 Jan 2005 09:07:57 -0000 1.2
+++ m4/strtoul.m4 9 Jul 2006 16:33:59 -0000
@@ -1,5 +1,5 @@
-# strtoul.m4 serial 2
-dnl Copyright (C) 2002 Free Software Foundation, Inc.
+# strtoul.m4 serial 3
+dnl Copyright (C) 2002, 2006 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -7,12 +7,4 @@ dnl with or without modifications, as lo
AC_DEFUN([gl_FUNC_STRTOUL],
[
AC_REPLACE_FUNCS(strtoul)
- if test $ac_cv_func_strtoul = no; then
- gl_PREREQ_STRTOUL
- fi
-])
-
-# Prerequisites of lib/strtoul.c.
-AC_DEFUN([gl_PREREQ_STRTOUL], [
- gl_PREREQ_STRTOL
])
Index: m4/xstrtol.m4
===================================================================
RCS file: /fetish/cu/m4/xstrtol.m4,v
retrieving revision 1.6
diff -p -u -r1.6 xstrtol.m4
--- m4/xstrtol.m4 21 Mar 2005 22:27:46 -0000 1.6
+++ m4/xstrtol.m4 9 Jul 2006 16:33:59 -0000
@@ -1,5 +1,5 @@
-#serial 7
-dnl Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+#serial 8
+dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -25,9 +25,8 @@ AC_DEFUN([gl_PREREQ_XSTRTOL_H],
AC_DEFUN([gl_PREREQ_XSTRTOL],
[
AC_REQUIRE([gl_PREREQ_XSTRTOL_H])
- AC_REQUIRE([AC_HEADER_STDC])
- AC_CHECK_FUNCS_ONCE(isascii)
- AC_CHECK_DECLS([strtoimax, strtoumax])
+ AC_CHECK_DECLS_ONCE([strtoimax])
+ AC_CHECK_DECLS_ONCE([strtoumax])
])
# Prerequisites of lib/xstrtoul.c.
Index: src/csplit.c
===================================================================
RCS file: /fetish/cu/src/csplit.c,v
retrieving revision 1.149
diff -p -u -r1.149 csplit.c
--- src/csplit.c 12 Apr 2006 07:37:11 -0000 1.149
+++ src/csplit.c 9 Jul 2006 16:33:59 -0000
@@ -1273,7 +1273,7 @@ get_format_conv_type (char **format_ptr)
break;
default:
- if (ISPRINT (ch))
+ if (isprint (ch))
error (EXIT_FAILURE, 0,
_("invalid conversion specifier in suffix: %c"), ch);
else
Index: src/cut.c
===================================================================
RCS file: /fetish/cu/src/cut.c,v
retrieving revision 1.125
diff -p -u -r1.125 cut.c
--- src/cut.c 12 Aug 2005 07:16:25 -0000 1.125
+++ src/cut.c 9 Jul 2006 16:33:59 -0000
@@ -372,7 +372,7 @@ set_fields (const char *fieldstr)
else
initial = 1;
}
- else if (*fieldstr == ',' || ISBLANK (*fieldstr) || *fieldstr == '\0')
+ else if (*fieldstr == ',' || isblank (*fieldstr) || *fieldstr == '\0')
{
in_digits = false;
/* Ending the string, or this field/byte sublist. */
Index: src/dd.c
===================================================================
RCS file: /fetish/cu/src/dd.c,v
retrieving revision 1.194
diff -p -u -r1.194 dd.c
--- src/dd.c 8 Jul 2006 06:04:18 -0000 1.194
+++ src/dd.c 9 Jul 2006 16:33:59 -0000
@@ -977,15 +977,13 @@ apply_translations (void)
if (conversions_mask & C_UCASE)
{
for (i = 0; i < 256; i++)
- if (ISLOWER (trans_table[i]))
- trans_table[i] = TOUPPER (trans_table[i]);
+ trans_table[i] = toupper (trans_table[i]);
translation_needed = true;
}
else if (conversions_mask & C_LCASE)
{
for (i = 0; i < 256; i++)
- if (ISUPPER (trans_table[i]))
- trans_table[i] = TOLOWER (trans_table[i]);
+ trans_table[i] = tolower (trans_table[i]);
translation_needed = true;
}
Index: src/dircolors.c
===================================================================
RCS file: /fetish/cu/src/dircolors.c,v
retrieving revision 1.98
diff -p -u -r1.98 dircolors.c
--- src/dircolors.c 26 Mar 2006 12:06:05 -0000 1.98
+++ src/dircolors.c 9 Jul 2006 16:33:59 -0000
@@ -155,8 +155,8 @@ parse_line (char const *line, char **key
*keyword = NULL;
*arg = NULL;
- for (p = line; ISSPACE (to_uchar (*p)); ++p)
- ;
+ for (p = line; isspace (to_uchar (*p)); ++p)
+ continue;
/* Ignore blank lines and shell-style comments. */
if (*p == '\0' || *p == '#')
@@ -164,7 +164,7 @@ parse_line (char const *line, char **key
keyword_start = p;
- while (!ISSPACE (to_uchar (*p)) && *p != '\0')
+ while (!isspace (to_uchar (*p)) && *p != '\0')
{
++p;
}
@@ -177,7 +177,7 @@ parse_line (char const *line, char **key
{
++p;
}
- while (ISSPACE (to_uchar (*p)));
+ while (isspace (to_uchar (*p)));
if (*p == '\0' || *p == '#')
return;
@@ -187,10 +187,8 @@ parse_line (char const *line, char **key
while (*p != '\0' && *p != '#')
++p;
- for (--p; ISSPACE (to_uchar (*p)); --p)
- {
- /* empty */
- }
+ for (--p; isspace (to_uchar (*p)); --p)
+ continue;
++p;
*arg = xstrndup (arg_start, p - arg_start);
Index: src/echo.c
===================================================================
RCS file: /fetish/cu/src/echo.c,v
retrieving revision 1.61
diff -p -u -r1.61 echo.c
--- src/echo.c 14 May 2005 07:58:37 -0000 1.61
+++ src/echo.c 9 Jul 2006 16:33:59 -0000
@@ -218,12 +218,12 @@ just_echo:
case 'x':
{
unsigned char ch = *s;
- if (! ISXDIGIT (ch))
+ if (! isxdigit (ch))
goto not_an_escape;
s++;
c = hextobin (ch);
ch = *s;
- if (ISXDIGIT (ch))
+ if (isxdigit (ch))
{
s++;
c = c * 16 + hextobin (ch);
Index: src/expand.c
===================================================================
RCS file: /fetish/cu/src/expand.c,v
retrieving revision 1.90
diff -p -u -r1.90 expand.c
--- src/expand.c 24 Oct 2005 07:28:45 -0000 1.90
+++ src/expand.c 9 Jul 2006 16:33:59 -0000
@@ -157,7 +157,7 @@ parse_tab_stops (char const *stops)
for (; *stops; stops++)
{
- if (*stops == ',' || ISBLANK (to_uchar (*stops)))
+ if (*stops == ',' || isblank (to_uchar (*stops)))
{
if (have_tabval)
add_tab_stop (tabval);
@@ -352,7 +352,7 @@ expand (void)
error (EXIT_FAILURE, 0, _("input line is too long"));
}
- convert &= convert_entire_line | ISBLANK (c);
+ convert &= convert_entire_line | !! isblank (c);
}
if (c < 0)
Index: src/fmt.c
===================================================================
RCS file: /fetish/cu/src/fmt.c,v
retrieving revision 1.93
diff -p -u -r1.93 fmt.c
--- src/fmt.c 14 May 2005 07:58:37 -0000 1.93
+++ src/fmt.c 9 Jul 2006 16:33:59 -0000
@@ -1,5 +1,5 @@
/* GNU fmt -- simple text formatter.
- Copyright (C) 1994-2005 Free Software Foundation, Inc.
+ Copyright (C) 1994-2006 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -668,7 +668,7 @@ get_line (FILE *f, int c)
*wptr++ = c;
c = getc (f);
}
- while (c != EOF && !ISSPACE (c));
+ while (c != EOF && !isspace (c));
in_column += word_limit->length = wptr - word_limit->text;
check_punctuation (word_limit);
@@ -756,7 +756,7 @@ check_punctuation (WORD *w)
unsigned char fin = *finish;
w->paren = isopen (*start);
- w->punct = ISPUNCT (fin);
+ w->punct = !! ispunct (fin);
while (start < finish && isclose (*finish))
finish--;
w->period = isperiod (*finish);
Index: src/fold.c
===================================================================
RCS file: /fetish/cu/src/fold.c,v
retrieving revision 1.86
diff -p -u -r1.86 fold.c
--- src/fold.c 12 Aug 2005 07:29:38 -0000 1.86
+++ src/fold.c 9 Jul 2006 16:33:59 -0000
@@ -176,7 +176,7 @@ fold_file (char *filename, size_t width)
while (logical_end)
{
--logical_end;
- if (ISBLANK (line_out[logical_end]))
+ if (isblank (to_uchar (line_out[logical_end])))
{
found_blank = true;
break;
Index: src/join.c
===================================================================
RCS file: /fetish/cu/src/join.c,v
retrieving revision 1.145
diff -p -u -r1.145 join.c
--- src/join.c 21 Feb 2006 02:55:31 -0000 1.145
+++ src/join.c 9 Jul 2006 16:33:59 -0000
@@ -174,14 +174,6 @@ E.g., use `sort -k 1b,1' if `join' has n
exit (status);
}
-/* Return true if C is a blank (a default input field separator). */
-
-static inline bool
-is_blank (unsigned char c)
-{
- return ISBLANK (c) != 0;
-}
-
/* Record a field in LINE, with location FIELD and size LEN. */
static void
@@ -216,19 +208,19 @@ xfields (struct line *line)
else
{
/* Skip leading blanks before the first field. */
- while (is_blank (*ptr))
+ while (isblank (to_uchar (*ptr)))
if (++ptr == lim)
return;
do
{
char *sep;
- for (sep = ptr + 1; sep != lim && ! is_blank (*sep); sep++)
+ for (sep = ptr + 1; sep != lim && ! isblank (to_uchar (*sep)); sep++)
continue;
extract_field (line, ptr, sep - ptr);
if (sep == lim)
return;
- for (ptr = sep + 1; ptr != lim && is_blank (*ptr); ptr++)
+ for (ptr = sep + 1; ptr != lim && isblank (to_uchar (*ptr)); ptr++)
continue;
}
while (ptr != lim);
Index: src/ls.c
===================================================================
RCS file: /fetish/cu/src/ls.c,v
retrieving revision 1.417
diff -p -u -r1.417 ls.c
--- src/ls.c 5 Jul 2006 10:17:24 -0000 1.417
+++ src/ls.c 9 Jul 2006 16:34:00 -0000
@@ -3659,7 +3659,7 @@ quote_name (FILE *out, const char *name,
while (p < plimit)
{
- if (! ISPRINT (to_uchar (*p)))
+ if (! isprint (to_uchar (*p)))
*p = '?';
p++;
}
@@ -3680,7 +3680,7 @@ quote_name (FILE *out, const char *name,
displayed_width = 0;
while (p < plimit)
{
- if (ISPRINT (to_uchar (*p)))
+ if (isprint (to_uchar (*p)))
displayed_width++;
p++;
}
Index: src/md5sum.c
===================================================================
RCS file: /fetish/cu/src/md5sum.c,v
retrieving revision 1.145
diff -p -u -r1.145 md5sum.c
--- src/md5sum.c 24 Jun 2006 05:31:42 -0000 1.145
+++ src/md5sum.c 9 Jul 2006 16:34:00 -0000
@@ -348,7 +348,7 @@ hex_digits (unsigned char const *s)
{
while (*s)
{
- if (!ISXDIGIT (*s))
+ if (!isxdigit (*s))
return false;
++s;
}
@@ -513,9 +513,9 @@ digest_check (const char *checkfile_name
in check file. Ignore case of hex digits. */
for (cnt = 0; cnt < digest_bin_bytes; ++cnt)
{
- if (TOLOWER (hex_digest[2 * cnt])
+ if (tolower (hex_digest[2 * cnt])
!= bin2hex[bin_buffer[cnt] >> 4]
- || (TOLOWER (hex_digest[2 * cnt + 1])
+ || (tolower (hex_digest[2 * cnt + 1])
!= (bin2hex[bin_buffer[cnt] & 0xf])))
break;
}
Index: src/od.c
===================================================================
RCS file: /fetish/cu/src/od.c,v
retrieving revision 1.169
diff -p -u -r1.169 od.c
--- src/od.c 2 Feb 2006 07:44:57 -0000 1.169
+++ src/od.c 9 Jul 2006 16:34:00 -0000
@@ -497,7 +497,7 @@ dump_hexl_mode_trailer (size_t n_bytes,
for (i = n_bytes; i > 0; i--)
{
unsigned char c = *block++;
- unsigned char c2 = (ISPRINT(c) ? c : '.');
+ unsigned char c2 = (isprint (c) ? c : '.');
putchar (c2);
}
putchar ('<');
@@ -576,7 +576,7 @@ print_ascii (size_t n_bytes, void const
break;
default:
- sprintf (buf, (ISPRINT (c) ? " %c" : "%03o"), c);
+ sprintf (buf, (isprint (c) ? " %c" : "%03o"), c);
s = buf;
}
@@ -1469,7 +1469,7 @@ dump_strings (void)
free (buf);
return ok;
}
- if (!ISPRINT (c))
+ if (! isprint (c))
/* Found a non-printing. Try again starting with next char. */
goto tryline;
buf[i] = c;
@@ -1492,7 +1492,7 @@ dump_strings (void)
}
if (c == '\0')
break; /* It is; print this string. */
- if (!ISPRINT (c))
+ if (! isprint (c))
goto tryline; /* It isn't; give up on this string. */
buf[i++] = c; /* String continues; store it all. */
}
Index: src/pinky.c
===================================================================
RCS file: /fetish/cu/src/pinky.c,v
retrieving revision 1.50
diff -p -u -r1.50 pinky.c
--- src/pinky.c 22 Sep 2005 07:01:07 -0000 1.50
+++ src/pinky.c 9 Jul 2006 16:34:00 -0000
@@ -134,8 +134,8 @@ create_fullname (const char *gecos_name,
if (*gecos_name == '&')
{
const char *uname = user_name;
- if (ISLOWER (*uname))
- *r++ = TOUPPER (*uname++);
+ if (islower (to_uchar (*uname)))
+ *r++ = toupper (to_uchar (*uname++));
while (*uname)
*r++ = *uname++;
}
Index: src/pr.c
===================================================================
RCS file: /fetish/cu/src/pr.c,v
retrieving revision 1.158
diff -p -u -r1.158 pr.c
--- src/pr.c 18 Feb 2006 07:21:50 -0000 1.158
+++ src/pr.c 9 Jul 2006 16:34:00 -0000
@@ -2326,7 +2326,7 @@ print_char (char c)
print_white_space ();
/* Nonprintables are assumed to have width 0, except '\b'. */
- if (!ISPRINT (to_uchar (c)))
+ if (! isprint (to_uchar (c)))
{
if (c == '\b')
--output_position;
@@ -2685,7 +2685,7 @@ char_to_clump (char c)
}
}
- else if (!ISPRINT (uc))
+ else if (! isprint (uc))
{
if (use_esc_sequence)
{
Index: src/printf.c
===================================================================
RCS file: /fetish/cu/src/printf.c,v
retrieving revision 1.102
diff -p -u -r1.102 printf.c
--- src/printf.c 3 Jul 2005 08:46:05 -0000 1.102
+++ src/printf.c 9 Jul 2006 16:34:00 -0000
@@ -250,7 +250,7 @@ print_esc (const char *escstart, bool oc
{
/* A hexadecimal \xhh escape sequence must have 1 or 2 hex. digits. */
for (esc_length = 0, ++p;
- esc_length < 2 && ISXDIGIT (*p);
+ esc_length < 2 && isxdigit (to_uchar (*p));
++esc_length, ++p)
esc_value = esc_value * 16 + hextobin (*p);
if (esc_length == 0)
@@ -280,7 +280,7 @@ print_esc (const char *escstart, bool oc
esc_length > 0;
--esc_length, ++p)
{
- if (!ISXDIGIT (*p))
+ if (! isxdigit (to_uchar (*p)))
error (EXIT_FAILURE, 0, _("missing hexadecimal number in escape"));
uni_value = uni_value * 16 + hextobin (*p);
}
Index: src/ptx.c
===================================================================
RCS file: /fetish/cu/src/ptx.c,v
retrieving revision 1.55
diff -p -u -r1.55 ptx.c
--- src/ptx.c 17 Apr 2006 23:17:11 -0000 1.55
+++ src/ptx.c 9 Jul 2006 16:34:00 -0000
@@ -180,15 +180,15 @@ static BLOCK text_buffer; /* file to stu
/* SKIP_NON_WHITE used only for getting or skipping the reference. */
#define SKIP_NON_WHITE(cursor, limit) \
- while (cursor < limit && !ISSPACE(*cursor)) \
+ while (cursor < limit && ! isspace (to_uchar (*cursor))) \
cursor++
#define SKIP_WHITE(cursor, limit) \
- while (cursor < limit && ISSPACE(*cursor)) \
+ while (cursor < limit && isspace (to_uchar (*cursor))) \
cursor++
#define SKIP_WHITE_BACKWARDS(cursor, start) \
- while (cursor > start && ISSPACE(cursor[-1]))
\
+ while (cursor > start && isspace (to_uchar (cursor[-1]))) \
cursor--
#define SKIP_SOMETHING(cursor, limit) \
@@ -319,7 +319,7 @@ copy_unescaped_string (const char *strin
case 'x': /* \xhhh escape, 3 chars maximum */
value = 0;
for (length = 0, string++;
- length < 3 && ISXDIGIT (*string);
+ length < 3 && isxdigit (to_uchar (*string));
length++, string++)
value = value * 16 + HEXTOBIN (*string);
if (length == 0)
@@ -442,7 +442,7 @@ initialize_regex (void)
if (ignore_case)
for (character = 0; character < CHAR_SET_SIZE; character++)
- folded_chars[character] = TOUPPER (character);
+ folded_chars[character] = toupper (character);
/* Unless the user already provided a description of the end of line or
end of sentence sequence, select an end of line sequence to compile.
@@ -482,7 +482,7 @@ initialize_regex (void)
/* Simulate \w+. */
for (character = 0; character < CHAR_SET_SIZE; character++)
- word_fastmap[character] = ISALPHA (character) ? 1 : 0;
+ word_fastmap[character] = !! isalpha (character);
}
else
{
@@ -1370,7 +1370,7 @@ fix_output_parameters (void)
form feed as a space character, but we do. */
for (character = 0; character < CHAR_SET_SIZE; character++)
- edited_flag[character] = ISSPACE (character) != 0;
+ edited_flag[character] = !! isspace (character);
edited_flag['\f'] = 1;
/* Complete the special character flagging according to selected output
Index: src/pwd.c
===================================================================
RCS file: /fetish/cu/src/pwd.c,v
retrieving revision 1.61
diff -p -u -r1.61 pwd.c
--- src/pwd.c 28 Jun 2006 22:21:48 -0000 1.61
+++ src/pwd.c 9 Jul 2006 16:34:01 -0000
@@ -210,7 +210,7 @@ find_dir_entry (struct stat *dot_sb, str
match is enough. */
if ( ! use_lstat || ent_sb.st_dev == dot_sb->st_dev)
{
- file_name_prepend (file_name, dp->d_name, NLENGTH (dp));
+ file_name_prepend (file_name, dp->d_name, _D_EXACT_NAMLEN (dp));
found = true;
break;
}
Index: src/sort.c
===================================================================
RCS file: /fetish/cu/src/sort.c,v
retrieving revision 1.337
diff -p -u -r1.337 sort.c
--- src/sort.c 28 Jun 2006 23:51:13 -0000 1.337
+++ src/sort.c 9 Jul 2006 16:34:01 -0000
@@ -580,10 +580,10 @@ inittables (void)
for (i = 0; i < UCHAR_LIM; ++i)
{
- blanks[i] = !!ISBLANK (i);
- nonprinting[i] = !ISPRINT (i);
- nondictionary[i] = !ISALNUM (i) && !ISBLANK (i);
- fold_toupper[i] = (ISLOWER (i) ? toupper (i) : i);
+ blanks[i] = !! isblank (i);
+ nonprinting[i] = ! isprint (i);
+ nondictionary[i] = ! isalnum (i) && ! isblank (i);
+ fold_toupper[i] = toupper (i);
}
#if HAVE_NL_LANGINFO
Index: src/stat.c
===================================================================
RCS file: /fetish/cu/src/stat.c,v
retrieving revision 1.93
diff -p -u -r1.93 stat.c
--- src/stat.c 17 Apr 2006 23:23:43 -0000 1.93
+++ src/stat.c 9 Jul 2006 16:34:01 -0000
@@ -653,13 +653,13 @@ print_it (char const *format, char const
putchar (esc_value);
--b;
}
- else if (*b == 'x' && ISXDIGIT (b[1]))
+ else if (*b == 'x' && isxdigit (to_uchar (b[1])))
{
int esc_value = hextobin (b[1]); /* Value of \xhh escape. */
/* A hexadecimal \xhh escape sequence must have
1 or 2 hex. digits. */
++b;
- if (ISXDIGIT (b[1]))
+ if (isxdigit (to_uchar (b[1])))
{
++b;
esc_value = esc_value * 16 + hextobin (*b);
Index: src/system.h
===================================================================
RCS file: /fetish/cu/src/system.h,v
retrieving revision 1.148
diff -p -u -r1.148 system.h
--- src/system.h 2 Jul 2006 07:09:25 -0000 1.148
+++ src/system.h 9 Jul 2006 16:34:01 -0000
@@ -226,20 +226,14 @@ initialize_exit_failure (int status)
#if HAVE_DIRENT_H
# include <dirent.h>
-# define NLENGTH(direct) (strlen((direct)->d_name))
-#else /* not HAVE_DIRENT_H */
+# ifndef _D_EXACT_NAMLEN
+# define _D_EXACT_NAMLEN(dp) strlen ((dp)->d_name)
+# endif
+#else
# define dirent direct
-# define NLENGTH(direct) ((direct)->d_namlen)
-# if HAVE_SYS_NDIR_H
-# include <sys/ndir.h>
-# endif /* HAVE_SYS_NDIR_H */
-# if HAVE_SYS_DIR_H
-# include <sys/dir.h>
-# endif /* HAVE_SYS_DIR_H */
-# if HAVE_NDIR_H
-# include <ndir.h>
-# endif /* HAVE_NDIR_H */
-#endif /* HAVE_DIRENT_H */
+# define _D_EXACT_NAMLEN(dp) (dp)->d_namlen
+# include <ndir.h>
+#endif
enum
{
@@ -247,7 +241,7 @@ enum
};
#ifdef D_INO_IN_DIRENT
-# define D_INO(dp) ((dp)->d_ino)
+# define D_INO(dp) (dp)->d_ino
#else
/* Some systems don't have inodes, so fake them to avoid lots of ifdefs. */
# define D_INO(dp) NOT_AN_INODE_NUMBER
@@ -362,70 +356,16 @@ enum
#include <ctype.h>
-/* Jim Meyering writes:
-
- "... Some ctype macros are valid only for character codes that
- isascii says are ASCII (SGI's IRIX-4.0.5 is one such system --when
- using /bin/cc or gcc but without giving an ansi option). So, all
- ctype uses should be through macros like ISPRINT... If
- STDC_HEADERS is defined, then autoconf has verified that the ctype
- macros don't need to be guarded with references to isascii. ...
- Defining isascii to 1 should let any compiler worth its salt
- eliminate the && through constant folding."
-
- Bruno Haible adds:
-
- "... Furthermore, isupper(c) etc. have an undefined result if c is
- outside the range -1 <= c <= 255. One is tempted to write isupper(c)
- with c being of type `char', but this is wrong if c is an 8-bit
- character >= 128 which gets sign-extended to a negative value.
- The macro ISUPPER protects against this as well." */
-
-#if STDC_HEADERS || (!defined isascii && !HAVE_ISASCII)
-# define IN_CTYPE_DOMAIN(c) 1
-#else
-# define IN_CTYPE_DOMAIN(c) isascii(c)
-#endif
-
-#ifdef isblank
-# define ISBLANK(c) (IN_CTYPE_DOMAIN (c) && isblank (c))
-#else
-# define ISBLANK(c) ((c) == ' ' || (c) == '\t')
-#endif
-#ifdef isgraph
-# define ISGRAPH(c) (IN_CTYPE_DOMAIN (c) && isgraph (c))
-#else
-# define ISGRAPH(c) (IN_CTYPE_DOMAIN (c) && isprint (c) && !isspace (c))
-#endif
-
-/* This is defined in <sys/euc.h> on at least Solaris2.6 systems. */
-#undef ISPRINT
-
-#define ISPRINT(c) (IN_CTYPE_DOMAIN (c) && isprint (c))
-#define ISALNUM(c) (IN_CTYPE_DOMAIN (c) && isalnum (c))
-#define ISALPHA(c) (IN_CTYPE_DOMAIN (c) && isalpha (c))
-#define ISCNTRL(c) (IN_CTYPE_DOMAIN (c) && iscntrl (c))
-#define ISLOWER(c) (IN_CTYPE_DOMAIN (c) && islower (c))
-#define ISPUNCT(c) (IN_CTYPE_DOMAIN (c) && ispunct (c))
-#define ISSPACE(c) (IN_CTYPE_DOMAIN (c) && isspace (c))
-#define ISUPPER(c) (IN_CTYPE_DOMAIN (c) && isupper (c))
-#define ISXDIGIT(c) (IN_CTYPE_DOMAIN (c) && isxdigit (c))
-#define ISDIGIT_LOCALE(c) (IN_CTYPE_DOMAIN (c) && isdigit (c))
-
-#if STDC_HEADERS
-# define TOLOWER(Ch) tolower (Ch)
-# define TOUPPER(Ch) toupper (Ch)
-#else
-# define TOLOWER(Ch) (ISUPPER (Ch) ? tolower (Ch) : (Ch))
-# define TOUPPER(Ch) (ISLOWER (Ch) ? toupper (Ch) : (Ch))
+#if ! (defined isblank || HAVE_DECL_ISBLANK)
+# define isblank(c) ((c) == ' ' || (c) == '\t')
#endif
-/* ISDIGIT differs from ISDIGIT_LOCALE, as follows:
- - Its arg may be any int or unsigned int; it need not be an unsigned char.
- - It's guaranteed to evaluate its argument exactly once.
+/* ISDIGIT differs from isdigit, as follows:
+ - Its arg may be any int or unsigned int; it need not be an unsigned char
+ or EOF.
- It's typically faster.
POSIX says that only '0' through '9' are digits. Prefer ISDIGIT to
- ISDIGIT_LOCALE unless it's important to use the locale's definition
+ isdigit unless it's important to use the locale's definition
of `digit' even when the host does not conform to POSIX. */
#define ISDIGIT(c) ((unsigned int) (c) - '0' <= 9)
Index: src/test.c
===================================================================
RCS file: /fetish/cu/src/test.c,v
retrieving revision 1.126
diff -p -u -r1.126 test.c
--- src/test.c 11 Jan 2006 19:29:47 -0000 1.126
+++ src/test.c 9 Jul 2006 16:34:01 -0000
@@ -134,7 +134,7 @@ find_int (char const *string)
char const *p;
char const *number_start;
- for (p = string; ISBLANK (to_uchar (*p)); p++)
+ for (p = string; isblank (to_uchar (*p)); p++)
continue;
if (*p == '+')
@@ -152,7 +152,7 @@ find_int (char const *string)
{
while (ISDIGIT (*p))
p++;
- while (ISBLANK (to_uchar (*p)))
+ while (isblank (to_uchar (*p)))
p++;
if (!*p)
return number_start;
Index: src/tr.c
===================================================================
RCS file: /fetish/cu/src/tr.c,v
retrieving revision 1.144
diff -p -u -r1.144 tr.c
--- src/tr.c.~1.144.~ 2005-07-11 11:27:10.000000000 -0700
+++ src/tr.c 2006-07-09 09:52:34.000000000 -0700
@@ -1,5 +1,5 @@
/* tr -- a filter to translate characters
- Copyright (C) 91, 1995-2005 Free Software Foundation, Inc.
+ Copyright (C) 91, 1995-2006 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -376,51 +376,52 @@ is_equiv_class_member (unsigned char equ
static bool
is_char_class_member (enum Char_class char_class, unsigned char c)
{
- bool result;
+ int result;
switch (char_class)
{
case CC_ALNUM:
- result = ISALNUM (c);
+ result = isalnum (c);
break;
case CC_ALPHA:
- result = ISALPHA (c);
+ result = isalpha (c);
break;
case CC_BLANK:
- result = ISBLANK (c);
+ result = isblank (c);
break;
case CC_CNTRL:
- result = ISCNTRL (c);
+ result = iscntrl (c);
break;
case CC_DIGIT:
- result = ISDIGIT_LOCALE (c);
+ result = isdigit (c);
break;
case CC_GRAPH:
- result = ISGRAPH (c);
+ result = isgraph (c);
break;
case CC_LOWER:
- result = ISLOWER (c);
+ result = islower (c);
break;
case CC_PRINT:
- result = ISPRINT (c);
+ result = isprint (c);
break;
case CC_PUNCT:
- result = ISPUNCT (c);
+ result = ispunct (c);
break;
case CC_SPACE:
- result = ISSPACE (c);
+ result = isspace (c);
break;
case CC_UPPER:
- result = ISUPPER (c);
+ result = isupper (c);
break;
case CC_XDIGIT:
- result = ISXDIGIT (c);
+ result = isxdigit (c);
break;
default:
abort ();
break;
}
- return result;
+
+ return !! result;
}
static void
@@ -569,7 +570,7 @@ make_printable_char (unsigned char c)
{
char *buf = xmalloc (5);
- if (ISPRINT (c))
+ if (isprint (c))
{
buf[0] = c;
buf[1] = '\0';
@@ -630,7 +631,7 @@ make_printable_str (char const *s, size_
tmp = "\\v";
break;
default:
- if (ISPRINT (c))
+ if (isprint (c))
{
buf[0] = c;
buf[1] = '\0';
@@ -1846,13 +1847,13 @@ main (int argc, char **argv)
if (class_s1 == UL_LOWER && class_s2 == UL_UPPER)
{
for (i = 0; i < N_CHARS; i++)
- if (ISLOWER (i))
+ if (islower (i))
xlate[i] = toupper (i);
}
else if (class_s1 == UL_UPPER && class_s2 == UL_LOWER)
{
for (i = 0; i < N_CHARS; i++)
- if (ISUPPER (i))
+ if (isupper (i))
xlate[i] = tolower (i);
}
else if ((class_s1 == UL_LOWER && class_s2 == UL_LOWER)
Index: src/unexpand.c
===================================================================
RCS file: /fetish/cu/src/unexpand.c,v
retrieving revision 1.97
diff -p -u -r1.97 unexpand.c
--- src/unexpand.c 6 Feb 2006 07:58:53 -0000 1.97
+++ src/unexpand.c 9 Jul 2006 16:34:01 -0000
@@ -176,7 +176,7 @@ parse_tab_stops (char const *stops)
for (; *stops; stops++)
{
- if (*stops == ',' || ISBLANK (to_uchar (*stops)))
+ if (*stops == ',' || isblank (to_uchar (*stops)))
{
if (have_tabval)
add_tab_stop (tabval);
@@ -348,7 +348,7 @@ unexpand (void)
if (convert)
{
- bool blank = ISBLANK (c);
+ bool blank = !! isblank (c);
if (blank)
{
Index: src/uniq.c
===================================================================
RCS file: /fetish/cu/src/uniq.c,v
retrieving revision 1.127
diff -p -u -r1.127 uniq.c
--- src/uniq.c 18 Feb 2006 07:45:27 -0000 1.127
+++ src/uniq.c 9 Jul 2006 16:34:01 -0000
@@ -198,9 +198,9 @@ find_field (const struct linebuffer *lin
for (count = 0; count < skip_fields && i < size; count++)
{
- while (i < size && ISBLANK (lp[i]))
+ while (i < size && isblank (lp[i]))
i++;
- while (i < size && !ISBLANK (lp[i]))
+ while (i < size && !isblank (lp[i]))
i++;
}
Index: src/wc.c
===================================================================
RCS file: /fetish/cu/src/wc.c,v
retrieving revision 1.110
diff -p -u -r1.110 wc.c
--- src/wc.c 26 Jun 2006 08:39:59 -0000 1.110
+++ src/wc.c 9 Jul 2006 16:34:01 -0000
@@ -38,14 +38,10 @@
#endif
#if !defined iswspace && !HAVE_ISWSPACE
# define iswspace(wc) \
- ((wc) == to_uchar (wc) && ISSPACE (to_uchar (wc)))
+ ((wc) == to_uchar (wc) && isspace (to_uchar (wc)))
#endif
-/* Include this after wctype.h so that we `#undef' ISPRINT
- (from Solaris's euc.h, from widec.h, from wctype.h) before
- redefining and using it. */
#include "system.h"
-
#include "error.h"
#include "inttostr.h"
#include "quote.h"
@@ -474,10 +470,10 @@ wc (int fd, char const *file_x, struct f
in_word = false;
break;
default:
- if (ISPRINT (to_uchar (p[-1])))
+ if (isprint (to_uchar (p[-1])))
{
linepos++;
- if (ISSPACE (to_uchar (p[-1])))
+ if (isspace (to_uchar (p[-1])))
goto word_separator;
in_word = true;
}
--- /dev/null 2005-09-24 22:00:15.000000000 -0700
+++ m4/absolute-header.m4 2006-07-04 00:27:33.000000000 -0700
@@ -0,0 +1,43 @@
+# absolute-header.m4 serial 4
+dnl Copyright (C) 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Derek Price.
+
+# gl_ABSOLUTE_HEADER(HEADER1 HEADER2 ...)
+# ---------------------------------------
+# Find the absolute name of a header file, assuming the header exists.
+# If the header were sys/inttypes.h, this macro would define
+# ABSOLUTE_SYS_INTTYPES_H to the `<>' quoted absolute name of sys/inttypes.h
+# in config.h
+# (e.g. `#define ABSOLUTE_SYS_INTTYPES_H <///usr/include/sys/inttypes.h>').
+# The three "///" are to pacify Sun C 5.8, which otherwise would say
+# "warning: #include of /usr/include/... may be non-portable".
+AC_DEFUN([gl_ABSOLUTE_HEADER],
+[AC_LANG_PREPROC_REQUIRE()dnl
+AC_FOREACH([gl_HEADER_NAME], [$1],
+ [AS_VAR_PUSHDEF([gl_absolute_header],
+ [gl_cv_absolute_]m4_quote(m4_defn([gl_HEADER_NAME])))dnl
+ AC_CACHE_CHECK([absolute name of <]m4_quote(m4_defn([gl_HEADER_NAME]))[>],
+ m4_quote(m4_defn([gl_absolute_header])),
+ [AS_VAR_PUSHDEF([ac_header_exists],
+ [ac_cv_header_]m4_quote(m4_defn([gl_HEADER_NAME])))dnl
+ AC_CHECK_HEADERS_ONCE(m4_quote(m4_defn([gl_HEADER_NAME])))dnl
+ if test AS_VAR_GET(ac_header_exists) = yes; then
+ AC_LANG_CONFTEST([AC_LANG_SOURCE([[#include
<]]m4_dquote(m4_defn([gl_HEADER_NAME]))[[>]])])
+dnl eval is necessary to expand ac_cpp.
+dnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell.
+ AS_VAR_SET(gl_absolute_header,
+[`(eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
+sed -n
'\#/]m4_quote(m4_defn([gl_HEADER_NAME]))[#{s#.*"\(.*/]m4_quote(m4_defn([gl_HEADER_NAME]))[\)".*#\1#;s#^/[^/]#//&#;p;q;}'`])
+ fi
+ AS_VAR_POPDEF([ac_header_exists])dnl
+ ])dnl
+ AC_DEFINE_UNQUOTED(AS_TR_CPP([ABSOLUTE_]m4_quote(m4_defn([gl_HEADER_NAME]))),
+ [<AS_VAR_GET(gl_absolute_header)>],
+ [Define this to an absolute name of
<]m4_quote(m4_defn([gl_HEADER_NAME]))[>.])
+ AS_VAR_POPDEF([gl_absolute_header])dnl
+])dnl
+])# gl_ABSOLUTE_HEADER
- sync from gnulib to coreutils, mostly for <ctype.h> and <dirent.h>,
Paul Eggert <=