fix backtrackable C-interface (patch from Christophe Billard).

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@526 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc
2002-06-11 05:43:01 +00:00
parent 7176752a68
commit 0f027df00c
5 changed files with 20 additions and 19 deletions

View File

@@ -276,9 +276,11 @@ file_property(void)
#if HAVE_READLINK
{
char tmp[256];
if (readlink(fd,tmp,256) == -1) {
int n;
if ((n = readlink(fd,tmp,256)) == -1) {
return(unify(ARG7, MkIntTerm(errno)));
}
tmp[n] = '\0';
if(!unify(ARG6,MkAtomTerm(LookupAtom(tmp)))) {
return(FALSE);
}