Hi/2.

This patch makes to use 64bits file IO API and to set a file handle to a
binary mode explicitly on OS/2.

-- 
KO Myung-Hun

Using Mozilla SeaMonkey 1.1.16
Under OS/2 Warp 4 for Korean with FixPak #15
On AMD ThunderBird 1 GHz with 512 MB RAM

Korean OS/2 User Community : http://www.ecomstation.co.kr


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 <os2.h>
+#include <io.h>     /* setmode() */
+#include <fcntl.h>  /* 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

_______________________________________________
DVDnav-discuss mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/dvdnav-discuss

Reply via email to