]> Savannah Git Hosting - gnulib.git/commitdiff
fsusage, mountlist, getloadavg, getgroups: Remove support for Ultrix.
authorBruno Haible <bruno@clisp.org>
Tue, 16 Oct 2018 19:25:00 +0000 (21:25 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 17 Oct 2018 23:46:16 +0000 (01:46 +0200)
* 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.

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

index 39164d927657303ee66186faea75b9964eb10e7c..5c8babfc5fbdd3cbb1195aece4d82b1201992ff8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
index e363227d1293d144a31036852946abf040e3b75c..221f89496055874635fbe0325d3530d1e498378f 100644 (file)
@@ -16,7 +16,7 @@ On some platforms, this function fails to reject a negative count,
 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},
index e33152aab039ec46759b1e067ac0a342779f4f4e..17daf9144a56ff6f233f029ac037e7523ec49740 100644 (file)
@@ -148,21 +148,6 @@ get_fs_usage (char const *file, char const *disk, struct fs_usage *fsp)
                         ? 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;
index ec137c158a925a88f3befe592dfe7ebd21c7316c..cd6f4d700090e49777631ac277ed1e4a14a8cba1 100644 (file)
@@ -58,8 +58,8 @@ int posix_getgroups (int, gid_t []) __asm ("_getgroups");
 #  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
index a1ab3423854b76313f9b0f73eccbcd415d56c57a..4e7eb0d23382e068bc86fe517b2c058ae8e230fa 100644 (file)
 #  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
 #  define MORE_BSD
 # endif
 
-# if defined (ultrix) && defined (mips)
-#  define decstation
-# endif
-
 # if defined (__SVR4) && !defined (SVR4)
 #  define SVR4
 # endif
 #   define LOAD_AVE_TYPE long
 #  endif
 
-#  ifdef decstation
-#   define LOAD_AVE_TYPE long
-#  endif
-
 #  ifdef sgi
 #   define LOAD_AVE_TYPE long
 #  endif
 #   define FSCALE 2048.0
 #  endif
 
-#  if defined (MIPS) || defined (SVR4) || defined (decstation)
+#  if defined (MIPS) || defined (SVR4)
 #   define FSCALE 256
 #  endif
 
index 01ad309f3fee3b43c11765e6defac7de64fba44e..9a94f42c79881273876ece501a46d3a2b650a1a2 100644 (file)
 # 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 @@ read_file_system_list (bool need_fs_type)
   }
 #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
index 44ba9bca3f7055bb77d36b29d55a96fdf98f48bb..feb1d6c34e242b76dc0a8a54e1a35f857b8a67cd 100644 (file)
@@ -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>.  */
index 96378ba5f0cdaa4ed3b2684620ea74daf6d988a4..c3ba4391ae2f4502fa6ada75b37b0d487edb4696 100644 (file)
@@ -263,41 +263,6 @@ int check_f_blocks_size[sizeof fsd.f_blocks * CHAR_BIT <= 32 ? -1 : 1];
     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])
 
 ])
index d38240259f09c8801006dbe9bd2821a1176adfb9..8cddb6ccdc83f3caa415b1f4cb8a6b97522d8660 100644 (file)
@@ -1,4 +1,4 @@
-# serial 20
+# serial 21
 
 dnl From Jim Meyering.
 dnl A wrapper around AC_FUNC_GETGROUPS.
@@ -34,7 +34,7 @@ AC_DEFUN([AC_FUNC_GETGROUPS],
       [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],
index 64a2dfcf789a7806b4db869e37a877ac72ce9c45..7a4efcc9c89b9835c6046d929a5748b84d68aaaf 100644 (file)
@@ -310,24 +310,6 @@ int getmntinfo (struct statfs **, int);
     fi
   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])