forked from lix-project/lix
* Cygwin compatibility.
This commit is contained in:
parent
f28ea27d83
commit
a03397be4c
|
@ -5,6 +5,7 @@
|
|||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
|
|
|
@ -10,7 +10,7 @@ while ! ln -s x $shared.lock; do
|
|||
done
|
||||
test -f $shared.cur || echo 0 > $shared.cur
|
||||
test -f $shared.max || echo 0 > $shared.max
|
||||
new=$(($(cat $shared.cur) + 1))
|
||||
new=$(expr $(cat $shared.cur) + 1)
|
||||
if test $new -gt $(cat $shared.max); then
|
||||
echo $new > $shared.max
|
||||
fi
|
||||
|
@ -28,5 +28,5 @@ while ! ln -s x $shared.lock; do
|
|||
sleep 1
|
||||
done
|
||||
test -f $shared.cur || echo 0 > $shared.cur
|
||||
echo $(($(cat $shared.cur) - 1)) > $shared.cur
|
||||
echo $(expr $(cat $shared.cur) - 1) > $shared.cur
|
||||
rm $shared.lock
|
||||
|
|
Loading…
Reference in a new issue