[INTERPRETER]
* NEW: Don't use lockf and F_TLOCK if it does not exist. A workaround will have to be found! git-svn-id: svn://localhost/gambas/trunk@1214 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
ac3111a9eb
commit
7643ace3f5
@ -929,6 +929,8 @@ void STREAM_lock(STREAM *stream)
|
||||
if (lseek(fd, 0, SEEK_SET) < 0)
|
||||
goto __ERROR;
|
||||
|
||||
#ifdef F_TLOCK
|
||||
|
||||
if (lockf(fd, F_TLOCK, 0))
|
||||
{
|
||||
if (errno == EAGAIN)
|
||||
@ -937,6 +939,12 @@ void STREAM_lock(STREAM *stream)
|
||||
goto __ERROR;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
fprintf(stderr, "locking is not implemented\n");
|
||||
|
||||
#endif
|
||||
|
||||
if (lseek(fd, pos, SEEK_SET) < 0)
|
||||
goto __ERROR;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user