diff options
author | Bruno Haible <bruno@clisp.org> | 2007-08-19 09:10:56 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2007-08-19 09:10:56 +0000 |
commit | 757e397c630b3078b0b3d67f8e901295569d8400 (patch) | |
tree | 3a805be4132ad57f65c901e36712b4a3e55d4311 /tests/test-lseek.c | |
parent | d2d412207bf7ceffe7ad8bdd29c8355ae3781258 (diff) | |
download | gnulib-757e397c630b3078b0b3d67f8e901295569d8400.tar.gz |
Another lseek bug on BeOS.
Diffstat (limited to 'tests/test-lseek.c')
-rw-r--r-- | tests/test-lseek.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test-lseek.c b/tests/test-lseek.c index f1f956e995..1948920a4a 100644 --- a/tests/test-lseek.c +++ b/tests/test-lseek.c @@ -49,7 +49,11 @@ main (int argc, char **argv) ASSERT (lseek (0, (off_t)-4, SEEK_CUR) == -1); ASSERT (errno == EINVAL); errno = 0; +#if ! defined __BEOS__ + /* POSIX says that the last lseek call, when failing, does not change + the current offset. But BeOS sets it to 0. */ ASSERT (lseek (0, (off_t)0, SEEK_CUR) == 2); +#endif #if 0 /* leads to SIGSYS on IRIX 6.5 */ ASSERT (lseek (0, (off_t)0, (SEEK_SET | SEEK_CUR | SEEK_END) + 1) == -1); ASSERT (errno == EINVAL); @@ -59,7 +63,11 @@ main (int argc, char **argv) ASSERT (lseek (1, (off_t)-4, SEEK_CUR) == -1); ASSERT (errno == EINVAL); errno = 0; +#if ! defined __BEOS__ + /* POSIX says that the last lseek call, when failing, does not change + the current offset. But BeOS sets it to 0. */ ASSERT (lseek (1, (off_t)0, SEEK_CUR) == 2); +#endif #if 0 /* leads to SIGSYS on IRIX 6.5 */ ASSERT (lseek (1, (off_t)0, (SEEK_SET | SEEK_CUR | SEEK_END) + 1) == -1); ASSERT (errno == EINVAL); |