Commit 0967faf5 authored by Sam Hocevar's avatar Sam Hocevar

  * Compile fix for newer versions of MacOS X by Colin Simmonds
    <colin_simmonds@Mac.lover.org>.
  * Additional MacOS X DVD ioctl work by Eugenio Jarosiewicz
    <ej0@cise.ufl.edu>.
parent 01d140d8
......@@ -111,7 +111,7 @@ D: DVD subtitles decoder
N: Eugenio Jarosiewicz
E: ej0@cise.ufl.edu
C: ej
D: MacOS X interface and fixes
D: MacOS X interface, DVD ioctls, and various fixes
N: Brieuc Jeunhomme
E: bbp@via.ecp.fr
......
......@@ -3567,6 +3567,15 @@ fi
done
case ${host_os} in
darwin*)
SYS=darwin
;;
*)
SYS=${host_os}
;;
esac
# Check whether --enable-ppro or --disable-ppro was given.
if test "${enable_ppro+set}" = set; then
enableval="$enable_ppro"
......@@ -3640,7 +3649,7 @@ if test "${enable_pth+set}" = set; then
enableval="$enable_pth"
if test x$enableval = xyes; then
echo $ac_n "checking for pth_init in -lpth""... $ac_c" 1>&6
echo "configure:3644: checking for pth_init in -lpth" >&5
echo "configure:3653: checking for pth_init in -lpth" >&5
ac_lib_var=`echo pth'_'pth_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -3648,7 +3657,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpth $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3652 "configure"
#line 3661 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
......@@ -3659,7 +3668,7 @@ int main() {
pth_init()
; return 0; }
EOF
if { (eval echo configure:3663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
......@@ -3687,7 +3696,7 @@ else
fi
cat > conftest.$ac_ext <<EOF
#line 3691 "configure"
#line 3700 "configure"
#include "confdefs.h"
#include <pth.h>
EOF
......@@ -3727,17 +3736,17 @@ for ac_hdr in videolan/dvdcss.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:3731: checking for $ac_hdr" >&5
echo "configure:3740: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3736 "configure"
#line 3745 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3741: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:3750: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -3800,9 +3809,7 @@ fi
if test x$enable_rc != xno; then
BUILTINS="${BUILTINS} rc"; fi
SYS=${host_os}
if test x$host_os = xbeos; then
if test x$SYS = xbeos; then
BUILTINS="${BUILTINS} beos"
LIB_BEOS="-lbe -lgame -lroot -ltracker"
PLCFLAGS="${PLCFLAGS} -nostart"
......@@ -3828,7 +3835,7 @@ if test "${enable_esd+set}" = set; then
# Extract the first word of "esd-config", so it can be a program name with args.
set dummy esd-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:3832: checking for $ac_word" >&5
echo "configure:3839: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_ESD_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -3893,17 +3900,17 @@ else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:3897: checking for $ac_hdr" >&5
echo "configure:3904: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3902 "configure"
#line 3909 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3907: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:3914: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -3974,17 +3981,17 @@ if test "${with_sdl+set}" = set; then
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:3978: checking for $ac_hdr" >&5
echo "configure:3985: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3983 "configure"
#line 3990 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3988: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:3995: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -4022,17 +4029,17 @@ fi
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:4026: checking for $ac_hdr" >&5
echo "configure:4033: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 4031 "configure"
#line 4038 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4036: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:4043: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -4076,17 +4083,17 @@ if test "${with_directx+set}" = set; then
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:4080: checking for $ac_hdr" >&5
echo "configure:4087: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 4085 "configure"
#line 4092 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4090: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:4097: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -4124,17 +4131,17 @@ fi
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:4128: checking for $ac_hdr" >&5
echo "configure:4135: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 4133 "configure"
#line 4140 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4138: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:4145: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -4234,7 +4241,7 @@ if test x$enable_gtk != xno; then
# Extract the first word of "gtk-config", so it can be a program name with args.
set dummy gtk-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4238: checking for $ac_word" >&5
echo "configure:4245: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -4294,17 +4301,17 @@ if test x$enable_x11 != xno; then
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:4298: checking for $ac_hdr" >&5
echo "configure:4305: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 4303 "configure"
#line 4310 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4308: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:4315: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -4356,17 +4363,17 @@ if test x$enable_xvideo != xno; then
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:4360: checking for $ac_hdr" >&5
echo "configure:4367: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 4365 "configure"
#line 4372 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4370: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:4377: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -4404,17 +4411,17 @@ if test "${enable_alsa+set}" = set; then
enableval="$enable_alsa"
if test x$enable_alsa = xyes; then ac_safe=`echo "sys/asoundlib.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for sys/asoundlib.h""... $ac_c" 1>&6
echo "configure:4408: checking for sys/asoundlib.h" >&5
echo "configure:4415: checking for sys/asoundlib.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 4413 "configure"
#line 4420 "configure"
#include "confdefs.h"
#include <sys/asoundlib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4418: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:4425: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -4431,7 +4438,7 @@ fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for main in -lasound""... $ac_c" 1>&6
echo "configure:4435: checking for main in -lasound" >&5
echo "configure:4442: checking for main in -lasound" >&5
ac_lib_var=`echo asound'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -4439,14 +4446,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lasound $LIBS"
cat > conftest.$ac_ext <<EOF
#line 4443 "configure"
#line 4450 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
if { (eval echo configure:4450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:4457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
......
......@@ -219,6 +219,18 @@ AC_CHECK_HEADERS(sys/ioctl.h,[
])
])
dnl
dnl Check the operating system
dnl
case ${host_os} in
darwin*)
SYS=darwin
;;
*)
SYS=${host_os}
;;
esac
dnl
dnl PentiumPro acceleration
dnl
......@@ -347,10 +359,8 @@ AC_ARG_ENABLE(rc,
if test x$enable_rc != xno; then
BUILTINS="${BUILTINS} rc"; fi
SYS=${host_os}
dnl special case for BeOS
if test x$host_os = xbeos; then
if test x$SYS = xbeos; then
BUILTINS="${BUILTINS} beos"
LIB_BEOS="-lbe -lgame -lroot -ltracker"
PLCFLAGS="${PLCFLAGS} -nostart"
......
......@@ -3,9 +3,10 @@
*****************************************************************************
* Copyright (C) 1998-2000 Apple Computer, Inc. All rights reserved.
* Copyright (C) 2001 VideoLAN
* $Id: DVDioctl.cpp,v 1.6 2001/05/25 04:23:37 sam Exp $
* $Id: DVDioctl.cpp,v 1.7 2001/06/25 11:34:08 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Eugenio Jarosiewicz <ej0@cise.ufl.edu>
*
* The contents of this file constitute Original Code as defined in and
* are subject to the Apple Public Source License Version 1.1 (the
......@@ -53,6 +54,10 @@ extern "C"
#include <IOKit/storage/IODVDMedia.h>
#include <IOKit/storage/IODVDBlockStorageDriver.h>
#undef CONTROL //some include above #defines this and breaks the next include...grr.
#include <IOKit/scsi-commands/IOSCSIMultimediaCommandsDevice.h>
#include <IOKit/scsi-commands/IODVDServices.h>
#include "DVDioctl.h"
/*****************************************************************************
......@@ -108,6 +113,8 @@ static int i_major;
static void *p_node;
static IODVDMedia *p_dvd;
static IODVDBlockStorageDriver *p_drive;
static IODVDServices *p_services;
static IOSCSIMultimediaCommandsDevice *p_scsi_mcd;
/*****************************************************************************
* DKR_GET_DEV: borrowed from IOMediaBSDClient.cpp
......@@ -252,6 +259,8 @@ bool DVDioctl::init( OSDictionary *p_dict = 0 )
p_node = NULL;
p_dvd = NULL;
p_drive = NULL;
p_services = NULL;
p_scsi_mcd = NULL;
i_major = -1;
b_inuse = false;
......@@ -405,6 +414,10 @@ static int DVDOpen( dev_t dev, int flags, int devtype, struct proc * )
p_drive = p_dvd->getProvider();
p_services = OSDynamicCast( IODVDServices, p_drive->getProvider() );
p_scsi_mcd = OSDynamicCast( IOSCSIMultimediaCommandsDevice, p_services->getProvider() );
log( LOG_INFO, "DVD ioctl: IODVDMedia->open()\n" );
return 0;
......@@ -420,6 +433,8 @@ static int DVDClose( dev_t dev, int flags, int devtype, struct proc * )
p_dvd = NULL;
p_drive = NULL;
p_services = NULL;
p_scsi_mcd = NULL;
b_inuse = false;
log( LOG_INFO, "DVD ioctl: IODVDMedia->close()\n" );
......@@ -450,9 +465,15 @@ static void DVDStrategy( buf_t * bp )
static int DVDBlockIoctl( dev_t dev, u_long cmd, caddr_t addr, int flags,
struct proc *p )
{
dvdioctl_data_t *p_data = (dvdioctl_data_t *)addr;
IOMemoryDescriptor *p_mem;
#define p_data (((dvdioctl_data_t *)addr))
IOReturn i_ret = EINVAL;
/* Only needed for IODVD_READ_STRUCTURE */
SCSITask *p_request;
SCSIServiceResponse response;
IOMemoryDescriptor *p_mem;
p_mem = IOMemoryDescriptor::withAddress( p_data->p_buffer,
p_data->i_size,
kIODirectionOutIn );
......@@ -463,9 +484,49 @@ static int DVDBlockIoctl( dev_t dev, u_long cmd, caddr_t addr, int flags,
log( LOG_INFO, "DVD ioctl: IODVD_READ_STRUCTURE\n" );
/* We don't do anything, since I don't know what to do */
return 0;
i_ret = kIOReturnUnsupported;
response = kSCSIServiceResponse_SERVICE_DELIVERY_OR_TARGET_FAILURE;
/* HACK! - Make GetSCSITask and friends in /System/Library/Frameworks/Kernel.framework/Versions/A/Headers/IOKit/scsi-commands/IOSCSIPrimaryCommandsDevice.h public by moving public: from line 96 to line 79 (as root). It's only a compile time check - not a link time thing, so it should be ok. */
p_request = p_scsi_mcd->GetSCSITask( );
if ( p_scsi_mcd->READ_DVD_STRUCTURE ( p_request,
p_mem,
p_data->i_lba,
0,//?LAYER_NUMBER
p_data->i_keyformat,
p_mem->getLength(),//p_data->i_size ?
p_data->i_agid,
0x00 //?CONTROL
) == true )
{
/* The command was successfully built, now send it */
response = p_scsi_mcd->SendCommand( p_request );
}
else
{
#if 0
exit -1;
PANIC_NOW(( "IOSCSIMultimediaCommandsDevice:: "
"readDVDstruct malformed command" ));
#endif
}
if( ( response == kSCSIServiceResponse_TASK_COMPLETE ) &&
( p_request->GetTaskStatus ( ) == kSCSITaskStatus_GOOD ) )
{
i_ret = kIOReturnSuccess;
}
else
{
i_ret = kIOReturnError;
}
p_scsi_mcd->ReleaseSCSITask( p_request );
}
break;
case IODVD_SEND_KEY:
......@@ -475,9 +536,11 @@ static int DVDBlockIoctl( dev_t dev, u_long cmd, caddr_t addr, int flags,
(int)p_data->p_buffer, p_data->i_keyclass,
p_data->i_agid, p_data->i_keyformat );
return p_drive->sendKey( p_mem, (DVDKeyClass)p_data->i_keyclass,
p_data->i_agid,
(DVDKeyFormat)p_data->i_keyformat );
i_ret = p_drive->sendKey( p_mem, (DVDKeyClass)p_data->i_keyclass,
p_data->i_agid,
(DVDKeyFormat)p_data->i_keyformat );
break;
case IODVD_REPORT_KEY:
......@@ -487,16 +550,23 @@ static int DVDBlockIoctl( dev_t dev, u_long cmd, caddr_t addr, int flags,
(int)p_data->p_buffer, p_data->i_keyclass, p_data->i_lba,
p_data->i_agid, p_data->i_keyformat );
return p_drive->reportKey( p_mem, (DVDKeyClass)p_data->i_keyclass,
p_data->i_lba, p_data->i_agid,
(DVDKeyFormat)p_data->i_keyformat );
i_ret = p_drive->reportKey( p_mem, (DVDKeyClass)p_data->i_keyclass,
p_data->i_lba, p_data->i_agid,
(DVDKeyFormat)p_data->i_keyformat );
break;
default:
log( LOG_INFO, "DVD ioctl: unknown ioctl\n" );
return EINVAL;
i_ret = EINVAL;
break;
}
return i_ret;
#undef p_data
}
/*****************************************************************************
......
......@@ -2,9 +2,10 @@
* DVDioctl.h: Linux-like DVD driver for Darwin and MacOS X
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: DVDioctl.h,v 1.3 2001/05/25 04:23:37 sam Exp $
* $Id: DVDioctl.h,v 1.4 2001/06/25 11:34:08 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Eugenio Jarosiewicz <ej0@cise.ufl.edu>
*
* The contents of this file constitute Original Code as defined in and
* are subject to the Apple Public Source License Version 1.1 (the
......
......@@ -2,7 +2,7 @@
* ioctl.c: DVD ioctl replacement function
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: ioctl.c,v 1.2 2001/06/14 02:47:44 sam Exp $
* $Id: ioctl.c,v 1.3 2001/06/25 11:34:08 sam Exp $
*
* Authors: Markus Kuespert <ltlBeBoy@beosmail.com>
* Samuel Hocevar <sam@zoy.org>
......@@ -56,7 +56,7 @@
#include "config.h"
#include "common.h"
#ifdef SYS_DARWIN1_3
#ifdef SYS_DARWIN
# include "DVDioctl/DVDioctl.h"
#endif
......@@ -114,7 +114,7 @@ int ioctl_ReadCopyright( int i_fd, int i_layer, int *pi_copyright )
*pi_copyright = p_buffer[ 4 ];
#elif defined( SYS_DARWIN1_3 )
#elif defined( SYS_DARWIN )
_dvd_error( dvdcss, "DVD ioctls not fully functional yet, "
"assuming disc is encrypted" );
......@@ -230,7 +230,7 @@ int ioctl_ReadKey( int i_fd, int *pi_agid, u8 *p_key )
memcpy( p_key, p_buffer + 4, 2048 );
#elif defined( SYS_DARWIN1_3 )
#elif defined( SYS_DARWIN )
_dvd_error( dvdcss, "DVD ioctls not fully functional yet, "
"sending an empty key" );
......@@ -323,7 +323,7 @@ int ioctl_ReportAgid( int i_fd, int *pi_agid )
*pi_agid = p_buffer[ 7 ] >> 6;
#elif defined( SYS_DARWIN1_3 )
#elif defined( SYS_DARWIN )
INIT_DVDIOCTL( 8 );
dvdioctl.i_keyformat = kCSSAGID;
......@@ -400,7 +400,7 @@ int ioctl_ReportChallenge( int i_fd, int *pi_agid, u8 *p_challenge )
memcpy( p_challenge, p_buffer + 4, 12 );
#elif defined( SYS_DARWIN1_3 )
#elif defined( SYS_DARWIN )
INIT_DVDIOCTL( 16 );
dvdioctl.i_keyformat = kChallengeKey;
......@@ -492,7 +492,7 @@ int ioctl_ReportASF( int i_fd, int *pi_agid, int *pi_asf )
*pi_asf = p_buffer[ 7 ] & 1;
#elif defined( SYS_DARWIN1_3 )
#elif defined( SYS_DARWIN )
INIT_DVDIOCTL( 8 );
dvdioctl.i_keyformat = kASF;
......@@ -584,7 +584,7 @@ int ioctl_ReportKey1( int i_fd, int *pi_agid, u8 *p_key )
memcpy( p_key, p_buffer + 4, 8 );
#elif defined( SYS_DARWIN1_3 )
#elif defined( SYS_DARWIN )
INIT_DVDIOCTL( 12 );
dvdioctl.i_keyformat = kKey1;
......@@ -666,7 +666,7 @@ int ioctl_InvalidateAgid( int i_fd, int *pi_agid )
i_ret = ioctl( i_fd, B_RAW_DEVICE_COMMAND, &rdc, sizeof(rdc) );
#elif defined( SYS_DARWIN1_3 )
#elif defined( SYS_DARWIN )
INIT_DVDIOCTL( 0 );
dvdioctl.i_keyformat = kInvalidateAGID;
......@@ -742,7 +742,7 @@ int ioctl_SendChallenge( int i_fd, int *pi_agid, u8 *p_challenge )
return ioctl( i_fd, B_RAW_DEVICE_COMMAND, &rdc, sizeof(rdc) );
#elif defined( SYS_DARWIN1_3 )
#elif defined( SYS_DARWIN )
INIT_DVDIOCTL( 16 );
dvdioctl.i_keyformat = kChallengeKey;
......@@ -857,7 +857,7 @@ int ioctl_SendKey2( int i_fd, int *pi_agid, u8 *p_key )
return WinSendSSC( i_fd, &ssc );
}
#elif defined( SYS_DARWIN1_3 )
#elif defined( SYS_DARWIN )
INIT_DVDIOCTL( 12 );
dvdioctl.i_keyformat = kKey2;
......
......@@ -2,7 +2,7 @@
* ioctl.h: DVD ioctl replacement function
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: ioctl.h,v 1.3 2001/06/20 07:43:48 sam Exp $
* $Id: ioctl.h,v 1.4 2001/06/25 11:34:08 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -48,7 +48,7 @@ int ioctl_SendKey2 ( int, int *, u8 * );
/*****************************************************************************
* Common macro, Darwin specific
*****************************************************************************/
#if defined( SYS_DARWIN1_3 )
#if defined( SYS_DARWIN )
#define INIT_DVDIOCTL( SIZE ) \
dvdioctl_data_t dvdioctl; \
u8 p_buffer[ (SIZE) ]; \
......
......@@ -2,7 +2,7 @@
* vout_x11.c: X11 video output display method
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: vout_x11.c,v 1.27 2001/06/19 05:51:57 sam Exp $
* $Id: vout_x11.c,v 1.28 2001/06/25 11:34:08 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -262,7 +262,7 @@ static int vout_Init( vout_thread_t *p_vout )
{
int i_err;
#ifdef SYS_DARWIN1_3
#ifdef SYS_DARWIN
/* FIXME : As of 2001-03-16, XFree4 for MacOS X does not support Xshm. */
p_vout->p_sys->b_shm = 0;
#endif
......
......@@ -2,7 +2,7 @@
* vout_xvideo.c: Xvideo video output display method
*****************************************************************************
* Copyright (C) 1998, 1999, 2000, 2001 VideoLAN
* $Id: vout_xvideo.c,v 1.19 2001/06/19 05:51:57 sam Exp $
* $Id: vout_xvideo.c,v 1.20 2001/06/25 11:34:08 sam Exp $
*
* Authors: Shane Harper <shanegh@optusnet.com.au>
* Vincent Seguin <seguin@via.ecp.fr>
......@@ -288,7 +288,7 @@ static int vout_Create( vout_thread_t *p_vout )
*****************************************************************************/
static int vout_Init( vout_thread_t *p_vout )
{
#ifdef SYS_DARWIN1_3
#ifdef SYS_DARWIN
/* FIXME : As of 2001-03-16, XFree4 for MacOS X does not support Xshm. */
p_vout->p_sys->b_shm = 0;
#endif
......
......@@ -4,7 +4,7 @@
* and spawn threads.
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: main.c,v 1.104 2001/06/14 20:21:04 sam Exp $
* $Id: main.c,v 1.105 2001/06/25 11:34:08 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -41,7 +41,7 @@
# include "GNUgetopt/getopt.h"
#endif
#ifdef SYS_DARWIN1_3
#ifdef SYS_DARWIN
# include <mach/mach.h> /* Altivec detection */
# include <mach/mach_error.h> /* some day the header files||compiler *
will define it for us */
......@@ -84,7 +84,7 @@
# include "beos_specific.h"
#endif
#ifdef SYS_DARWIN1_3
#ifdef SYS_DARWIN
# include "darwin_specific.h"
#endif
......@@ -273,7 +273,7 @@ int main( int i_argc, char *ppsz_argv[], char *ppsz_env[] )
/*
* System specific initialization code
*/
#if defined( SYS_BEOS ) || defined( SYS_DARWIN1_3 )
#if defined( SYS_BEOS ) || defined( SYS_DARWIN )
system_Init( &i_argc, ppsz_argv, ppsz_env );
#endif
......@@ -386,7 +386,7 @@ int main( int i_argc, char *ppsz_argv[], char *ppsz_env[] )
/*
* System specific cleaning code
*/
#if defined( SYS_BEOS ) || defined( SYS_DARWIN1_3 )
#if defined( SYS_BEOS ) || defined( SYS_DARWIN )
system_End();
#endif
......@@ -529,7 +529,7 @@ static int GetConfiguration( int *pi_argc, char *ppsz_argv[], char *ppsz_env[] )
}
}
#ifdef SYS_DARWIN1_3
#ifdef SYS_DARWIN
/* When vlc.app is run by double clicking in Mac OS X, the 2nd arg
* is the PSN - process serial number (a unique PID-ish thingie)
* still ok for real Darwin & when run from command line */
......@@ -959,7 +959,7 @@ static int CPUCapabilities( void )
return( i_capabilities );
#elif defined( SYS_DARWIN1_3 )
#elif defined( SYS_DARWIN )
struct host_basic_info hi;
kern_return_t ret;
host_name_port_t host;
......
......@@ -2,7 +2,7 @@
* modules.c : Built-in and plugin modules management functions
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: modules.c,v 1.36 2001/06/14 02:47:45 sam Exp $
* $Id: modules.c,v 1.37 2001/06/25 11:34:08 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Ethan C. Baldridge <BaldridgeE@cadmus.com>
......@@ -55,7 +55,7 @@
# include "beos_specific.h"
#endif
#ifdef SYS_DARWIN1_3
#ifdef SYS_DARWIN
# include "darwin_specific.h"
#endif
......@@ -125,7 +125,7 @@ void module_InitBank( void )
char ** ppsz_path = path;
char * psz_fullpath;
char * psz_file;
#if defined( SYS_BEOS ) || defined( SYS_DARWIN1_3 )
#if defined( SYS_BEOS ) || defined( SYS_DARWIN )
char * psz_vlcpath = system_GetProgramPath();
int i_vlclen = strlen( psz_vlcpath );
boolean_t b_notinroot;
......@@ -162,7 +162,7 @@ void module_InitBank( void )
/* Store strlen(*ppsz_path) for later use. */
int i_dirlen = strlen( *ppsz_path );
#if defined( SYS_BEOS ) || defined( SYS_DARWIN1_3 )
#if defined( SYS_BEOS ) || defined( SYS_DARWIN )
b_notinroot = 0;
/* Under BeOS, we need to add beos_GetProgramPath() to access
* files under the current directory */
......@@ -217,7 +217,7 @@ void module_InitBank( void )
closedir( dir );
}
#if defined( SYS_BEOS ) || defined( SYS_DARWIN1_3 )
#if defined( SYS_BEOS ) || defined( SYS_DARWIN )
if( b_notinroot )
{
free( psz_fullpath );
......
......@@ -2,7 +2,7 @@
* modules_core.h : Module management functions used by the core application.
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: modules_core.h,v 1.2 2001/06/14 01:49:44 sam Exp $
* $Id: modules_core.h,v 1.3 2001/06/25 11:34:08 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -98,7 +98,7 @@ module_getsymbol( module_handle_t handle, char * psz_function )
return( NULL );
}
#elif defined(SYS_DARWIN1_3)
#elif defined( SYS_DARWIN )
/* MacOS X dl library expects symbols to begin with "_". That's
* really lame, but hey, what can we do ? */
char * psz_call = malloc( strlen( psz_function ) + 2 );
......
......@@ -2,7 +2,7 @@
* video_text.c : text manipulation functions
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: video_text.c,v 1.28 2001/05/31 03:12:49 sam Exp $
* $Id: video_text.c,v 1.29 2001/06/25 11:34:08 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -43,7 +43,7 @@
# include "beos_specific.h"
#endif
#ifdef SYS_DARWIN1_3
#ifdef SYS_DARWIN
# include "darwin_specific.h"
#endif
......@@ -227,7 +227,7 @@ vout_font_t *vout_LoadFont( const char *psz_name )
char ** ppsz_path = path;
char * psz_file;
#if defined( SYS_BEOS ) || defined( SYS_DARWIN1_3 )
#if defined( SYS_BEOS ) || defined( SYS_DARWIN )
char * psz_vlcpath = system_GetProgramPath();
int i_vlclen = strlen( psz_vlcpath );
#endif
......@@ -238,7 +238,7 @@ vout_font_t *vout_LoadFont( const char *psz_name )
for( ; *ppsz_path != NULL ; ppsz_path++ )
{
#if defined( SYS_BEOS ) || defined( SYS_DARWIN1_3 )
#if defined( SYS_BEOS ) || defined( SYS_DARWIN )
/* Under BeOS, we need to add beos_GetProgramPath() to access
* files under the current directory */
if( strncmp( *ppsz_path, "/", 1 ) )
......
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