Mail Archives: djgpp/1993/07/20/16:59:26
> I'm trying to port the "woman" (enhanced "man") program
> recently posted to comp.sources.unix, and I'm running into
> two problems. There are references in the code to a waitpid
> function and S_ISREG macro/defined value.
> I'm currently using v. 1.09. Are these functions defined in
> 1.10?
The definition of S_ISREG should be in <sys/stat.h> and should be:
#define S_ISREG(x) (((x) & S_IFMT) == S_IFREG)
I don't know if this is in 1.10. I suppose it should be. There are
similar macros for other file types:
#define S_ISDIR(x) (((x) & S_IFMT) == S_IFDIR)
#define S_ISCHR(x) (((x) & S_IFMT) == S_IFCHR)
#define S_ISBLK(x) (((x) & S_IFMT) == S_IFBLK)
#define S_ISFIFO(x) (((x) & S_IFMT) == S_IFIFO)
--
Eric Backus
ericb AT lsid DOT hp DOT com
(206) 335-2495
- Raw text -