diff options
author | Ulrich Drepper <drepper@redhat.com> | 1997-08-05 23:36:21 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1997-08-05 23:36:21 +0000 |
commit | 044b16f4e9ae773187f4fee8a9a0a54f9a51f13f (patch) | |
tree | 58bc41e16535e0d0f61d51e6af15ce4128864fc9 /login | |
parent | c59a94711c6a9d38811b828863076f39000831b4 (diff) | |
download | glibc-044b16f4e9ae773187f4fee8a9a0a54f9a51f13f.tar.gz glibc-044b16f4e9ae773187f4fee8a9a0a54f9a51f13f.tar.xz glibc-044b16f4e9ae773187f4fee8a9a0a54f9a51f13f.zip |
update for 2.0.5pre1
Diffstat (limited to 'login')
-rw-r--r-- | login/login.c | 6 | ||||
-rw-r--r-- | login/pty.h | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/login/login.c b/login/login.c index 7cbe8b603e..0df11c6895 100644 --- a/login/login.c +++ b/login/login.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. @@ -42,7 +42,7 @@ tty_name (int fd, char **tty, size_t buf_len) { rv = ttyname_r (fd, buf, buf_len); - if (rv < 0 || memchr (buf, '\0', buf_len)) + if (rv != 0 || memchr (buf, '\0', buf_len)) /* We either got an error, or we succeeded and the returned name fit in the buffer. */ break; @@ -65,6 +65,8 @@ tty_name (int fd, char **tty, size_t buf_len) __set_errno (ENOMEM); break; } + + buf = new_buf; } if (rv == 0) diff --git a/login/pty.h b/login/pty.h index 09024a787a..731ab12d82 100644 --- a/login/pty.h +++ b/login/pty.h @@ -1,5 +1,5 @@ /* pty.h - Functions for pseudo TTY handling. - Copyright (C) 1996 Free Software Foundation, Inc. + Copyright (C) 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -22,6 +22,7 @@ #define _PTY_H 1 #include <features.h> +#include <ioctl-types.h> #include <termios.h> |