* Cygwin compatibility.

This commit is contained in:
Eelco Dolstra 2005-01-04 17:38:26 +00:00
parent f28ea27d83
commit a03397be4c
2 changed files with 3 additions and 2 deletions

View file

@ -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>

View file

@ -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