[MPlayer-dev-eng] OpenBSD patch

Björn Sandell biorn at dce.chalmers.se
Wed Apr 24 21:31:38 CEST 2002


Howdy folks,

Here's a patch that'll make mplayer compile on OpenBSD (if you have an
assembler that understands mmx). It *will*, however, break stuff, most
notably mp3lib/dct36_3dnow.s and mp3lib/dct36_k7.s and possibly places
where MANGLE is used (loader/win32.c, mp3lib/dct64_3dnow.c and
mp3lib/dct64_k7.c). 

Have fun.

Björn Sandell       DCE/DFS Sysadmin       IT department
Chalmers University of Technology    www.dce.chalmers.se
-------------- next part --------------
Index: mangle.h
===================================================================
RCS file: /cvsroot/mplayer/main/mangle.h,v
retrieving revision 1.2
diff -u -r1.2 mangle.h
--- mangle.h	23 Mar 2002 18:40:54 -0000	1.2
+++ mangle.h	24 Apr 2002 18:40:16 -0000
@@ -8,7 +8,7 @@
 #define __MANGLE_H
 
 /* Feel free to add more to the list, eg. a.out IMO */
-#if defined(__CYGWIN__) || defined(__OS2__)
+#if defined(__CYGWIN__) || defined(__OS2__) || defined (__OpenBSD__)
 #define MANGLE(a) "_" #a
 #else
 #define MANGLE(a) #a
Index: libao2/ao_sun.c
===================================================================
RCS file: /cvsroot/mplayer/main/libao2/ao_sun.c,v
retrieving revision 1.14
diff -u -r1.14 ao_sun.c
--- libao2/ao_sun.c	1 Mar 2002 14:54:05 -0000	1.14
+++ libao2/ao_sun.c	24 Apr 2002 18:40:16 -0000
@@ -440,9 +440,11 @@
     }
 #endif
 
-    ioctl(audio_fd, AUDIO_GETINFO, &info);
-    if (queued_bursts - info.play.eof > 2)
-	return 0;
+#ifndef __OpenBSD__
+   ioctl(audio_fd, AUDIO_GETINFO, &info);
+   if (queued_bursts - info.play.eof > 2)
+      return 0;
+#endif
 
     return ao_data.outburst;
 }
@@ -500,9 +502,13 @@
 static float get_delay(){
     audio_info_t info;
     ioctl(audio_fd, AUDIO_GETINFO, &info);
+#ifdef __OpenBSD__
+    return (float) info.play.seek/ (float)byte_per_sec ;
+#else
     if (info.play.samples && enable_sample_timing == RTSC_ENABLED)
 	return (float)(queued_samples - info.play.samples) / (float)byte_per_sec;
     else
 	return (float)((queued_bursts - info.play.eof) * ao_data.outburst) / (float)byte_per_sec;
+#endif
 }
 
Index: libfame/fame.h
===================================================================
RCS file: /cvsroot/mplayer/main/libfame/fame.h,v
retrieving revision 1.1
diff -u -r1.1 fame.h
--- libfame/fame.h	13 Mar 2002 01:14:34 -0000	1.1
+++ libfame/fame.h	24 Apr 2002 18:40:16 -0000
@@ -39,7 +39,11 @@
 #  define ASMSYM  "_"
 # else
 #  define DECLSPEC
-#  define ASMSYM
+#  ifdef __OpenBSD__
+#   define ASMSYM  "_"
+#  else
+#   define ASMSYM
+#  endif
 # endif
 # endif
 #endif
Index: libmpdemux/dvdauth.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/dvdauth.c,v
retrieving revision 1.14
diff -u -r1.14 dvdauth.c
--- libmpdemux/dvdauth.c	24 Jan 2002 16:52:36 -0000	1.14
+++ libmpdemux/dvdauth.c	24 Apr 2002 19:27:03 -0000
@@ -31,8 +31,11 @@
 #include <sys/wait.h>
 // #include <css.h>
 
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
+#if defined(__FreeBSD__) || defined(__NetBSD__)
 #  include <sys/dvdio.h>
