GNU/kFreeBSD support, closes Bugzilla #704.

patch by Petr Salinger, Petr.Salinger seznam cz


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21866 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
diego 2007-01-10 14:56:23 +00:00
parent 793eb3b681
commit d1f409719c
6 changed files with 17 additions and 13 deletions

8
configure vendored
View File

@ -105,7 +105,7 @@ hpux() { issystem "HP-UX" ; return "$?" ; }
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 @@ if test -z "$_target" ; then
IRIX*)
system_name=IRIX
;;
GNU/kFreeBSD)
system_name=FreeBSD
;;
HP-UX*)
system_name=HP-UX
;;
@ -618,6 +621,7 @@ else # if test -z "$_target"
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 @@ $_def_vcd
#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

View File

@ -20,7 +20,7 @@ CpuCaps gCpuCaps;
#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 @@ void GetCpuCaps( CpuCaps *caps)
#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 @@ LONG CALLBACK win32_sig_handler_sse(EXCEPTION_POINTERS* ep)
* 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 @@ static void check_os_katmai_support( void )
#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);

View File

@ -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"

View File

@ -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 @@ read_toc(const char *dev) {
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);

View File

@ -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 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
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 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) {
}
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");
}

View File

@ -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