[DVDnav-discuss] r1180 - trunk/libdvdnav/src/vm/vm.c
erik
subversion at mplayerhq.hu
Sun Sep 6 17:26:39 CEST 2009
Author: erik
Date: Sun Sep 6 17:26:39 2009
New Revision: 1180
Log:
OS/2 portability fix
This commit only touches the OS/2 port. The function os2_open is changed
to perform the large file open call instead of the regular file open
call. And there is a setmode call to explicitly set the DOS file mode
to binary. This commit is directly from the patch sent in by
KO Myung-Hun <komh AT chollian DOT net>. Thanks!
Modified:
trunk/libdvdnav/src/vm/vm.c
Modified: trunk/libdvdnav/src/vm/vm.c
==============================================================================
--- trunk/libdvdnav/src/vm/vm.c Wed Sep 2 03:44:16 2009 (r1179)
+++ trunk/libdvdnav/src/vm/vm.c Sun Sep 6 17:26:39 2009 (r1180)
@@ -54,6 +54,8 @@
#ifdef __OS2__
#define INCL_DOS
#include <os2.h>
+#include <io.h> /* setmode() */
+#include <fcntl.h> /* O_BINARY */
#endif
/*
@@ -144,14 +146,16 @@ static int os2_open(const char *name, in
ULONG ulAction;
ULONG rc;
- rc = DosOpen( name, &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( name, &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 )
return -1;
+ setmode( hfile, O_BINARY );
+
return ( int )hfile;
}
#endif
More information about the DVDnav-discuss
mailing list