[MPlayer-dev-eng] [PATCH] AIX PPC mplayer port

Derek E. Lewis dlewis at solnetworks.net
Tue Dec 27 06:59:19 CET 2005


Apologies.

Derek E. Lewis
dlewis at solnetworks.net
http://riemann.solnetworks.net/~dlewis

On Tue, 27 Dec 2005, The Wanderer wrote:

> On 12/26/2005 11:21 PM, Derek E. Lewis wrote:
>
>> I've begun working on porting mplayer to AIX/PowerPC (not POWER,
>> yet). The initial port wasn't too hard to do, as you can see -- add a
>> few pre-processor macros here and there, and make some minor changes
>> to the configure and Makefile files.
>
> Please send patches in unified diff format, or they will not be
> considered.
>
> -- 
>      The Wanderer
>
> Warning: Simply because I argue an issue does not mean I agree with any
> side of it.
>
> Secrecy is the beginning of tyranny.
>
> _______________________________________________
> MPlayer-dev-eng mailing list
> MPlayer-dev-eng at mplayerhq.hu
> http://mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
>
>
-------------- next part --------------
Index: osdep/getch2.c
===================================================================
RCS file: /cvsroot/mplayer/main/osdep/getch2.c,v
retrieving revision 1.21
diff -u -r1.21 getch2.c
--- osdep/getch2.c	25 Dec 2005 18:26:35 -0000	1.21
+++ osdep/getch2.c	27 Dec 2005 05:57:42 -0000
@@ -221,7 +221,7 @@
 void getch2_enable(){
 #ifdef HAVE_TERMIOS
 struct termios tio_new;
-#if defined(__NetBSD__) || defined(__svr4__) || defined(__CYGWIN__) || defined(__OS2__) || defined(__GLIBC__)
+#if defined(__NetBSD__) || defined(__svr4__) || defined(__CYGWIN__) || defined(__OS2__) || defined(__GLIBC__) || defined(_AIX)
     tcgetattr(0,&tio_orig);
 #elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__APPLE__) || defined(__DragonFly__)
     ioctl(0,TIOCGETA,&tio_orig);
@@ -232,7 +232,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(__GLIBC__)
+#if defined(__NetBSD__) || defined(__svr4__) || defined(__CYGWIN__) || defined(__OS2__) || defined(__GLIBC__) || defined(_AIX)
     tcsetattr(0,TCSANOW,&tio_new);
 #elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__APPLE__) || defined(__DragonFly__)
     ioctl(0,TIOCSETA,&tio_new);
@@ -246,7 +246,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(__GLIBC__)
+#if defined(__NetBSD__) || defined(__svr4__) || defined(__CYGWIN__) || defined(__OS2__) || defined(__GLIBC__) || defined(_AIX)
     tcsetattr(0,TCSANOW,&tio_orig);
 #elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__APPLE__) || defined(__DragonFly__)
     ioctl(0,TIOCSETA,&tio_orig);
Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/configure,v
retrieving revision 1.1114
diff -u -r1.1114 configure
--- configure	26 Dec 2005 03:16:47 -0000	1.1114
+++ configure	27 Dec 2005 05:55:49 -0000
@@ -479,7 +479,7 @@
   # OS name
   system_name=`uname -s 2>&1`
   case "$system_name" in
-  Linux|FreeBSD|NetBSD|BSD/OS|OpenBSD|SunOS|QNX|Darwin|GNU|BeOS|MorphOS)
+  Linux|FreeBSD|NetBSD|BSD/OS|OpenBSD|SunOS|QNX|Darwin|GNU|BeOS|MorphOS|AIX)
     ;;
   IRIX*)
     system_name=IRIX
@@ -2337,6 +2337,18 @@
   echores "no"
 fi
 
+echocheck "-lC"
+cat > $TMPC <<EOF
+int main(void) { return 0; }
+EOF
+if cc_check -lC; then
+  _ld_lC="-lC"
+  echores "yes"
+else
+  _ld_lC=""
+  echores "no"
+fi 
+
 # Checking for localization ...
 # CSAK EGY MARADHAT - A HEGYLAKO
 echocheck "i18n"
@@ -7095,6 +7107,7 @@
 ENCA_LIB = $_ld_enca
 HAVE_PTHREADS = $_pthreads
 MATH_LIB = $_ld_lm
+AIX_LIBC_LIB = $_ld_lC
 
 X11_INC = $_inc_x11
 X11DIR = $_ld_x11
Index: Makefile
===================================================================
RCS file: /cvsroot/mplayer/main/Makefile,v
retrieving revision 1.333
diff -u -r1.333 Makefile
--- Makefile	16 Nov 2005 10:38:23 -0000	1.333
+++ Makefile	27 Dec 2005 05:56:55 -0000
@@ -395,6 +395,7 @@
                $(ARCH_LIB) \
                $(I18NLIBS) \
                $(MATH_LIB) \
+	       $(AIX_LIBC_LIB) \
 
 $(PRG):	$(MPLAYER_DEP)
     ifeq ($(TARGET_WIN32),yes)
@@ -424,6 +425,7 @@
                 $(ARCH_LIB) \
                 $(I18NLIBS) \
                 $(MATH_LIB) \
+		$(AIX_LIBC_LIB) \
 
 $(PRG_MENCODER): $(MENCODER_DEP)
 	$(CC) $(CFLAGS) -o $(PRG_MENCODER) $(OBJS_MENCODER) $(LIBS_MENCODER)


More information about the MPlayer-dev-eng mailing list