From owner-freebsd-hackers Sun Sep 17 15:02:18 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id PAA28024 for hackers-outgoing; Sun, 17 Sep 1995 15:02:18 -0700 Received: from kf0yn.ampr.org (s087.netins.net [167.142.100.87]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id PAA28018 for ; Sun, 17 Sep 1995 15:02:14 -0700 Received: from [44.50.32.7] (kf0yn-mb.ampr.org [44.50.32.7]) by kf0yn.ampr.org (8.6.11/8.6.5) with SMTP id RAA26582 for ; Sun, 17 Sep 1995 17:02:42 -0500 X-Sender: cmf@44.50.32.6 Message-Id: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Sun, 17 Sep 1995 17:03:16 -0500 To: hackers@freebsd.org From: cmf@netins.net (Carl Fongheiser) Subject: Diff to POSIX-ify ttyname.c Sender: owner-hackers@freebsd.org Precedence: bulk Apologies if something like this has already been committed -- I somehow got dropped off cvs-all. --- /usr/src/lib/libc/gen/ttyname.c Fri Sep 8 21:58:45 1995 +++ ttyname.c Sun Sep 17 16:34:57 1995 @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include #include @@ -52,7 +52,7 @@ int fd; { struct stat sb; - struct sgttyb ttyb; + struct termios ttyb; DB *db; DBT data, key; struct { @@ -61,7 +61,7 @@ } bkey; /* Must be a terminal. */ - if (ioctl(fd, TIOCGETP, &ttyb) < 0) + if (tcgetattr(fd, &ttyb) < 0) return (NULL); /* Must be a character device. */ if (fstat(fd, &sb) || !S_ISCHR(sb.st_mode))