projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(ftypelet): Handle doors.
[gnulib.git]
/
lib
/
filemode.c
diff --git
a/lib/filemode.c
b/lib/filemode.c
index
e61f212
..
c4fb54f
100644
(file)
--- a/
lib/filemode.c
+++ b/
lib/filemode.c
@@
-1,5
+1,5
@@
/* filemode.c -- make a string describing file modes
/* filemode.c -- make a string describing file modes
- Copyright (C) 1985, 1990, 1993, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1985, 1990, 1993, 1998
, 1999
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-89,6
+89,9
@@
#if !defined(S_ISNWK) && defined(S_IFNWK) /* HP/UX */
# define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK)
#endif
#if !defined(S_ISNWK) && defined(S_IFNWK) /* HP/UX */
# define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK)
#endif
+#if !defined(S_ISDOOR) && defined(S_IFDOOR) /* Solaris 2.5 and up */
+# define S_ISDOOR(m) (((m) & S_IFMT) == S_IFDOOR)
+#endif
/* Look at read, write, and execute bits in BITS and set
flags in CHARS accordingly. */
/* Look at read, write, and execute bits in BITS and set
flags in CHARS accordingly. */
@@
-142,6
+145,7
@@
setst (short unsigned int bits, char *chars)
/* Return a character indicating the type of file described by
file mode BITS:
'd' for directories
/* Return a character indicating the type of file described by
file mode BITS:
'd' for directories
+ 'D' for doors
'b' for block special files
'c' for character special files
'm' for multiplexor files
'b' for block special files
'c' for character special files
'm' for multiplexor files
@@
-185,6
+189,10
@@
ftypelet (long int bits)
if (S_ISNWK (bits))
return 'n';
#endif
if (S_ISNWK (bits))
return 'n';
#endif
+#ifdef S_ISDOOR
+ if (S_ISDOOR (bits))
+ return 'D';
+#endif
/* The following two tests are for Cray DMF (Data Migration
Facility), which is a HSM file system. A migrated file has a
/* The following two tests are for Cray DMF (Data Migration
Facility), which is a HSM file system. A migrated file has a