[MPlayer-dev-eng] [PATCH] initial DragonFly BSD support

Pawel Biernacki kaktus at DragonFlyBSD.pl
Sun Aug 29 04:01:38 CEST 2004


Hi

I've made initial support for DragonFly BSD. Mplayer should now fine 
compile on both gcc 2.95 and 3.4.1. This patch mostly uses FreeBSD parts 
of code. I've also update en and pl documentation.


-------------- next part --------------
Index: AUTHORS
===================================================================
RCS file: /cvsroot/mplayer/main/AUTHORS,v
retrieving revision 1.107
diff -u -r1.107 AUTHORS
--- AUTHORS	28 Aug 2004 19:22:56 -0000	1.107
+++ AUTHORS	29 Aug 2004 01:43:52 -0000
@@ -107,6 +107,9 @@
     * dynamic a/v plugins (external shared ad/vd/.. objects)
     * millions of bug fixes
 
+Biernacki, Pawe? <kaktus at dragonflybsd.pl>
+    * initial DragonFly BSD support
+
 Bitterberg, Tilmann <transcode at tibit.org>
     * AVI OpenDML read support
 
Index: cpudetect.c
===================================================================
RCS file: /cvsroot/mplayer/main/cpudetect.c,v
retrieving revision 1.35
diff -u -r1.35 cpudetect.c
--- cpudetect.c	18 Jun 2004 20:56:06 -0000	1.35
+++ cpudetect.c	29 Aug 2004 01:43:52 -0000
@@ -21,7 +21,7 @@
 #include <machine/cpu.h>
 #endif
 
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__DragonFly__)
 #include <sys/types.h>
 #include <sys/sysctl.h>
 #endif
@@ -170,7 +170,7 @@
 #endif
 
 		/* FIXME: Does SSE2 need more OS support, too? */
-#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__CYGWIN__) || defined(__OpenBSD__)
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__CYGWIN__) || defined(__OpenBSD__) || defined(__DragonFly__)
 		if (caps->hasSSE)
 			check_os_katmai_support();
 		if (!caps->hasSSE)
@@ -358,7 +358,7 @@
  */
 static void check_os_katmai_support( void )
 {
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) || defined(__DragonFly__)
    int has_sse=0, ret;
    size_t len=sizeof(has_sse);
 
Index: DOCS/tech/MAINTAINERS
===================================================================
RCS file: /cvsroot/mplayer/main/DOCS/tech/MAINTAINERS,v
retrieving revision 1.39
diff -u -r1.39 MAINTAINERS
--- DOCS/tech/MAINTAINERS	28 Aug 2004 01:34:24 -0000	1.39
+++ DOCS/tech/MAINTAINERS	29 Aug 2004 01:44:19 -0000
@@ -46,6 +46,7 @@
     * BSD/OS support: Steven Schultz
     * NetBSD support: Bernd Ernesti
     * OpenBSD support: Bj?rn Sandell
+    * DragonFly BSD support: Pawe? Biernacki
     * Solaris 8 support: J?rgen Keil, Pierre Lombard
     * MIPS support: Oliver Schoenbrunner
     * Win32/Cygwin/MinGW support: Sascha Sommer, Joey Parrish, Diego Biurrun
Index: DOCS/tech/porting-status.txt
===================================================================
RCS file: /cvsroot/mplayer/main/DOCS/tech/porting-status.txt,v
retrieving revision 1.2
diff -u -r1.2 porting-status.txt
--- DOCS/tech/porting-status.txt	25 Oct 2002 16:52:07 -0000	1.2
+++ DOCS/tech/porting-status.txt	29 Aug 2004 01:44:22 -0000
@@ -35,6 +35,8 @@
 
 -> BSD/OS (Steven M. Schultz <sms at 2bsd.com>)
 
+-> DragonFly BSD (...)
+
 -> Darwin/MacOS X (Atmos, Justin Hallet <justin at caisnet.com>)
  + minor fixes (iconv, sockets) -- will soon be included [Justin Hallet]
  + VCD support (check videolans vlc/plugins/vcd/cdromtools.[ch]) [Justin Hallet]
