2017-10-01 Paul Eggert <eggert@cs.ucla.edu>
+ fsusage: remove SVR2 support
+ SVR2 was obsolete by 1986 and is no longer supported by anybody,
+ and its code was getting in the way of use of this module by
+ Emacs, which has its own ‘read’ function anyway.
+ * lib/fsusage.c: Do not include sys/filsys.h.
+ (get_fs_usage): Remove SVR2-specific code.
+ * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE):
+ Do not test for sys/filsys.h or set STAT_READ_FILSYS.
+ * modules/fsusage (Depends-on): Do not depend on full-read.
+
Simplify autoupdate of licenses
* config/srclistvars.sh (GNUWWWLICENSES): Move to a more-typical
place.
# if HAVE_SYS_FS_S5PARAM_H /* Fujitsu UXP/V */
# include <sys/fs/s5param.h>
# endif
-# if defined HAVE_SYS_FILSYS_H && !defined _CRAY
-# include <sys/filsys.h> /* SVR2 */
-# endif
# if HAVE_SYS_STATFS_H
# include <sys/statfs.h>
# endif
fsp->fsu_files = PROPAGATE_ALL_ONES (fsd.fd_req.gtot);
fsp->fsu_ffree = PROPAGATE_ALL_ONES (fsd.fd_req.gfree);
-#elif defined STAT_READ_FILSYS /* SVR2 */
-# ifndef SUPERBOFF
-# define SUPERBOFF (SUPERB * 512)
-# endif
-
- struct filsys fsd;
- int fd;
-
- if (! disk)
- {
- errno = 0;
- return -1;
- }
-
- fd = open (disk, O_RDONLY);
- if (fd < 0)
- return -1;
- lseek (fd, (off_t) SUPERBOFF, 0);
- if (full_read (fd, (char *) &fsd, sizeof fsd) != sizeof fsd)
- {
- close (fd);
- return -1;
- }
- close (fd);
-
- fsp->fsu_blocksize = (fsd.s_type == Fs2b ? 1024 : 512);
- fsp->fsu_blocks = PROPAGATE_ALL_ONES (fsd.s_fsize);
- fsp->fsu_bfree = PROPAGATE_ALL_ONES (fsd.s_tfree);
- fsp->fsu_bavail = PROPAGATE_TOP_BIT (fsd.s_tfree);
- fsp->fsu_bavail_top_bit_set = EXTRACT_TOP_BIT (fsd.s_tfree) != 0;
- fsp->fsu_files = (fsd.s_isize == -1
- ? UINTMAX_MAX
- : (fsd.s_isize - 2) * INOPB * (fsd.s_type == Fs2b ? 2 : 1));
- fsp->fsu_ffree = PROPAGATE_ALL_ONES (fsd.s_tinode);
-
#elif defined STAT_STATFS3_OSF1 /* OSF/1 */
struct statfs fsd;
-# serial 31
+# serial 32
# Obtaining file system usage information.
# Copyright (C) 1997-1998, 2000-2001, 2003-2017 Free Software Foundation, Inc.
fi
fi
-if test $ac_fsusage_space = no; then
- # SVR2
- # (AIX, HP-UX, OSF/1 already handled above.)
- AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include <sys/filsys.h>
- ]])],
- [AC_DEFINE([STAT_READ_FILSYS], [1],
- [Define if there is no specific function for reading file systems usage
- information and you have the <sys/filsys.h> header file. (SVR2)])
- ac_fsusage_space=yes])
-fi
-
AS_IF([test $ac_fsusage_space = yes], [$1], [$2])
])
# Prerequisites of lib/fsusage.c not done by gl_FILE_SYSTEM_USAGE.
AC_DEFUN([gl_PREREQ_FSUSAGE_EXTRA],
[
- AC_CHECK_HEADERS([dustat.h sys/fs/s5param.h sys/filsys.h sys/statfs.h])
+ AC_CHECK_HEADERS([dustat.h sys/fs/s5param.h sys/statfs.h])
gl_STATFS_TRUNCATES
])
largefile
stdbool
stdint
-full-read [test $gl_cv_fs_space = yes]
configure.ac:
gl_FSUSAGE