Stefan Dösinger : winebuild: Open resource files in binary mode.

Alexandre Julliard julliard at winehq.org
Fri Jun 26 09:47:09 CDT 2009


Module: wine
Branch: master
Commit: 07e835fffb202ff5b60f594c9a00069297295065
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=07e835fffb202ff5b60f594c9a00069297295065

Author: Stefan Dösinger <stefan at codeweavers.com>
Date:   Wed Jun 24 21:10:55 2009 +0200

winebuild: Open resource files in binary mode.

---

 tools/winebuild/res16.c |    2 +-
 tools/winebuild/res32.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/winebuild/res16.c b/tools/winebuild/res16.c
index a957ca8..8a26ae2 100644
--- a/tools/winebuild/res16.c
+++ b/tools/winebuild/res16.c
@@ -168,7 +168,7 @@ void load_res16_file( const char *name, DLLSPEC *spec )
     void *base;
     struct stat st;
 
-    if ((fd = open( name, O_RDONLY )) == -1) fatal_perror( "Cannot open %s", name );
+    if ((fd = open( name, O_RDONLY | O_BINARY )) == -1) fatal_perror( "Cannot open %s", name );
     if ((fstat( fd, &st ) == -1)) fatal_perror( "Cannot stat %s", name );
     if (!st.st_size) fatal_error( "%s is an empty file\n", name );
 #ifdef	HAVE_MMAP
diff --git a/tools/winebuild/res32.c b/tools/winebuild/res32.c
index 0aaf2f0..946523d 100644
--- a/tools/winebuild/res32.c
+++ b/tools/winebuild/res32.c
@@ -269,7 +269,7 @@ int load_res32_file( const char *name, DLLSPEC *spec )
     void *base;
     struct stat st;
 
-    if ((fd = open( name, O_RDONLY )) == -1) fatal_perror( "Cannot open %s", name );
+    if ((fd = open( name, O_RDONLY | O_BINARY )) == -1) fatal_perror( "Cannot open %s", name );
     if ((fstat( fd, &st ) == -1)) fatal_perror( "Cannot stat %s", name );
     if (!st.st_size) fatal_error( "%s is an empty file\n", name );
 #ifdef	HAVE_MMAP




More information about the wine-cvs mailing list