1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-26 00:55:14 +00:00

- Use termios.h

PR:             110439
Submitted by:   Ed Schouten <ed@fxq.nl>
This commit is contained in:
Martin Wilke 2007-03-21 12:32:53 +00:00
parent be32e6e4cc
commit 3d5ec94e7d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=187883
2 changed files with 25 additions and 1 deletions

View File

@ -1,6 +1,6 @@
--- src/include/os_bsd.h.orig Sat Apr 24 18:09:46 1993
+++ src/include/os_bsd.h Mon Apr 3 21:27:21 2006
@@ -8,18 +8,32 @@
@@ -8,18 +8,36 @@
#include "os_unix.h"
@ -24,8 +24,12 @@
-#define HAS_INDEX /* index( ) instead of strchr( ) */
#define HAS_BCOPY /* bcopy( ), bzero( ) */
#define HAS_BSDRANDOM /* srandom( ) and random( ) */
+#ifdef __FreeBSD__
+#define HAS_POSIXTTY /* <termios.h> */
+#else
#define HAS_BSDTTY /* <sgtty.h> */
-#define HAS_BSDDIRS /* <sys/dir.h> */
+#endif
#define HAS_BSDRUSAGE /* getrusage( ) */
#define HAS_BSDRLIMIT /* getrlimit( ) */
#define HAS_DUP2

View File

@ -0,0 +1,20 @@
--- src/lib/cp/complete.c Wed Jun 19 05:55:38 1991
+++ src/lib/cp/complete.c Sat Mar 17 11:51:56 2007
@@ -445,14 +445,14 @@
ison = on;
if (ison == true) {
- (void) ioctl(fileno(cp_in), TERM_GET, (char *) &OS_Buf);
+ tcgetattr(fileno(cp_in), &OS_Buf);
sbuf = OS_Buf;
sbuf.c_cc[VEOF] = 0;
sbuf.c_cc[VEOL] = ESCAPE;
sbuf.c_cc[VEOL2] = CNTRL_D;
- (void) ioctl(fileno(cp_in), TERM_SET, (char *) &sbuf);
+ tcsetattr(fileno(cp_in), TCSANOW, &OS_Buf);
} else {
- (void) ioctl(fileno(cp_in), TERM_SET, (char *) &OS_Buf);
+ tcsetattr(fileno(cp_in), TCSANOW, &OS_Buf);
}
# endif