summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/fhandler_tty.cc
diff options
context:
space:
mode:
authorPierre Humblet <phumblet@phumblet.no-ip.org>2004-05-12 01:44:11 +0000
committerPierre Humblet <phumblet@phumblet.no-ip.org>2004-05-12 01:44:11 +0000
commit8bdfa78a69bf543f55cc05940fa698262fcd1010 (patch)
treeafe8e1bc62f57d9a29ac4e0a53050221d9bed077 /winsup/cygwin/fhandler_tty.cc
parent5b4c8ae219eb888667c4f345a3a254a1fd56cdff (diff)
downloadcygnal-8bdfa78a69bf543f55cc05940fa698262fcd1010.tar.gz
cygnal-8bdfa78a69bf543f55cc05940fa698262fcd1010.tar.bz2
cygnal-8bdfa78a69bf543f55cc05940fa698262fcd1010.zip
2004-05-12 Pierre Humblet <pierre.humblet@ieee.org>
* tty.h: Remove the %d or %x from all cygtty strings. (tty::open_output_mutex): Only declare. (tty::open_input_mutex): Ditto. (tty::open_mutex): New definition. * fhandlet_tty.cc (fhandler_tty_slave::open): Declare buf with size CYG_MAX_PATH and replace __small_printf calls by shared_name. * tty.cc (tty::create_inuse): Ditto. (tty::get_event): Ditto. (tty::common_init): Ditto. (tty::open_output_mutex): New method definition. (tty::open_input_mutex): Ditto. (tty::open_mutex): New method.
Diffstat (limited to 'winsup/cygwin/fhandler_tty.cc')
-rw-r--r--winsup/cygwin/fhandler_tty.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc
index 717a9924d..6233971cb 100644
--- a/winsup/cygwin/fhandler_tty.cc
+++ b/winsup/cygwin/fhandler_tty.cc
@@ -466,14 +466,14 @@ fhandler_tty_slave::open (int flags, mode_t)
set_flags ((flags & ~O_TEXT) | O_BINARY);
/* Create synchronisation events */
- char buf[40];
+ char buf[CYG_MAX_PATH];
/* output_done_event may or may not exist. It will exist if the tty
was opened by fhandler_tty_master::init, normally called at
startup if use_tty is non-zero. It will not exist if this is a
pty opened by fhandler_pty_master::open. In the former case, tty
output is handled by a separate thread which controls output. */
- __small_sprintf (buf, OUTPUT_DONE_EVENT, get_unit ());
+ shared_name (buf, OUTPUT_DONE_EVENT, get_unit ());
output_done_event = OpenEvent (EVENT_ALL_ACCESS, TRUE, buf);
if (!(output_mutex = get_ttyp ()->open_output_mutex ()))
@@ -488,7 +488,7 @@ fhandler_tty_slave::open (int flags, mode_t)
__seterrno ();
return 0;
}
- __small_sprintf (buf, INPUT_AVAILABLE_EVENT, get_unit ());
+ shared_name (buf, INPUT_AVAILABLE_EVENT, get_unit ());
if (!(input_available_event = OpenEvent (EVENT_ALL_ACCESS, TRUE, buf)))
{
termios_printf ("open input event failed, %E");
@@ -498,9 +498,9 @@ fhandler_tty_slave::open (int flags, mode_t)
/* The ioctl events may or may not exist. See output_done_event,
above. */
- __small_sprintf (buf, IOCTL_REQUEST_EVENT, get_unit ());
+ shared_name (buf, IOCTL_REQUEST_EVENT, get_unit ());
ioctl_request_event = OpenEvent (EVENT_ALL_ACCESS, TRUE, buf);
- __small_sprintf (buf, IOCTL_DONE_EVENT, get_unit ());
+ shared_name (buf, IOCTL_DONE_EVENT, get_unit ());
ioctl_done_event = OpenEvent (EVENT_ALL_ACCESS, TRUE, buf);
/* FIXME: Needs a method to eliminate tty races */