[MPlayer-dev-eng] ported to GNU

Robert Millan zeratul2 at wanadoo.es
Thu Oct 31 12:31:13 CET 2002


Hello!

I ported mplayer to the GNU system (also known as GNU/Hurd),
it was just a matter of adding it to the makefiles
and other misc fix. here's a patch.

btw, i suggest handling that TERMIOS thing in a more
OS-independant fashion (maybe with autoconf)

diff -Nur MPlayer-0.90pre8.old/configure MPlayer-0.90pre8/configure
--- MPlayer-0.90pre8.old/configure	2002-09-17 21:47:55.000000000 +0200
+++ MPlayer-0.90pre8/configure	2002-10-23 11:25:28.000000000 +0200
@@ -66,6 +66,7 @@
 bsd()     { freebsd || netbsd || bsdos || openbsd ; return "$?" ; }
 qnx()     { issystem "QNX"     ; return "$?" ; }
 darwin()  { issystem "Darwin"  ; return "$?" ; }
+gnu()     { issystem "GNU"     ; return "$?" ; }
 
 # arch test boolean functions
 # x86/x86pc is used by QNX
@@ -311,7 +312,7 @@
   # OS name
   system_name=`( uname -s ) 2>&1`
   case "$system_name" in
-  Linux|FreeBSD|NetBSD|BSD/OS|OpenBSD|SunOS|QNX|Darwin)
+  Linux|FreeBSD|NetBSD|BSD/OS|OpenBSD|SunOS|QNX|Darwin|GNU)
     ;;
   IRIX*)
     system_name=IRIX
@@ -344,7 +345,7 @@
 
       # x86/x86pc is used by QNX
       case "`( uname -m ) 2>&1`" in
-      i[3-9]86|x86|x86pc|k5|k6|k6_2|k6_3|k6-2|k6-3|pentium*|athlon*|i586_i686|i586-i686) host_arch=i386 ;;
+      i[3-9]86*|x86|x86pc|k5|k6|k6_2|k6_3|k6-2|k6-3|pentium*|athlon*|i586_i686|i586-i686) host_arch=i386 ;;
       ia64) host_arch=ia64 ;;
       x86_64) host_arch=x86_64 ;;
       ppc) host_arch=ppc ;;
diff -Nur MPlayer-0.90pre8.old/linux/getch2.c MPlayer-0.90pre8/linux/getch2.c
--- MPlayer-0.90pre8.old/linux/getch2.c	2002-05-03 21:01:46.000000000 +0200
+++ MPlayer-0.90pre8/linux/getch2.c	2002-10-23 11:25:07.000000000 +0200
@@ -217,7 +217,7 @@
 void getch2_enable(){
 #ifdef HAVE_TERMIOS
 struct termios tio_new;
-#if defined(__NetBSD__) || defined(__svr4__) || defined(__CYGWIN__) || defined(__OS2__)
+#if defined(__NetBSD__) || defined(__svr4__) || defined(__CYGWIN__) || defined(__OS2__) || defined(__GNU__)
     tcgetattr(0,&tio_orig);
 #elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__APPLE__)
     ioctl(0,TIOCGETA,&tio_orig);
@@ -228,7 +228,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__)
+#if defined(__NetBSD__) || defined(__svr4__) || defined(__CYGWIN__) || defined(__OS2__) || defined(__GNU__)
     tcsetattr(0,TCSANOW,&tio_new);
 #elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__APPLE__)
     ioctl(0,TIOCSETA,&tio_new);
@@ -242,7 +242,7 @@
 void getch2_disable(){
     if(!getch2_status) return; // already disabled / never enabled
 #ifdef HAVE_TERMIOS
-#if defined(__NetBSD__) || defined(__svr4__) || defined(__CYGWIN__) || defined(__OS2__)
+#if defined(__NetBSD__) || defined(__svr4__) || defined(__CYGWIN__) || defined(__OS2__) || defined(__GNU__)
     tcsetattr(0,TCSANOW,&tio_orig);
 #elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__APPLE__)
     ioctl(0,TIOCSETA,&tio_orig);


-- 
Robert Millan

"5 years from now everyone will be running
free GNU on their 200 MIPS, 64M SPARCstation-5"

              Andrew S. Tanenbaum, 30 Jan 1992



More information about the MPlayer-dev-eng mailing list