1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-04-15 00:12:00 +02:00
Commit Graph

55 Commits

Author SHA1 Message Date
Paul Eggert
368bc94656 Don't include <inttypes.h> or <stdint.h>, since
fsusage.h now does that.  Include fsusage.h first, to test interface.
Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
at most one method (the old code could have generated decls that
didn't conform to C89, not that this was ever exercised).
2006-04-12 20:13:00 +00:00
Paul Eggert
2d0c5eefd0 Sync from gnulib. 2005-09-22 06:05:39 +00:00
Jim Meyering
410f98fc2b Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally. 2005-07-02 08:41:46 +00:00
Jim Meyering
58076430c3 Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
and don't include <sys/file.h>).
2005-07-01 20:55:29 +00:00
Paul Eggert
ab2edb9e33 Don't use "path" or "filename" to mean "file name"
in comments or local variable names.
2005-06-02 05:05:29 +00:00
Jim Meyering
116e6fb244 Update FSF postal mail address. 2005-05-14 07:58:06 +00:00
Paul Eggert
cc08c826e9 (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
Declaring int functions causes warnings on some modern systems and
shouldn't be needed to compile on ancient ones.
2004-11-26 07:40:23 +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
Jim Meyering
c56f9d7cb0 Use `file system', not filesystem in a comment. 2004-06-30 22:39:13 +00:00
Jim Meyering
81c26ff410 Merge from gnulib. 2003-06-06 19:46:45 +00:00
Jim Meyering
524ed3ce44 Remove declaration of statfs.
It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
2003-02-06 10:25:43 +00:00
Jim Meyering
dd02096234 Include full_read.h.
(get_fs_usage): Use full_read instead of safe_read.
2003-01-06 13:08:19 +00:00
Jim Meyering
4b0eb25d6d [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include <stdint.h>.
(UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
(PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
int.  Work more efficiently if X is the same width as uintmax_t.
Do not compare X to -1, to avoid bogus compiler warning.
(get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
Don't assume that f_frsize and f_bsize are the same type.
2002-09-26 08:18:33 +00:00
Jim Meyering
b5a4f7671a Remove unneeded parentheses around operands of `defined'. 2002-09-25 11:45:37 +00:00
Jim Meyering
51b6b653a2 back out Copyright date changes for files with no changes year 2000-08-07 15:48:18 +00:00
Jim Meyering
fde850f7ad update copyright date 2000-07-09 07:22:43 +00:00
Jim Meyering
6970bbc17b (get_fs_usage) [STATFS_TRUNCATES_BLOCK_COUNTS]:
Work around SunOS botch also when block size is different from 1k.
1999-07-15 07:50:06 +00:00
Jim Meyering
7d60769bea ansideclify 1998-12-07 03:12:10 +00:00
Jim Meyering
b48e78e3b7 Include <limits.h>.
(CHAR_BIT, EXTRACT_TOP_BIT, PROPAGATE_TOP_BIT): New macros.
(get_fs_usage): If top bit of system variable corresponding to
fsu_bavail is set, then set fsu_bavail_top_bit_set, and
sign-extend the value when storing it into fsu_bavail.
1998-03-19 22:18:04 +00:00
Jim Meyering
e162abfc5b (get_fs_usage): Add parens. 1998-01-05 17:38:38 +00:00
Jim Meyering
866773c72a (PROPAGATE_ALL_ONES): New macro.
(get_fs_usage): If a value consists entirely of 1 bits,
propagate this info to the output by setting it to (uintmax_t) -1.
1998-01-05 17:33:54 +00:00
Jim Meyering
25fabf3d2d Do all calculations using uintmax_t.
Include <inttypes.h> if available.
(adjust_blocks, CONVERT_BLOCKS): Remove.
(get_fs_usage): Set new member fsu_blocksize, and do not convert
numbers to 512-byte block units; this avoids overflow here.
Cast lseek arg to off_t, not long.
1997-11-30 10:24:24 +00:00
Jim Meyering
bcb8610977 (get_fs_usage): If DISK is 0 and we needed to use
it, return -1 with 0 in ERRNO.

From Miles.
1996-11-28 19:37:01 +00:00
Jim Meyering
71a04268b5 libitize 1996-11-05 03:38:23 +00:00
Jim Meyering
70196747af cpp-indent + change some #ifdef to #if 1996-11-03 23:53:51 +00:00
Jim Meyering
2a5f4c45e1 (get_fs_usage) [STAT_STATFS4] [_CRAY]: Define f_bavail to f_bfree.
From by Johan Danielsson.
1996-08-02 03:25:10 +00:00
Jim Meyering
402b4612f8 [HAVE_SYS_FS_S5PARAM_H]: Include sys/fs/s5param.h
to work around bug in sys/filsys.h of Fujitsu UXP/V.
Reported by Johan Danielsson.
1996-07-31 04:43:59 +00:00
Jim Meyering
e8b07e3796 update FSF address in copyright 1996-07-15 03:36:16 +00:00
Jim Meyering
c2705c1e62 [_CRAY]: Don't include sys/filsys.h because although
Unicos-9 has it, it's not needed and would cause other problems
because it requires inclusion of other, non-standard headers.
1996-05-23 13:04:03 +00:00
Jim Meyering
bae16cb45b (get_fs_usage): Declare parameter PATH to be const. 1996-05-17 03:16:34 +00:00
Jim Meyering
1d15980fb6 Remove trailing whitespace. 1995-10-01 22:49:07 +00:00
Jim Meyering
4de6eab547 (get_fs_usage) [STATFS_TRUNCATES_BLOCK_COUNTS]: Copy untruncated block
counts from f_spare array into proper members of struct statfs.
From Eirik Fuller (eirik@netapp.com);
1995-10-01 18:23:29 +00:00
Jim Meyering
1fffbc7472 No longer include safe-l?stat.h. 1995-05-19 15:23:18 +00:00
Jim Meyering
627abb8251 (statfs): Use stat, not safe_stat. 1995-05-13 13:06:46 +00:00
Jim Meyering
fedcb63136 (get_fs_usage, statfs): Use safe_read, and safe_stat rather than
bare read and stat.
1995-01-27 17:20:54 +00:00
Jim Meyering
21b82f43b9 . 1994-10-29 05:06:43 +00:00
Jim Meyering
f6b8bdc529 merge with 3.9s 1994-10-27 13:43:59 +00:00
Jim Meyering
35adb7c5be . 1994-10-08 14:52:10 +00:00
Jim Meyering
4b8534f940 . 1994-10-08 02:05:20 +00:00
Jim Meyering
f1ce35a10c merge with 3.9h 1994-10-02 05:43:03 +00:00
Jim Meyering
be7d4a230e Use SAFE_STAT instead of stat to avoid unnecessary failure
on systems for which stat can return EINTR.
1994-07-30 13:13:52 +00:00
Jim Meyering
945f1c9781 (adjust_blocks): Code it as a function again. 1994-03-16 14:47:59 +00:00
Jim Meyering
239d98e18d . 1994-03-16 14:32:26 +00:00
Jim Meyering
f2b1a05bff . 1994-03-14 16:24:52 +00:00
Jim Meyering
cbd7649260 . 1994-03-14 14:54:14 +00:00
Jim Meyering
7691d2fba0 merge with 3.8.4c 1993-10-12 20:24:09 +00:00
Jim Meyering
4ab2d8f53a merge with 3.8.3e 1993-10-09 20:43:31 +00:00
Jim Meyering
f2080b7714 merge with 3.8.3b 1993-10-06 16:44:26 +00:00
Jim Meyering
061697058c merge with 3.8.3a 1993-10-06 00:24:18 +00:00
Jim Meyering
429043125e merge with 3.8.2 1993-08-26 04:38:30 +00:00