summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2012-06-24 17:05:25 +0200
committerBruno Haible <bruno@clisp.org>2012-06-24 17:05:25 +0200
commitf68069b334f95cfd6d18db4bb059b792beb48158 (patch)
tree350e4312de989f8f4ffef47ac51f6005f5275b32 /tests
parent68cd59a59fd614b4c3bef80c4d8a822a1662109b (diff)
downloadgnulib-f68069b334f95cfd6d18db4bb059b792beb48158.tar.gz
ptsname_r: Fix test failures on IRIX, Solaris.
* m4/ptsname_r.m4 (gl_PREREQ_PTSNAME_R): Test whether isatty sets errno when it fails. Define ISATTY_FAILS_WITHOUT_SETTING_ERRNO accordingly. * lib/ptsname_r.c: Include <fcntl.h>. (__ptsname_r): When isatty returned false, then on IRIX, Solaris set errno if fd is invalid. * tests/test-isatty.c (main): Update comments.
Diffstat (limited to 'tests')
-rw-r--r--tests/test-isatty.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test-isatty.c b/tests/test-isatty.c
index 263e05ed04..195a9066b9 100644
--- a/tests/test-isatty.c
+++ b/tests/test-isatty.c
@@ -45,14 +45,14 @@ main (void)
errno = 0;
ASSERT (isatty (-1) == 0);
ASSERT (errno == EBADF
- || errno == 0 /* seen on Solaris 10 */
+ || errno == 0 /* seen on IRIX 6.5, Solaris 10 */
);
}
{
errno = 0;
ASSERT (isatty (99) == 0);
ASSERT (errno == EBADF
- || errno == 0 /* seen on Solaris 10 */
+ || errno == 0 /* seen on IRIX 6.5, Solaris 10 */
);
}