Mercurial > hg > octave-nkf > gnulib-hg
changeset 8908:027b9a4512eb
Don't work around an lseek POSIX compliance bug on IRIX.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Sat, 02 Jun 2007 00:42:13 +0000 |
parents | f84ac9f04f6c |
children | dcf6f4e1ef96 |
files | ChangeLog doc/functions/lseek.texi tests/test-lseek.c |
diffstat | 3 files changed, 15 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-06-01 Bruno Haible <bruno@clisp.org> + + * tests/test-lseek.c (main): Disable test of errno for invalid third + argument. + * doc/functions/lseek.texi: Update. + 2007-05-28 Bruno Haible <bruno@clisp.org> * m4/intl.m4 (AM_INTL_SUBDIR): Substitute variables WOE32, WINDRES.
--- a/doc/functions/lseek.texi +++ b/doc/functions/lseek.texi @@ -22,4 +22,9 @@ On platforms where @code{off_t} is a 32-bit type, @code{lseek} does not work correctly with files larger than 2 GB. The fix is to use the @code{AC_SYS_LARGEFILE} macro. +@item +When the third argument is invalid, POSIX says that @code{lseek} should set +@code{errno} to @code{EINVAL} and return -1, but in this situation a +@code{SIGSYS} signal is raised on some platforms: +IRIX 6.5. @end itemize
--- a/tests/test-lseek.c +++ b/tests/test-lseek.c @@ -50,16 +50,20 @@ ASSERT (errno == EINVAL); errno = 0; ASSERT (lseek (0, (off_t)0, SEEK_CUR) == 2); +#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); +#endif ASSERT (lseek (1, (off_t)2, SEEK_SET) == 2); errno = 0; ASSERT (lseek (1, (off_t)-4, SEEK_CUR) == -1); ASSERT (errno == EINVAL); errno = 0; ASSERT (lseek (1, (off_t)0, SEEK_CUR) == 2); +#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); +#endif break; case '1': /* pipes */