isatty: Fix test failure of ptsname_r on native Windows.
authorBruno Haible <bruno@clisp.org>
Sat, 4 Feb 2012 18:13:34 +0000 (19:13 +0100)
committerBruno Haible <bruno@clisp.org>
Sat, 4 Feb 2012 18:13:34 +0000 (19:13 +0100)
commit5eb934dfd78a8ff086ffef87f5d4ec18e2d45cf7
treec25f7344498fec2be951cbf3b058f36de8e527fb
parent4e9e5f62f6a6d5488f0697cb38c8c7847a25ebf8
isatty: Fix test failure of ptsname_r on native Windows.

* lib/isatty.c (_isatty_nothrow): Upon exception, return 0, not -1,
and don't set errno.
(isatty): Test first whether fd is valid. Set errno when returning 0.
ChangeLog
lib/isatty.c