mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 07:23:41 +02:00
Open files with O_BINARY on windows. (#517140)
2008-02-18 Alexander Larsson <alexl@redhat.com> * glocalfile.c: * glocalfileoutputstream.c: Open files with O_BINARY on windows. (#517140) svn path=/trunk/; revision=6531
This commit is contained in:
committed by
Alexander Larsson
parent
ee9020e45e
commit
b221d1b36d
@@ -46,6 +46,10 @@
|
||||
#include <sys/mount.h>
|
||||
#endif
|
||||
|
||||
#ifndef O_BINARY
|
||||
#define O_BINARY 0
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_STATFS) && defined(HAVE_STATVFS)
|
||||
/* Some systems have both statfs and statvfs, pick the
|
||||
most "native" for these */
|
||||
@@ -1110,7 +1114,7 @@ g_local_file_read (GFile *file,
|
||||
int fd;
|
||||
struct stat buf;
|
||||
|
||||
fd = g_open (local->filename, O_RDONLY, 0);
|
||||
fd = g_open (local->filename, O_RDONLY|O_BINARY, 0);
|
||||
if (fd == -1)
|
||||
{
|
||||
int errsv = errno;
|
||||
|
Reference in New Issue
Block a user