aboutsummaryrefslogtreecommitdiffstats
path: root/net/pmf
diff options
context:
space:
mode:
authormiwi <miwi@FreeBSD.org>2007-03-27 15:38:14 +0800
committermiwi <miwi@FreeBSD.org>2007-03-27 15:38:14 +0800
commit21f0de655c376cced91f21ecc01d50b99478ea75 (patch)
tree4c9c734f34ebb0a10660e9d6b48ba52fb574bce4 /net/pmf
parent43ec0447c05680746fb5b001857fba45560e3766 (diff)
downloadfreebsd-ports-gnome-21f0de655c376cced91f21ecc01d50b99478ea75.tar.gz
freebsd-ports-gnome-21f0de655c376cced91f21ecc01d50b99478ea75.tar.zst
freebsd-ports-gnome-21f0de655c376cced91f21ecc01d50b99478ea75.zip
- Use termios.h instead of sgtty.h
PR: 110875 Submitted by: Ed Schouten <ed@fxq.nl>
Diffstat (limited to 'net/pmf')
-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 */
+