+#elif defined(__OpenBSD__)
+#  include <sys/cdio.h>
+#  define RTLD_NOW RTLD_LAZY
 #elif defined(__linux__)
 #  include <linux/cdrom.h>
 #elif defined(__sun)
@@ -169,6 +172,9 @@
 		ioctl(dvd, DVDIOCREPORTKEY, &ai);
 	}
 #else
+#if defined(__OpenBSD__)
+        union
+#endif
         dvd_authinfo ai;
         int i;
         for (i = 0; i < 4; i++) {
@@ -206,7 +212,11 @@
 }
 
 
-
+#ifdef __OpenBSD__
+#define ASMSYM "_"
+#else
+#define ASMSYM
+#endif
 int dvd_auth ( char *dev , char *filename )
 {
     	DVDHandle dvd;  /* DVD device handle */
@@ -223,12 +233,12 @@
 fprintf(stderr,"DVD: %s\n  Hint: use libcss version 0.1!\n",dlerror());\
 return 1; }
 
-	CSS_DLSYM(dl_CSSisEncrypted,"CSSisEncrypted");
-	CSS_DLSYM(dl_CSSAuthDisc,"CSSAuthDisc");
-	CSS_DLSYM(dl_CSSAuthTitle,"CSSAuthTitle");
-	CSS_DLSYM(dl_CSSGetASF,"CSSGetASF");
-	CSS_DLSYM(dl_CSSDecryptTitleKey,"CSSDecryptTitleKey");
-	CSS_DLSYM(dl_CSSDescramble,"CSSDescramble");
+	CSS_DLSYM(dl_CSSisEncrypted,ASMSYM"CSSisEncrypted");
+	CSS_DLSYM(dl_CSSAuthDisc,ASMSYM"CSSAuthDisc");
+	CSS_DLSYM(dl_CSSAuthTitle,ASMSYM"CSSAuthTitle");
+	CSS_DLSYM(dl_CSSGetASF,ASMSYM"CSSGetASF");
+	CSS_DLSYM(dl_CSSDecryptTitleKey,ASMSYM"CSSDecryptTitleKey");
+	CSS_DLSYM(dl_CSSDescramble,ASMSYM"CSSDescramble");
 
 #undef CSS_DLSYM
 
Index: loader/ldt_keeper.c
===================================================================
RCS file: /cvsroot/mplayer/main/loader/ldt_keeper.c,v
retrieving revision 1.7
diff -u -r1.7 ldt_keeper.c
--- loader/ldt_keeper.c	21 Apr 2002 01:39:36 -0000	1.7
+++ loader/ldt_keeper.c	24 Apr 2002 18:40:17 -0000
@@ -21,6 +21,7 @@
 #include <asm/ldt.h>
 #else
 #if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+#include <machine/segments.h>
 #include <machine/sysarch.h>
 #endif
 
Index: loader/win32.c
===================================================================
RCS file: /cvsroot/mplayer/main/loader/win32.c,v
retrieving revision 1.56
diff -u -r1.56 win32.c
--- loader/win32.c	23 Apr 2002 15:12:22 -0000	1.56
+++ loader/win32.c	24 Apr 2002 18:40:17 -0000
@@ -4096,7 +4096,7 @@
     LL(msdmo)
     LL(msvfw32)
 };