Index: DOCS/xml/en/cd-dvd.xml
===================================================================
RCS file: /cvsroot/mplayer/main/DOCS/xml/en/cd-dvd.xml,v
retrieving revision 1.11
diff -u -r1.11 cd-dvd.xml
--- DOCS/xml/en/cd-dvd.xml	1 Jan 2004 17:44:41 -0000	1.11
+++ DOCS/xml/en/cd-dvd.xml	29 Aug 2004 01:44:24 -0000
@@ -63,7 +63,7 @@
 <ulink url="http://das.ist.org/~georg/">Plextor SCSI drives</ulink>.
 </para>
 
-<para>FreeBSD:</para>
+<para>FreeBSD / DragonFly BSD:</para>
 <para>Speed: <command>cdcontrol [-f <replaceable>device</replaceable>] speed <replaceable>speed</replaceable></command></para>
 <para>DMA: <command>sysctl hw.ata.atapi_dma=1</command></para>
 </sect1>
Index: DOCS/xml/en/codecs.xml
===================================================================
RCS file: /cvsroot/mplayer/main/DOCS/xml/en/codecs.xml,v
retrieving revision 1.45
diff -u -r1.45 codecs.xml
--- DOCS/xml/en/codecs.xml	24 Aug 2004 11:10:40 -0000	1.45
+++ DOCS/xml/en/codecs.xml	29 Aug 2004 01:44:24 -0000
@@ -418,7 +418,7 @@
 
 <note><para>
 <application>RealPlayer</application> libraries currently
-<emphasis role="bold">only work with Linux, FreeBSD, NetBSD and Cygwin on the x86,
+<emphasis role="bold">only work with Linux, FreeBSD, NetBSD, DragonFly BSD and Cygwin on the x86,
 Alpha and PowerPC (Linux/Alpha and Linux/PowerPC have been tested) platforms and with Mac OS X</emphasis>.
 </para></note>
 </sect3>
Index: DOCS/xml/en/ports.xml
===================================================================
RCS file: /cvsroot/mplayer/main/DOCS/xml/en/ports.xml,v
retrieving revision 1.46
diff -u -r1.46 ports.xml
--- DOCS/xml/en/ports.xml	21 Jul 2004 20:00:42 -0000	1.46
+++ DOCS/xml/en/ports.xml	29 Aug 2004 01:44:26 -0000
@@ -69,7 +69,7 @@
 <sect1 id="bsd">
 <title>*BSD</title>
 <para>
-<application>MPlayer</application> runs on FreeBSD, OpenBSD, NetBSD,
+<application>MPlayer</application> runs on FreeBSD, OpenBSD, NetBSD, DragonFly BSD,
 BSD/OS and Darwin. There are ports/pkgsrc/fink/etc versions of <application>MPlayer</application>
 available that are probably easier to use than our raw sources.
 </para>
@@ -102,6 +102,14 @@
 </para>
 </sect2>
 
+<sect2 id="dragonfly">
+<title>DragonFly BSD</title>
+<para>
+If your CPU has SSE, recompile your kernel with
+&quot;<envar>options CPU_ENABLE_SSE</envar>&quot;.
+</para>
+</sect2>
+
 <sect2 id="openbsd">
 <title>OpenBSD</title>
 <para>
Index: DOCS/xml/pl/cd-dvd.xml
===================================================================
RCS file: /cvsroot/mplayer/main/DOCS/xml/pl/cd-dvd.xml,v
retrieving revision 1.3
diff -u -r1.3 cd-dvd.xml
--- DOCS/xml/pl/cd-dvd.xml	1 Jan 2004 22:01:54 -0000	1.3
+++ DOCS/xml/pl/cd-dvd.xml	29 Aug 2004 01:44:39 -0000
@@ -72,7 +72,7 @@
 <ulink url="http://das.ist.org/~georg/">nap??dami SCSI Plextor</ulink>.
 </para>
 
-<para>FreeBSD:</para>
+<para>FreeBSD / DragonFly BSD:</para>
 <para>Pr??dko????: <command>cdcontrol [-f <replaceable>device</replaceable>] speed <replaceable>speed</replaceable></command></para>
 <para>DMA: <command>sysctl hw.ata.atapi_dma=1</command></para>
 </sect1>
