Paul Eggert [Tue, 10 Dec 2002 19:41:28 +0000 (19:41 +0000)]
(FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
defined (e.g., a pure POSIX system).
(EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
Paul Eggert [Fri, 6 Dec 2002 19:28:32 +0000 (19:28 +0000)]
Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
a pain in practice to deal with generated m4 files. This change
goes together with the 2002-12-04 unlocked-io.h change in ../lib.
Jim Meyering [Fri, 6 Dec 2002 08:00:45 +0000 (08:00 +0000)]
Merge in changes from libc's misc/error.c, in preparation
for the merge of gnulib's changes back into libc.
(_): Define only if not already defined.
Move definition to follow all #include directives.
Include unlocked-io.h only if !_LIBC.
[_LIBC]: Include <libio/libioP.h>.
[USE_IN_LIBIO]: Include <libio/iolibio.h>
(fflush): Tweak definition to use INTUSE.
(putc): Define.
Paul Eggert [Thu, 5 Dec 2002 20:46:03 +0000 (20:46 +0000)]
[defined emacs]: Include "lisp.h".
(xalloc_die) [defined emacs]: New macro.
(free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
[! defined emacs]: Include <xalloc.h>.
(POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
(pointer): Typedef to POINTER_TYPE *.
(malloc): Remove decl; we now always use xmalloc.
(alloca): Use old-style definition, since Emacs needs this.
Check for arithmetic overflow when computing combined size.
Paul Eggert [Sat, 23 Nov 2002 07:02:40 +0000 (07:02 +0000)]
Avoid use of <assert.h>, as the GNU Coding Standards hint that one
should use `if (! x) abort ();' rather than `assert (x);', and anyway
it's one less thing to worry about configuring. (hash_lookup,
hash_get_first, hash_get_next, hash_find_entry, hash_rehash,
hash_insert): Use abort rather than assert.
Paul Eggert [Sat, 23 Nov 2002 06:45:49 +0000 (06:45 +0000)]
Include quotearg.h immediately after config.h.
No need to include stddef.h or sys/types.h any more.
Surround local include files with "", not "<>".
Assume HAVE_LIMITS_H unconditionally, as we assume C89.
Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
(HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
(mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
(ISPRINT): Remove; no longer needed now that we assume C89.
Paul Eggert [Sat, 23 Nov 2002 06:45:22 +0000 (06:45 +0000)]
Allow multiple inclusion by surrounding with
"#ifndef QUOTEARG_H_". Include <stddef.h>, for size_t,
so that we can be included first.
(PARAMS): Remove; we now assume C89 or later. All uses removed.
Jim Meyering [Thu, 21 Nov 2002 13:22:51 +0000 (13:22 +0000)]
2002-09-25 Paul Eggert <eggert@twinsun.com>
[! HAVE_INTTYPES_H && HAVE_STDINT_H] Include <stdint.h>.
(UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
(PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
int. Work more efficiently if X is the same width as uintmax_t.
Do not compare X to -1, to avoid bogus compiler warning.
(get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
Don't assume that f_frsize and f_bsize are the same type.
Paul Eggert [Thu, 21 Nov 2002 07:19:54 +0000 (07:19 +0000)]
Do not include <config.h> or <sys/types.h>.
Include <stddef.h> instead, since it's all we need for size_t.
(PARAMS): Remove. All uses removed.
(ARRAY_CARDINALITY): Do not bother to #undef.
(ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
Remove unnecessary parentheses.
(ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
Insert necessary parentheses.
(ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
(ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.