]> Savannah Git Hosting - gnulib.git/commitdiff
filemode: Remove Cray support.
authorBruno Haible <bruno@clisp.org>
Sun, 20 Dec 2020 21:19:26 +0000 (22:19 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 20 Dec 2020 21:36:46 +0000 (22:36 +0100)
* lib/filemode.c (IS_MIGRATED_FILE): Remove macro.
(filemodestring): Don't produce an 'M' type.
* m4/filemode.m4 (gl_FILEMODE): Don't invoke AC_STRUCT_ST_DM_MODE.
* m4/st_dm_mode.m4: Remove file.
* modules/filemode (Files): Remove it.

ChangeLog
lib/filemode.c
m4/filemode.m4
m4/st_dm_mode.m4 [deleted file]
modules/filemode

index c281ec4399d2c7f2e67c8ccfdceaccd010b5e9aa..9af234b677f745db01e02454d8492a8aa4827b17 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2020-12-20  Bruno Haible  <bruno@clisp.org>
+
+       filemode: Remove Cray support.
+       * lib/filemode.c (IS_MIGRATED_FILE): Remove macro.
+       (filemodestring): Don't produce an 'M' type.
+       * m4/filemode.m4 (gl_FILEMODE): Don't invoke AC_STRUCT_ST_DM_MODE.
+       * m4/st_dm_mode.m4: Remove file.
+       * modules/filemode (Files): Remove it.
+
 2020-12-20  Paul Eggert  <eggert@cs.ucla.edu>
 
        free-posix: assume glibc 2.33 fixes this.
index e1b069093f8f416e6cb5825e2ae6531eda2e37fc..15e3551368bcc946c997f67012e0ab8c17e77184 100644 (file)
 
 #include "filemode.h"
 
-/* The following is for Cray DMF (Data Migration Facility), which is a
-   HSM file system.  A migrated file has a 'st_dm_mode' that is
-   different from the normal 'st_mode', so any tests for migrated
-   files should use the former.  */
-#if HAVE_ST_DM_MODE
-# define IS_MIGRATED_FILE(statp) \
-    (S_ISOFD (statp->st_dm_mode) || S_ISOFL (statp->st_dm_mode))
-#else
-# define IS_MIGRATED_FILE(statp) 0
-#endif
-
 #if ! HAVE_DECL_STRMODE
 
 /* Return a character indicating the type of file described by
@@ -126,7 +115,6 @@ strmode (mode_t mode, char *str)
         for files whose type cannot be determined solely from st_mode:
 
             'F' semaphore
-            'M' migrated file (Cray DMF)
             'Q' message queue
             'S' shared memory object
             'T' typed memory object
@@ -169,8 +157,6 @@ filemodestring (struct stat const *statp, char *str)
 
   if (S_TYPEISSEM (statp))
     str[0] = 'F';
-  else if (IS_MIGRATED_FILE (statp))
-    str[0] = 'M';
   else if (S_TYPEISMQ (statp))
     str[0] = 'Q';
   else if (S_TYPEISSHM (statp))
index 5aaaa1a167df96ce0d315b4c7ce88a9cd25085eb..8bbfcdbafe0a9823c28c63872a3d33fe7787723b 100644 (file)
@@ -1,4 +1,4 @@
-# filemode.m4 serial 8
+# filemode.m4 serial 9
 dnl Copyright (C) 2002, 2005-2006, 2009-2020 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -6,6 +6,5 @@ dnl with or without modifications, as long as this notice is preserved.
 
 AC_DEFUN([gl_FILEMODE],
 [
-  AC_REQUIRE([AC_STRUCT_ST_DM_MODE])
   AC_CHECK_DECLS_ONCE([strmode])
 ])
diff --git a/m4/st_dm_mode.m4 b/m4/st_dm_mode.m4
deleted file mode 100644 (file)
index 5dad161..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-# serial 6
-
-# Copyright (C) 1998-1999, 2001, 2009-2020 Free Software Foundation, Inc.
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# Define HAVE_ST_DM_MODE if struct stat has an st_dm_mode member.
-
-AC_DEFUN([AC_STRUCT_ST_DM_MODE],
- [AC_CACHE_CHECK([for st_dm_mode in struct stat], [ac_cv_struct_st_dm_mode],
-   [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-#include <sys/types.h>
-#include <sys/stat.h>]], [[struct stat s; s.st_dm_mode;]])],
-     [ac_cv_struct_st_dm_mode=yes],
-     [ac_cv_struct_st_dm_mode=no])])
-
-  if test $ac_cv_struct_st_dm_mode = yes; then
-    AC_DEFINE([HAVE_ST_DM_MODE], [1],
-              [Define if struct stat has an st_dm_mode member.])
-  fi
- ]
-)
index be442ba59251bb3c3a00c799a5a959ed7bb9cc91..95d3e0f714e276e5eb5b9ca9324e6b10b2cb6bc6 100644 (file)
@@ -6,7 +6,6 @@ Files:
 lib/filemode.h
 lib/filemode.c
 m4/filemode.m4
-m4/st_dm_mode.m4
 
 Depends-on:
 sys_stat