Index: DOCS/xml/pl/codecs.xml
===================================================================
RCS file: /cvsroot/mplayer/main/DOCS/xml/pl/codecs.xml,v
retrieving revision 1.4
diff -u -r1.4 codecs.xml
--- DOCS/xml/pl/codecs.xml	23 Aug 2004 22:49:42 -0000	1.4
+++ DOCS/xml/pl/codecs.xml	29 Aug 2004 01:44:39 -0000
@@ -429,7 +429,7 @@
 
 <note><para>
 Aktualnie biblioteki <application>RealPlayer</application>
-<emphasis role="bold">dzia?aj? tylko pod Linuksem, FreeBSD, NetBSD i Cygwinem na platformach x86,
+<emphasis role="bold">dzia?aj? tylko pod Linuksem, FreeBSD, NetBSD, DragonFly BSD i Cygwinem na platformach x86,
 Alpha i PowerPC (Sprawdzone zosta?y Linux/Alpha i Linux/PowerPC)</emphasis>.
 </para></note>
 </sect3>
Index: DOCS/xml/pl/ports.xml
===================================================================
RCS file: /cvsroot/mplayer/main/DOCS/xml/pl/ports.xml,v
retrieving revision 1.31
diff -u -r1.31 ports.xml
--- DOCS/xml/pl/ports.xml	4 Aug 2004 13:36:56 -0000	1.31
+++ DOCS/xml/pl/ports.xml	29 Aug 2004 01:44:41 -0000
@@ -71,7 +71,7 @@
 <sect1 id="bsd">
 <title>*BSD</title>
 <para>
-<application>MPlayer</application> dzia?a na FreeBSD, OpenBSD, NetBSD,
+<application>MPlayer</application> dzia?a na FreeBSD, OpenBSD, NetBSD, DragonFly BSD
 BSD/OS i Darwinie. Dost?pne s? wersje port?w/pkgsrc/fink/itp., kt?re
 prawdopodobnie s? ?atwiejsze w instalacji, ni? kompilacja ze ?r?de?.
 </para>
@@ -102,6 +102,14 @@
 </para>
 </sect2>
 
+<sect2 id="dragonfly">
+<title>DragonFly BSD</title>
+<para>
+Je?eli Tw?j procesor ma rozszerzenie SSE, przekompiluj j?dro z opcj?
+&quot;<envar>CPU_ENABLE_SSE</envar>&quot;.
+</para>
+</sect2>
+
 <sect2 id="openbsd">
 <title>OpenBSD</title>
 <para>Ze wzgl?du na ograniczenia w r??nych wersjach gas (GNU assemblera - przyp. t?umacza)
Index: libaf/af_format.c
===================================================================
RCS file: /cvsroot/mplayer/main/libaf/af_format.c,v
retrieving revision 1.15
diff -u -r1.15 af_format.c
--- libaf/af_format.c	18 May 2004 19:13:15 -0000	1.15
+++ libaf/af_format.c	29 Aug 2004 01:44:50 -0000
@@ -15,8 +15,13 @@
 
 // Integer to float conversion through lrintf()
 #ifdef HAVE_LRINTF
+#if defined(__DragonFly__)
+#include <math.h>
+#define lrintf(x) rintf(x)
+#else
 #define __USE_ISOC99 1
 #include <math.h>
+#endif
 #else
 #define lrintf(x) ((int)(x))
 #endif
Index: libdha/pci.c
===================================================================
RCS file: /cvsroot/mplayer/main/libdha/pci.c,v
retrieving revision 1.14
diff -u -r1.14 pci.c
--- libdha/pci.c	26 Jun 2004 12:40:56 -0000	1.14
+++ libdha/pci.c	29 Aug 2004 01:44:50 -0000
@@ -62,7 +62,7 @@
 /* OS depended stuff */
 #if defined (linux)
 #include "sysdep/pci_linux.c"
-#elif defined (__FreeBSD__)
+#elif defined (__FreeBSD__) || defined(__DragonFly__)
 #include "sysdep/pci_freebsd.c"
 #elif defined (__386BSD__)
 #include "sysdep/pci_386bsd.c"
Index: libfaad2/common.h
===================================================================
RCS file: /cvsroot/mplayer/main/libfaad2/common.h,v
retrieving revision 1.5
diff -u -r1.5 common.h
--- libfaad2/common.h	23 Jun 2004 13:50:49 -0000	1.5
+++ libfaad2/common.h	29 Aug 2004 01:44:50 -0000
@@ -365,11 +365,16 @@
 
 #ifdef HAVE_LRINTF
 #  define HAS_LRINTF
