# HG changeset patch # User erik # Date 1252250799 0 # Node ID 61edd6fa781b5c97165e4432c8b8e2b62220ee98 # Parent ec2408d48b85d282b085958a8e1c9908fc61d2c2 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 . Thanks! diff -r ec2408d48b85 -r 61edd6fa781b vm/vm.c --- a/vm/vm.c Wed Apr 22 07:40:57 2009 +0000 +++ b/vm/vm.c Sun Sep 06 15:26:39 2009 +0000 @@ -54,6 +54,8 @@ #ifdef __OS2__ #define INCL_DOS #include +#include /* setmode() */ +#include /* O_BINARY */ #endif /* @@ -144,14 +146,16 @@ 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