64 Commits

Author SHA1 Message Date
Paul Eggert
f8d4015e36 (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
Do not assume SA_SIGINFO behavior.
Bug reported by Jim Meyering on NetBSD 1.5.2.
2002-06-22 13:29:17 +00:00
Paul Eggert
4ead5e1146 (noinst_HEADERS): Remove freesoft.h.
Add version-etc.h.
(libdiffutils_a_SOURCES): Remove freesoft.c.  Add version-etc.c.
2002-06-17 05:55:42 +00:00
Paul Eggert
b0ec6101bd (version_etc): Remove package and version args.
(version_etc_copyright): Remove.
2002-06-17 05:55:42 +00:00
Paul Eggert
cb95fdb5a3 (version_etc): Remove package and version args.
(version_etc_copyright): Remove.
Do not include unlocked-io.h; no longer needed.
Include gettext.h rather than libinto.h.
(_): Define unconditionally.
(version_etc): Adjust wording to match current GNU coding standards.
Translate "(C)" if possible.
2002-06-17 05:55:42 +00:00
Paul Eggert
edd7dd52ff (WIDE_CHAR_SUPPORT): New macro. Use it uniformly instead of
(defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).  It also depends
on HAVE_BTOWC.
2002-06-12 06:06:47 +00:00
Paul Eggert
d327549393 Check for HAVE_SIGALTSTACK and HAVE_GETCONTEXT, too. 2002-06-11 11:59:47 +00:00
Paul Eggert
65dbacedda Fix trailing white space. 2002-06-11 11:18:52 +00:00
Paul Eggert
aa5475b6b4 Include posixver.h. 2002-06-11 06:06:32 +00:00
Paul Eggert
bf641a9542 (struct patternlist.str): Size 1, not 0, as C89 requires this.
(NEW_PATTERN): Use offsetof, not sizeof, since str now has size 1.
2002-06-11 06:06:32 +00:00
Paul Eggert
bb9cc01d98 (EXTRA_DIST): Add fnmatch_loop.c.
(noinst_HEADERS): fnmatch_.h renamed from fnmatch.hin.
regex_.h renamed from regex.hin.
Add file-type.h.
(libdiffutils_a_SOURCES): Add file-type.c.
(DISTCLEANFILES): Remove fnmatch.hno, regex.hno.
2002-06-11 05:53:54 +00:00
Paul Eggert
9e4cdf9d2c (__const): Do not define to empty, as this breaks
Sun cc.  The code doesn't work with K&R anyway.
2002-06-11 05:53:54 +00:00
Paul Eggert
871e480cf6 (alloca, __builtin_expect): Define for non-GCC hosts.
<strings.h>: Include only if HAVE_STRINGS_H.
<stddef.h>: Include if we include stdlib.h.
Do not comment out all code if ! HAVE_FNMATCH_GNU.
(getenv): Do not declare if HAVE_DECL_GETENV.
(__strchrnul, __wcschrnul): Remove; not used.
(MEMPCPY): Use mempcpy if not _LIBC; use memcpy if neither _LIBC
nor HAVE_MEMPCPY.
(FOLD) [HANDLE_MULTIBYTE]: Do not pass wide char to ISUPPER.
(STRLEN, STRCAT, MEMPCPY) [HANDLE_MULTIBYTE && !defined _LIBC]:
Use wcslen rather than __wcslen, and likewise for wcscat, wmempcpy.
(MEMPCPY) [HANDLE_MULTIBYTE]: Use wmempcpy if not _LIBC; use wmemcpy
if neither _LIBC nor HAVE_WMEMPCPY.
2002-06-11 05:53:54 +00:00
Paul Eggert
a9a0f5a47b (siginfo_t, c_stack_die): Remove decl. 2002-06-11 05:53:54 +00:00
Paul Eggert
88ead75505 (__attribute__): New macro.
(EOVERFLOW): Define if not defined.(stack_t): Define to struct sigaltstack if not defined or declared.
Include <sys/resource.h>, <ucontext.h> if available.
Include <stdio.h> if DEBUG.
Do not include <inttypes.h> or <stdint.h>.
(c_stack_die): Remove info and context args.  All uses changed.
(segv_action): Likewise.
(alternate_signal_stack): Change uintmax_t to long, to ease porting.
(get_stack_location, min_address_from_argv, max_address_from_argv,
null_action): New functions.
(stack_base, stack_size): New vars.
(segv_handler): context arg may not be used.
Use global stack_base, stack_size if
! HAVE_XSI_STACK_OVERFLOW_HEURISTIC.
Add debug code.
Invoke die (rather than segv_action) to exit.
(c_stack_action): Accept new argv arg, and simpler handler arg.
All uses changed.  Move code into new functions above.
Allow null action.
[! (defined SA_ONSTACK && defined _SC_PAGESIZE)]: Assume all segvs
are stack overflows.
(main) [DEBUG]: Describe what output should be like.
2002-06-11 05:53:54 +00:00
Paul Eggert
a1fdcabe77 Initial revision 2002-05-10 11:20:06 +00:00
Paul Eggert
384ece6125 (__restrict_arr): Define for GCC 3.1 and up. 2002-04-08 18:56:39 +00:00
Paul Eggert
a758e82c03 (errno): Remove declaration; K&R C is obsolete.
Include limits.h.
(SIZE_MAX, SSIZE_MAX): Define if standard headers don't.
(MIN): New macro.
(block_read): Do not attempt to read more than SSIZE_MAX bytes, as the
resulting behavior is implementation-defined.  Work around bug in
Tru64 5.1, which can't read more than INT_MAX bytes at a time.
2002-04-05 20:37:31 +00:00
Paul Eggert
78899f4efb (c_stack_die) [!HAVE_SIGINFO_T]: Don't use info.
Bug reported by Eli Zaretskii.
2002-03-24 07:36:37 +00:00
Paul Eggert
0d3dcc25e7 (alloca): Remove.
Include stdlib.h if available, for malloc.
(hard_locale): Use malloc, not alloca.  Test for storage allocation failure.
2002-03-12 06:34:28 +00:00
Paul Eggert
dbea9821b7 (AUTOMAKE_OPTIONS): Remove. 2002-03-11 08:00:47 +00:00
Paul Eggert
1e15bf9664 Include <errno.h>
(ENOTSUP): Define if errno.h doesn't.
(SA_NODEFER, SA_ONSTACK, SA_RESETHAND, SA_SIGINFO, SIGSTKSZ, _SC_PAGESIZE,
ALTERNATE_STACK_SIZE, stack_t, sigaltstack): Remove; we now assume them
all when HAVE_XSI_STACK_OVERFLOW_HEURISTIC, so we don't need substitutes.
(<ucontext.h>): Include only if HAVE_XSI_STACK_OVERFLOW_HEURISTIC.
(alternate_signal_stack): Now of size SIGSTKSZ, not ALTERNATE_STACK_SIZE.
(segv_handler): Simplify, under the assumption that
HAVE_XSI_STACK_OVERFLOW_HEURISTIC is nonzero.
(c_stack_action): Likewise.
(exit_failure) [DEBUG]: Initialize to 0, not 1.
(recurse, main) [DEBUG]: Remove main args.
2002-03-11 08:00:47 +00:00
Paul Eggert
9f0eff52c2 Initial revision 2002-02-28 04:28:07 +00:00
Paul Eggert
8d9e3b29bf (buffer_lcm): New arg LCM_MAX. 2002-02-28 04:28:07 +00:00
Paul Eggert
47b633e3cf Include errno.h.
(errno): Declare if !STDC_HEADERS.
Include signal.h.
(SA_RESTART): Define if not already defined.
Include <inttypes.h>.
(PTRDIFF_MAX): Define if not already defined.
(TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Likewise.
(block_read): Accommodate ancient AIX hosts that set errno to EINTR
after uncaught SIGCONT.
(buffer_lcm): Return a reasonable size if the multiple is too large.
New arg LCM_MAX.  All callers changed.
2002-02-28 04:28:07 +00:00
Paul Eggert
a44befd50b (noinst_HEADERS): Add c-stack.h, exitfail.h.
(libdiffutils_a_SOURCES): Add c-stack.c, exitfail.c, quotesys.c.
(INCLUDES): Remove.
2002-02-28 04:28:07 +00:00
Paul Eggert
2e507ad1c0 Include exitfail.h.
(xalloc_exit_failure): Remove; subsumed by exit_failure.
All uses changed.
2002-02-28 04:28:07 +00:00
Paul Eggert
b89fe19666 (xalloc_exit_failure): Remove; subsumed by exit_failure. 2002-02-28 04:28:07 +00:00
Paul Eggert
8eb1bae700 Include "hard-locale.h".
(hard_locale): Ignore ENABLE_NLS, since we want to operate on
locales other than LC_MESSAGES.
2002-02-28 04:28:07 +00:00
Paul Eggert
38231fc04f Initial revision 2002-02-16 05:30:19 +00:00
Paul Eggert
5289afd403 Include <string.h>. Reported by Bruno Haible. 2002-01-24 20:16:38 +00:00
Paul Eggert
eadc9ce7d6 Fix comment. 2002-01-24 20:16:38 +00:00
Paul Eggert
75cd3e885f (noinst_HEADERS): Add gettext.h. 2002-01-24 20:16:38 +00:00
Paul Eggert
c30fa59166 Initial revision 2002-01-05 21:13:09 +00:00
Paul Eggert
e053f8c49d [HAVE_FCNTL_H && HAVE_SETMODE_DOS]: Include <fcntl.h>.
[!HAVE_SETMODE_DOS]: Do not include <unistd.h>.
(set_binary_mode): Return mode (not 1) if fd is a tty.
Do not assume that O_TEXT is zero.
2001-12-24 00:09:16 +00:00
Paul Eggert
26b18e2062 Latest version from self. 2001-12-22 01:48:53 +00:00
Paul Eggert
d104e14d8e Initial revision 2001-12-11 08:11:35 +00:00
Paul Eggert
412c4f3436 (noinst_HEADERS): Add dirname.h, setmode.h.
(libdiffutils_a_SOURCES): Add basename.c, setmode.c.
2001-12-11 08:09:04 +00:00
Paul Eggert
39ac13e212 Fix copyright notice. 2001-12-03 14:05:54 +00:00
Paul Eggert
0ac2866bd3 diffutils 2.7.7 2001-12-03 13:56:28 +00:00
Paul Eggert
75ea63a2d7 (EXTRA_DIST): Add xstrtol.c.
(noinst_HEADERS): Add xstrtol.h.
(libdiffutils_a_SOURCES): Add xstrtoumax.c.
2001-12-03 13:12:06 +00:00
Paul Eggert
c99680457c (__xstrtol): Don't accept 'Ki'; require 'KiB'. 2001-12-03 06:23:58 +00:00
Paul Eggert
cc58a4f806 (__xstrtol): Add support for IEC 60027-2. 2001-12-03 05:33:58 +00:00
Paul Eggert
9b53dc8757 (EXTRA_DIST): Add strtoimax.c, strtol.c. 2001-11-25 07:36:42 +00:00
Paul Eggert
7577cc7fb6 (noinst_HEADERS): Add unlocked-io.h. 2001-11-25 07:25:31 +00:00
Paul Eggert
f78da6466e Initial revision 2001-11-23 13:28:32 +00:00
Paul Eggert
cd1a913b43 Include config.h, freesoft.h rather than diff.h.
(free_software_msgid): Wrap contents in N_.
2001-11-23 13:04:25 +00:00
Paul Eggert
e28790892e Use prototypes instead of old-style functions. 2001-11-23 13:02:42 +00:00
Paul Eggert
33d72d80bc Don't include system.h; instead, include config.h, unistd.h.
Use prototypes instead of old-style functions.
(block_read): Don't assume that int is no wider than size_t.
2001-11-23 13:02:08 +00:00
Paul Eggert
8e78630e37 Initial revision 2001-11-04 01:21:33 +00:00
Paul Eggert
8a650ddd00 Initial revision 2001-10-27 00:37:40 +00:00