-- 
Steven Edwards

"There is one thing stronger than all the armies in the world, and
that is an idea whose time has come." - Victor Hugo
From d7e5946566433ee18ffda721dd48bd026ec8ee71 Mon Sep 17 00:00:00 2001
From: Steven Edwards <[EMAIL PROTECTED]>
Date: Wed, 10 Sep 2008 09:18:14 -0400
Subject: [PATCH] Open file in binary mode to work around a windows bug

---
 tools/widl/typelib.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/widl/typelib.c b/tools/widl/typelib.c
index b30b323..2706870 100644
--- a/tools/widl/typelib.c
+++ b/tools/widl/typelib.c
@@ -354,10 +354,10 @@ static void read_importlib(importlib_t *importlib)
 
     file_name = wpp_find_include(importlib->name, NULL);
     if(file_name) {
-        fd = open(file_name, O_RDONLY);
+        fd = open(file_name, O_RDONLY | O_BINARY );
         free(file_name);
     }else {
-        fd = open(importlib->name, O_RDONLY);
+        fd = open(importlib->name, O_RDONLY | O_BINARY );
     }
 
     if(fd < 0)
-- 
1.5.4.3



Reply via email to