4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-02-28 03:27:46 +08:00

* tty.cc (grantpt): Check for valid fd.

(unlockpt): Ditto.
This commit is contained in:
Christopher Faylor 2011-09-21 04:33:57 +00:00
parent 7c14eb0589
commit 36b6320736
3 changed files with 10 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2011-09-21 Christopher Faylor <me.cygwin2011@cgf.cx>
* tty.cc (grantpt): Check for valid fd.
(unlockpt): Ditto.
2011-09-02 Corinna Vinschen <corinna@vinschen.de> 2011-09-02 Corinna Vinschen <corinna@vinschen.de>
* net.cc (cygwin_getsockopt): Drop erroneous double conversion of error * net.cc (cygwin_getsockopt): Drop erroneous double conversion of error

View File

@ -16,7 +16,7 @@ details. */
#undef CloseHandle #undef CloseHandle
static cygthread NO_COPY threads[32]; static cygthread NO_COPY threads[64];
#define NTHREADS (sizeof (threads) / sizeof (threads[0])) #define NTHREADS (sizeof (threads) / sizeof (threads[0]))
DWORD NO_COPY cygthread::main_thread_id; DWORD NO_COPY cygthread::main_thread_id;

View File

@ -34,13 +34,15 @@ posix_openpt (int oflags)
extern "C" int extern "C" int
grantpt (int fd) grantpt (int fd)
{ {
return 0; cygheap_fdget cfd (fd);
return cfd < 0 ? -1 : 0;
} }
extern "C" int extern "C" int
unlockpt (int fd) unlockpt (int fd)
{ {
return 0; cygheap_fdget cfd (fd);
return cfd < 0 ? -1 : 0;
} }
extern "C" int extern "C" int