+#if defined(__DragonFly__)
+#  include <math.h>
+#  define lrintf(x) rintf(x)
+#else
 #  define _ISOC9X_SOURCE 1
 #  define _ISOC99_SOURCE 1
 #  define __USE_ISOC9X   1
 #  define __USE_ISOC99   1
 #endif
+#endif
 
     #include <math.h>
 
Index: libmpcodecs/ad_realaud.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/ad_realaud.c,v
retrieving revision 1.32
diff -u -r1.32 ad_realaud.c
--- libmpcodecs/ad_realaud.c	24 Jun 2004 13:53:49 -0000	1.32
+++ libmpcodecs/ad_realaud.c	29 Aug 2004 01:44:50 -0000
@@ -39,7 +39,7 @@
 	free(ize);
 }
 
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
 void *__ctype_b=NULL;
 #endif
 
Index: libmpcodecs/vd_realvid.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_realvid.c,v
retrieving revision 1.27
diff -u -r1.27 vd_realvid.c
--- libmpcodecs/vd_realvid.c	24 Jun 2004 09:16:50 -0000	1.27
+++ libmpcodecs/vd_realvid.c	29 Aug 2004 01:44:50 -0000
@@ -83,7 +83,7 @@
 //	exit(1);
 }
 
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
 void ___brk_addr(void) {exit(0);}
 char **__environ={NULL};
 #undef stderr
Index: libmpcodecs/vd_xanim.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_xanim.c,v
retrieving revision 1.12
diff -u -r1.12 vd_xanim.c
--- libmpcodecs/vd_xanim.c	3 Jul 2003 20:22:51 -0000	1.12
+++ libmpcodecs/vd_xanim.c	29 Aug 2004 01:44:50 -0000
@@ -29,7 +29,7 @@
 
 LIBVD_EXTERN(xanim)
 
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__DragonFly__)
 #include <unistd.h>
 #endif
 
Index: libmpdemux/cddb.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/cddb.c,v
retrieving revision 1.16
diff -u -r1.16 cddb.c
--- libmpdemux/cddb.c	26 Apr 2004 09:33:35 -0000	1.16
+++ libmpdemux/cddb.c	29 Aug 2004 01:44:51 -0000
@@ -30,7 +30,7 @@
 
 #if defined(__linux__)
 	#include <linux/cdrom.h>
-#elif defined(__FreeBSD__) || defined(__bsdi__) || defined(__NetBSD__) || defined(__OpenBSD__)
+#elif defined(__FreeBSD__) || defined(__bsdi__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
 	#include <sys/cdio.h>
 #endif
 
@@ -82,7 +82,7 @@
 	return tochdr.cdth_trk1;
 }
 
-#elif defined(__FreeBSD__) || defined(__bsdi__)
+#elif defined(__FreeBSD__) || defined(__bsdi__) || defined(__DragonFly__)
 int 
 read_toc(const char *dev) {
 	int drive;
Index: libmpdemux/open.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/open.c,v
retrieving revision 1.99
diff -u -r1.99 open.c
--- libmpdemux/open.c	22 Aug 2004 18:47:48 -0000	1.99
+++ libmpdemux/open.c	29 Aug 2004 01:44:51 -0000
@@ -11,7 +11,7 @@
 #include "mp_msg.h"
 #include "help_mp.h"
 
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__DragonFly__)
 #include <sys/cdrio.h>
 #endif
 
Index: libmpdemux/stream_vcd.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/stream_vcd.c,v
retrieving revision 1.4
diff -u -r1.4 stream_vcd.c
--- libmpdemux/stream_vcd.c	11 Jul 2004 22:23:57 -0000	1.4
+++ libmpdemux/stream_vcd.c	29 Aug 2004 01:44:51 -0000
@@ -14,7 +14,7 @@
 #include <sys/ioctl.h>
 #include <errno.h>
 
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__DragonFly__)
 #include <sys/cdrio.h>
 #include "vcd_read_fbsd.h" 
 #elif defined(__NetBSD__) || defined (__OpenBSD__)
