From 792d25a48ba7fc9e2aa1f82d8b15c13af2a65dcc Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Sun, 21 Oct 2018 11:52:57 +0300 Subject: [PATCH] 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 --- lib/stat-size.h | 5 ---- lib/unixcompat.h | 4 --- lib/vfs/vfs.c | 4 --- m4.include/gnulib/fsusage.m4 | 4 +-- src/filemanager/mountlist.c | 36 ++---------------------- src/vfs/smbfs/helpers/include/includes.h | 4 --- 6 files changed, 4 insertions(+), 53 deletions(-) diff --git a/lib/stat-size.h b/lib/stat-size.h index 682c1b2d4..3462ecdbb 100644 --- a/lib/stat-size.h +++ b/lib/stat-size.h @@ -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) diff --git a/lib/unixcompat.h b/lib/unixcompat.h index 627dc4b17..c7ff12ded 100644 --- a/lib/unixcompat.h +++ b/lib/unixcompat.h @@ -19,10 +19,6 @@ #include #endif -#if defined(_AIX) -#include /* AIX for tm */ -#endif - #include /*** typedefs(not structures) and defined constants **********************************************/ diff --git a/lib/vfs/vfs.c b/lib/vfs/vfs.c index 5093e4293..7a6eef9e2 100644 --- a/lib/vfs/vfs.c +++ b/lib/vfs/vfs.c @@ -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 ****************************************************************/ diff --git a/m4.include/gnulib/fsusage.m4 b/m4.include/gnulib/fsusage.m4 index ca7d5bd82..3764c8668 100644 --- a/m4.include/gnulib/fsusage.m4 +++ b/m4.include/gnulib/fsusage.m4 @@ -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 ]) diff --git a/src/filemanager/mountlist.c b/src/filemanager/mountlist.c index 412166f1a..078e6b9b9 100644 --- a/src/filemanager/mountlist.c +++ b/src/filemanager/mountlist.c @@ -78,9 +78,6 @@ #ifdef HAVE_SYS_STATFS_H #include #endif -#ifdef HAVE_DUSTAT_H /* AIX PS/2 */ -#include -#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; diff --git a/src/vfs/smbfs/helpers/include/includes.h b/src/vfs/smbfs/helpers/include/includes.h index 8d481ad1d..4a363ed0e 100644 --- a/src/vfs/smbfs/helpers/include/includes.h +++ b/src/vfs/smbfs/helpers/include/includes.h @@ -197,10 +197,6 @@ #include #endif -#ifdef HAVE_DUSTAT_H -#include -#endif - #ifdef HAVE_SYS_STATVFS_H #include #endif