Index: src/vm/vm.c =================================================================== --- src/vm/vm.c (revision 1173) +++ src/vm/vm.c (working copy) @@ -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