ref: 6288be6892eea448b8d239e06bdff779f95cfe87
parent: 58ecf1ad0b9c4d6f180ccf38a1184d0a75b46e8c
author: Jon Lech Johansen <jlj@videolan.org>
date: Wed Apr 3 16:25:13 EST 2002
* Fixed a Darwin define problem.
--- a/configure.in
+++ b/configure.in
@@ -123,6 +123,12 @@
])
])
dnl
+ dnl Darwin
+ dnl
+ AC_CHECK_HEADER(IOKit/storage/IODVDMediaBSDClient.h,[
+ AC_DEFINE(DARWIN_DVD_IOCTL, 1, Have IOKit DVD IOCTL headers)
+ ])
+ dnl
dnl Final tests to check what was detected
dnl
if test x$LINUX_DVD_STRUCT = x1; then
--- a/src/config.h.in
+++ b/src/config.h.in
@@ -75,6 +75,9 @@
/* Define if <sys/scsi.h> defines sctl_io. */
#undef HPUX_SCTL_IO
+/* Have IOKit DVD IOCTL headers */
+#undef DARWIN_DVD_IOCTL
+
/* Define if Linux-like dvd_struct is defined. */
#undef HAVE_LINUX_DVD_STRUCT
--- a/src/ioctl.c
+++ b/src/ioctl.c
@@ -2,7 +2,7 @@
* ioctl.c: DVD ioctl replacement function
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id: ioctl.c,v 1.2 2002/02/03 14:54:53 hjort Exp $
+ * $Id: ioctl.c,v 1.3 2002/04/03 21:25:13 jlj Exp $
*
* Authors: Markus Kuespert <ltlBeBoy@beosmail.com>
* Samuel Hocevar <sam@zoy.org>
@@ -72,10 +72,8 @@
# include <sys/scsi/scsi_types.h>
# include <sys/scsi/impl/uscsi.h>
#endif
-
-#ifdef SYS_DARWIN
+#ifdef DARWIN_DVD_IOCTL
# include <IOKit/storage/IODVDMediaBSDClient.h>
-/* # include "DVDioctl/DVDioctl.h" */
#endif
#include "common.h"
@@ -175,7 +173,7 @@
*pi_copyright = p_buffer[ 4 ];
/* s->copyright.rmi = p_buffer[ 5 ]; */
-#elif defined( SYS_DARWIN )
+#elif defined( DARWIN_DVD_IOCTL )
dk_dvd_read_structure_t dvd;
DVDCopyrightInfo dvdcpi;
@@ -345,7 +343,7 @@
memcpy( p_key, p_buffer + 4, DVD_DISCKEY_SIZE );
-#elif defined( SYS_DARWIN )
+#elif defined( DARWIN_DVD_IOCTL )
dk_dvd_read_structure_t dvd;
DVDDiscKeyInfo dvddki;
@@ -494,7 +492,7 @@
memcpy( p_key, p_buffer + 5, DVD_KEY_SIZE );
-#elif defined( SYS_DARWIN )
+#elif defined( DARWIN_DVD_IOCTL )
dk_dvd_report_key_t dvd;
DVDTitleKeyInfo dvdtki;
@@ -625,7 +623,7 @@
*pi_agid = p_buffer[ 7 ] >> 6;
-#elif defined( SYS_DARWIN )
+#elif defined( DARWIN_DVD_IOCTL )
dk_dvd_report_key_t dvd;
DVDAuthenticationGrantIDInfo dvdagid;
@@ -737,7 +735,7 @@
memcpy( p_challenge, p_buffer + 4, DVD_CHALLENGE_SIZE );
-#elif defined( SYS_DARWIN )
+#elif defined(_DARWIN_DVD_IOCTL )
dk_dvd_report_key_t dvd;
DVDChallengeKeyInfo dvdcki;
@@ -860,7 +858,7 @@
*pi_asf = p_buffer[ 7 ] & 1;
-#elif defined( SYS_DARWIN )
+#elif defined( DARWIN_DVD_IOCTL )
dk_dvd_report_key_t dvd;
DVDAuthenticationSuccessFlagInfo dvdasfi;
@@ -984,7 +982,7 @@
memcpy( p_key, p_buffer + 4, DVD_KEY_SIZE );
-#elif defined( SYS_DARWIN )
+#elif defined( DARWIN_DVD_IOCTL )
dk_dvd_report_key_t dvd;
DVDKey1Info dvdk1i;
@@ -1092,7 +1090,7 @@
i_ret = -1;
}
-#elif defined( SYS_DARWIN )
+#elif defined( DARWIN_DVD_IOCTL )
dk_dvd_send_key_t dvd;
DVDAuthenticationGrantIDInfo dvdagid;
@@ -1207,7 +1205,7 @@
return 0;
-#elif defined( SYS_DARWIN )
+#elif defined( DARWIN_DVD_IOCTL )
dk_dvd_send_key_t dvd;
DVDChallengeKeyInfo dvdcki;
@@ -1329,7 +1327,7 @@
return 0;
-#elif defined( SYS_DARWIN )
+#elif defined( DARWIN_DVD_IOCTL )
dk_dvd_send_key_t dvd;
DVDKey2Info dvdk2i;
@@ -1445,7 +1443,7 @@
*p_mask = p_buffer[ 5 ];
*p_scheme = p_buffer[ 6 ];
-#elif defined( SYS_DARWIN )
+#elif defined( DARWIN_DVD_IOCTL )
/* The headers for Darwin / MacOSX are unavaialbe. */
/* Someone who has them should have no problem implementing this. */
i_ret = -1;