Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
'ok' flag around.
(simple_cat, cat): Return true if successful. All callers changed.
(simple_cat, cat, main): Use bool for booleans.
(simple_cat): Use size_t for sizes.
(cat, main): Use the same names for parameters that we use for
long options, to avoid confusion. This inverts the sense of the
show_tabs (formerly output_tabs) and number_nonblank
(formerly numbers_at_empty_lines) variables.
(main): Don't mess up (due to integer overflow) if we are given
INT_MAX - INT_MIN + 1 options.
[O_BINARY]: Don't invoke isatty unless the other options require it.
(main): When deciding whether to use simple_cat, don't worry
about binary option; it's irrelevant.
|
|
|
|
lines from the output strings, to save space.
Use a narrower type like 'unsigned char' for line lengths, if
that will do.
Make the output variables static, not extern.
|
|
|
|
|
|
(UINT_MAX_DECIMAL_DIGITS, uint_to_string): Remove.
(gid_to_name, uid_to_name): Use imaxtostr/umaxtostr
instead of uint_to_string).
(describe_change): Instead of an int flag, use a char *
auxiliary; this avoids the need for casts.
Assume free (NULL) works.
(change_file_owner): Return true/false, not 0/-1, since
we don't set errno. All callers changed.
Use bool when appropriate.
(chown_files): Likewise.
|
|
|
|
(main): int -> bool when appropriate.
|
|
|
|
(V_STRDUP): Don't assume the string's length fits in int.
(ISDIGIT): unsigned -> unsigned int
(is_number): Define only ifdef __DJGPP__; not needed elsewhere.
Use bool instead of int where appropriate.
Do not allow empty strings.
(parse_user_spec): Parse numbers as decimal integers, even if
they have a leading 0. Don't assume uids and gids fit in int.
|
|
|
|
"010", which must be parsed as decimal.
|
|
|
|
|
|
(LONG_MAX_32_BITS): Remove.
Include <inttypes.h> and <stdint.h> if available.
(alignof, UNALIGNEDP): New macro, portable to all C89 hosts.
(__memrchr): Don't assume unsigned long int is either 4 or 8 bytes;
let it be any number of bytes greater than or equal to 4.
|
|
(LONG_MAX_32_BITS): Remove.
Include <inttypes.h> and <stdint.h> if available.
(alignof, UNALIGNEDP): New macro, portable to all C89 hosts.
(__memchr): Don't assume unsigned long int is either 4 or 8 bytes;
let it be any number of bytes greater than or equal to 4.
* memrchr.c: Likewise, with __memrchr.
|
|
|
|
|
|
|
|
use inline any more. Require AC_C_BIGENDIAN, though.
|
|
suffices with C89 or better.
(alignof): New macro, portable to all C89 hosts.
(UNALIGNED): Use it. Use uintptr_t if available, and assume
everything is unaligned otherwise; this is more portable than
assuming 'unsigned long int' will always work.
|
|
ifdef _LIBC.
(md5_uint32): Use uint32_t if available. Simplify fallback ifdefs.
|
|
(EOVERFLOW): Define if not defined.
(getgroups): Return -1 with errno=EOVERFLOW if an integer overflow
occurs.
|
|
|
|
|
|
pwd when there are multiple names for the working directory
(which can happen with an automounter, sigh).
|
|
|
|
(localedir.h): Don't depend on Makefile: this causes Solaris
8 'make' to build localedir.h unnecessarily. The dependence
on Makefile is ineffective anyway, since $(localedir) might
change even if Makefile hasn't.
|
|
working directory, pretend we started from "/", not ".".
|
|
working directory, pretend we started from "/", not ".".
This avoids a bug on hosts like Solaris that don't let you
remove the working directory.
|
|
|
|
declared: this fixes a portability bug with Solaris 8 + GCC.
(STRTOX): Parenthesize use of macro arg as expression.
(vstrtoimax, vstrtoumax, vstrtold): Remove now-unnecessary
parentheses.
|
|
|
|
|
|
|
|
pathchk_LDADD, rm_LDADD, test_LDADD): New vars, for eaccess.
|
|
unistd.h, as autoconf does this for us. Check for libgen.h.
Also look for eaccess within -lgen, which is where it is in
Solaris. Set LIB_EACCESS accordingly.
|
|
eaccess on Solaris and SVR4-like systems.
(euidaccess): Use HAVE_EACCESS, not HAVE_DECL_EACCESS.
|
|
|
|
you need to include first. You don't need to include any files
other than the usual config.h.
Include <inttypes.h> and <stdint.h> if available, for uintmax_t.
Remove 'struct stat;' not needed since we know sys/stat.h has
been included by dev-ino.h.
(struct cycle_check_state): Change chdir_counter to uintmax_t,
not size_t, since it isn't limited by object sizes.
Change magic from long unsigned int to int; that's good enough
for our use.
|
|
is_power_of_two, to reflect better what it really does.
All uses changed. Arg is now uintmax_t, not unsigned int
(it should have been unsigned long int -- that was a bug).
(cycle_check): Check for integer overflow in cycle count,
and report a cycle if that happens, as it must be a cycle
by this point.
|
|
|
|
|
|
|
|
|
|
|