Commit 30046622 authored by Johan Bilien's avatar Johan Bilien

* ALL : better FreeBSD detection for VCD input

parent 7eb66813
This diff is collapsed.
...@@ -715,7 +715,7 @@ dnl ...@@ -715,7 +715,7 @@ dnl
dnl VCD module dnl VCD module
dnl dnl
AC_ARG_ENABLE(vcd, AC_ARG_ENABLE(vcd,
[ --enable-vcd VCD support for Linux and MacOS X (default enabled)]) [ --enable-vcd VCD support for Linux, FreeBSD and MacOS X (default enabled)])
if test x$enable_vcd != xno if test x$enable_vcd != xno
then then
...@@ -723,10 +723,10 @@ then ...@@ -723,10 +723,10 @@ then
PLUGINS="${PLUGINS} vcd" PLUGINS="${PLUGINS} vcd"
]) ])
if test "x${SYS}" = "xfreebsd4.5" AC_EGREP_HEADER(ioc_toc_header ,sys/cdio.h,[
then
PLUGINS="${PLUGINS} vcd" PLUGINS="${PLUGINS} vcd"
fi AC_DEFINE(HAVE_IOC_TOC_HEADER_IN_SYS_CDIO_H, 1, For FreeBSD VCD support)
])
if test "x${SYS}" = "xbsdi" if test "x${SYS}" = "xbsdi"
then then
......
...@@ -380,6 +380,9 @@ ...@@ -380,6 +380,9 @@
/* Define if your compiler groks C altivec extensions. */ /* Define if your compiler groks C altivec extensions. */
#undef CAN_COMPILE_C_ALTIVEC #undef CAN_COMPILE_C_ALTIVEC
/* For FreeBSD VCD support */
#undef HAVE_IOC_TOC_HEADER_IN_SYS_CDIO_H
/* Indicate whether we should use SDL/SDL.h or SDL11/SDL.h */ /* Indicate whether we should use SDL/SDL.h or SDL11/SDL.h */
#undef SDL_INCLUDE_FILE #undef SDL_INCLUDE_FILE
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* cdrom_tools.c: cdrom tools * cdrom_tools.c: cdrom tools
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2001 VideoLAN * Copyright (C) 1998-2001 VideoLAN
* $Id: cdrom_tools.c,v 1.3 2002/04/26 23:32:23 jobi Exp $ * $Id: cdrom_tools.c,v 1.4 2002/04/27 02:20:32 jobi Exp $
* *
* Author: Johan Bilien <jobi@via.ecp.fr> * Author: Johan Bilien <jobi@via.ecp.fr>
* Jon Lech Johansen <jon-vl@nanocrew.net> * Jon Lech Johansen <jon-vl@nanocrew.net>
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
# include <IOKit/storage/IOCDTypes.h> # include <IOKit/storage/IOCDTypes.h>
# include <IOKit/storage/IOCDMedia.h> # include <IOKit/storage/IOCDMedia.h>
# include <IOKit/storage/IOCDMediaBSDClient.h> # include <IOKit/storage/IOCDMediaBSDClient.h>
#elif defined( SYS_FREEBSD4_5 ) #elif defined( HAVE_IOC_TOC_HEADER_IN_SYS_CDIO_H )
# include <sys/cdio.h> # include <sys/cdio.h>
# include <sys/cdrio.h> # include <sys/cdrio.h>
#else #else
...@@ -92,7 +92,7 @@ int ioctl_GetTrackCount( int i_fd, const char *psz_dev ) ...@@ -92,7 +92,7 @@ int ioctl_GetTrackCount( int i_fd, const char *psz_dev )
freeTOC( pTOC ); freeTOC( pTOC );
#elif defined( SYS_FREEBSD4_5 ) #elif defined( HAVE_IOC_TOC_HEADER_IN_SYS_CDIO_H )
struct ioc_toc_header tochdr; struct ioc_toc_header tochdr;
if( ioctl( i_fd, CDIOREADTOCHEADER, &tochdr ) == -1 ) if( ioctl( i_fd, CDIOREADTOCHEADER, &tochdr ) == -1 )
...@@ -181,7 +181,7 @@ int * ioctl_GetSectors( int i_fd, const char *psz_dev ) ...@@ -181,7 +181,7 @@ int * ioctl_GetSectors( int i_fd, const char *psz_dev )
freeTOC( pTOC ); freeTOC( pTOC );
#elif defined( SYS_FREEBSD4_5 ) #elif defined( HAVE_IOC_TOC_HEADER_IN_SYS_CDIO_H )
struct ioc_read_toc_entry toc_entries; struct ioc_read_toc_entry toc_entries;
i_tracks = ioctl_GetTrackCount( i_fd, psz_dev ); i_tracks = ioctl_GetTrackCount( i_fd, psz_dev );
...@@ -285,7 +285,7 @@ int ioctl_ReadSector( int i_fd, int i_sector, byte_t * p_buffer ) ...@@ -285,7 +285,7 @@ int ioctl_ReadSector( int i_fd, int i_sector, byte_t * p_buffer )
return( -1 ); return( -1 );
} }
#elif defined( SYS_FREEBSD4_5 ) #elif defined( HAVE_IOC_TOC_HEADER_IN_SYS_CDIO_H )
int i_size = VCD_SECTOR_SIZE; int i_size = VCD_SECTOR_SIZE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment