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/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
#include <sys/time.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
|
@ -10,7 +10,7 @@ while ! ln -s x $shared.lock; do
|
||||||
done
|
done
|
||||||
test -f $shared.cur || echo 0 > $shared.cur
|
test -f $shared.cur || echo 0 > $shared.cur
|
||||||
test -f $shared.max || echo 0 > $shared.max
|
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
|
if test $new -gt $(cat $shared.max); then
|
||||||
echo $new > $shared.max
|
echo $new > $shared.max
|
||||||
fi
|
fi
|
||||||
|
@ -28,5 +28,5 @@ while ! ln -s x $shared.lock; do
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
test -f $shared.cur || echo 0 > $shared.cur
|
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
|
rm $shared.lock
|
||||||
|
|
Loading…
Reference in a new issue