From c5364e6a932e9da9a885f88dc16956646a21ec18 Mon Sep 17 00:00:00 2001 From: jtc Date: Thu, 10 Oct 1996 14:34:37 +0000 Subject: [PATCH] S_ISFIFO(x) should not return true with sockets. S_ISSOCK(x) should not return true with fifos. Users who want the previous behavior can use (S_ISFIFO(x) || S_ISSOCK(x)). --- sys/sys/stat.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sys/sys/stat.h b/sys/sys/stat.h index b785a6958cb9..a2cc1dc600a4 100644 --- a/sys/sys/stat.h +++ b/sys/sys/stat.h @@ -1,4 +1,4 @@ -/* $NetBSD: stat.h,v 1.20 1996/05/16 22:17:49 cgd Exp $ */ +/* $NetBSD: stat.h,v 1.21 1996/10/10 14:34:37 jtc Exp $ */ /*- * Copyright (c) 1982, 1986, 1989, 1993 @@ -146,12 +146,10 @@ struct stat { #define S_ISCHR(m) ((m & 0170000) == 0020000) /* char special */ #define S_ISBLK(m) ((m & 0170000) == 0060000) /* block special */ #define S_ISREG(m) ((m & 0170000) == 0100000) /* regular file */ -#define S_ISFIFO(m) ((m & 0170000) == 0010000 || \ - (m & 0170000) == 0140000) /* fifo or socket */ +#define S_ISFIFO(m) ((m & 0170000) == 0010000) /* fifo */ #ifndef _POSIX_SOURCE #define S_ISLNK(m) ((m & 0170000) == 0120000) /* symbolic link */ -#define S_ISSOCK(m) ((m & 0170000) == 0010000 || \ - (m & 0170000) == 0140000) /* fifo or socket */ +#define S_ISSOCK(m) ((m & 0170000) == 0140000) /* socket */ #define S_ISWHT(m) ((m & 0170000) == 0160000) /* whiteout */ #endif