mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-19 04:49:25 +08:00
* 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.
This commit is contained in:
parent
023a2fa789
commit
d8a5f04695
@ -1,3 +1,13 @@
|
|||||||
|
2007-11-28 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
2007-11-28 Corinna Vinschen <corinna@vinschen.de>
|
2007-11-28 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* fhandler_socket.cc (fhandler_socket::recv_internal): Add MSG_WAITALL
|
* fhandler_socket.cc (fhandler_socket::recv_internal): Add MSG_WAITALL
|
||||||
|
@ -1130,7 +1130,7 @@ mtinfo_drive::ioctl (HANDLE mt, unsigned int cmd, void *buf)
|
|||||||
void
|
void
|
||||||
mtinfo::initialize ()
|
mtinfo::initialize ()
|
||||||
{
|
{
|
||||||
char name[CYG_MAX_PATH];
|
char name[MAX_PATH];
|
||||||
HANDLE mtx;
|
HANDLE mtx;
|
||||||
|
|
||||||
shared_name (name, "mtinfo_mutex", 0);
|
shared_name (name, "mtinfo_mutex", 0);
|
||||||
|
@ -1300,7 +1300,7 @@ fhandler_pty_master::ioctl (unsigned int cmd, void *arg)
|
|||||||
char *
|
char *
|
||||||
fhandler_pty_master::ptsname ()
|
fhandler_pty_master::ptsname ()
|
||||||
{
|
{
|
||||||
static char buf[32];
|
static char buf[TTY_NAME_MAX];
|
||||||
|
|
||||||
__small_sprintf (buf, "/dev/tty%d", get_unit ());
|
__small_sprintf (buf, "/dev/tty%d", get_unit ());
|
||||||
return buf;
|
return buf;
|
||||||
|
@ -108,7 +108,7 @@ openpty (int *amaster, int *aslave, char *name, struct termios *termp,
|
|||||||
struct winsize *winp)
|
struct winsize *winp)
|
||||||
{
|
{
|
||||||
int master, slave;
|
int master, slave;
|
||||||
char pts[CYG_MAX_PATH];
|
char pts[TTY_NAME_MAX];
|
||||||
|
|
||||||
if ((master = open ("/dev/ptmx", O_RDWR | O_NOCTTY)) >= 0)
|
if ((master = open ("/dev/ptmx", O_RDWR | O_NOCTTY)) >= 0)
|
||||||
{
|
{
|
||||||
|
@ -1931,8 +1931,8 @@ ttyname_r (int fd, char *buf, size_t buflen)
|
|||||||
extern "C" char *
|
extern "C" char *
|
||||||
ttyname (int fd)
|
ttyname (int fd)
|
||||||
{
|
{
|
||||||
static char name[TTY_NAME_MAX + 1];
|
static char name[TTY_NAME_MAX];
|
||||||
int ret = ttyname_r (fd, name, TTY_NAME_MAX + 1);
|
int ret = ttyname_r (fd, name, TTY_NAME_MAX);
|
||||||
if (ret)
|
if (ret)
|
||||||
{
|
{
|
||||||
set_errno (ret);
|
set_errno (ret);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user