[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
filemode: Remove Cray support
From: |
Bruno Haible |
Subject: |
filemode: Remove Cray support |
Date: |
Sun, 20 Dec 2020 22:33:55 +0100 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-197-generic; KDE/5.18.0; x86_64; ; ) |
The AC_STRUCT_ST_DM_MODE macro caught my eye: its name starts with AC_ but
it is not part of Autoconf.
Looking deeper, I find that a web search for
"checking for st_dm_mode in struct stat... yes"
finds 0 hits. That's because st_dm_mode existed only on Cray [1]. We missed
it when removing Cray support in July [2][3].
[1] http://owentrek.com/rkowen/howto/cugc90dmf/article/indexM.html
[2] https://lists.gnu.org/archive/html/bug-gnulib/2020-07/msg00139.html
[3] https://lists.gnu.org/archive/html/bug-gnulib/2020-07/msg00179.html
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.
diff --git a/lib/filemode.c b/lib/filemode.c
index e1b0690..15e3551 100644
--- a/lib/filemode.c
+++ b/lib/filemode.c
@@ -20,17 +20,6 @@
#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))
diff --git a/m4/filemode.m4 b/m4/filemode.m4
index 5aaaa1a..8bbfcdb 100644
--- a/m4/filemode.m4
+++ b/m4/filemode.m4
@@ -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
index 5dad161..0000000
--- a/m4/st_dm_mode.m4
+++ /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
- ]
-)
diff --git a/modules/filemode b/modules/filemode
index be442ba..95d3e0f 100644
--- a/modules/filemode
+++ b/modules/filemode
@@ -6,7 +6,6 @@ Files:
lib/filemode.h
lib/filemode.c
m4/filemode.m4
-m4/st_dm_mode.m4
Depends-on:
sys_stat
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- filemode: Remove Cray support,
Bruno Haible <=