mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 12:32:40 +03:00
Sync with gnulib 4d4877e6c2123c4862c321f3eab28a55bf886216.
Remove support for AIX PS/2. * m4.include/gnulib/fsusage.m4: (gl_PREREQ_FSUSAGE_EXTRA): Don't check for dustat.h. * lib/unixcompat.h: Remove code for AIX PS/2. * lib/stat-size.h (ST_NBLOCKSIZE): Likewise. * lib/vfs/vfs.c: Likewise. * src/filemanager/mountlist.c: Likewise. * src/vfs/smbfs/helpers/include/includes.h: Likewise. Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
610bf3a9d9
commit
792d25a48b
@ -83,10 +83,6 @@
|
||||
This loses when mixing HP-UX and BSD file systems with NFS. */
|
||||
#define ST_NBLOCKSIZE 1024
|
||||
#else /* !hpux */
|
||||
#if defined _AIX && defined _I386
|
||||
/* AIX PS/2 counts st_blocks in 4K units. */
|
||||
#define ST_NBLOCKSIZE (4 * 1024)
|
||||
#else
|
||||
#if defined _CRAY
|
||||
#define ST_NBLOCKS(statbuf) \
|
||||
(S_ISREG ((statbuf).st_mode) || S_ISDIR ((statbuf).st_mode) \
|
||||
@ -94,7 +90,6 @@
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef ST_NBLOCKS
|
||||
#define ST_NBLOCKS(statbuf) ((statbuf).st_blocks)
|
||||
|
@ -19,10 +19,6 @@
|
||||
#include <sys/sysmacros.h>
|
||||
#endif
|
||||
|
||||
#if defined(_AIX)
|
||||
#include <time.h> /* AIX for tm */
|
||||
#endif
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
/*** typedefs(not structures) and defined constants **********************************************/
|
||||
|
@ -82,10 +82,6 @@ vfs_class *current_vfs = NULL;
|
||||
|
||||
/*** file scope macro definitions ****************************************************************/
|
||||
|
||||
#if defined(_AIX) && !defined(NAME_MAX)
|
||||
#define NAME_MAX FILENAME_MAX
|
||||
#endif
|
||||
|
||||
#define VFS_FIRST_HANDLE 100
|
||||
|
||||
/*** file scope type declarations ****************************************************************/
|
||||
|
@ -199,7 +199,7 @@ int check_f_blocks_size[sizeof fsd.f_blocks * CHAR_BIT <= 32 ? -1 : 1];
|
||||
ac_fsusage_space=yes
|
||||
AC_DEFINE([STAT_STATFS2_BSIZE], [1],
|
||||
[Define if statfs takes 2 args and struct statfs has a field named f_bsize.
|
||||
(4.3BSD, SunOS 4, HP-UX, AIX PS/2)])
|
||||
(4.3BSD, SunOS 4, HP-UX)])
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -337,6 +337,6 @@ choke -- this is a workaround for a Sun-specific problem
|
||||
# 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/statfs.h])
|
||||
AC_CHECK_HEADERS([sys/fs/s5param.h sys/statfs.h])
|
||||
gl_STATFS_TRUNCATES
|
||||
])
|
||||
|
@ -78,9 +78,6 @@
|
||||
#ifdef HAVE_SYS_STATFS_H
|
||||
#include <sys/statfs.h>
|
||||
#endif
|
||||
#ifdef HAVE_DUSTAT_H /* AIX PS/2 */
|
||||
#include <sys/dustat.h>
|
||||
#endif
|
||||
|
||||
#ifdef MOUNTED_GETMNTENT1 /* glibc, HP-UX, IRIX, Cygwin, Android,
|
||||
also (obsolete) 4.3BSD, SunOS, Dynix */
|
||||
@ -565,35 +562,6 @@ dev_from_mount_options (char const *mount_options)
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
||||
#if defined _AIX && defined _I386
|
||||
/* AIX PS/2 does not supply statfs. */
|
||||
|
||||
static int
|
||||
statfs (char *file, struct statfs *fsb)
|
||||
{
|
||||
struct stat stats;
|
||||
struct dustat fsd;
|
||||
|
||||
if (stat (file, &stats) != 0)
|
||||
return -1;
|
||||
if (dustat (stats.st_dev, 0, &fsd, sizeof (fsd)))
|
||||
return -1;
|
||||
fsb->f_type = 0;
|
||||
fsb->f_bsize = fsd.du_bsize;
|
||||
fsb->f_blocks = fsd.du_fsize - fsd.du_isize;
|
||||
fsb->f_bfree = fsd.du_tfree;
|
||||
fsb->f_bavail = fsd.du_tfree;
|
||||
fsb->f_files = (fsd.du_isize - 2) * fsd.du_inopb;
|
||||
fsb->f_ffree = fsd.du_tinode;
|
||||
fsb->f_fsid.val[0] = fsd.du_site;
|
||||
fsb->f_fsid.val[1] = fsd.du_pckno;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* _AIX && _I386 */
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
||||
#if defined MOUNTED_GETMNTENT1 && defined __linux__ /* GNU/Linux, Android */
|
||||
|
||||
/* Unescape the paths in mount tables.
|
||||
@ -1523,7 +1491,7 @@ get_fs_usage (char const *file, char const *disk, struct fs_usage *fsp)
|
||||
|
||||
#elif defined STAT_STATFS4 /* SVR3, Dynix, old Irix, old AIX */
|
||||
|
||||
#if !defined _AIX && !defined _SEQUENT_
|
||||
#if !defined _SEQUENT_
|
||||
#define f_bavail f_bfree
|
||||
#endif
|
||||
|
||||
@ -1535,7 +1503,7 @@ get_fs_usage (char const *file, char const *disk, struct fs_usage *fsp)
|
||||
/* Empirically, the block counts on most SVR3 and SVR3-derived
|
||||
systems seem to always be in terms of 512-byte blocks,
|
||||
no matter what value f_bsize has. */
|
||||
#if defined _AIX || defined _CRAY
|
||||
#if defined _CRAY
|
||||
fsp->fsu_blocksize = PROPAGATE_ALL_ONES (fsd.f_bsize);
|
||||
#else
|
||||
fsp->fsu_blocksize = 512;
|
||||
|
@ -197,10 +197,6 @@
|
||||
#include <sys/statfs.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_DUSTAT_H
|
||||
#include <sys/dustat.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_STATVFS_H
|
||||
#include <sys/statvfs.h>
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user