aboutsummaryrefslogtreecommitdiff
path: root/net/pmf/files
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2007-03-27 07:38:14 +0000
committerMartin Wilke <miwi@FreeBSD.org>2007-03-27 07:38:14 +0000
commit9753d885d25b4d19a627a95162930aff175cd459 (patch)
treeac9e3635e392742e2f607dcca354e81157bffc39 /net/pmf/files
parent51ed7e33288a282d8e47b22b9ce9567c308c3cde (diff)
downloadports-9753d885d25b4d19a627a95162930aff175cd459.tar.gz
ports-9753d885d25b4d19a627a95162930aff175cd459.zip
- Use termios.h instead of sgtty.h
PR: 110875 Submitted by: Ed Schouten <ed@fxq.nl>
Notes
Notes: svn path=/head/; revision=188464
Diffstat (limited to 'net/pmf/files')
-rw-r--r--net/pmf/files/patch-ac5
-rw-r--r--net/pmf/files/patch-ad7
-rw-r--r--net/pmf/files/patch-tty.c28
3 files changed, 36 insertions, 4 deletions
diff --git a/net/pmf/files/patch-ac b/net/pmf/files/patch-ac
index e6fe42221e56..05c960f98efa 100644
--- a/net/pmf/files/patch-ac
+++ b/net/pmf/files/patch-ac
@@ -18,7 +18,7 @@
#define SYSTEM_NEWS_FILE "NEWS"
#define SYSTEM_HELP_DIR "helpfiles"
#define SYSTEM_SOUND_DIR "soundfiles"
-@@ -63,7 +65,9 @@
+@@ -63,14 +65,20 @@
#define X_OUTPUT_PROGRAM "cat"
/* What system? Define one either BSD or SYSV:*/
@@ -28,7 +28,8 @@
/* #define SYSV */
/* What ioctl do we use for the ttys? */
-@@ -71,6 +75,10 @@
+-#ifdef BSD
++#if defined(BSD) && !defined(__FreeBSD__)
# define USE_TIOCGETP
#else
# define USE_TCGETA
diff --git a/net/pmf/files/patch-ad b/net/pmf/files/patch-ad
index b345d105b966..dc361333ce5d 100644
--- a/net/pmf/files/patch-ad
+++ b/net/pmf/files/patch-ad
@@ -1,7 +1,10 @@
--- main.c.orig Sun Sep 22 12:13:43 1991
+++ main.c Fri Feb 11 04:14:00 2000
-@@ -15,6 +15,7 @@
- #include <sgtty.h>
+@@ -12,9 +12,9 @@
+ #include <stdio.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+-#include <sgtty.h>
#include <signal.h>
#include <setjmp.h>
+#include <sys/param.h>
diff --git a/net/pmf/files/patch-tty.c b/net/pmf/files/patch-tty.c
new file mode 100644
index 000000000000..9ad3aed2838d
--- /dev/null
+++ b/net/pmf/files/patch-tty.c
@@ -0,0 +1,28 @@
+--- tty.c Fri Oct 29 10:09:06 1993
++++ tty.c Mon Mar 26 20:02:26 2007
+@@ -18,6 +18,9 @@
+ /* Added by dodurham@stimpy.ualr.edu for Linux machines */
+ #ifdef SYSV
+ # include <termio.h>
++#elif defined(__FreeBSD__)
++# include <termios.h>
++# define termio termios
+ #else
+ # include <sgtty.h>
+ #endif
+@@ -161,13 +164,13 @@
+
+ pmf_save_terminal()
+ {
+- if (ioctl(0, TCGETA, &terminal_state) == -1)
++ if (tcgetattr(0, &terminal_state) == -1)
+ fatal("ioctl TCGETA failed in pmf_save_terminal.");
+ } /* pmf_save_terminal */
+
+ pmf_restore_terminal()
+ {
+- if (ioctl(0, TCSETA, &terminal_state) == -1)
++ if (tcsetattr(0, TCSANOW, &terminal_state) == -1)
+ fatal("ioctl TCSETA failed in pmf_restore_terminal.");
+ } /* pmf_restore_terminal */
+