* tests/test-getlogin.c: Include <errno.h>.
(main): Avoid test failure on HP-UX 11.11.
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>
#include "signature.h"
SIGNATURE_CHECK (getlogin, char *, (void));
+#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
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;
}