From 6bdfc2fa2c12a35f4df4e918d435ed8c50e8d8b3 Mon Sep 17 00:00:00 2001 From: Steven Edwards Date: Wed, 10 Sep 2008 09:18:14 -0400 Subject: [PATCH] widl: Open files in binary mode to avoid corruption from text mode on Windows. --- tools/widl/typelib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/widl/typelib.c b/tools/widl/typelib.c index b30b323ed16..27068705d30 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)