[MPlayer-cvslog] r21866 - in trunk: configure cpudetect.c libdha/pci.c stream/stream_cddb.c stream/stream_vcd.c stream/tvi_bsdbt848.c

diego subversion at mplayerhq.hu
Wed Jan 10 15:56:23 CET 2007


Author: diego
Date: Wed Jan 10 15:56:23 2007
New Revision: 21866

Modified:
   trunk/configure
   trunk/cpudetect.c
   trunk/libdha/pci.c
   trunk/stream/stream_cddb.c
   trunk/stream/stream_vcd.c
   trunk/stream/tvi_bsdbt848.c

Log:
GNU/kFreeBSD support, closes Bugzilla #704.
patch by Petr Salinger, Petr.Salinger seznam cz


Modified: trunk/configure
==============================================================================
--- trunk/configure	(original)
+++ trunk/configure	Wed Jan 10 15:56:23 2007
@@ -105,7 +105,7 @@
 irix()    { issystem "IRIX"    ; return "$?" ; }
 aix()     { issystem "AIX"     ; return "$?" ; }
 cygwin()  { issystem "CYGWIN"  ; return "$?" ; }
-freebsd() { issystem "FreeBSD" ; return "$?" ; }
+freebsd() { issystem "FreeBSD" || issystem "GNU/kFreeBSD"; return "$?" ; }
 netbsd()  { issystem "NetBSD"  ; return "$?" ; }
 bsdos()   { issystem "BSD/OS"  ; return "$?" ; }
 openbsd() { issystem "OpenBSD" ; return "$?" ; }
@@ -558,6 +558,9 @@
   IRIX*)
     system_name=IRIX
     ;;
+  GNU/kFreeBSD)
+    system_name=FreeBSD
+    ;;
   HP-UX*)
     system_name=HP-UX
     ;;
@@ -618,6 +621,7 @@
   case "`echo $system_name | tr A-Z a-z`" in
     linux) system_name=Linux ;;
     freebsd) system_name=FreeBSD ;;
+    gnu/kfreebsd) system_name=FreeBSD ;;
     netbsd) system_name=NetBSD ;;
     bsd/os) system_name=BSD/OS ;;
     openbsd) system_name=OpenBSD ;;
@@ -8070,7 +8074,7 @@
 #elif defined(__OpenBSD__)
 #define DEFAULT_CDROM_DEVICE	"/dev/rcd0a"
 #define DEFAULT_DVD_DEVICE	DEFAULT_CDROM_DEVICE
-#elif defined(__FreeBSD__)
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
 #define DEFAULT_CDROM_DEVICE	"/dev/acd0"
 #define DEFAULT_DVD_DEVICE	DEFAULT_CDROM_DEVICE
 #else

Modified: trunk/cpudetect.c
==============================================================================
--- trunk/cpudetect.c	(original)
+++ trunk/cpudetect.c	Wed Jan 10 15:56:23 2007
@@ -20,7 +20,7 @@
 #include <machine/cpu.h>
 #endif
 
-#if defined(__FreeBSD__) || defined(__DragonFly__)
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
 #include <sys/types.h>
 #include <sys/sysctl.h>
 #endif
@@ -182,7 +182,7 @@
 #endif
 
 		/* FIXME: Does SSE2 need more OS support, too? */
-#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__CYGWIN__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__APPLE__)
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__CYGWIN__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__APPLE__)
 		if (caps->hasSSE)
 			check_os_katmai_support();
 		if (!caps->hasSSE)
@@ -346,7 +346,7 @@
  * support for user space apps that do SSE.
  */
  
-#if defined(__FreeBSD__) || defined(__DragonFly__)
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
 #define SSE_SYSCTL_NAME "hw.instruction_sse"
 #elif defined(__APPLE__)
 #define SSE_SYSCTL_NAME "hw.optional.sse"
@@ -357,7 +357,7 @@
 #ifdef ARCH_X86_64
    gCpuCaps.hasSSE=1;
    gCpuCaps.hasSSE2=1;
-#elif defined(__FreeBSD__) || defined(__DragonFly__) || defined(__APPLE__)
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) || defined(__APPLE__)
    int has_sse=0, ret;
    size_t len=sizeof(has_sse);
 

Modified: trunk/libdha/pci.c
==============================================================================
--- trunk/libdha/pci.c	(original)
+++ trunk/libdha/pci.c	Wed Jan 10 15:56:23 2007
@@ -62,7 +62,7 @@
 /* OS depended stuff */
 #if defined (linux)
 #include "sysdep/pci_linux.c"
-#elif defined (__FreeBSD__) || defined(__DragonFly__)
+#elif defined (__FreeBSD__) || defined (__FreeBSD_kernel__) || defined(__DragonFly__)
 #include "sysdep/pci_freebsd.c"
 #elif defined (__386BSD__)
 #include "sysdep/pci_386bsd.c"

Modified: trunk/stream/stream_cddb.c
==============================================================================
--- trunk/stream/stream_cddb.c	(original)
+++ trunk/stream/stream_cddb.c	Wed Jan 10 15:56:23 2007
@@ -41,7 +41,7 @@
 
 #if defined(__linux__)
 	#include <linux/cdrom.h>
-#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
 	#include <sys/cdio.h>
 #elif defined(WIN32)
         #include <ddk/ntddcdrm.h>
@@ -110,7 +110,7 @@
 		cdtoc[i].sec = tocentry.cdte_addr.msf.second;
 		cdtoc[i].frame = tocentry.cdte_addr.msf.frame;
 	}
-#elif defined(__FreeBSD__) || defined(__DragonFly__)
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
 	{
 	struct ioc_toc_header tochdr;
 	ioctl(drive, CDIOREADTOCHEADER, &tochdr);

Modified: trunk/stream/stream_vcd.c
==============================================================================
--- trunk/stream/stream_vcd.c	(original)
+++ trunk/stream/stream_vcd.c	Wed Jan 10 15:56:23 2007
@@ -13,7 +13,7 @@
 #include <sys/ioctl.h>
 #include <errno.h>
 
-#if defined(__FreeBSD__) || defined(__DragonFly__)
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
 #include <sys/cdrio.h>
 #include "vcd_read_fbsd.h" 
 #elif defined(__NetBSD__) || defined (__OpenBSD__)
@@ -71,7 +71,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(__FreeBSD_kernel__)
   int bsize = VCD_SECTOR_SIZE;
 #endif
 
@@ -119,7 +119,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(__FreeBSD_kernel__)
   if (ioctl (f, CDRIOCSETBLOCKSIZE, &bsize) == -1) {
     mp_msg(MSGT_OPEN,MSGL_WARN,"Error in CDRIOCSETBLOCKSIZE");
   }

Modified: trunk/stream/tvi_bsdbt848.c
==============================================================================
--- trunk/stream/tvi_bsdbt848.c	(original)
+++ trunk/stream/tvi_bsdbt848.c	Wed Jan 10 15:56:23 2007
@@ -44,7 +44,7 @@
 #elif defined(__DragonFly__)
 #include <dev/video/meteor/ioctl_meteor.h>
 #include <dev/video/bktr/ioctl_bt848.h>
-#elif __FreeBSD_version >= 502100
+#elif (__FreeBSD_version >= 502100) || defined(__FreeBSD_kernel__)
 #include <dev/bktr/ioctl_meteor.h>
 #include <dev/bktr/ioctl_bt848.h>
 #else



More information about the MPlayer-cvslog mailing list