-
+#include <mangle.h>
 static char* called_unk = "Called unk_%s\n";
 static void ext_stubs(void)
 {
@@ -4109,9 +4109,9 @@
 	 "movl $0, %eax		\n\t"
 	 "movl $0, %edx		\n\t"
 	 "shl $5,%eax		\n\t"			// ax * 32
-	 "addl $export_names,%eax \n\t"
+	 "addl $"MANGLE(export_names)",%eax \n\t"
 	 "pushl %eax		\n\t"
-	 "pushl called_unk	\n\t"
+	 "pushl "MANGLE(called_unk)"	\n\t"
 	 "call *%edx		\n\t"                   // printf (via dx)
 	 "addl $8,%esp		\n\t"
 	 "xorl %eax,%eax	\n\t"
Index: mp3lib/dct36_3dnow.s
===================================================================
RCS file: /cvsroot/mplayer/main/mp3lib/dct36_3dnow.s,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 dct36_3dnow.s
--- mp3lib/dct36_3dnow.s	24 Feb 2001 20:31:08 -0000	1.1.1.1
+++ mp3lib/dct36_3dnow.s	24 Apr 2002 18:40:17 -0000
@@ -26,9 +26,9 @@
 /// this program. Use it at your own risk.
 /// 
 
-	.globl dct36_3dnow
-	.type	 dct36_3dnow, at function
-dct36_3dnow:
+	.globl _dct36_3dnow
+	.type	 _dct36_3dnow, at function
+_dct36_3dnow:
 	pushl %ebp
 	movl %esp,%ebp
 	subl $120,%esp
@@ -120,9 +120,9 @@
 
 	movq 24(%eax),%mm0
 	movq 48(%eax),%mm1
-	movd COS9+12,%mm2
+	movd _COS9+12,%mm2
 	punpckldq %mm2,%mm2
-	movd COS9+24,%mm3
+	movd _COS9+24,%mm3
 	punpckldq %mm3,%mm3
 	pfmul %mm2,%mm0
 	pfmul %mm3,%mm1
@@ -132,41 +132,41 @@
 	pi2fd %mm7,%mm7
 	popl %eax
 	movq 8(%eax),%mm2
-	movd COS9+4,%mm3
+	movd _COS9+4,%mm3
 	punpckldq %mm3,%mm3
 	pfmul %mm3,%mm2
 	pfadd %mm0,%mm2
 	movq 40(%eax),%mm3
-	movd COS9+20,%mm4
+	movd _COS9+20,%mm4
 	punpckldq %mm4,%mm4
 	pfmul %mm4,%mm3
 	pfadd %mm3,%mm2
 	movq 56(%eax),%mm3
-	movd COS9+28,%mm4
+	movd _COS9+28,%mm4
 	punpckldq %mm4,%mm4
 	pfmul %mm4,%mm3
 	pfadd %mm3,%mm2
 	movq (%eax),%mm3
 	movq 16(%eax),%mm4
-	movd COS9+8,%mm5
+	movd _COS9+8,%mm5
 	punpckldq %mm5,%mm5
 	pfmul %mm5,%mm4
 	pfadd %mm4,%mm3
 	movq 32(%eax),%mm4
-	movd COS9+16,%mm5
+	movd _COS9+16,%mm5
 	punpckldq %mm5,%mm5
 	pfmul %mm5,%mm4
 	pfadd %mm4,%mm3
 	pfadd %mm1,%mm3
 	movq 64(%eax),%mm4
-	movd COS9+32,%mm5
+	movd _COS9+32,%mm5
 	punpckldq %mm5,%mm5
 	pfmul %mm5,%mm4
 	pfadd %mm4,%mm3
 	movq %mm2,%mm4
 	pfadd %mm3,%mm4
 	movq %mm7,%mm5
-	punpckldq tfcos36+0,%mm5
+	punpckldq _tfcos36+0,%mm5
 	pfmul %mm5,%mm4
 	movq %mm4,%mm5
 	pfacc %mm5,%mm5
@@ -192,7 +192,7 @@
 	movq %mm3,%mm4
 	pfsub %mm2,%mm4
 	movq %mm7,%mm5
-	punpckldq tfcos36+32,%mm5
+	punpckldq _tfcos36+32,%mm5
 	pfmul %mm5,%mm4
 	movq %mm4,%mm5
 	pfacc %mm5,%mm5
@@ -220,7 +220,7 @@
 	pfsub %mm3,%mm2
 	movq 56(%eax),%mm3
 	pfsub %mm3,%mm2
-	movd COS9+12,%mm3
+	movd _COS9+12,%mm3
 	punpckldq %mm3,%mm3
 	pfmul %mm3,%mm2
 	movq 16(%eax),%mm3
@@ -228,7 +228,7 @@
 	pfsub %mm4,%mm3
 	movq 64(%eax),%mm4
 	pfsub %mm4,%mm3
-	movd COS9+24,%mm4
+	movd _COS9+24,%mm4
 	punpckldq %mm4,%mm4
 	pfmul %mm4,%mm3
 	movq 48(%eax),%mm4
@@ -238,7 +238,7 @@
 	movq %mm2,%mm4
 	pfadd %mm3,%mm4
 	movq %mm7,%mm5
-	punpckldq tfcos36+4,%mm5
+	punpckldq _tfcos36+4,%mm5
 	pfmul %mm5,%mm4
 	movq %mm4,%mm5
 	pfacc %mm5,%mm5
@@ -264,7 +264,7 @@
 	movq %mm3,%mm4
 	pfsub %mm2,%mm4
 	movq %mm7,%mm5
-	punpckldq tfcos36+28,%mm5
+	punpckldq _tfcos36+28,%mm5
 	pfmul %mm5,%mm4
 	movq %mm4,%mm5
 	pfacc %mm5,%mm5
@@ -289,41 +289,41 @@
 	movd %mm5,2048(%ebx)
 
 	movq 8(%eax),%mm2
-	movd COS9+20,%mm3
+	movd _COS9+20,%mm3
 	punpckldq %mm3,%mm3
 	pfmul %mm3,%mm2
 	pfsub %mm0,%mm2
 	movq 40(%eax),%mm3
-	movd COS9+28,%mm4
+	movd _COS9+28,%mm4
 	punpckldq %mm4,%mm4
 	pfmul %mm4,%mm3
 	pfsub %mm3,%mm2
 	movq 56(%eax),%mm3
-	movd COS9+4,%mm4
+	movd _COS9+4,%mm4
 	punpckldq %mm4,%mm4
 	pfmul %mm4,%mm3
 	pfadd %mm3,%mm2
 	movq (%eax),%mm3
 	movq 16(%eax),%mm4
-	movd COS9+32,%mm5
+	movd _COS9+32,%mm5
 	punpckldq %mm5,%mm5
 	pfmul %mm5,%mm4
 	pfsub %mm4,%mm3
 	movq 32(%eax),%mm4
-	movd COS9+8,%mm5
+	movd _COS9+8,%mm5
 	punpckldq %mm5,%mm5
 	pfmul %mm5,%mm4
 	pfsub %mm4,%mm3
 	pfadd %mm1,%mm3
 	movq 64(%eax),%mm4
-	movd COS9+16,%mm5
+	movd _COS9+16,%mm5
 	punpckldq %mm5,%mm5
 	pfmul %mm5,%mm4
 	pfadd %mm4,%mm3
 	movq %mm2,%mm4
 	pfadd %mm3,%mm4
 	movq %mm7,%mm5
-	punpckldq tfcos36+8,%mm5
+	punpckldq _tfcos36+8,%mm5
 	pfmul %mm5,%mm4
 	movq %mm4,%mm5
 	pfacc %mm5,%mm5
@@ -349,7 +349,7 @@
 	movq %mm3,%mm4
 	pfsub %mm2,%mm4
 	movq %mm7,%mm5
-	punpckldq tfcos36+24,%mm5
+	punpckldq _tfcos36+24,%mm5
 	pfmul %mm5,%mm4
 	movq %mm4,%mm5
 	pfacc %mm5,%mm5
@@ -373,41 +373,41 @@
 	psrlq $32,%mm5
 	movd %mm5,1920(%ebx)
 	movq 8(%eax),%mm2
-	movd COS9+28,%mm3
+	movd _COS9+28,%mm3
 	punpckldq %mm3,%mm3
 	pfmul %mm3,%mm2
 	pfsub %mm0,%mm2
 	movq 40(%eax),%mm3
-	movd COS9+4,%mm4
+	movd _COS9+4,%mm4
 	punpckldq %mm4,%mm4
 	pfmul %mm4,%mm3
 	pfadd %mm3,%mm2
 	movq 56(%eax),%mm3
-	movd COS9+20,%mm4
+	movd _COS9+20,%mm4
 	punpckldq %mm4,%mm4
 	pfmul %mm4,%mm3
 	pfsub %mm3,%mm2
 	movq (%eax),%mm3
 	movq 16(%eax),%mm4
-	movd COS9+16,%mm5
+	movd _COS9+16,%mm5
 	punpckldq %mm5,%mm5
 	pfmul %mm5,%mm4
 	pfsub %mm4,%mm3
 	movq 32(%eax),%mm4
-	movd COS9+32,%mm5
+	movd _COS9+32,%mm5
 	punpckldq %mm5,%mm5
 	pfmul %mm5,%mm4
 	pfadd %mm4,%mm3
 	pfadd %mm1,%mm3
 	movq 64(%eax),%mm4
-	movd COS9+8,%mm5
+	movd _COS9+8,%mm5
 	punpckldq %mm5,%mm5
 	pfmul %mm5,%mm4
 	pfsub %mm4,%mm3
 	movq %mm2,%mm4
 	pfadd %mm3,%mm4
 	movq %mm7,%mm5
-	punpckldq tfcos36+12,%mm5
+	punpckldq _tfcos36+12,%mm5
 	pfmul %mm5,%mm4
 	movq %mm4,%mm5
 	pfacc %mm5,%mm5
@@ -433,7 +433,7 @@
 	movq %mm3,%mm4
 	pfsub %mm2,%mm4
 	movq %mm7,%mm5
-	punpckldq tfcos36+20,%mm5
+	punpckldq _tfcos36+20,%mm5
 	pfmul %mm5,%mm4
 	movq %mm4,%mm5
 	pfacc %mm5,%mm5
@@ -467,7 +467,7 @@
 	movq 64(%eax),%mm3
 	pfadd %mm3,%mm4
 	movq %mm7,%mm5
-	punpckldq tfcos36+16,%mm5
+	punpckldq _tfcos36+16,%mm5
 	pfmul %mm5,%mm4
 	movq %mm4,%mm5
 	pfacc %mm5,%mm5
Index: mp3lib/dct36_k7.s
===================================================================
RCS file: /cvsroot/mplayer/main/mp3lib/dct36_k7.s,v
retrieving revision 1.1
diff -u -r1.1 dct36_k7.s
--- mp3lib/dct36_k7.s	9 May 2001 07:59:55 -0000	1.1
+++ mp3lib/dct36_k7.s	24 Apr 2002 18:40:17 -0000
@@ -40,9 +40,9 @@
 /// this program. Use it at your own risk.
 /// 
 
-	.globl dct36_3dnowex
-	.type	 dct36_3dnowex, at function
-dct36_3dnowex:
+	.globl _dct36_3dnowex
+	.type	 _dct36_3dnowex, at function
+_dct36_3dnowex:
 	pushl %ebp
 	movl %esp,%ebp
 	subl $120,%esp
@@ -133,9 +133,9 @@
 	movd %mm3,68(%eax)
 	movq 24(%eax),%mm0
 	movq 48(%eax),%mm1
-	movd COS9+12,%mm2
+	movd _COS9+12,%mm2
 	punpckldq %mm2,%mm2
-	movd COS9+24,%mm3
+	movd _COS9+24,%mm3
 	punpckldq %mm3,%mm3
 	pfmul %mm2,%mm0
 	pfmul %mm3,%mm1
@@ -145,41 +145,41 @@
 	pi2fd %mm7,%mm7
 	popl %eax
 	movq 8(%eax),%mm2
-	movd COS9+4,%mm3
+	movd _COS9+4,%mm3
 	punpckldq %mm3,%mm3
 	pfmul %mm3,%mm2
 	pfadd %mm0,%mm2
 	movq 40(%eax),%mm3
-	movd COS9+20,%mm4
+	movd _COS9+20,%mm4
 	punpckldq %mm4,%mm4
 	pfmul %mm4,%mm3
 	pfadd %mm3,%mm2
 	movq 56(%eax),%mm3
-	movd COS9+28,%mm4
+	movd _COS9+28,%mm4
 	punpckldq %mm4,%mm4
 	pfmul %mm4,%mm3
 	pfadd %mm3,%mm2
 	movq (%eax),%mm3
 	movq 16(%eax),%mm4
-	movd COS9+8,%mm5
+	movd _COS9+8,%mm5
 	punpckldq %mm5,%mm5
 	pfmul %mm5,%mm4
 	pfadd %mm4,%mm3
 	movq 32(%eax),%mm4
-	movd COS9+16,%mm5
+	movd _COS9+16,%mm5
 	punpckldq %mm5,%mm5
 	pfmul %mm5,%mm4
 	pfadd %mm4,%mm3
 	pfadd %mm1,%mm3
 	movq 64(%eax),%mm4
-	movd COS9+32,%mm5
+	movd _COS9+32,%mm5
 	punpckldq %mm5,%mm5
 	pfmul %mm5,%mm4
 	pfadd %mm4,%mm3
 	movq %mm2,%mm4
 	pfadd %mm3,%mm4
 	movq %mm7,%mm5
-	punpckldq tfcos36+0,%mm5
+	punpckldq _tfcos36+0,%mm5
 	pfmul %mm5,%mm4
 	movq %mm4,%mm5
 	pfacc %mm5,%mm5
@@ -204,7 +204,7 @@
 	movq %mm3,%mm4
 	pfsub %mm2,%mm4
 	movq %mm7,%mm5
-	punpckldq tfcos36+32,%mm5
+	punpckldq _tfcos36+32,%mm5
 	pfmul %mm5,%mm4
 	movq %mm4,%mm5
 	pfacc %mm5,%mm5
@@ -232,7 +232,7 @@
 	pfsub %mm3,%mm2
 	movq 56(%eax),%mm3
 	pfsub %mm3,%mm2
-	movd COS9+12,%mm3
+	movd _COS9+12,%mm3
 	punpckldq %mm3,%mm3
 	pfmul %mm3,%mm2
 	movq 16(%eax),%mm3
@@ -240,7 +240,7 @@
 	pfsub %mm4,%mm3
 	movq 64(%eax),%mm4
 	pfsub %mm4,%mm3
-	movd COS9+24,%mm4
+	movd _COS9+24,%mm4
 	punpckldq %mm4,%mm4
 	pfmul %mm4,%mm3
 	movq 48(%eax),%mm4
@@ -250,7 +250,7 @@
 	movq %mm2,%mm4
 	pfadd %mm3,%mm4
 	movq %mm7,%mm5
-	punpckldq tfcos36+4,%mm5
+	punpckldq _tfcos36+4,%mm5
 	pfmul %mm5,%mm4
 	movq %mm4,%mm5
 	pfacc %mm5,%mm5
@@ -276,7 +276,7 @@
 	movq %mm3,%mm4
 	pfsub %mm2,%mm4
 	movq %mm7,%mm5
-	punpckldq tfcos36+28,%mm5
+	punpckldq _tfcos36+28,%mm5
 	pfmul %mm5,%mm4
 	movq %mm4,%mm5
 	pfacc %mm5,%mm5
@@ -301,41 +301,41 @@
 	movd %mm5,2048(%ebx)
 
 	movq 8(%eax),%mm2
-	movd COS9+20,%mm3
+	movd _COS9+20,%mm3
 	punpckldq %mm3,%mm3
 	pfmul %mm3,%mm2
 	pfsub %mm0,%mm2
 	movq 40(%eax),%mm3
-	movd COS9+28,%mm4
+	movd _COS9+28,%mm4
 	punpckldq %mm4,%mm4
 	pfmul %mm4,%mm3
 	pfsub %mm3,%mm2
 	movq 56(%eax),%mm3
-	movd COS9+4,%mm4
+	movd _COS9+4,%mm4
 	punpckldq %mm4,%mm4
 	pfmul %mm4,%mm3
 	pfadd %mm3,%mm2
 	movq (%eax),%mm3
 	movq 16(%eax),%mm4
-	movd COS9+32,%mm5
+	movd _COS9+32,%mm5
 	punpckldq %mm5,%mm5
 	pfmul %mm5,%mm4
 	pfsub %mm4,%mm3
 	movq 32(%eax),%mm4
-	movd COS9+8,%mm5
+	movd _COS9+8,%mm5
 	punpckldq %mm5,%mm5
 	pfmul %mm5,%mm4
 	pfsub %mm4,%mm3
 	pfadd %mm1,%mm3
 	movq 64(%eax),%mm4
-	movd COS9+16,%mm5
+	movd _COS9+16,%mm5
 	punpckldq %mm5,%mm5
 	pfmul %mm5,%mm4
 	pfadd %mm4,%mm3
 	movq %mm2,%mm4
 	pfadd %mm3,%mm4
 	movq %mm7,%mm5
-	punpckldq tfcos36+8,%mm5
+	punpckldq _tfcos36+8,%mm5
 	pfmul %mm5,%mm4
 	movq %mm4,%mm5
 	pfacc %mm5,%mm5
@@ -361,7 +361,7 @@
 	movq %mm3,%mm4
 	pfsub %mm2,%mm4
 	movq %mm7,%mm5
-	punpckldq tfcos36+24,%mm5
+	punpckldq _tfcos36+24,%mm5
 	pfmul %mm5,%mm4
 	movq %mm4,%mm5
 	pfacc %mm5,%mm5
@@ -385,41 +385,41 @@
 	psrlq $32,%mm5
 	movd %mm5,1920(%ebx)
 	movq 8(%eax),%mm2
-	movd COS9+28,%mm3
+	movd _COS9+28,%mm3
 	punpckldq %mm3,%mm3
 	pfmul %mm3,%mm2
 	pfsub %mm0,%mm2
 	movq 40(%eax),%mm3
-	movd COS9+4,%mm4
+	movd _COS9+4,%mm4
 	punpckldq %mm4,%mm4
 	pfmul %mm4,%mm3
 	pfadd %mm3,%mm2
 	movq 56(%eax),%mm3
-	movd COS9+20,%mm4
+	movd _COS9+20,%mm4
 	punpckldq %mm4,%mm4
 	pfmul %mm4,%mm3
 	pfsub %mm3,%mm2
 	movq (%eax),%mm3
 	movq 16(%eax),%mm4
-	movd COS9+16,%mm5
+	movd _COS9+16,%mm5
 	punpckldq %mm5,%mm5
 	pfmul %mm5,%mm4
 	pfsub %mm4,%mm3
 	movq 32(%eax),%mm4
-	movd COS9+32,%mm5
+	movd _COS9+32,%mm5
 	punpckldq %mm5,%mm5
 	pfmul %mm5,%mm4
 	pfadd %mm4,%mm3
 	pfadd %mm1,%mm3
 	movq 64(%eax),%mm4
-	movd COS9+8,%mm5
+	movd _COS9+8,%mm5
 	punpckldq %mm5,%mm5
 	pfmul %mm5,%mm4
 	pfsub %mm4,%mm3
 	movq %mm2,%mm4
 	pfadd %mm3,%mm4
 	movq %mm7,%mm5
-	punpckldq tfcos36+12,%mm5
+	punpckldq _tfcos36+12,%mm5
 	pfmul %mm5,%mm4
 	movq %mm4,%mm5
 	pfacc %mm5,%mm5
@@ -445,7 +445,7 @@
 	movq %mm3,%mm4
 	pfsub %mm2,%mm4
 	movq %mm7,%mm5
-	punpckldq tfcos36+20,%mm5
+	punpckldq _tfcos36+20,%mm5
 	pfmul %mm5,%mm4
 	movq %mm4,%mm5
 	pfacc %mm5,%mm5
@@ -479,7 +479,7 @@
 	movq 64(%eax),%mm3
 	pfadd %mm3,%mm4
 	movq %mm7,%mm5
-	punpckldq tfcos36+16,%mm5
+	punpckldq _tfcos36+16,%mm5
 	pfmul %mm5,%mm4
 	movq %mm4,%mm5
 	pfacc %mm5,%mm5
Index: mp3lib/dct64_3dnow.c
===================================================================
RCS file: /cvsroot/mplayer/main/mp3lib/dct64_3dnow.c,v
retrieving revision 1.2
diff -u -r1.2 dct64_3dnow.c
--- mp3lib/dct64_3dnow.c	23 Mar 2002 21:48:55 -0000	1.2
+++ mp3lib/dct64_3dnow.c	24 Apr 2002 18:40:17 -0000
@@ -504,7 +504,7 @@
 
 "	movd	"MANGLE(plus_1f)", %%mm6\n\t"
 "	punpckldq 120(%%ebx), %%mm6\n\t"      /* mm6 = 1.0 | 120(%%ebx)*/
-"	movq	x_plus_minus_3dnow, %%mm7\n\t" /* mm7 = +1 | -1 */
+"	movq	"MANGLE(x_plus_minus_3dnow)", %%mm7\n\t" /* mm7 = +1 | -1 */
 
 "	movq	32(%%ecx), %%mm0\n\t"
 "	movq	64(%%ecx), %%mm2\n\t"
@@ -913,4 +913,4 @@
 	:
 	:"m"(a),"m"(b),"m"(c),"m"(tmp[0])
 	:"memory","%ebx","%esi","%edi");
