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
On Sunday, 06 September 2009 at 17:26, erik wrote:
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 );
I know it's too late and I don't care that much, but this diff would've been 6 lines smaller if you had applied the reindentation in a separate commit. Please do so in the future. Regards, R. -- Fedora http://fedoraproject.org/wiki/User:Rathann RPMFusion http://rpmfusion.org | MPlayer http://mplayerhq.hu "Faith manages." -- Delenn to Lennier in Babylon 5:"Confessions and Lamentations"
I know it's too late and I don't care that much, but this diff would've been 6 lines smaller if you had applied the reindentation in a separate commit. Please do so in the future.
Understood. I had attempted to include the patch as given from the original contributer. But if that is not as important and the purity of the change, I will strive to do better. E -- Erik Hovland erik@hovland.org http://hovland.org/
On Sunday, 27 September 2009 at 01:20, Erik Hovland wrote:
I know it's too late and I don't care that much, but this diff would've been 6 lines smaller if you had applied the reindentation in a separate commit. Please do so in the future.
Understood. I had attempted to include the patch as given from the original contributer. But if that is not as important and the purity of the change, I will strive to do better.
Also, in your next commit you actually reindented that part anyway, so it seems pretty pointless to do it twice. Anyway, thanks for your understanding. Regards, R. -- Fedora http://fedoraproject.org/wiki/User:Rathann RPMFusion http://rpmfusion.org | MPlayer http://mplayerhq.hu "Faith manages." -- Delenn to Lennier in Babylon 5:"Confessions and Lamentations"
participants (3)
-
Dominik 'Rathann' Mierzejewski -
erik -
Erik Hovland