Skip to content

Commit

Permalink
Add support for GNU/Hurd to GRASS plugin qtermwidget/kpty.cpp.
Browse files Browse the repository at this point in the history
The GNU/Hurd porting guidelines document the following:
"
 Missing termio.h

 Change it to use termios.h (check for it properly with autoconf
 HAVE_TERMIOS_H or the __GLIBC__ macro)

 Also, change calls to ioctl(fd, TCGETS, ...) and ioctl(fd, TCSETS, ...)
 with tcgetattr(fd, ...) and tcsetattr(fd, ...).
"
https://www.gnu.org/software/hurd/hurd/porting/guidelines.html#Missing_termio_h_tt_
  • Loading branch information
sebastic committed May 14, 2016
1 parent 45e7da1 commit 666050c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/plugins/grass/qtermwidget/kpty.cpp
Expand Up @@ -120,7 +120,7 @@ extern "C" {
#if defined (__FreeBSD__) || defined(__FreeBSD_kernel__) || defined (__NetBSD__) || defined (__OpenBSD__) || defined (__bsdi__) || defined(__APPLE__) || defined (__DragonFly__) #if defined (__FreeBSD__) || defined(__FreeBSD_kernel__) || defined (__NetBSD__) || defined (__OpenBSD__) || defined (__bsdi__) || defined(__APPLE__) || defined (__DragonFly__)
# define _tcgetattr(fd, ttmode) ioctl(fd, TIOCGETA, (char *)ttmode) # define _tcgetattr(fd, ttmode) ioctl(fd, TIOCGETA, (char *)ttmode)
#else #else
# if defined(_HPUX_SOURCE) || defined(__Lynx__) || defined (__CYGWIN__) # if defined(_HPUX_SOURCE) || defined(__Lynx__) || defined (__CYGWIN__) || defined(__GNU__)
# define _tcgetattr(fd, ttmode) tcgetattr(fd, ttmode) # define _tcgetattr(fd, ttmode) tcgetattr(fd, ttmode)
# else # else
# define _tcgetattr(fd, ttmode) ioctl(fd, TCGETS, (char *)ttmode) # define _tcgetattr(fd, ttmode) ioctl(fd, TCGETS, (char *)ttmode)
Expand All @@ -130,7 +130,7 @@ extern "C" {
#if defined (__FreeBSD__) || defined(__FreeBSD_kernel__) || defined (__NetBSD__) || defined (__OpenBSD__) || defined (__bsdi__) || defined(__APPLE__) || defined (__DragonFly__) #if defined (__FreeBSD__) || defined(__FreeBSD_kernel__) || defined (__NetBSD__) || defined (__OpenBSD__) || defined (__bsdi__) || defined(__APPLE__) || defined (__DragonFly__)
# define _tcsetattr(fd, ttmode) ioctl(fd, TIOCSETA, (char *)ttmode) # define _tcsetattr(fd, ttmode) ioctl(fd, TIOCSETA, (char *)ttmode)
#else #else
# if defined(_HPUX_SOURCE) || defined(__CYGWIN__) # if defined(_HPUX_SOURCE) || defined(__CYGWIN__) || defined(__GNU__)
# define _tcsetattr(fd, ttmode) tcsetattr(fd, TCSANOW, ttmode) # define _tcsetattr(fd, ttmode) tcsetattr(fd, TCSANOW, ttmode)
# else # else
# define _tcsetattr(fd, ttmode) ioctl(fd, TCSETS, (char *)ttmode) # define _tcsetattr(fd, ttmode) ioctl(fd, TCSETS, (char *)ttmode)
Expand Down

0 comments on commit 666050c

Please sign in to comment.