winebuild: Open resource files in binary mode.

This commit is contained in:
Stefan Dösinger 2009-06-24 21:10:55 +02:00 committed by Alexandre Julliard
parent 4008943502
commit 07e835fffb
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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