mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
Sync with gnulib 1ff0e9684bb83a8277ffe22ac125ce7e90f6702b.
mountlist: Remove support for Cray with UNICOS 9. * m4.include/gnulib/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't define MOUNTED_LISTMNTENT. * src/filemanager/mountlist.c: Remove MOUNTED_LISTMNTENT case. Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
93f790dc7c
commit
03e69e1f36
@ -68,36 +68,6 @@ $ac_includes_default
|
|||||||
# make sure LIBS contains the appropriate -l option.
|
# make sure LIBS contains the appropriate -l option.
|
||||||
AC_FUNC_GETMNTENT
|
AC_FUNC_GETMNTENT
|
||||||
|
|
||||||
# This test must precede the ones for getmntent because Unicos-9 is
|
|
||||||
# reported to have the getmntent function, but its support is incompatible
|
|
||||||
# with other getmntent implementations.
|
|
||||||
|
|
||||||
# NOTE: Normally, I wouldn't use a check for system type as I've done for
|
|
||||||
# 'CRAY' below since that goes against the whole autoconf philosophy. But
|
|
||||||
# I think there is too great a chance that some non-Cray system has a
|
|
||||||
# function named listmntent to risk the false positive.
|
|
||||||
|
|
||||||
if test -z "$ac_list_mounted_fs"; then
|
|
||||||
# (obsolete) Cray UNICOS 9
|
|
||||||
AC_CACHE_CHECK([for listmntent of Cray/Unicos-9],
|
|
||||||
[fu_cv_sys_mounted_cray_listmntent],
|
|
||||||
[fu_cv_sys_mounted_cray_listmntent=no
|
|
||||||
AC_EGREP_CPP([yes],
|
|
||||||
[#ifdef _CRAY
|
|
||||||
yes
|
|
||||||
#endif
|
|
||||||
], [test $ac_cv_func_listmntent = yes \
|
|
||||||
&& fu_cv_sys_mounted_cray_listmntent=yes]
|
|
||||||
)
|
|
||||||
])
|
|
||||||
if test $fu_cv_sys_mounted_cray_listmntent = yes; then
|
|
||||||
ac_list_mounted_fs=found
|
|
||||||
AC_DEFINE([MOUNTED_LISTMNTENT], [1],
|
|
||||||
[Define if there is a function named listmntent that can be used to
|
|
||||||
list all mounted file systems. (UNICOS)])
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -z "$ac_list_mounted_fs"; then
|
if test -z "$ac_list_mounted_fs"; then
|
||||||
# AIX.
|
# AIX.
|
||||||
AC_CACHE_CHECK([for mntctl function and struct vmount],
|
AC_CACHE_CHECK([for mntctl function and struct vmount],
|
||||||
|
@ -112,10 +112,6 @@
|
|||||||
#include <sys/statfs.h>
|
#include <sys/statfs.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MOUNTED_LISTMNTENT /* (obsolete) Cray UNICOS 9 */
|
|
||||||
#include <mntent.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef MOUNTED_GETEXTMNTENT /* Solaris >= 8 */
|
#ifdef MOUNTED_GETEXTMNTENT /* Solaris >= 8 */
|
||||||
#include <sys/mnttab.h>
|
#include <sys/mnttab.h>
|
||||||
#endif
|
#endif
|
||||||
@ -592,37 +588,6 @@ read_file_system_list (void)
|
|||||||
GSList *mount_list = NULL;
|
GSList *mount_list = NULL;
|
||||||
struct mount_entry *me;
|
struct mount_entry *me;
|
||||||
|
|
||||||
#ifdef MOUNTED_LISTMNTENT /* (obsolete) Cray UNICOS 9 */
|
|
||||||
{
|
|
||||||
struct tabmntent *mntlist, *p;
|
|
||||||
|
|
||||||
/* the third and fourth arguments could be used to filter mounts,
|
|
||||||
but Crays doesn't seem to have any mounts that we want to
|
|
||||||
remove. Specifically, automount create normal NFS mounts.
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (listmntent (&mntlist, KMTAB, NULL, NULL) < 0)
|
|
||||||
return NULL;
|
|
||||||
for (p = mntlist; p; p = p->next)
|
|
||||||
{
|
|
||||||
struct mntent *mnt = p->ment;
|
|
||||||
|
|
||||||
me = g_malloc (sizeof (*me));
|
|
||||||
me->me_devname = g_strdup (mnt->mnt_fsname);
|
|
||||||
me->me_mountdir = g_strdup (mnt->mnt_dir);
|
|
||||||
me->me_mntroot = NULL;
|
|
||||||
me->me_type = g_strdup (mnt->mnt_type);
|
|
||||||
me->me_type_malloced = 1;
|
|
||||||
me->me_dummy = ME_DUMMY (me->me_devname, me->me_type);
|
|
||||||
me->me_remote = ME_REMOTE (me->me_devname, me->me_type);
|
|
||||||
me->me_dev = -1;
|
|
||||||
|
|
||||||
mount_list = g_slist_prepend (mount_list, me);
|
|
||||||
}
|
|
||||||
freemntlist (mntlist);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef MOUNTED_GETMNTENT1 /* glibc, HP-UX, IRIX, Cygwin, Android,
|
#ifdef MOUNTED_GETMNTENT1 /* glibc, HP-UX, IRIX, Cygwin, Android,
|
||||||
also (obsolete) 4.3BSD, SunOS */
|
also (obsolete) 4.3BSD, SunOS */
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user