Hash :
d2d77c0e
Author :
Date :
2007-05-28T12:43:30
Improve lseek module. * lib/lseek.c (rpl_lseek): Detect EBADF on mingw. * lib/unistd_.h (lseek): Scale back link warning message. * tests/test-lseek.c: Beef up test. * tests/test-lseek.sh: Exercise more facets of lseek. Reported by Bruno Haible.
#!/bin/sh
tmpfiles=
trap 'rm -fr $tmpfiles' 1 2 3 15
tmpfiles=t-lseek.tmp
# seekable files
./test-lseek${EXEEXT} 0 < "$srcdir/test-lseek.sh" > t-lseek.tmp || exit 1
# pipes
echo hi | ./test-lseek${EXEEXT} 1 | cat || exit 1
# closed descriptors
./test-lseek${EXEEXT} 2 <&- >&- || exit 1
rm -rf $tmpfiles
exit 0