summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1993-04-15 01:58:23 +0000
committerJim Meyering <jim@meyering.net>1993-04-15 01:58:23 +0000
commit29c0442cadced638d3f26b50db5a6328ad7b82d9 (patch)
tree2a8e508d291fa2d0705b3d3f1cc7cc2efcf02c61 /lib
parent0c6e5c710bac25a3676d0c04b185b70a7bfcf8b7 (diff)
downloadcoreutils-29c0442cadced638d3f26b50db5a6328ad7b82d9.tar.xz
merge with 3.4.7
Diffstat (limited to 'lib')
-rw-r--r--lib/Makefile.in5
-rw-r--r--lib/fsusage.c12
2 files changed, 15 insertions, 2 deletions
diff --git a/lib/Makefile.in b/lib/Makefile.in
index fb21e13dc..affeea23d 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -78,12 +78,13 @@ libfu.a: $(OBJECTS)
# is the only way to reliably do a parallel make.
getdate.c: getdate.y
@echo expect 9 shift/reduce conflicts
- -bison -o getdate.c $(srcdir)/getdate.y || yacc $(srcdir)/getdate.y
+ -bison -o getdate.c $(srcdir)/getdate.y || $(YACC) $(srcdir)/getdate.y
test ! -f y.tab.c || mv y.tab.c getdate.c
# Make the rename atomic, in case sed is interrupted and later rerun.
posixtm.c: posixtm.y
- -bison -o posixtm.tab.c $(srcdir)/posixtm.y || yacc $(srcdir)/posixtm.y
+ -bison -o posixtm.tab.c $(srcdir)/posixtm.y \
+ || $(YACC) $(srcdir)/posixtm.y
test ! -f y.tab.c || mv y.tab.c posixtm.tab.c
sed -e 's/yy/zz/g' posixtm.tab.c > tposixtm.c
mv tposixtm.c posixtm.c
diff --git a/lib/fsusage.c b/lib/fsusage.c
index b43491343..2a1fe86c7 100644
--- a/lib/fsusage.c
+++ b/lib/fsusage.c
@@ -20,6 +20,10 @@
int statfs ();
+#if defined (STATFS_OSF1) /* DEC Alpha running OSF/1 */
+# include <sys/mount.h>
+#endif
+
#if defined(STAT_STATFS2_BSIZE) && !defined(_IBMR2) /* 4.3BSD, SunOS 4, HP-UX, AIX PS/2. */
#include <sys/vfs.h>
#endif
@@ -80,6 +84,14 @@ get_fs_usage (path, disk, fsp)
char *path, *disk;
struct fs_usage *fsp;
{
+#if defined (STATFS_OSF1)
+ struct statfs fsd;
+
+ if (statfs (path, &fsd, sizeof (struct statfs)) != 0)
+ return (-1);
+#define convert_blocks(b) adjust_blocks ((b),fsd.f_fsize, 512)
+#endif /* STATFS_OSF1 */
+
#ifdef STAT_STATFS2_FS_DATA /* Ultrix. */
struct fs_data fsd;