[newlib-cygwin] Cygwin: pty: Define mask_switch_to_pcon_in() in fhandler_tty.cc.
Corinna Vinschen
corinna@sourceware.org
Mon Feb 10 10:04:00 GMT 2020
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=2bae1591711f7694b8c79e00c172a0b873d82ff0
commit 2bae1591711f7694b8c79e00c172a0b873d82ff0
Author: Takashi Yano <takashi.yano@nifty.ne.jp>
Date: Sun Feb 9 23:46:00 2020 +0900
Cygwin: pty: Define mask_switch_to_pcon_in() in fhandler_tty.cc.
- This patch moves the definition of mask_switch_to_pcon() from
fhandler.h to fhandler_tty.cc.
Diff:
---
winsup/cygwin/fhandler.h | 9 +--------
winsup/cygwin/fhandler_tty.cc | 10 ++++++++++
2 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h
index 82527ec..53b6c2c 100644
--- a/winsup/cygwin/fhandler.h
+++ b/winsup/cygwin/fhandler.h
@@ -2207,14 +2207,7 @@ class fhandler_pty_slave: public fhandler_pty_common
void set_switch_to_pcon (int fd);
void reset_switch_to_pcon (void);
void push_to_pcon_screenbuffer (const char *ptr, size_t len);
- void mask_switch_to_pcon_in (bool mask)
- {
- if (!mask && get_ttyp ()->pcon_pid &&
- get_ttyp ()->pcon_pid != myself->pid &&
- !!pinfo (get_ttyp ()->pcon_pid))
- return;
- get_ttyp ()->mask_switch_to_pcon_in = mask;
- }
+ void mask_switch_to_pcon_in (bool mask);
void fixup_after_attach (bool native_maybe, int fd);
bool is_line_input (void)
{
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc
index 181bed5..a92bcfc 100644
--- a/winsup/cygwin/fhandler_tty.cc
+++ b/winsup/cygwin/fhandler_tty.cc
@@ -1395,6 +1395,16 @@ fhandler_pty_slave::write (const void *ptr, size_t len)
return towrite;
}
+void
+fhandler_pty_slave::mask_switch_to_pcon_in (bool mask)
+{
+ if (!mask && get_ttyp ()->pcon_pid &&
+ get_ttyp ()->pcon_pid != myself->pid &&
+ !!pinfo (get_ttyp ()->pcon_pid))
+ return;
+ get_ttyp ()->mask_switch_to_pcon_in = mask;
+}
+
bool
fhandler_pty_common::to_be_read_from_pcon (void)
{
More information about the Cygwin-cvs
mailing list