From 792505ec4986e04d59a9f0101f06047cc706a722 Mon Sep 17 00:00:00 2001 From: Martin Wilke Date: Wed, 11 Apr 2007 20:12:06 +0000 Subject: - Use termios.h when available PR: 110879 Submitted by: Ed Schouten Approved by: maintainer --- databases/grass/files/patch-intr_char.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 databases/grass/files/patch-intr_char.c (limited to 'databases') diff --git a/databases/grass/files/patch-intr_char.c b/databases/grass/files/patch-intr_char.c new file mode 100644 index 000000000000..fe49370647dd --- /dev/null +++ b/databases/grass/files/patch-intr_char.c @@ -0,0 +1,27 @@ +--- 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 + #ifndef __MINGW32__ +-#ifdef HAVE_TERMIO_H ++#if defined(HAVE_TERMIOS_H) ++# include ++# define TYPE termios ++# define C c_cc[VINTR] ++#elif defined(HAVE_TERMIO_H) + # include + # define TYPE termio + # define C c_cc[VINTR] +@@ -32,7 +36,11 @@ + #ifndef __MINGW32__ + struct TYPE buf; + ++#ifdef HAVE_TERMIOS_H ++ tcgetattr (2, &buf); ++#else + ioctl (2, GET, &buf); ++#endif + c = buf.C; + #endif + return c; -- cgit v1.2.3