1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-04-14 07:46:28 +02:00
Commit Graph

3789 Commits

Author SHA1 Message Date
Paul Eggert
4e3640a010 (SIZE_MAX): Define after including files, to avoid
a collision on OpenBSD 3.4.
2004-08-04 22:08:33 +00:00
Paul Eggert
0e591504c8 (LONGEST_MODIFIER): New macro.
(PRIuMAX) [!PRI_MACROS_BROKEN && !defined PRIuMAX]: New macro.
(find_matching_ancestor): Use it for dev_t and ino_t.
2004-08-04 21:58:46 +00:00
Paul Eggert
fade486c60 Sync from gnulib. 2004-08-04 20:58:57 +00:00
Paul Eggert
a617eff5dc Work around bug in OpenBSD 3.4 sterror_r: it
sometimes returns a positive errno value even when it succeeds.
(print_errno_message) [!LIBC]: Fall back on strerror if
__strerror_r fails.
2004-08-04 19:35:24 +00:00
Paul Eggert
126d5f9437 Include limits.h, stdbool.h.
(CHAR_BIT): Remove.
(timespec_subtract, xnanosleep): Use bool for booleans.
2004-08-02 23:00:15 +00:00
Paul Eggert
3afb4dad99 unsigned -> unsigned int 2004-08-02 22:59:41 +00:00
Paul Eggert
aebe589261 unsigned -> unsigned int 2004-08-02 22:58:22 +00:00
Paul Eggert
e55f95fe97 Include <stdbool.h>.
(yesno): Return bool, not int.
2004-08-02 22:57:37 +00:00
Paul Eggert
8e4b7d7fa1 Include yesno.h first.
(yesno): Return bool, not int.
2004-08-02 22:57:13 +00:00
Paul Eggert
eb32ddf3c0 (errno): Remove decl; we now assume C89 or better.
(__xstrtol): Rewrite to avoid casts.
2004-08-02 22:56:56 +00:00
Paul Eggert
a4e2377f60 Just include xstrtol.h rather than rolling our own include pattern. 2004-08-02 22:55:59 +00:00
Paul Eggert
dc44675984 Just include xstrtol.h rather than rolling our own include pattern. 2004-08-02 22:55:32 +00:00
Paul Eggert
965de5df36 Log today's int-related changes 2004-08-02 22:55:12 +00:00
Paul Eggert
596f9e22e1 (version_etc_va): Use size_t for sizes. 2004-08-02 22:54:36 +00:00
Paul Eggert
325ec4052e Include <stdbool.h>.
(same_name): Return bool, not int.
2004-08-02 22:54:15 +00:00
Paul Eggert
f8a0187525 (errno): Remove decl; we now assume C89 or better.
(same_name): Return bool, not int.
2004-08-02 22:53:41 +00:00
Paul Eggert
7fed0a985b Rewrite to avoid casts. 2004-08-02 22:52:39 +00:00
Paul Eggert
f9bbf56c51 Include stdbool.h.
(quotearg_buffer_restyled): Use bool for booleans.
2004-08-02 22:52:17 +00:00
Paul Eggert
cd24faad5f nanosleep.c (errno): Remove decl; we now assume C89 or better.
Include stdbool.h.
(rpl_nanosleep): Usee bool for booleans.
2004-08-02 22:51:56 +00:00
Paul Eggert
24cdab4d1a Use Autoconf-suggested pattern for inttypes and stdint. 2004-08-02 22:51:09 +00:00
Paul Eggert
58907a1ee9 Update copyright. 2004-08-02 22:50:47 +00:00
Paul Eggert
c04045506d Use Autoconf-suggested pattern for inttypes and stdint. 2004-08-02 22:50:29 +00:00
Paul Eggert
75d42c8224 Use Autoconf-suggested pattern for inttypes and stdint. 2004-08-02 22:49:58 +00:00
Paul Eggert
d5905bb653 (hash_string): Rewrite to avoid cast. 2004-08-02 22:49:34 +00:00
Paul Eggert
28730b8b36 Include <stdbool.h>.
(hard_locale): Return bool, not int.
2004-08-02 22:49:12 +00:00
Paul Eggert
ecb7230885 hard-locale.c (hard_locale): Return bool, not int. 2004-08-02 22:48:49 +00:00
Paul Eggert
21e7da65ea Include <stdbool.h>.
(getloadavg_initialized): Use bool for booleans.
2004-08-02 22:48:05 +00:00
Paul Eggert
a3b96dbd55 (lookup_word): Rewrite to avoid cast. 2004-08-02 22:47:44 +00:00
Paul Eggert
e9d449928d (textutils_fileblocks_unused): Make it a typedef
instead of an int, to save a few bytes in the object file.
2004-08-02 22:47:25 +00:00
Paul Eggert
632f0144b2 Update copyright. 2004-08-02 22:47:00 +00:00
Paul Eggert
f4afb6798d (enum canonicalize_mode_t): Reformat comments to fit in 80 columns. 2004-08-02 22:42:37 +00:00
Paul Eggert
fd0ca86dd2 (errno): Remove decl; we now assume C89 or better. 2004-08-02 22:41:37 +00:00
Paul Eggert
61c0c553f8 (xstrtod): Return bool, not int. Invert the sense of the boolean.
All uses changed.
2004-08-02 22:18:32 +00:00
Paul Eggert
a43efc5f75 (xstrtod): Return bool, not int. Invert the sense of the boolean.
All uses changed.
2004-08-02 22:17:42 +00:00
Paul Eggert
c87d825fd3 Don't include <sys/types.h> or "exit.h"; no longer needed.
(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.
2004-08-02 21:52:07 +00:00
Paul Eggert
27454c431f Include <stdbool.h>.
(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.
2004-08-02 21:06:22 +00:00
Paul Eggert
838af3f618 (read_utmp): Don't assume that the number of users is less than INT_MAX.
Check for integer overflow in size calculations.
Return -1 (not 1) on failure, since we set errno in that case.
2004-08-02 20:55:14 +00:00
Paul Eggert
6517d85e05 (UT_USER): Parenthesize properly.
(UT_USER_SIZE): New constant.
(read_utmp): Don't assume that the number of users is less than
INT_MAX.
2004-08-02 20:54:45 +00:00
Paul Eggert
e71e29e309 (posix_time_parse): Don't assume that the length of
the string being parsed is <= UINT_MAX.
2004-08-02 20:34:27 +00:00
Paul Eggert
25d291e3ec (read_file_system_list): Accept bool flag, not int.
(errno): Remove decl; we now assume C89 or better.
(xatoi): Remove; replaced by strtoul.  Hence device numbers can now
go up to ULONG_MAX.
2004-08-02 20:27:45 +00:00
Paul Eggert
d1ee2543c7 Include <stdbool.h>.
(read_file_system_list): Accept bool flag, not int.
2004-08-02 20:27:16 +00:00
Paul Eggert
df3b48143b Regenerate. 2004-08-02 20:17:31 +00:00
Paul Eggert
7bb8bcf375 No longer needed by 'install', so remove it. 2004-08-02 20:15:49 +00:00
Paul Eggert
def5c89707 (libfetish_a_SOURCES): Remove isdir.c. 2004-08-02 20:14:53 +00:00
Paul Eggert
c1bbe24045 Add an FSF copyright notice, since our changes are becoming nontrivial.
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.
2004-08-02 19:42:01 +00:00
Paul Eggert
787b4d50d0 Add an FSF copyright notice, since our changes are becoming nontrivial.
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.
2004-08-02 19:41:35 +00:00
Paul Eggert
97f2714e35 Use Autoconf-suggested pattern for inttypes and stdint.
Include unistd.h, for lseek.
2004-08-02 18:44:11 +00:00
Paul Eggert
11e8886958 Include <stdbool.h>.
(struct fs_usage): Use uintmax_t for block sizes, so that they're
not limited to INT_MAX.
Use bool for booleans.
2004-08-02 18:43:56 +00:00
Paul Eggert
b4b2eed874 (EXT): Use size_t for sizes, not ptrdiff_t, so that we don't have
to worry about wraparound.
2004-08-02 18:21:05 +00:00
Paul Eggert
272dfbf173 fnmatch_loop.c (EXT, FCT): Use bool when appropriate.
(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.
2004-08-02 18:10:55 +00:00