From 7007bb0eb8a57b09e0364e0fbf1d36011e728fa6 Mon Sep 17 00:00:00 2001 From: spanne Date: Wed, 13 Jul 2005 11:35:36 +0000 Subject: [PATCH] Solaris doesn't have cfmakeraw, but it is only a convenience function for some bit-fiddling, anyway. git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@673 7f0cb862-5218-0410-a997-914c9d46530a --- freeglut/freeglut/ChangeLog | 3 +++ freeglut/freeglut/src/freeglut_input_devices.c | 9 ++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/freeglut/freeglut/ChangeLog b/freeglut/freeglut/ChangeLog index 8b297e7..b31470e 100644 --- a/freeglut/freeglut/ChangeLog +++ b/freeglut/freeglut/ChangeLog @@ -1118,3 +1118,6 @@ bit on the way. (290) Made all the "glutJoystickXXX" functions part of the freeglut extensions. + +(291) Solaris doesn't have cfmakeraw, but it is only a convenience function +for some bit-fiddling, anyway. diff --git a/freeglut/freeglut/src/freeglut_input_devices.c b/freeglut/freeglut/src/freeglut_input_devices.c index b5a9144..19dc9c6 100755 --- a/freeglut/freeglut/src/freeglut_input_devices.c +++ b/freeglut/freeglut/src/freeglut_input_devices.c @@ -271,7 +271,14 @@ static SERIALPORT *serial_open ( const char *device ) tcgetattr(fd,&port->termio_save); memset(&termio, 0, sizeof(termio)); - cfmakeraw(&termio); + + /* Same as "cfmakeraw(&termio)", but Solaris doesn't have this call */ + termio.c_iflag &= ~( IGNBRK | BRKINT | PARMRK | ISTRIP | INLCR | IGNCR | ICRNL | IXON ); + termio.c_oflag &= ~OPOST; + termio.c_lflag &= ~( ECHO | ECHONL | ICANON | ISIG | IEXTEN ); + termio.c_cflag &= ~( CSIZE | PARENB ); + termio.c_cflag |= CS8; + termio.c_cflag = CS8 | CREAD | HUPCL ; termio.c_iflag = IGNPAR | IGNBRK ; termio.c_cc[VTIME] = 0; /* inter-character timer */