mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-15 05:29:10 +08:00
Cygwin: Add new APIs tc[gs]etwinsize()
New APIs tcgetwinsize/tcsetwinsize are added, which is added in POSIX.1-2024. Reviewed-by: Corinna Vinschen <corinna@vinschen.de> Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
This commit is contained in:
parent
41baac804d
commit
0eef1b6c96
@ -1530,9 +1530,11 @@ tcflush SIGFE
|
||||
tcgetattr SIGFE
|
||||
tcgetpgrp SIGFE
|
||||
tcgetsid SIGFE
|
||||
tcgetwinsize SIGFE
|
||||
tcsendbreak SIGFE
|
||||
tcsetattr SIGFE
|
||||
tcsetpgrp SIGFE
|
||||
tcsetwinsize SIGFE
|
||||
tdelete SIGFE
|
||||
tdestroy NOSIGFE
|
||||
telldir SIGFE
|
||||
|
@ -1333,6 +1333,8 @@ fhandler_base::ioctl (unsigned int cmd, void *buf)
|
||||
break;
|
||||
case FIONREAD:
|
||||
case TIOCSCTTY:
|
||||
case TIOCGWINSZ:
|
||||
case TIOCSWINSZ:
|
||||
set_errno (ENOTTY);
|
||||
res = -1;
|
||||
break;
|
||||
|
@ -301,6 +301,8 @@ speed_t cfgetospeed(const struct termios *);
|
||||
int cfsetispeed (struct termios *, speed_t);
|
||||
int cfsetospeed (struct termios *, speed_t);
|
||||
int cfsetspeed (struct termios *, speed_t);
|
||||
int tcgetwinsize(int fd, const struct winsize *winsz);
|
||||
int tcsetwinsize(int fd, const struct winsize *winsz);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -9,6 +9,8 @@ What's new:
|
||||
|
||||
- New API call: timespec_get.
|
||||
|
||||
- New API calls: tcgetwinsize, tcsetwinsize.
|
||||
|
||||
- New POSIX-defined entry points posix_spawn_file_actions_addchdir and
|
||||
posix_spawn_file_actions_addfchdir. These are the same as the already
|
||||
exported posix_spawn_file_actions_addchdir_np and
|
||||
|
@ -398,3 +398,15 @@ cfmakeraw(struct termios *tp)
|
||||
tp->c_cflag &= ~(CSIZE | PARENB);
|
||||
tp->c_cflag |= CS8;
|
||||
}
|
||||
|
||||
extern "C" int
|
||||
tcgetwinsize (int fd, const struct winsize *winsz)
|
||||
{
|
||||
return ioctl (fd, TIOCGWINSZ, winsz);
|
||||
}
|
||||
|
||||
extern "C" int
|
||||
tcsetwinsize (int fd, const struct winsize *winsz)
|
||||
{
|
||||
return ioctl (fd, TIOCSWINSZ, winsz);
|
||||
}
|
||||
|
@ -4,6 +4,18 @@
|
||||
|
||||
<sect1 id="ov-new"><title>What's new and what changed in Cygwin</title>
|
||||
|
||||
<sect2 id="ov-new3.6"><title>What's new and what changed in 3.6</title>
|
||||
|
||||
<itemizedlist mark="bullet">
|
||||
|
||||
<listitem><para>
|
||||
New API calls: tcgetwinsize, tcsetwinsize.
|
||||
</para></listitem>
|
||||
|
||||
</itemizedlist>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2 id="ov-new3.5"><title>What's new and what changed in 3.5</title>
|
||||
|
||||
<itemizedlist mark="bullet">
|
||||
|
@ -990,9 +990,11 @@ also IEEE Std 1003.1-2017 (POSIX.1-2017).</para>
|
||||
tcgetattr
|
||||
tcgetpgrp
|
||||
tcgetsid
|
||||
tcgetwinsize
|
||||
tcsendbreak
|
||||
tcsetattr
|
||||
tcsetpgrp
|
||||
tcsetwinsize
|
||||
tdelete
|
||||
telldir
|
||||
tempnam
|
||||
|
Loading…
x
Reference in New Issue
Block a user