diff options
Diffstat (limited to 'src/fsmagic.c')
-rw-r--r-- | src/fsmagic.c | 15 |
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: |