summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/fhandler_tty.cc
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2007-11-28 16:45:34 +0000
committerCorinna Vinschen <corinna@vinschen.de>2007-11-28 16:45:34 +0000
commitd8a5f0469569be846a7292b2ec591c49031ead40 (patch)
tree8d1cc6712f40ee20e70f5ecb4812fa9918aa0554 /winsup/cygwin/fhandler_tty.cc
parent023a2fa789b7700ed32f8d78655c03b4b273d42b (diff)
downloadcygnal-d8a5f0469569be846a7292b2ec591c49031ead40.tar.gz
cygnal-d8a5f0469569be846a7292b2ec591c49031ead40.tar.bz2
cygnal-d8a5f0469569be846a7292b2ec591c49031ead40.zip
* fhandler_tape.cc (mtinfo::initialize): Use MAX_PATH instead of
CYG_MAX_PATH. * fhandler_tty.cc (fhandler_pty_master::ptsname): Set buffer size to TTY_NAME_MAX. * syscalls.cc (ttyname): Eliminate the `+ 1' from the name buffer size since TTY_NAME_MAX already counts the trailing NUL. * libc/bsdlib.cc (openpty): Set pts buffer size to TTY_NAME_MAX.
Diffstat (limited to 'winsup/cygwin/fhandler_tty.cc')
-rw-r--r--winsup/cygwin/fhandler_tty.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc
index e86531ef0..6fed0e0f1 100644
--- a/winsup/cygwin/fhandler_tty.cc
+++ b/winsup/cygwin/fhandler_tty.cc
@@ -1300,7 +1300,7 @@ fhandler_pty_master::ioctl (unsigned int cmd, void *arg)
char *
fhandler_pty_master::ptsname ()
{
- static char buf[32];
+ static char buf[TTY_NAME_MAX];
__small_sprintf (buf, "/dev/tty%d", get_unit ());
return buf;