ports/110879: [databases/grass] Use termios.h when available

Ed Schouten ed at fxq.nl
Mon Mar 26 18:50:08 UTC 2007

>Number:         110879
>Category:       ports
>Synopsis:       [databases/grass] Use termios.h when available
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar 26 18:50:02 GMT 2007
>Originator:     Ed Schouten
>Release:        FreeBSD 6.2-STABLE i386
System: FreeBSD palm.hoeg.nl 6.2-STABLE FreeBSD 6.2-STABLE #0: Sun Feb 11 22:32:09 CET 2007 root at palm.hoeg.nl:/usr/obj/usr/src/sys/PALM i386
The databases/grass port makes use of sgtty.h to read the interrupt
character value. We could use termios.h, which works without
COMPAT_43TTY as well. The autoconf script already checks for termios.h.
Create a directory called `files' and place the following patch in it:

--- lib/gis/intr_char.c	Thu Feb  9 04:08:56 2006
+++ lib/gis/intr_char.c	Mon Mar 26 19:27:22 2007
@@ -2,7 +2,11 @@
 #include <grass/config.h>
 #ifndef __MINGW32__
+#if defined(HAVE_TERMIOS_H)
+# include <termios.h>
+# define TYPE termios
+# define C c_cc[VINTR]
+#elif defined(HAVE_TERMIO_H)
 # include <termio.h>
 # define TYPE termio
 # define C c_cc[VINTR]
@@ -32,7 +36,11 @@
 #ifndef __MINGW32__    
     struct TYPE buf;
+    tcgetattr (2, &buf);
     ioctl (2, GET, &buf);
     c = buf.C;
     return c;

More information about the freebsd-ports-bugs mailing list