fix S_ISREG and S_ISDIR for Unix machines
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@46 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
82438c1d6f
commit
8c907c498d
@ -244,9 +244,9 @@ file_property(void)
|
|||||||
/* return an error number */
|
/* return an error number */
|
||||||
return(unify(ARG6, MkIntTerm(errno)));
|
return(unify(ARG6, MkIntTerm(errno)));
|
||||||
}
|
}
|
||||||
if (buf.st_mode & _S_IFREG)
|
if (S_ISREG(buf.st_mode))
|
||||||
unify(ARG2, MkAtomTerm(LookupAtom("regular")));
|
unify(ARG2, MkAtomTerm(LookupAtom("regular")));
|
||||||
else if (buf.st_mode & _S_IFDIR)
|
else if (S_ISDIR(buf.st_mode))
|
||||||
unify(ARG2, MkAtomTerm(LookupAtom("directory")));
|
unify(ARG2, MkAtomTerm(LookupAtom("directory")));
|
||||||
else if (S_ISFIFO(buf.st_mode))
|
else if (S_ISFIFO(buf.st_mode))
|
||||||
unify(ARG2, MkAtomTerm(LookupAtom("fifo")));
|
unify(ARG2, MkAtomTerm(LookupAtom("fifo")));
|
||||||
|
Reference in New Issue
Block a user