[MPlayer-dev-eng] [PATCH] GNU/k*BSD support

Robert Millan zeratul2 at wanadoo.es
Mon Mar 15 03:25:47 CET 2004


Hi!

The attached patch fixes a minor build problem on GNU/k*BSD: getch2.c should
check for Glibc, not GNU. Please commit.

-- 
Robert Millan

"[..] but the delight and pride of Aule is in the deed of making, and in the
thing made, and neither in possession nor in his own mastery; wherefore he
gives and hoards not, and is free from care, passing ever on to some new work."

 -- J.R.R.T., Ainulindale (Silmarillion)
-------------- next part --------------
--- MPlayer-1.0pre3/osdep/getch2.c~	2003-01-11 13:32:24.000000000 +0100
+++ MPlayer-1.0pre3/osdep/getch2.c	2004-02-09 23:08:21.000000000 +0100
@@ -218,7 +218,7 @@
 void getch2_enable(){
 #ifdef HAVE_TERMIOS
 struct termios tio_new;
-#if defined(__NetBSD__) || defined(__svr4__) || defined(__CYGWIN__) || defined(__OS2__) || defined(__GNU__)
+#if defined(__NetBSD__) || defined(__svr4__) || defined(__CYGWIN__) || defined(__OS2__) || defined(__GLIBC__)
     tcgetattr(0,&tio_orig);
 #elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__APPLE__)
     ioctl(0,TIOCGETA,&tio_orig);
@@ -229,7 +229,7 @@
     tio_new.c_lflag &= ~(ICANON|ECHO); /* Clear ICANON and ECHO. */
     tio_new.c_cc[VMIN] = 1;
     tio_new.c_cc[VTIME] = 0;
-#if defined(__NetBSD__) || defined(__svr4__) || defined(__CYGWIN__) || defined(__OS2__) || defined(__GNU__)
+#if defined(__NetBSD__) || defined(__svr4__) || defined(__CYGWIN__) || defined(__OS2__) || defined(__GLIBC__)
     tcsetattr(0,TCSANOW,&tio_new);
 #elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__APPLE__)
     ioctl(0,TIOCSETA,&tio_new);
@@ -243,7 +243,7 @@
 void getch2_disable(){
     if(!getch2_status) return; // already disabled / never enabled
 #ifdef HAVE_TERMIOS
-#if defined(__NetBSD__) || defined(__svr4__) || defined(__CYGWIN__) || defined(__OS2__) || defined(__GNU__)
+#if defined(__NetBSD__) || defined(__svr4__) || defined(__CYGWIN__) || defined(__OS2__) || defined(__GLIBC__)
     tcsetattr(0,TCSANOW,&tio_orig);
 #elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__APPLE__)
     ioctl(0,TIOCSETA,&tio_orig);


More information about the MPlayer-dev-eng mailing list