-}
+}
Index: mp3lib/dct64_k7.c
===================================================================
RCS file: /cvsroot/mplayer/main/mp3lib/dct64_k7.c,v
retrieving revision 1.2
diff -u -r1.2 dct64_k7.c
--- mp3lib/dct64_k7.c	23 Mar 2002 21:48:55 -0000	1.2
+++ mp3lib/dct64_k7.c	24 Apr 2002 18:40:17 -0000
@@ -382,7 +382,7 @@
 
 "	movd	"MANGLE(plus_1f)", %%mm6\n\t"
 "	punpckldq 120(%%ebx), %%mm6\n\t"      /* mm6 = 1.0 | 120(%%ebx)*/
-"	movq	x_plus_minus_3dnow, %%mm7\n\t" /* mm7 = +1 | -1 */
+"	movq	"MANGLE(x_plus_minus_3dnow)", %%mm7\n\t" /* mm7 = +1 | -1 */
 
 "	movq	32(%%ecx), %%mm0\n\t"
 "	movq	64(%%ecx), %%mm2\n\t"
@@ -791,4 +791,4 @@
 	:
 	:"m"(a),"m"(b),"m"(c),"m"(tmp[0])
 	:"memory","%ebx","%esi","%edi");
-}
+}
Index: vidix/vidixlib.c
===================================================================
RCS file: /cvsroot/mplayer/main/vidix/vidixlib.c,v
retrieving revision 1.9
diff -u -r1.9 vidixlib.c
--- vidix/vidixlib.c	6 Feb 2002 16:41:06 -0000	1.9
+++ vidix/vidixlib.c	24 Apr 2002 18:40:17 -0000
@@ -91,6 +91,10 @@
   return 1;
 }
 
+#ifdef __OpenBSD__
+#define RTLD_GLOBAL RTLD_LAZY
+#define RTLD_NOW RTLD_LAZY
+#endif
 static int vdl_probe_driver(VDL_HANDLE stream,const char *path,const char *name,unsigned cap,int verbose)
 {
   vidix_capability_t vid_cap;


More information about the MPlayer-dev-eng mailing list