Age | Commit message (Collapse) | Author |
|
|
|
(getloadavg_initialized): Use bool for booleans.
|
|
|
|
instead of an int, to save a few bytes in the object file.
|
|
|
|
|
|
|
|
All uses changed.
|
|
All uses changed.
|
|
(errno): Remove decl; we now assume C89 or better.
Include unistd.h if available, for gethostname.
(ENAMETOOLONG): Define to 0, not 9999, to avoid colliding with
existing errno values if any.
(gethostname): Remove decl, since unistd.h declares it (or doesn't,
in which case it's an older system and it should just work).
(xgethostname): Don't assume host name length is less than INT_MAX.
Exit if malloc fails, just as the comment says.
|
|
(errno): Remove decl; we now assume C89 or better.
(save_cwd): Use bool for booleans.
(save_cwd, restore_cwd): Return -1 on failure, not 1, since we set
errno on failure.
|
|
Check for integer overflow in size calculations.
Return -1 (not 1) on failure, since we set errno in that case.
|
|
(UT_USER_SIZE): New constant.
(read_utmp): Don't assume that the number of users is less than
INT_MAX.
|
|
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.
|
|
|
|
|
|
|
|
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.
|
|
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.
|
|
(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.
|
|
|
|
|
|
Use mode_t for modes, not int. All uses changed.
(errno): Remove decl; no longer needed since we assume C89.
|
|
(make_path, make_dir): Use bool, not int, since we're not setting errno.
Use mode_t for modes, not int. All uses changed.
|
|
|
|
|
|
(mode_compile): Use bool when appropriate.
|
|
|
|
|
|
|