Mercurial > hg > octave-kai > gnulib-hg
changeset 13966:cd5c217f15be
getlogin, getlogin_r: Document HP-UX 11.11 bugs.
* tests/test-getlogin.c: Include <errno.h>.
(main): Avoid test failure on HP-UX 11.11.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Mon, 20 Dec 2010 12:43:41 +0100 |
parents | 9cc6c6504486 |
children | c0afec342ca5 |
files | ChangeLog tests/test-getlogin.c |
diffstat | 2 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -3,7 +3,9 @@ getlogin, getlogin_r: Document HP-UX 11.11 bugs. * doc/posix-functions/getlogin.texi: Document HP-UX 11.11 bug. * doc/posix-functions/getlogin_r.texi: Likewise. - * tests/test-getlogin_r.c (main): Avoid test failure on HP-UX 11.11. + * tests/test-getlogin.c: Include <errno.h>. + (main): Avoid test failure on HP-UX 11.11. + * tests/test-getlogin_r.c (main): Likewise. 2010-12-20 Bruno Haible <bruno@clisp.org>
--- a/tests/test-getlogin.c +++ b/tests/test-getlogin.c @@ -23,6 +23,7 @@ #include "signature.h" SIGNATURE_CHECK (getlogin, char *, (void)); +#include <errno.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -39,7 +40,10 @@ if (buf == NULL) { /* getlogin() fails when stdin is not connected to a tty. */ + ASSERT (errno == ENOTTY); +#if !defined __hpux /* On HP-UX 11.11 it fails anyway. */ ASSERT (! isatty (0)); +#endif fprintf (stderr, "Skipping test: stdin is not a tty.\n"); return 77; }