@@ -68,7 +68,7 @@
   struct stream_priv_s* p = (struct stream_priv_s*)opts;
   int ret,ret2,f;
   mp_vcd_priv_t* vcd;
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__DragonFly__)
   int bsize = VCD_SECTOR_SIZE;
 #endif
 
@@ -117,7 +117,7 @@
   }
   mp_msg(MSGT_OPEN,MSGL_V,"VCD start byte position: 0x%X  end: 0x%X\n",ret,ret2);
 
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__DragonFly__)
   if (ioctl (f, CDRIOCSETBLOCKSIZE, &bsize) == -1) {
     mp_msg(MSGT_OPEN,MSGL_WARN,"Error in CDRIOCSETBLOCKSIZE");
   }
Index: libmpdvdkit2/bswap.h
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdvdkit2/bswap.h,v
retrieving revision 1.2
diff -u -r1.2 bswap.h
--- libmpdvdkit2/bswap.h	16 Aug 2002 22:50:21 -0000	1.2
+++ libmpdvdkit2/bswap.h	29 Aug 2004 01:44:51 -0000
@@ -90,7 +90,7 @@
  * functionality! 
  */
 
-#elif defined(__FreeBSD__) || defined(__sun) || defined(__bsdi__) || defined(__CYGWIN__)
+#elif defined(__FreeBSD__) || defined(__sun) || defined(__bsdi__) || defined(__CYGWIN__) || defined(__DragonFly__)
 #define B2N_16(x) \
  x = ((((x) & 0xff00) >> 8) | \
       (((x) & 0x00ff) << 8))
Index: libmpdvdkit2/dvd_reader.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdvdkit2/dvd_reader.c,v
retrieving revision 1.11
diff -u -r1.11 dvd_reader.c
--- libmpdvdkit2/dvd_reader.c	6 May 2004 18:04:06 -0000	1.11
+++ libmpdvdkit2/dvd_reader.c	29 Aug 2004 01:44:51 -0000
@@ -31,7 +31,7 @@
 #include <limits.h>
 #include <dirent.h>
  
-#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__bsdi__)|| defined(__DARWIN__)
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__bsdi__)|| defined(__DARWIN__) || defined(__DragonFly__)
 #define SYS_BSD 1
 #endif
 
@@ -244,6 +244,7 @@
 
 #if defined(SYS_BSD)
 /* FreeBSD /dev/(r)(a)cd0c (a is for atapi), recomended to _not_ use r
+   DragonFly /dev/(a)cd0c (a is for atapi)
    OpenBSD /dev/rcd0c, it needs to be the raw device
    NetBSD  /dev/rcd0[d|c|..] d for x86, c (for non x86), perhaps others
    Darwin  /dev/rdisk0,  it needs to be the raw device
Index: loader/driver.c
===================================================================
RCS file: /cvsroot/mplayer/main/loader/driver.c,v
retrieving revision 1.13
diff -u -r1.13 driver.c
--- loader/driver.c	25 Jun 2004 17:03:30 -0000	1.13
+++ loader/driver.c	29 Aug 2004 01:44:51 -0000
@@ -5,7 +5,7 @@
 #include <malloc.h>
 #endif
 #include <stdlib.h>
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__DragonFly__)
 #include <sys/time.h>
 #endif
 
Index: loader/ldt_keeper.c
===================================================================
RCS file: /cvsroot/mplayer/main/loader/ldt_keeper.c,v
retrieving revision 1.12
diff -u -r1.12 ldt_keeper.c
--- loader/ldt_keeper.c	6 Sep 2003 00:14:08 -0000	1.12
+++ loader/ldt_keeper.c	29 Aug 2004 01:44:52 -0000
@@ -38,7 +38,7 @@
 }
 #endif
 #else
-#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
 #include <machine/segments.h>
 #include <machine/sysarch.h>
 #endif
@@ -88,7 +88,7 @@
 #define       LDT_SEL(idx) ((idx) << 3 | 1 << 2 | 3)
 
 /* i got this value from wine sources, it's the first free LDT entry */
-#if defined(__FreeBSD__) && defined(LDT_AUTO_ALLOC)
+#if (defined(__FreeBSD__) || defined(__DragonFly__)) && defined(LDT_AUTO_ALLOC)
 #define       TEB_SEL_IDX     LDT_AUTO_ALLOC
 #endif
 
