From: eck Date: Wed, 21 Mar 1990 11:13:21 +0000 (+0000) Subject: adapted directory test for POSIX X-Git-Tag: release-5-5~1774 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=df33f1eeffaae8b1382147db1d1733bfa31f5139;p=ack.git adapted directory test for POSIX --- diff --git a/util/arch/archiver.c b/util/arch/archiver.c index 7b1c2b6fe..33bf42c06 100644 --- a/util/arch/archiver.c +++ b/util/arch/archiver.c @@ -62,6 +62,9 @@ typedef char BOOL; #define IO_SIZE (10 * 1024) #define equal(str1, str2) (!strncmp((str1), (str2), 14)) +#ifndef S_ISDIR +#define S_ISDIR(m) (m & S_IFDIR) /* is a directory */ +#endif BOOL verbose; BOOL app_fl; @@ -415,7 +418,7 @@ char *mess; error(FALSE, "cannot find %s\n", name); return; } - else if (status.st_mode & S_IFDIR) { + else if (S_ISDIR(status.st_mode) { error(FALSE, "%s is a directory (ignored)\n", name); return; }