Mercurial > gnulib
changeset 39934:57d3bf2ca96d
fsusage, mountlist, getloadavg, getgroups: Remove support for Ultrix.
* m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't define
STAT_STATFS2_FS_DATA.
* lib/fsusage.c: Remove STAT_STATFS2_FS_DATA case.
* m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't define
MOUNTED_GETMNT.
* lib/mountlist.c: Remove MOUNTED_GETMNT case.
* lib/getloadavg.c (decstation): Remove definition and case.
* m4/getgroups.m4 (AC_FUNC_GETGROUPS): Mention NeXTstep, not Ultrix.
* lib/getgroups.c: Likewise.
* doc/posix-functions/getgroups.texi: Likewise.
* lib/time.in.h: Update comments.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Tue, 16 Oct 2018 21:25:00 +0200 |
parents | e448868abbc6 |
children | 3ab19de60a55 |
files | ChangeLog doc/posix-functions/getgroups.texi lib/fsusage.c lib/getgroups.c lib/getloadavg.c lib/mountlist.c lib/time.in.h m4/fsusage.m4 m4/getgroups.m4 m4/ls-mntd-fs.m4 |
diffstat | 10 files changed, 22 insertions(+), 122 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Tue Oct 16 21:09:51 2018 +0200 +++ b/ChangeLog Tue Oct 16 21:25:00 2018 +0200 @@ -1,3 +1,18 @@ +2018-10-16 Bruno Haible <bruno@clisp.org> + + fsusage, mountlist, getloadavg, getgroups: Remove support for Ultrix. + * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't define + STAT_STATFS2_FS_DATA. + * lib/fsusage.c: Remove STAT_STATFS2_FS_DATA case. + * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't define + MOUNTED_GETMNT. + * lib/mountlist.c: Remove MOUNTED_GETMNT case. + * lib/getloadavg.c (decstation): Remove definition and case. + * m4/getgroups.m4 (AC_FUNC_GETGROUPS): Mention NeXTstep, not Ultrix. + * lib/getgroups.c: Likewise. + * doc/posix-functions/getgroups.texi: Likewise. + * lib/time.in.h: Update comments. + 2018-10-16 Bruno Haible <bruno@clisp.org> getloadavg: Remove support for ConvexOS.
--- a/doc/posix-functions/getgroups.texi Tue Oct 16 21:09:51 2018 +0200 +++ b/doc/posix-functions/getgroups.texi Tue Oct 16 21:25:00 2018 +0200 @@ -16,7 +16,7 @@ even though that is less than the size that would be returned: FreeBSD 7.2. @item -On Ultrix 4.3, @code{getgroups (0, NULL)} always fails. See macro +On NeXTstep 3.2, @code{getgroups (0, NULL)} always fails. See macro @samp{AC_FUNC_GETGROUPS}. @item On very old systems, this function operated on an array of @samp{int},
--- a/lib/fsusage.c Tue Oct 16 21:09:51 2018 +0200 +++ b/lib/fsusage.c Tue Oct 16 21:25:00 2018 +0200 @@ -148,21 +148,6 @@ ? PROPAGATE_ALL_ONES (fsd.f_frsize) : PROPAGATE_ALL_ONES (fsd.f_bsize)); -#elif defined STAT_STATFS2_FS_DATA /* Ultrix */ - - struct fs_data fsd; - - if (statfs (file, &fsd) != 1) - return -1; - - fsp->fsu_blocksize = 1024; - fsp->fsu_blocks = PROPAGATE_ALL_ONES (fsd.fd_req.btot); - fsp->fsu_bfree = PROPAGATE_ALL_ONES (fsd.fd_req.bfree); - fsp->fsu_bavail = PROPAGATE_TOP_BIT (fsd.fd_req.bfreen); - fsp->fsu_bavail_top_bit_set = EXTRACT_TOP_BIT (fsd.fd_req.bfreen) != 0; - fsp->fsu_files = PROPAGATE_ALL_ONES (fsd.fd_req.gtot); - fsp->fsu_ffree = PROPAGATE_ALL_ONES (fsd.fd_req.gfree); - #elif defined STAT_STATFS3_OSF1 /* OSF/1 */ struct statfs fsd;
--- a/lib/getgroups.c Tue Oct 16 21:09:51 2018 +0200 +++ b/lib/getgroups.c Tue Oct 16 21:25:00 2018 +0200 @@ -58,8 +58,8 @@ # define getgroups posix_getgroups # endif -/* On at least Ultrix 4.3 and NextStep 3.2, getgroups (0, NULL) always - fails. On other systems, it returns the number of supplemental +/* On at least NeXTstep 3.2, getgroups (0, NULL) always fails. + On other systems, it returns the number of supplemental groups for the process. This function handles that special case and lets the system-provided function handle all others. However, it can fail with ENOMEM if memory is tight. It is unspecified
--- a/lib/getloadavg.c Tue Oct 16 21:09:51 2018 +0200 +++ b/lib/getloadavg.c Tue Oct 16 21:25:00 2018 +0200 @@ -97,11 +97,6 @@ # define WINDOWS32 # endif -# if !defined (BSD) && defined (ultrix) -/* Ultrix behaves like BSD on Vaxen. */ -# define BSD -# endif - # ifdef NeXT /* NeXT in the 2.{0,1,2} releases defines BSD in <sys/param.h>, which conflicts with the definition understood in this file, that this @@ -141,10 +136,6 @@ # define MORE_BSD # endif -# if defined (ultrix) && defined (mips) -# define decstation -# endif - # if defined (__SVR4) && !defined (SVR4) # define SVR4 # endif @@ -180,10 +171,6 @@ # define LOAD_AVE_TYPE long # endif -# ifdef decstation -# define LOAD_AVE_TYPE long -# endif - # ifdef sgi # define LOAD_AVE_TYPE long # endif @@ -218,7 +205,7 @@ # define FSCALE 2048.0 # endif -# if defined (MIPS) || defined (SVR4) || defined (decstation) +# if defined (MIPS) || defined (SVR4) # define FSCALE 256 # endif
--- a/lib/mountlist.c Tue Oct 16 21:09:51 2018 +0200 +++ b/lib/mountlist.c Tue Oct 16 21:25:00 2018 +0200 @@ -84,11 +84,6 @@ # include <sys/statvfs.h> #endif -#ifdef MOUNTED_GETMNT /* (obsolete) Ultrix */ -# include <sys/mount.h> -# include <sys/fs_types.h> -#endif - #ifdef MOUNTED_FS_STAT_DEV /* Haiku, also (obsolete) BeOS */ # include <fs_info.h> # include <dirent.h> @@ -647,35 +642,6 @@ } #endif /* MOUNTED_GETMNTINFO2 */ -#ifdef MOUNTED_GETMNT /* (obsolete) Ultrix */ - { - int offset = 0; - int val; - struct fs_data fsd; - - while (errno = 0, - 0 < (val = getmnt (&offset, &fsd, sizeof (fsd), NOSTAT_MANY, - (char *) 0))) - { - me = xmalloc (sizeof *me); - me->me_devname = xstrdup (fsd.fd_req.devname); - me->me_mountdir = xstrdup (fsd.fd_req.path); - me->me_mntroot = NULL; - me->me_type = gt_names[fsd.fd_req.fstype]; - me->me_type_malloced = 0; - 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 = fsd.fd_req.dev; - - /* Add to the linked list. */ - *mtail = me; - mtail = &me->me_next; - } - if (val < 0) - goto free_then_fail; - } -#endif /* MOUNTED_GETMNT. */ - #if defined MOUNTED_FS_STAT_DEV /* Haiku, also (obsolete) BeOS */ { /* The next_dev() and fs_stat_dev() system calls give the list of
--- a/lib/time.in.h Tue Oct 16 21:09:51 2018 +0200 +++ b/lib/time.in.h Tue Oct 16 21:25:00 2018 +0200 @@ -48,7 +48,7 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ -/* Some systems don't define struct timespec (e.g., AIX 4.1, Ultrix 4.3). +/* Some systems don't define struct timespec (e.g., AIX 4.1). Or they define it with the wrong member names or define it in <sys/time.h> (e.g., FreeBSD circa 1997). Stock Mingw prior to 3.0 does not define it, but the pthreads-win32 library defines it in <pthread.h>. */
--- a/m4/fsusage.m4 Tue Oct 16 21:09:51 2018 +0200 +++ b/m4/fsusage.m4 Tue Oct 16 21:25:00 2018 +0200 @@ -263,41 +263,6 @@ fi fi - if test $ac_fsusage_space = no; then - # Ultrix - AC_CACHE_CHECK([for two-argument statfs with struct fs_data (Ultrix)], - [fu_cv_sys_stat_fs_data], - [AC_RUN_IFELSE([AC_LANG_SOURCE([[ -#include <sys/types.h> -#ifdef HAVE_SYS_PARAM_H -#include <sys/param.h> -#endif -#ifdef HAVE_SYS_MOUNT_H -#include <sys/mount.h> -#endif -#ifdef HAVE_SYS_FS_TYPES_H -#include <sys/fs_types.h> -#endif - int - main () - { - struct fs_data fsd; - /* Ultrix's statfs returns 1 for success, - 0 for not mounted, -1 for failure. */ - return statfs (".", &fsd) != 1; - }]])], - [fu_cv_sys_stat_fs_data=yes], - [fu_cv_sys_stat_fs_data=no], - [fu_cv_sys_stat_fs_data=no]) - ]) - if test $fu_cv_sys_stat_fs_data = yes; then - ac_fsusage_space=yes - AC_DEFINE([STAT_STATFS2_FS_DATA], [1], - [Define if statfs takes 2 args and the second argument has - type struct fs_data. (Ultrix)]) - fi - fi - AS_IF([test $ac_fsusage_space = yes], [$1], [$2]) ])
--- a/m4/getgroups.m4 Tue Oct 16 21:09:51 2018 +0200 +++ b/m4/getgroups.m4 Tue Oct 16 21:25:00 2018 +0200 @@ -1,4 +1,4 @@ -# serial 20 +# serial 21 dnl From Jim Meyering. dnl A wrapper around AC_FUNC_GETGROUPS. @@ -34,7 +34,7 @@ [AC_RUN_IFELSE( [AC_LANG_PROGRAM( [AC_INCLUDES_DEFAULT], - [[/* On Ultrix 4.3, getgroups (0, 0) always fails. */ + [[/* On NeXTstep 3.2, getgroups (0, 0) always fails. */ return getgroups (0, 0) == -1;]]) ], [ac_cv_func_getgroups_works=yes],
--- a/m4/ls-mntd-fs.m4 Tue Oct 16 21:09:51 2018 +0200 +++ b/m4/ls-mntd-fs.m4 Tue Oct 16 21:25:00 2018 +0200 @@ -311,24 +311,6 @@ fi if test -z "$ac_list_mounted_fs"; then - # (obsolete) Ultrix. - AC_CACHE_CHECK([for getmnt function], - [fu_cv_sys_mounted_getmnt], - [AC_PREPROC_IFELSE([AC_LANG_SOURCE([[ -#include <sys/fs_types.h> -#include <sys/mount.h>]])], - [fu_cv_sys_mounted_getmnt=yes], - [fu_cv_sys_mounted_getmnt=no]) - ]) - if test $fu_cv_sys_mounted_getmnt = yes; then - ac_list_mounted_fs=found - AC_DEFINE([MOUNTED_GETMNT], [1], - [Define if there is a function named getmnt for reading the list of - mounted file systems. (Ultrix)]) - fi - fi - - if test -z "$ac_list_mounted_fs"; then # Haiku, also (obsolete) BeOS. AC_CHECK_FUNCS([next_dev fs_stat_dev]) AC_CHECK_HEADERS([fs_info.h])