Steven Edwards : widl: Open files in binary mode to avoid corruption from text mode on Windows.
Alexandre Julliard
julliard at winehq.org
Wed Sep 10 06:01:32 CDT 2008
Module: wine
Branch: master
Commit: 6bdfc2fa2c12a35f4df4e918d435ed8c50e8d8b3
URL: http://source.winehq.org/git/wine.git/?a=commit;h=6bdfc2fa2c12a35f4df4e918d435ed8c50e8d8b3
Author: Steven Edwards <winehacker at gmail.com>
Date: Wed Sep 10 09:18:14 2008 -0400
widl: Open files in binary mode to avoid corruption from text mode on Windows.
---
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)
More information about the wine-cvs
mailing list