Age | Commit message (Collapse) | Author |
|
the string being parsed is <= UINT_MAX.
|
|
(errno): Remove decl; we now assume C89 or better.
(xatoi): Remove; replaced by strtoul. Hence device numbers can now
go up to ULONG_MAX.
|
|
(read_file_system_list): Accept bool flag, not int.
|
|
|
|
|
|
|
|
(install_file_to_path): Rely on make_path to fail if the destination
is not a directory, by passing preserve_existing==true to it.
Hence we no longer need to call isdir.
Free dest_dir immediately when it's no longer needed, rather than
waiting until the end of the function.
(copy_file): Don't bother calling isdir, as copy will do the
right thing if the destination is a directory.
|
|
print_grand_total, opt_separate_dirs, hash_ins, process_file, main):
Use bool for booleans.
(max_depth): Now size_t, not int, to avoid an arbitrary limit
of INT_MAX on depth.
(G_fail): Remove: no longer needed, now that the relevant
functions return bool.
(process_file): Use return value to signal success rather than
setting a global. Remove first_call static var; not needed, since
we can look at n_alloc. Use size_t for depths. Remove FIXME
about size_t casts, as it's now fixed. Use xnrealloc rather
than the obsolescent XREALLOC. Don't bother to check whether
reallocation is needed unless level > prev_level.
(du_files): Invert sense of result, for consistency with
other coreutils code. All callers changed.
(main): Allow --max-depth values up to SIZE_MAX.
|
|
Include stdint.h if available, as Autoconf suggests.
(ALIGNBYTES, ALIGN): Remove; no longer needed now that fts_statp
is an array.
(fts_alloc, fts_palloc, fts_sort, fts_load, fts_build):
Use size_t for sizes.
(fts_stat, fts_safe_changedir, fts_debug, fts_read, fts_build,
fts_palloc):
Use bool when appropriate.
(SIZE_MAX, TYPE_SIGNED): New macros.
(fts_read): Use u_short for instructions.
(fts_build): Use ptrdiff_t for levels. Don't assume file name lengths
fit into int. Don't assume nlink_t is signed.
(find_matching_ancestor): Don't assume dev, ino fit in int.
(fts_stat): Use function prototype; required for bool arg.
(fts_sort): Detect integer overflow in size calculations.
(fts_alloc): Simplify allocation code, now that fts_statp is an array
and not a pointer.
|
|
Include stddef.h, for ptrdiff_t.
(FTS.fts_nitems): Now size_t, not int, for hosts that allow more
than INT_MAX entries in a directory.
(FTS_ROOTPARENTLEVEL): Parenthesize properly.
(FTSENT.fts_level): Now ptrdiff_t, not int, to allow recursing more
than INT_MAX levels deep on 64-bit hosts.
(FTSENT.fts_namelen): Now size_t, not u_short, to support hosts like
the Hurd that don't have arbitrary limits on directory entry lengths.
(FTSENT.fts_statp): Now an array, not a pointer, so that we don't
have to play unportable games with pointer arithmetic. Keep it array
for the benefit of user code that assumes it is a pointer.
|
|
Include unistd.h, for lseek.
|
|
(struct fs_usage): Use uintmax_t for block sizes, so that they're
not limited to INT_MAX.
Use bool for booleans.
|
|
show_listed_fs, posix_format, require_sync, print_type,
selected_fstype, excluded_fstype, show_dev, show_point, main):
Use bool for booleans.
(df_readable, show_dev): Use UINTMAX_MAX instead of -1.
(show_dev, show_point, main):
Use EXIT_SUCCESS/EXIT_FAILURE instead of 0/1.
Don't assume disk name lengths are <= INT_MAX.
Rewrite pct calculation to avoid cast.
(show_point): Don't assume resolved length is <= SSIZE_MAX.
|
|
to worry about wraparound.
|
|
(FCT): Use size_t, not unsigned int, for sizes.
(EXT): Use ptrdiff_t, not int, for a variable that has to
store a size-related quantity but might go negative.
ptrdiff_t is good enough here, since in practice the value
can't exceed SIZE_MAX/2.
|
|
(errno): Remove decl; we now assume C89 or better.
|
|
|
|
|
|
(strip_trailing_slashes): Now returns bool.
|
|
Use ptrdiff_t, not int, when counting arguments, to allow more
than INT_MAX arguments.
Use bool when appropriate.
|
|
Use ptrdiff_t, not int, when counting arguments, to allow more
than INT_MAX arguments.
|
|
|
|
(safe_rw): Don't work around Tru64 bug unless the bug symptoms
manifest themselves. This allows us to do proper reads and writes
on other hosts, e.g., "dd" with a block size greater than 2**31.
|
|
|
|
|
|
|
|
|
|
good as uintptr_t in checking for alignments, and has fewer
configuration hassles.
|
|
(word32): Remove. All uses changed to uint32_t.
(isaac_seed_data): Remove unnecessary cast.
|
|
|
|
|
|
|
|
Require gl_AC_TYPE_UINTPTR_T instead of using AC_CHECK_TYPE
on uintptr_t. Require gl_AC_TYPE_UINT32_T.
|
|
good as uintptr_t in checking for alignments, and has fewer
configuration hassles.
|
|
(UNALIGNED_P): Remove.
(__memrchr): Use size_t, not uintptr_t, to test alignment.
|
|
(UNALIGNED_P): Remove.
(__memchr): Use size_t, not uintptr_t, to test alignment.
|
|
as it defines symbols like UINT32_MAX on Solaris 8.
(md5_uint32): Assume uint32_t exists; Autoconf will define it
otherwise (if the host has a 32-bit unsigned type, anyway).
|
|
good as uintptr_t in checking for alignments, and has fewer
configuration hassles.
|
|
|
|
|
|
undoes part of the 2004-07-27 patch.
|
|
|
|
|
|
(is_char_class_member): Use bool when appropriate.
|
|
no longer needed now we assume C89 or better.
Include <inttypes.h> before <stdint.h>, as it's the Autoconf-recommended pattern.
(to_uchar): New inline function, moved here from tr.c.
Use full names for int types, e.g. "long int" rather than "long".
|
|
(IS_THOUSANDS_SEP): Use bool when appropriate.
(numcompare, main): Use char, not int, when the value is always a char.
(numcompare): Remove "register"; compilers are smart enough these days.
|
|
|
|
|
|
(main): Use EXIT_SUCCESS/EXIT_FAILURE instead of 0/1.
|
|
Use mode_t for modes, not int. All uses changed.
(errno): Remove decl; no longer needed since we assume C89.
|