Commit badd9197 authored by KO Myung-Hun's avatar KO Myung-Hun Committed by Sam Hocevar
Browse files

Use 64-bit IO and binary mode on OS/2.

parent 25ebde2b
......@@ -69,6 +69,8 @@
# define INCL_DOS
# define INCL_DOSDEVIOCTL
# include <os2.h>
# include <io.h> /* setmode() */
# include <fcntl.h> /* O_BINARY */
#endif
#include "dvdcss/dvdcss.h"
......@@ -672,10 +674,10 @@ static int os2_open ( dvdcss_t dvdcss, char const *psz_device )
psz_dvd[0] = psz_device[0];
rc = DosOpen( ( 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 );
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 )
{
......@@ -683,6 +685,8 @@ static int os2_open ( dvdcss_t dvdcss, char const *psz_device )
return -1;
}
setmode( hfile, O_BINARY );
dvdcss->i_fd = dvdcss->i_read_fd = hfile;
dvdcss->i_pos = 0;
......
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