From b207b64d8ebe1b87ae04ebdbf631e5c52cba08f4 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Tue, 28 Mar 1995 05:44:58 +0000 Subject: [PATCH] added _S_IFMT, _S_IFREG, and S_ISREG --- compat.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/compat.h b/compat.h index 49edee3f9..554700550 100644 --- a/compat.h +++ b/compat.h @@ -48,6 +48,19 @@ # define MAXHOSTNAMELEN 64 #endif +/* + * Posix versions for those without... + */ +#ifndef _S_IFMT +# define _S_IFMT S_IFMT +#endif /* _S_IFMT */ +#ifndef _S_IFREG +# define _S_IFREG S_IFREG +#endif /* _S_IFREG */ +#ifndef S_ISREG +# define S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG) +#endif /* S_ISREG */ + /* * Emulate seteuid() and setegid() for HP-UX */