summaryrefslogtreecommitdiff
path: root/src/fsmagic.c
diff options
context:
space:
mode:
authorChristos Zoulas <christos@zoulas.com>1999-10-31 22:23:03 +0000
committerChristos Zoulas <christos@zoulas.com>1999-10-31 22:23:03 +0000
commit2d56c502b45e41c9318536c4ffce13b9cd2d43d7 (patch)
tree353d2decee9d90ca942b7495ab05e7b4cbfb524d /src/fsmagic.c
parent27e8e4d6c65515d7ddabda120c2e0fc67dbbe333 (diff)
downloadfile-git-2d56c502b45e41c9318536c4ffce13b9cd2d43d7.tar.gz
Recent changesFILE3_28
Diffstat (limited to 'src/fsmagic.c')
-rw-r--r--src/fsmagic.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/fsmagic.c b/src/fsmagic.c
index 9fd74f8c..ef5b5fbd 100644
--- a/src/fsmagic.c
+++ b/src/fsmagic.c
@@ -26,6 +26,9 @@
*/
#include "file.h"
+#ifdef __CYGWIN__
+#include <errno.h>
+#endif
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
@@ -54,7 +57,7 @@
#undef HAVE_MAJOR
#ifndef lint
-FILE_RCSID("@(#)$Id: fsmagic.c,v 1.29 1999/02/14 17:16:08 christos Exp $")
+FILE_RCSID("@(#)$Id: fsmagic.c,v 1.30 1999/10/31 22:23:03 christos Exp $")
#endif /* lint */
int
@@ -83,14 +86,21 @@ struct stat *sb;
return 1;
}
+#ifdef S_ISUID
if (sb->st_mode & S_ISUID) ckfputs("setuid ", stdout);
+#endif
+#ifdef S_ISGID
if (sb->st_mode & S_ISGID) ckfputs("setgid ", stdout);
+#endif
+#ifdef S_ISVTX
if (sb->st_mode & S_ISVTX) ckfputs("sticky ", stdout);
+#endif
switch (sb->st_mode & S_IFMT) {
case S_IFDIR:
ckfputs("directory", stdout);
return 1;
+#ifdef S_IFCHR
case S_IFCHR:
/*
* If -s has been specified, treat character special files
@@ -113,6 +123,8 @@ struct stat *sb;
(void) printf("character special");
#endif
return 1;
+#endif
+#ifdef S_IFBLK
case S_IFBLK:
/*
* If -s has been specified, treat block special files
@@ -135,6 +147,7 @@ struct stat *sb;
(void) printf("block special");
#endif
return 1;
+#endif
/* TODO add code to handle V7 MUX and Blit MUX files */
#ifdef S_IFIFO
case S_IFIFO: