* tests/test-ptsname.c: Include <errno.h>.
(main): Test behaviour with invalid file descriptor.
+2012-06-24 Bruno Haible <bruno@clisp.org>
+
+ ptsname test: Extend test.
+ * tests/test-ptsname.c: Include <errno.h>.
+ (main): Test behaviour with invalid file descriptor.
+
2012-06-23 Paul Eggert <eggert@cs.ucla.edu>
time: fix obsolete comment
#include "signature.h"
SIGNATURE_CHECK (ptsname, char *, (int));
+#include <errno.h>
#include <fcntl.h>
#include <signal.h>
#include <stdio.h>
alarm (5);
#endif
+ {
+ char *result;
+
+ errno = 0;
+ result = ptsname (-1);
+ ASSERT (result == NULL);
+ ASSERT (errno == EBADF
+ || errno == ENOTTY /* seen on glibc */
+ );
+ }
+
{
int fd;
char *result;