Age | Commit message (Collapse) | Author |
|
|
|
|
|
doesn't conflict with sparc-sun-solaris2.7's definition in
/usr/include/sys/int_types.h.
|
|
|
|
(fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
and strncasecmp as r-values. Unixware didn't have declarations.
|
|
|
|
|
|
Use an initial, malloc'd, buffer of length 128 rather than
a statically allocated one of length 1024.
|
|
|
|
Include stdlib.h and unistd.h if available.
Include xalloc.h.
(xmalloc, xstrdup, free): Remove decls.
(xgetcwd): Don't assume sizes fit in unsigned.
Check for overflow when computing sizes.
Simplify reallocation code.
|
|
|
|
|
|
Also, make the following further changes to make this file's
configuration more similar to that of strtol.c:
(UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED. All uses changed.
(strtoumax, uintmax_t, strtoull, strtol): Remove.
(intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
(strtoimax): Renamed from strtoumax. All uses of unsigned values
changed to signed values.
And make the following changes as well:
Fix copyright notice, as 1999 was missing.
(verify): New macro.
(strtoimax): Check sizes at compile-time, not run-time.
Prefer strtol to strtoll if both work.
(main): Remove; it was not that useful and was a pain to maintain.
|
|
|
|
|
|
a directory's st_size can have an arbitrary value, so the old
usage could waste an arbitrary amount of memory. All uses
changed.
|
|
|
|
|
|
|
|
|
|
(_DECLARE_XSTRTOL): Improve quality of diagnostic for
LONGINT_INVALID_SUFFIX_CHAR.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
exists and anyway it was so heavily changed from the old cccp
code as to be unrecognizable. Include full-write.h.
(full_write) Return size_t, with short writes meaning failure.
All callers changed. This fixes a bug with large buffers
on 64-bit hosts.
|
|
|
|
(free_exclude): New decl.
(add_exclude, add_exclude_file): Now takes int options arg.
(excluded_filename): No longer requires options arg, as the options
are determined by add_exclude. Now returns bool, not int.
|
|
This fixes one or two unlikely storage allocation overflow bugs,
but doesn't change user-visible behavior otherwise.
(bool): Declare, perhaps by including stdbool.h.
(<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
(<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
Include if available.
(<xalloc.h>): Include
(SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
(verify): New macro. Use it to verify that EXCLUDE macros do not
collide with FNM macros.
(struct patopts): New struct.
(struct exclude): Use it, as exclude patterns now come with options.
(new_exclude): Support above changes.
(new_exclude, add_exclude_file):
Initial size must now be a power of two to simplify overflow checking.
(free_exclude, fnmatch_no_wildcards): New function.
(excluded_filename): No longer requires options arg, as the options
are determined by add_exclude. Now returns bool, not int.
(excluded_filename, add_exclude):
Add support for the fancy new exclusion options.
(add_exclude, add_exclude_file): Now takes int options arg.
Check for arithmetic overflow when computing sizes.
(add_exclude_file): xrealloc might modify errno, so don't
realloc until after errno might be used.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Revert most of last change.
Instead, simply don't mark the `Copyright...' string for translation.
Based on advice from Paul Eggert.
|
|
|
|
|
|
|
|
|
|
|
|
of copyright with `%s' so translators don't get an untranslated message in 2002.
(COPYRIGHT_YEAR): Define.
(version_etc): Use fprintf rather than fputs.
|