bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

m4-1.4.9b on IRIX 6.5


From: Bruno Haible
Subject: m4-1.4.9b on IRIX 6.5
Date: Sat, 2 Jun 2007 02:43:32 +0200
User-agent: KMail/1.5.4

Gary V. Vaughan reported in
  http://article.gmane.org/gmane.comp.lib.gnulib.bugs/10446
that on IRIX 6.5:

test-lseek.sh fails with SIGSYS.

This works around it by disabling the corresponding portion of the test.
It's rare that program code uses a wrong 3rd argument of lseek.
Gnulib is a portability library; we spend time finding workarounds for bugs
which affect one platform but not another one. Programs use lseek usually with
a constant and symbolic third argument.

2007-06-01  Bruno Haible  <address@hidden>

        * tests/test-lseek.c (main): Disable test of errno for invalid third
        argument.
        * doc/functions/lseek.texi: Update.

--- tests/test-lseek.c  31 May 2007 01:09:04 -0000      1.3
+++ tests/test-lseek.c  2 Jun 2007 00:35:59 -0000
@@ -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 */
--- doc/functions/lseek.texi    28 May 2007 13:59:41 -0000      1.3
+++ doc/functions/lseek.texi    2 Jun 2007 00:35:59 -0000
@@ -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.
address@hidden
+When the third argument is invalid, POSIX says that @code{lseek} should set
address@hidden to @code{EINVAL} and return -1, but in this situation a
address@hidden signal is raised on some platforms:
+IRIX 6.5.
 @end itemize





reply via email to

[Prev in Thread] Current Thread [Next in Thread]