[libdvdcss-devel] [PATCH 46/47] Drop support for OS/2.

KO Myung-Hun komh78 at gmail.com
Thu Oct 30 02:54:34 CET 2014


Why ?

Diego Biurrun wrote:
> ---
>  NEWS              |   2 +-
>  configure.ac      |   3 -
>  libdvdcss.spec.in |   4 +-
>  src/device.c      | 116 -----------------------------------
>  src/device.h      |   2 +-
>  src/ioctl.c       | 176 ------------------------------------------------------
>  src/ioctl.h       |  35 -----------
>  src/libdvdcss.c   |  20 +------
>  test/dvd_region.c |  12 ----
>  9 files changed, 6 insertions(+), 364 deletions(-)
> 
> diff --git a/NEWS b/NEWS
> index f7f905c..2f37902 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -6,7 +6,7 @@ Changes between 1.2.13 and 1.3.0:
>      - the type dvdcss_handle
>      - the variable dvdcss_interface_2
>    * Support for Android
> -  * Drop support for HP-UX, BeOS, QNX, and Windows 9x.
> +  * Drop support for HP-UX, BeOS, QNX, OS/2, and Windows 9x.
>    * Miscellaneous cleanups to code, documentation, build system.
>  
>  
> diff --git a/configure.ac b/configure.ac
> index 8d3d6c4..868333b 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -108,9 +108,6 @@ case x"${host_os}" in
>      CFLAGS="${CFLAGS} -mwin32"
>      AC_DEFINE([_WIN32_IE], 0x0500, [Define to '0x0500' for IE 5.0 (and shell) APIs.])
>      ;;
> -  xos2*)
> -    LDFLAGS="-Zbin-files"
> -    ;;
>    x*msvc*)
>      SYS_MSVC=1
>      AC_DEFINE([_WIN32_IE], 0x0500, [Define to '0x0500' for IE 5.0 (and shell) APIs.])
> diff --git a/libdvdcss.spec.in b/libdvdcss.spec.in
> index 67994a5..c58d9d3 100644
> --- a/libdvdcss.spec.in
> +++ b/libdvdcss.spec.in
> @@ -32,7 +32,7 @@ Conflicts:      libdvdcss0.0.1, libdvdcss0.0.2
>  libdvdcss is a simple library designed for accessing DVDs like a block device
>  without having to bother about the decryption. The important features are:
>   * Portability: Currently supported platforms are GNU/Linux, FreeBSD, NetBSD,
> -   OpenBSD, Mac OS X, Solaris, OS/2, and Windows NT 4.0 (with IE 5.0) or later.
> +   OpenBSD, Mac OS X, Solaris, and Windows NT 4.0 (with IE 5.0) or later.
>   * Adaptability: Unlike most similar projects, libdvdcss does not require the
>     region of your drive to be set and will try its best to read from the disc
>     even in the case of a region mismatch.
> @@ -48,7 +48,7 @@ Provides:       %name = %version-%release
>  libdvdcss is a simple library designed for accessing DVDs like a block device
>  without having to bother about the decryption. The important features are:
>   * Portability: Currently supported platforms are GNU/Linux, FreeBSD, NetBSD,
> -   OpenBSD, Mac OS X, Solaris, OS/2, and Windows NT 4.0 (with IE 5.0) or later.
> +   OpenBSD, Mac OS X, Solaris, and Windows NT 4.0 (with IE 5.0) or later.
>   * Adaptability: Unlike most similar projects, libdvdcss does not require the
>     region of your drive to be set and will try its best to read from the disc
>     even in the case of a region mismatch.
> diff --git a/src/device.c b/src/device.c
> index 288fc93..2c73e02 100644
> --- a/src/device.c
> +++ b/src/device.c
> @@ -58,14 +58,6 @@
>  #   include <IOKit/storage/IODVDMedia.h>
>  #endif
>  
> -#ifdef __OS2__
> -#   define INCL_DOS
> -#   define INCL_DOSDEVIOCTL
> -#   include <os2.h>
> -#   include <io.h>                                              /* setmode() */
> -#   include <fcntl.h>                                           /* O_BINARY  */
> -#endif
> -
>  #include "dvdcss/dvdcss.h"
>  
>  #include "common.h"
> @@ -87,13 +79,6 @@ static int win2k_open  ( dvdcss_t, const char * );
>  static int win2k_seek  ( dvdcss_t, int );
>  static int win2k_read  ( dvdcss_t, void *, int );
>  static int win2k_readv ( dvdcss_t, struct iovec *, int );
> -
> -#elif defined( __OS2__ )
> -static int os2_open ( dvdcss_t, const char * );
> -/* just use macros for libc */
> -#   define os2_seek     libc_seek
> -#   define os2_read     libc_read
> -#   define os2_readv    libc_readv
>  #endif
>  
>  int dvdcss_use_ioctls( dvdcss_t dvdcss )
> @@ -106,16 +91,6 @@ int dvdcss_use_ioctls( dvdcss_t dvdcss )
>  
>      /* FIXME: implement this for Windows */
>      return 1;
> -#elif defined( __OS2__ )
> -    ULONG ulMode;
> -
> -    if( DosQueryFHState( dvdcss->i_fd, &ulMode ) != 0 )
> -        return 1;  /* What to do?  Be conservative and try to use the ioctls */
> -
> -    if( ulMode & OPEN_FLAGS_DASD )
> -        return 1;
> -
> -    return 0;
>  #else
>      struct stat fileinfo;
>      int ret;
> @@ -162,28 +137,6 @@ void dvdcss_check_device ( dvdcss_t dvdcss )
>      kern_return_t kern_result;
>      io_iterator_t media_iterator;
>      CFMutableDictionaryRef classes_to_match;
> -#elif defined( __OS2__ )
> -#pragma pack( 1 )
> -    struct
> -    {
> -        BYTE bCmdInfo;
> -        BYTE bDrive;
> -    } param;
> -
> -    struct
> -    {
> -        BYTE    abEBPB[31];
> -        USHORT  usCylinders;
> -        BYTE    bDevType;
> -        USHORT  usDevAttr;
> -    } data;
> -#pragma pack()
> -
> -    ULONG ulParamLen;
> -    ULONG ulDataLen;
> -    ULONG rc;
> -
> -    int i;
>  #else
>      const char *ppsz_devices[] = { "/dev/dvd", "/dev/cdrom", "/dev/hdc", NULL };
>      int i, i_fd;
> @@ -297,32 +250,6 @@ void dvdcss_check_device ( dvdcss_t dvdcss )
>      }
>  
>      IOObjectRelease( media_iterator );
> -#elif defined( __OS2__ )
> -    for( i = 0; i < 26; i++ )
> -    {
> -        param.bCmdInfo = 0;
> -        param.bDrive = i;
> -
> -        rc = DosDevIOCtl( ( HFILE )-1, IOCTL_DISK, DSK_GETDEVICEPARAMS,
> -                          &param, sizeof( param ), &ulParamLen,
> -                          &data, sizeof( data ), &ulDataLen );
> -
> -        if( rc == 0 )
> -        {
> -            /* Check for removable and for cylinders */
> -            if( ( data.usDevAttr & 1 ) == 0 && data.usCylinders == 0xFFFF )
> -            {
> -                char psz_dvd[] = "A:";
> -
> -                psz_dvd[0] += i;
> -
> -                print_debug( dvdcss, "defaulting to drive `%s'", psz_dvd );
> -                free( dvdcss->psz_device );
> -                dvdcss->psz_device = strdup( psz_dvd );
> -                return;
> -            }
> -        }
> -    }
>  #else
>      for( i = 0; ppsz_devices[i]; i++ )
>      {
> @@ -367,18 +294,6 @@ int dvdcss_open_device ( dvdcss_t dvdcss )
>          return win2k_open( dvdcss, psz_device );
>      }
>      else
> -#elif defined( __OS2__ )
> -    /* If device is "X:" or "X:\", we are not actually opening a file. */
> -    if( psz_device[0] && psz_device[1] == ':' &&
> -        ( !psz_device[2] || ( psz_device[2] == '\\' && !psz_device[3] ) ) )
> -    {
> -        print_debug( dvdcss, "using OS/2 API for access" );
> -        dvdcss->pf_seek  = os2_seek;
> -        dvdcss->pf_read  = os2_read;
> -        dvdcss->pf_readv = os2_readv;
> -        return os2_open( dvdcss, psz_device );
> -    }
> -    else
>  #endif
>      {
>          print_debug( dvdcss, "using libc for access" );
> @@ -505,37 +420,6 @@ error:
>  }
>  #endif /* defined( WIN32 ) */
>  
> -#ifdef __OS2__
> -static int os2_open ( dvdcss_t dvdcss, const char *psz_device )
> -{
> -    char  psz_dvd[] = "X:";
> -    HFILE hfile;
> -    ULONG ulAction;
> -    ULONG rc;
> -
> -    psz_dvd[0] = psz_device[0];
> -
> -    rc = DosOpenL( ( PSZ )psz_dvd, &hfile, &ulAction, 0, FILE_NORMAL,
> -                   OPEN_ACTION_OPEN_IF_EXISTS | OPEN_ACTION_FAIL_IF_NEW,
> -                   OPEN_ACCESS_READONLY | OPEN_SHARE_DENYNONE | OPEN_FLAGS_DASD,
> -                   NULL );
> -
> -    if( rc )
> -    {
> -        print_error( dvdcss, "failed to open device" );
> -        return -1;
> -    }
> -
> -    setmode( hfile, O_BINARY );
> -
> -    dvdcss->i_fd = dvdcss->i_read_fd = hfile;
> -
> -    dvdcss->i_pos = 0;
> -
> -    return 0;
> -}
> -#endif /* __OS2__ */
> -
>  /*****************************************************************************
>   * Seek commands.
>   *****************************************************************************/
> diff --git a/src/device.h b/src/device.h
> index f56489f..2c06e8e 100644
> --- a/src/device.h
> +++ b/src/device.h
> @@ -44,7 +44,7 @@ struct iovec
>  
>  #include "dvdcss/dvdcss.h"
>  
> -#if !defined(WIN32) && !defined(__OS2__)
> +#if !defined(WIN32)
>  #   define DVDCSS_RAW_OPEN
>  #endif
>  
> diff --git a/src/ioctl.c b/src/ioctl.c
> index dee2c86..b54c1bd 100644
> --- a/src/ioctl.c
> +++ b/src/ioctl.c
> @@ -8,7 +8,6 @@
>   *          Håkan Hjort <d95hjort at dtek.chalmers.se>
>   *          Eugenio Jarosiewicz <ej0 at cise.ufl.edu>
>   *          David Siebörger <drs-videolan at rucus.ru.ac.za>
> - *          Alex Strelnikov <lelik at os2.ru>
>   *          Gildas Bazin <gbazin at netcourrier.com>
>   *
>   * libdvdcss is free software; you can redistribute it and/or modify
> @@ -39,13 +38,6 @@
>  #if defined( WIN32 )
>  #   include <windows.h>
>  #   include <winioctl.h>
> -#elif defined ( __OS2__ )
> -#   define INCL_DOSFILEMGR
> -#   define INCL_DOSDEVICES
> -#   define INCL_DOSDEVIOCTL
> -#   define INCL_DOSERRORS
> -#   include <os2.h>
> -#   include <sys/ioctl.h>
>  #else
>  #   include <netinet/in.h>
>  #   include <sys/ioctl.h>
> @@ -86,8 +78,6 @@ static void SolarisInitUSCSI( struct uscsi_cmd *p_sc, int i_type );
>  static int SolarisSendUSCSI( int fd, struct uscsi_cmd *p_sc );
>  #elif defined( WIN32 )
>  static void WinInitSPTD ( SCSI_PASS_THROUGH_DIRECT *, int );
> -#elif defined( __OS2__ )
> -static void OS2InitSDC( struct OS2_ExecSCSICmd *, int );
>  #endif
>  
>  /*****************************************************************************
> @@ -161,18 +151,6 @@ int ioctl_ReadCopyright( int i_fd, int i_layer, int *pi_copyright )
>          *pi_copyright = p_buffer[ 4 ];
>      }
>  
> -#elif defined( __OS2__ )
> -    INIT_SSC( GPCMD_READ_DVD_STRUCTURE, 8 );
> -
> -    sdc.command[ 6 ] = i_layer;
> -    sdc.command[ 7 ] = DVD_STRUCT_COPYRIGHT;
> -
> -    i_ret = DosDevIOCtl(i_fd, IOCTL_CDROMDISK, CDROMDISK_EXECMD,
> -                        &sdc, sizeof(sdc), &ulParamLen,
> -                        p_buffer, sizeof(p_buffer), &ulDataLen);
> -
> -    *pi_copyright = p_buffer[ 4 ];
> -
>  #else
>  #   error "DVD ioctls are unavailable on this system"
>  
> @@ -263,23 +241,6 @@ int ioctl_ReadDiscKey( int i_fd, int *pi_agid, uint8_t *p_key )
>  
>      memcpy( p_key, key->KeyData, DVD_DISCKEY_SIZE );
>  
> -#elif defined ( __OS2__ )
> -    INIT_SSC( GPCMD_READ_DVD_STRUCTURE, DVD_DISCKEY_SIZE + 4 );
> -
> -    sdc.command[ 7 ]  = DVD_STRUCT_DISCKEY;
> -    sdc.command[ 10 ] = *pi_agid << 6;
> -
> -    i_ret = DosDevIOCtl(i_fd, IOCTL_CDROMDISK, CDROMDISK_EXECMD,
> -                        &sdc, sizeof(sdc), &ulParamLen,
> -                        p_buffer, sizeof(p_buffer), &ulDataLen);
> -
> -    if( i_ret < 0 )
> -    {
> -        return i_ret;
> -    }
> -
> -    memcpy( p_key, p_buffer + 4, DVD_DISCKEY_SIZE );
> -
>  #else
>  #   error "DVD ioctls are unavailable on this system"
>  
> @@ -368,21 +329,6 @@ int ioctl_ReadTitleKey( int i_fd, int *pi_agid, int i_pos, uint8_t *p_key )
>  
>      memcpy( p_key, key->KeyData, DVD_KEY_SIZE );
>  
> -#elif defined( __OS2__ )
> -    INIT_SSC( GPCMD_REPORT_KEY, 12 );
> -
> -    sdc.command[ 2 ] = ( i_pos >> 24 ) & 0xff;
> -    sdc.command[ 3 ] = ( i_pos >> 16 ) & 0xff;
> -    sdc.command[ 4 ] = ( i_pos >>  8 ) & 0xff;
> -    sdc.command[ 5 ] = ( i_pos       ) & 0xff;
> -    sdc.command[ 10 ] = DVD_REPORT_TITLE_KEY | (*pi_agid << 6);
> -
> -    i_ret = DosDevIOCtl(i_fd, IOCTL_CDROMDISK, CDROMDISK_EXECMD,
> -                        &sdc, sizeof(sdc), &ulParamLen,
> -                        p_buffer, sizeof(p_buffer), &ulDataLen);
> -
> -    memcpy( p_key, p_buffer + 5, DVD_KEY_SIZE );
> -
>  #else
>  #   error "DVD ioctls are unavailable on this system"
>  
> @@ -453,17 +399,6 @@ int ioctl_ReportAgid( int i_fd, int *pi_agid )
>  
>      *pi_agid = id;
>  
> -#elif defined( __OS2__ )
> -    INIT_SSC( GPCMD_REPORT_KEY, 8 );
> -
> -    sdc.command[ 10 ] = DVD_REPORT_AGID | (*pi_agid << 6);
> -
> -    i_ret = DosDevIOCtl(i_fd, IOCTL_CDROMDISK, CDROMDISK_EXECMD,
> -                        &sdc, sizeof(sdc), &ulParamLen,
> -                        p_buffer, sizeof(p_buffer), &ulDataLen);
> -
> -    *pi_agid = p_buffer[ 7 ] >> 6;
> -
>  #else
>  #   error "DVD ioctls are unavailable on this system"
>  
> @@ -542,17 +477,6 @@ int ioctl_ReportChallenge( int i_fd, int *pi_agid, uint8_t *p_challenge )
>  
>      memcpy( p_challenge, key->KeyData, DVD_CHALLENGE_SIZE );
>  
> -#elif defined( __OS2__ )
> -    INIT_SSC( GPCMD_REPORT_KEY, 16 );
> -
> -    sdc.command[ 10 ] = DVD_REPORT_CHALLENGE | (*pi_agid << 6);
> -
> -    i_ret = DosDevIOCtl(i_fd, IOCTL_CDROMDISK, CDROMDISK_EXECMD,
> -                        &sdc, sizeof(sdc), &ulParamLen,
> -                        p_buffer, sizeof(p_buffer), &ulDataLen);
> -
> -    memcpy( p_challenge, p_buffer + 4, DVD_CHALLENGE_SIZE );
> -
>  #else
>  #   error "DVD ioctls are unavailable on this system"
>  
> @@ -633,17 +557,6 @@ int ioctl_ReportASF( int i_fd, int *pi_asf )
>      keyData = (PDVD_ASF)key->KeyData;
>      *pi_asf = keyData->SuccessFlag;
>  
> -#elif defined( __OS2__ )
> -    INIT_SSC( GPCMD_REPORT_KEY, 8 );
> -
> -    sdc.command[ 10 ] = DVD_REPORT_ASF;
> -
> -    i_ret = DosDevIOCtl(i_fd, IOCTL_CDROMDISK, CDROMDISK_EXECMD,
> -                        &sdc, sizeof(sdc), &ulParamLen,
> -                        p_buffer, sizeof(p_buffer), &ulDataLen);
> -
> -    *pi_asf = p_buffer[ 7 ] & 1;
> -
>  #else
>  #   error "DVD ioctls are unavailable on this system"
>  
> @@ -717,17 +630,6 @@ int ioctl_ReportKey1( int i_fd, int *pi_agid, uint8_t *p_key )
>  
>      memcpy( p_key, key->KeyData, DVD_KEY_SIZE );
>  
> -#elif defined( __OS2__ )
> -    INIT_SSC( GPCMD_REPORT_KEY, 12 );
> -
> -    sdc.command[ 10 ] = DVD_REPORT_KEY1 | (*pi_agid << 6);
> -
> -    i_ret = DosDevIOCtl(i_fd, IOCTL_CDROMDISK, CDROMDISK_EXECMD,
> -                        &sdc, sizeof(sdc), &ulParamLen,
> -                        p_buffer, sizeof(p_buffer), &ulDataLen);
> -
> -    memcpy( p_key, p_buffer + 4, DVD_KEY_SIZE );
> -
>  #else
>  #   error "DVD ioctls are unavailable on this system"
>  
> @@ -784,18 +686,6 @@ int ioctl_InvalidateAgid( int i_fd, int *pi_agid )
>      i_ret = DeviceIoControl( (HANDLE) i_fd, IOCTL_DVD_END_SESSION,
>                  pi_agid, sizeof( *pi_agid ), NULL, 0, &tmp, NULL ) ? 0 : -1;
>  
> -#elif defined( __OS2__ )
> -    INIT_SSC( GPCMD_REPORT_KEY, 1 );
> -
> -    sdc.data_length = 0;
> -    sdc.command[ 8 ] = 0;
> -    sdc.command[ 9 ] = 0;
> -
> -    sdc.command[ 10 ] = DVDCSS_INVALIDATE_AGID | (*pi_agid << 6);
> -
> -    i_ret = DosDevIOCtl(i_fd, IOCTL_CDROMDISK, CDROMDISK_EXECMD,
> -                        &sdc, sizeof(sdc), &ulParamLen,
> -                        NULL, 0, &ulDataLen);
>  #else
>  #   error "DVD ioctls are unavailable on this system"
>  
> @@ -872,18 +762,6 @@ int ioctl_SendChallenge( int i_fd, int *pi_agid, uint8_t *p_challenge )
>      i_ret = DeviceIoControl( (HANDLE) i_fd, IOCTL_DVD_SEND_KEY, key,
>               key->KeyLength, key, key->KeyLength, &tmp, NULL ) ? 0 : -1;
>  
> -#elif defined( __OS2__ )
> -    INIT_SSC( GPCMD_SEND_KEY, 16 );
> -
> -    sdc.command[ 10 ] = DVD_SEND_CHALLENGE | (*pi_agid << 6);
> -
> -    p_buffer[ 1 ] = 0xe;
> -    memcpy( p_buffer + 4, p_challenge, DVD_CHALLENGE_SIZE );
> -
> -    i_ret = DosDevIOCtl( i_fd, IOCTL_CDROMDISK, CDROMDISK_EXECMD,
> -                         &sdc, sizeof(sdc), &ulParamLen,
> -                         p_buffer, sizeof(p_buffer), &ulDataLen );
> -
>  #else
>  #   error "DVD ioctls are unavailable on this system"
>  
> @@ -960,18 +838,6 @@ int ioctl_SendKey2( int i_fd, int *pi_agid, uint8_t *p_key )
>      i_ret = DeviceIoControl( (HANDLE) i_fd, IOCTL_DVD_SEND_KEY, key,
>               key->KeyLength, key, key->KeyLength, &tmp, NULL ) ? 0 : -1;
>  
> -#elif defined( __OS2__ )
> -    INIT_SSC( GPCMD_SEND_KEY, 12 );
> -
> -    sdc.command[ 10 ] = DVD_SEND_KEY2 | (*pi_agid << 6);
> -
> -    p_buffer[ 1 ] = 0xa;
> -    memcpy( p_buffer + 4, p_key, DVD_KEY_SIZE );
> -
> -    i_ret = DosDevIOCtl( i_fd, IOCTL_CDROMDISK, CDROMDISK_EXECMD,
> -                         &sdc, sizeof(sdc), &ulParamLen,
> -                         p_buffer, sizeof(p_buffer), &ulDataLen );
> -
>  #else
>  #   error "DVD ioctls are unavailable on this system"
>  
> @@ -1063,19 +929,6 @@ int ioctl_ReportRPC( int i_fd, int *p_type, int *p_mask, int *p_scheme )
>      *p_mask = keyData->RegionMask;
>      *p_scheme = keyData->RpcScheme;
>  
> -#elif defined( __OS2__ )
> -    INIT_SSC( GPCMD_REPORT_KEY, 8 );
> -
> -    sdc.command[ 10 ] = DVD_REPORT_RPC;
> -
> -    i_ret = DosDevIOCtl(i_fd, IOCTL_CDROMDISK, CDROMDISK_EXECMD,
> -                        &sdc, sizeof(sdc), &ulParamLen,
> -                        p_buffer, sizeof(p_buffer), &ulDataLen);
> -
> -    *p_type = p_buffer[ 4 ] >> 6;
> -    *p_mask = p_buffer[ 5 ];
> -    *p_scheme = p_buffer[ 6 ];
> -
>  #else
>  #   error "DVD ioctls are unavailable on this system"
>  
> @@ -1216,32 +1069,3 @@ static void WinInitSPTD( SCSI_PASS_THROUGH_DIRECT *p_sptd, int i_type )
>      p_sptd->TimeOutValue = 2;
>  }
>  #endif /* defined( WIN32 ) */
> -
> -#if defined( __OS2__ )
> -/*****************************************************************************
> - * OS2InitSDC: initialize a SDC structure for the Execute SCSI-command
> - *****************************************************************************
> - * This function initializes an OS/2 'execute SCSI command' structure for
> - * future use, either a read command or a write command.
> - *****************************************************************************/
> -static void OS2InitSDC( struct OS2_ExecSCSICmd *p_sdc, int i_type )
> -{
> -    switch( i_type )
> -    {
> -        case GPCMD_SEND_KEY:
> -            p_sdc->flags = 0;
> -            break;
> -
> -        case GPCMD_READ_DVD_STRUCTURE:
> -        case GPCMD_REPORT_KEY:
> -            p_sdc->flags = EX_DIRECTION_IN;
> -            break;
> -    }
> -
> -    p_sdc->command[ 0 ] = i_type;
> -    p_sdc->command[ 8 ] = (p_sdc->data_length >> 8) & 0xff;
> -    p_sdc->command[ 9 ] = p_sdc->data_length        & 0xff;
> -    p_sdc->id_code      = 0x31304443;    // 'CD01'
> -    p_sdc->cmd_length   = 12;
> -}
> -#endif /* defined( __OS2__ ) */
> diff --git a/src/ioctl.h b/src/ioctl.h
> index f7c3067..eb8cd8d 100644
> --- a/src/ioctl.h
> +++ b/src/ioctl.h
> @@ -74,15 +74,6 @@ int ioctl_ReportRPC         ( int, int *, int *, int * );
>                        (SPTD), sizeof( SCSI_PASS_THROUGH_DIRECT ), \
>                        (SPTD), sizeof( SCSI_PASS_THROUGH_DIRECT ), \
>                        (TMP), NULL ) ? 0 : -1)
> -#elif defined( __OS2__ )
> -#define INIT_SSC( TYPE, SIZE ) \
> -    struct OS2_ExecSCSICmd sdc = { 0 }; \
> -    uint8_t p_buffer[ (SIZE) + 1 ] = { 0 }; \
> -    unsigned long ulParamLen; \
> -    unsigned long ulDataLen; \
> -    sdc.data_length = (SIZE); \
> -    ulParamLen = sizeof(sdc); \
> -    OS2InitSDC( &sdc, (TYPE) )
>  #endif
>  
>  /*****************************************************************************
> @@ -246,30 +237,4 @@ typedef struct SCSI_PASS_THROUGH_DIRECT
>  
>  #endif /* defined( WIN32 ) */
>  
> -/*****************************************************************************
> - * OS/2 ioctl specific
> - *****************************************************************************/
> -#if defined( __OS2__ )
> -
> -#define CDROMDISK_EXECMD      0x7A
> -
> -#define EX_DIRECTION_IN       0x01
> -#define EX_PLAYING_CHK        0x02
> -
> -#pragma pack(1)
> -
> -struct OS2_ExecSCSICmd
> -{
> -    unsigned long   id_code;      // 'CD01'
> -    unsigned short  data_length;  // length of the Data Packet
> -    unsigned short  cmd_length;   // length of the Command Buffer
> -    unsigned short  flags;        // flags
> -    unsigned char   command[16];  // Command Buffer for SCSI command
> -
> -} OS2_ExecSCSICmd;
> -
> -#pragma pack()
> -
> -#endif /* defined( __OS2__ ) */
> -
>  #endif /* DVDCSS_IOCTL_H */
> diff --git a/src/libdvdcss.c b/src/libdvdcss.c
> index 9a10ac9..85edba5 100644
> --- a/src/libdvdcss.c
> +++ b/src/libdvdcss.c
> @@ -30,8 +30,8 @@
>   * device without having to bother about the decryption. The important features
>   * are:
>   * \li portability: Currently supported platforms are GNU/Linux, FreeBSD,
> - *     NetBSD, OpenBSD, Mac OS X, Solaris, OS/2, and Windows NT 4.0 (with
> - *     IE 5.0) or later.
> + *     NetBSD, OpenBSD, Mac OS X, Solaris, and Windows NT 4.0 (with IE 5.0)
> + *     or later.
>   * \li adaptability: Unlike most similar projects, libdvdcss does not require
>   *     the region of your drive to be set and will try its best to read from
>   *     the disc even in the case of a region mismatch.
> @@ -227,22 +227,6 @@ static char *set_cache_directory( dvdcss_t dvdcss )
>          if( psz_home )
>          {
>              int home_pos = 0;
> -
> -#ifdef __OS2__
> -            if( *psz_home == '/' || *psz_home == '\\')
> -            {
> -                const char *psz_unixroot = getenv("UNIXROOT");
> -
> -                if( psz_unixroot &&
> -                    psz_unixroot[0] &&
> -                    psz_unixroot[1] == ':'  &&
> -                    psz_unixroot[2] == '\0')
> -                {
> -                    strcpy( psz_buffer, psz_unixroot );
> -                    home_pos = 2;
> -                }
> -            }
> -#endif /* __OS2__ */
>              snprintf( psz_buffer + home_pos, PATH_MAX - home_pos,
>                        "%s/.dvdcss", psz_home );
>              psz_buffer[PATH_MAX-1] = '\0';
> diff --git a/test/dvd_region.c b/test/dvd_region.c
> index c4308a3..d601386 100644
> --- a/test/dvd_region.c
> +++ b/test/dvd_region.c
> @@ -91,18 +91,6 @@ static int ioctl_SendRPC( int i_fd, int i_pdrc )
>  
>      i_ret = SEND_SPTD( i_fd, &sptd, &tmp );
>  
> -#elif defined( __OS2__ )
> -    INIT_SSC( GPCMD_SEND_KEY, 8 );
> -
> -    sdc.command[ 10 ] = DVD_SEND_RPC;
> -
> -    p_buffer[ 1 ] = 6;
> -    p_buffer[ 4 ] = i_pdrc;
> -
> -    i_ret = DosDevIOCtl( i_fd, IOCTL_CDROMDISK, CDROMDISK_EXECMD,
> -                         &sdc, sizeof(sdc), &ulParamLen,
> -                         p_buffer, sizeof(p_buffer), &ulDataLen );
> -
>  #else
>  #   error "DVD ioctls are unavailable on this system"
>  

-- 
KO Myung-Hun

Using Mozilla SeaMonkey 2.7.2
Under OS/2 Warp 4 for Korean with FixPak #15
In VirtualBox v4.1.32 on Intel Core i7-3615QM 2.30GHz with 8GB RAM

Korean OS/2 User Community : http://www.ecomstation.co.kr



More information about the libdvdcss-devel mailing list