Age | Commit message (Collapse) | Author |
|
(CHAR_BIT): Remove.
(timespec_subtract, xnanosleep): Use bool for booleans.
|
|
|
|
|
|
(yesno): Return bool, not int.
|
|
(yesno): Return bool, not int.
|
|
(__xstrtol): Rewrite to avoid casts.
|
|
|
|
|
|
|
|
|
|
(same_name): Return bool, not int.
|
|
(same_name): Return bool, not int.
|
|
|
|
(quotearg_buffer_restyled): Use bool for booleans.
|
|
Include stdbool.h.
(rpl_nanosleep): Usee bool for booleans.
|
|
|
|
|
|
|
|
|
|
|
|
(hard_locale): Return bool, not int.
|
|
|
|
(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.
|