@@ -152,7 +152,7 @@
 #endif
 #endif
 
-#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
 static void LDT_EntryToBytes( unsigned long *buffer, const struct modify_ldt_ldt_s *content )
 {
     *buffer++ = ((content->base_addr & 0x0000ffff) << 16) |
@@ -213,12 +213,12 @@
     }
 #endif /*linux*/
 
-#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
     {
         unsigned long d[2];
 
         LDT_EntryToBytes( d, &array );
-#if defined(__FreeBSD__) && defined(LDT_AUTO_ALLOC)
+#if (defined(__FreeBSD__) || defined(__DragonFly__)) && defined(LDT_AUTO_ALLOC)
         ret = i386_set_ldt(LDT_AUTO_ALLOC, (union descriptor *)d, 1);
         array.entry_number = ret;
         fs_ldt = ret;
@@ -232,7 +232,7 @@
             printf("Did you reconfigure the kernel with \"options USER_LDT\"?\n");
         }
     }
-#endif  /* __NetBSD__ || __FreeBSD__ || __OpenBSD__ */
+#endif  /* __NetBSD__ || __FreeBSD__ || __OpenBSD__ || __DragonFly__ */
 
 #if defined(__svr4__)
     {
Index: loader/pe_image.c
===================================================================
RCS file: /cvsroot/mplayer/main/loader/pe_image.c,v
retrieving revision 1.7
diff -u -r1.7 pe_image.c
--- loader/pe_image.c	13 Sep 2002 19:43:13 -0000	1.7
+++ loader/pe_image.c	29 Aug 2004 01:44:52 -0000
@@ -898,7 +898,7 @@
  */
 static void extend_stack_for_dll_alloca(void)
 {
-#ifndef __FreeBSD__
+#if !defined(__FreeBSD__) || !defined(__DragonFly__)
     void* mem=alloca(0x20000);
     *(int*)mem=0x1234;
 #endif
Index: loader/win32.c
===================================================================
RCS file: /cvsroot/mplayer/main/loader/win32.c,v
retrieving revision 1.91
diff -u -r1.91 win32.c
--- loader/win32.c	28 Aug 2004 20:22:38 -0000	1.91
+++ loader/win32.c	29 Aug 2004 01:44:53 -0000
@@ -986,7 +986,7 @@
 
 /* disable cpuid based detection (mplayer's cpudetect.c does this - see above) */
 #ifndef MPLAYER
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__svr4__)
+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__svr4__) || defined(__DragonFly__)
     do_cpuid(1, regs);
     switch ((regs[0] >> 8) & 0xf) {			// cpu family
     case 3: cachedsi.dwProcessorType = PROCESSOR_INTEL_386;
Index: osdep/getch2.c
===================================================================
RCS file: /cvsroot/mplayer/main/osdep/getch2.c,v
retrieving revision 1.18
diff -u -r1.18 getch2.c
--- osdep/getch2.c	5 Apr 2004 21:33:08 -0000	1.18
+++ osdep/getch2.c	29 Aug 2004 01:44:53 -0000
@@ -220,7 +220,7 @@
 struct termios tio_new;
 #if defined(__NetBSD__) || defined(__svr4__) || defined(__CYGWIN__) || defined(__OS2__) || defined(__GLIBC__)
     tcgetattr(0,&tio_orig);
-#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__APPLE__)
+#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__APPLE__) || defined(__DragonFly__)
     ioctl(0,TIOCGETA,&tio_orig);
 #else
     ioctl(0,TCGETS,&tio_orig);
@@ -231,7 +231,7 @@
     tio_new.c_cc[VTIME] = 0;
 #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__)
+#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__APPLE__) || defined(__DragonFly__)
     ioctl(0,TIOCSETA,&tio_new);
 #else
     ioctl(0,TCSETS,&tio_new);
@@ -245,7 +245,7 @@
 #ifdef HAVE_TERMIOS
 #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__)
+#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__APPLE__) || defined(__DragonFly__)
     ioctl(0,TIOCSETA,&tio_orig);
 #else
     ioctl(0,TCSETS,&tio_orig);


More information about the MPlayer-dev-eng mailing list