Mercurial > gnulib
changeset 39923:8e97d3ff3b45
mountlist: Remove support for SVR2.
Reported by Andrew Borodin <aborodin@vmail.ru> in
<https://lists.gnu.org/archive/html/bug-gnulib/2018-10/msg00101.html>.
* lib/mountlist.c: Remove MOUNTED_FREAD case.
* m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't define
MOUNTED_FREAD.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Tue, 16 Oct 2018 18:44:33 +0200 |
parents | 19aa0e7905eb |
children | 8cd275b3c9a9 |
files | ChangeLog lib/mountlist.c m4/ls-mntd-fs.m4 |
diffstat | 3 files changed, 12 insertions(+), 32 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Wed Oct 17 10:30:48 2018 -0700 +++ b/ChangeLog Tue Oct 16 18:44:33 2018 +0200 @@ -1,3 +1,12 @@ +2018-10-16 Bruno Haible <bruno@clisp.org> + + mountlist: Remove support for SVR2. + Reported by Andrew Borodin <aborodin@vmail.ru> in + <https://lists.gnu.org/archive/html/bug-gnulib/2018-10/msg00101.html>. + * lib/mountlist.c: Remove MOUNTED_FREAD case. + * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't define + MOUNTED_FREAD. + 2018-10-15 Paul Eggert <eggert@cs.ucla.edu> libc-config: merge from glibc
--- a/lib/mountlist.c Wed Oct 17 10:30:48 2018 -0700 +++ b/lib/mountlist.c Tue Oct 16 18:44:33 2018 +0200 @@ -97,10 +97,6 @@ # include <dirent.h> #endif -#ifdef MOUNTED_FREAD /* (obsolete) SVR2 */ -# include <mnttab.h> -#endif - #ifdef MOUNTED_FREAD_FSTYP /* (obsolete) SVR3 */ # include <mnttab.h> # include <sys/fstyp.h> @@ -838,7 +834,7 @@ } #endif /* MOUNTED_GETFSSTAT */ -#if defined MOUNTED_FREAD || defined MOUNTED_FREAD_FSTYP /* (obsolete) SVR3, SVR2 */ +#if defined MOUNTED_FREAD_FSTYP /* (obsolete) SVR3 */ { struct mnttab mnt; char *table = "/etc/mnttab"; @@ -851,19 +847,12 @@ while (fread (&mnt, sizeof mnt, 1, fp) > 0) { me = xmalloc (sizeof *me); -# ifdef GETFSTYP /* SVR3. */ me->me_devname = xstrdup (mnt.mt_dev); -# else - me->me_devname = xmalloc (strlen (mnt.mt_dev) + 6); - strcpy (me->me_devname, "/dev/"); - strcpy (me->me_devname + 5, mnt.mt_dev); -# endif me->me_mountdir = xstrdup (mnt.mt_filsys); me->me_mntroot = NULL; me->me_dev = (dev_t) -1; /* Magic; means not known yet. */ me->me_type = ""; me->me_type_malloced = 0; -# ifdef GETFSTYP /* SVR3. */ if (need_fs_type) { struct statfs fsd; @@ -876,7 +865,6 @@ me->me_type_malloced = 1; } } -# endif me->me_dummy = ME_DUMMY (me->me_devname, me->me_type); me->me_remote = ME_REMOTE (me->me_devname, me->me_type); @@ -897,7 +885,7 @@ if (fclose (fp) == EOF) goto free_then_fail; } -#endif /* MOUNTED_FREAD || MOUNTED_FREAD_FSTYP. */ +#endif /* MOUNTED_FREAD_FSTYP. */ #ifdef MOUNTED_GETMNTTBL /* (obsolete) DolphinOS */ {
--- a/m4/ls-mntd-fs.m4 Wed Oct 17 10:30:48 2018 -0700 +++ b/m4/ls-mntd-fs.m4 Tue Oct 16 18:44:33 2018 +0200 @@ -1,4 +1,4 @@ -# serial 34 +# serial 35 # How to list mounted file systems. # Copyright (C) 1998-2004, 2006, 2009-2018 Free Software Foundation, Inc. @@ -354,23 +354,6 @@ fi if test -z "$ac_list_mounted_fs"; then - # (obsolete) SVR2. - AC_CACHE_CHECK([whether it is possible to resort to fread on /etc/mnttab], - [fu_cv_sys_mounted_fread], - [AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include <mnttab.h>]])], - [fu_cv_sys_mounted_fread=yes], - [fu_cv_sys_mounted_fread=no]) - ]) - if test $fu_cv_sys_mounted_fread = yes; then - ac_list_mounted_fs=found - AC_DEFINE([MOUNTED_FREAD], [1], - [Define if there is no specific function for reading the list of - mounted file systems. fread will be used to read /etc/mnttab. - (SVR2) ]) - fi - fi - - if test -z "$ac_list_mounted_fs"; then # Interix / BSD alike statvfs # the code is really interix specific, so make sure, we're on it. case "$host" in