Paul Eggert [Mon, 8 Jan 2007 22:55:35 +0000 (22:55 +0000)]
* m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
WCTYPE_H is empty, for the benefit of builds from non-distclean
directories. Problem reported by Eric Blake in
<http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
Jim Meyering [Mon, 8 Jan 2007 10:32:58 +0000 (10:32 +0000)]
Use a more robust test for a "can't happen" condition.
* lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
narrowed the st_size value. Presuming the "can't happen" condition
is true, that narrowing could conceivably convert an invalid st_size
value into a valid one. Instead, use a change based on Matthew
Woehlke's original patch.
Jim Meyering [Mon, 8 Jan 2007 10:30:47 +0000 (10:30 +0000)]
Slight readability improvement: use an assert-like macro
in place of literal "abort ()" uses.
* lib/fts.c (fts_assert): Define.
(fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
Use this macro instead of a bare 'abort'.
Paul Eggert [Sat, 6 Jan 2007 00:27:48 +0000 (00:27 +0000)]
Don't worry about using IRIX 5.3's wctype.h broken definitions;
simply work around them.
* lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
(iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
(iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before declaring.
Don't bother to define as macros, since the standard doesn't require it.
* m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
longer worry about IRIX 5.3.
(HAVE_WCTYPE_CTMP_BUG): Remove.
Paul Eggert [Thu, 4 Jan 2007 19:21:42 +0000 (19:21 +0000)]
* lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
not wint_t. Also, include <ctype.h>, to fix another IRIX bug.
* m4/wctype.m4 (gl_WCTYPE_H): Likewise.
Problems reported by Georg Schwarz for IRIX 5.3.
Paolo Bonzini [Wed, 3 Jan 2007 10:51:18 +0000 (10:51 +0000)]
2007-01-03 Paolo Bonzini <bonzini@gnu.org>
Yoann Vandoorselaere <yoann.v@prelude-ids.com>
* lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
sockets, server sockets, and other file descriptors. Count errors
to compute the return value. Reorder the code a bit to be easier
to follow. Don't set event bits that were not requested (except
POLLERR and POLLHUP).
Paul Eggert [Sun, 31 Dec 2006 06:29:50 +0000 (06:29 +0000)]
* gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
Rewrite so as not to assume GNU sort. Also, don't assume
the C locale, and avoid an "eval" that could cause trouble.
Paul Eggert [Fri, 29 Dec 2006 19:33:46 +0000 (19:33 +0000)]
* lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
struct stat. Problem reported by Henning Nielsen Lund.
* lib/acl.c: Include acl.h first, to check interface. Don't
bother to include sys/types.h and sys/stat.h again.
Paul Eggert [Tue, 26 Dec 2006 01:51:36 +0000 (01:51 +0000)]
* gnulib-tool (SED): Remove, undoing previous change.
The problem was that it broke coreutils on Solaris, because
"sed --posix" leaked into a makefile.
(sed): New alias, if 'alias' and GNU sed.
Jim Meyering [Sun, 24 Dec 2006 17:08:04 +0000 (17:08 +0000)]
Work around an fchownat bug in glibc-2.4:
http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
in spite of the -P option.
* m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
New macros.
(gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
* modules/openat (Files): Add lib/fchownat.c.
* lib/openat.c (fchownat): Don't define here. Move to...
* lib/fchownat.c: ...this new file.
Paul Eggert [Sun, 24 Dec 2006 07:55:08 +0000 (07:55 +0000)]
Fix bug reported by Bruno Haible in
<http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
where quotearg.c didn't compile on Mac OS X 10.2 because it
lacks <wchar.h> and wint_t.
* lib/wctype_.h (__wctype_wint_t): New type.
Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
(iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
(iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
Arg is now of type __wctype_wint_t, not wint_t.
* m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
substitute HAVE_WINT_T.
* modules/wctype (Files): Add m4/wint_t.m4.
(wctype.h): Substitute HAVE_WINT_T.