Commit 603dc537 authored by Vincent Torri's avatar Vincent Torri

Eet : eet_flush2 : add O_BINARY to open()

On Windows, open() in text mode followed by fdopen() in
binary mode does not create a stream in binary mode.
So add O_BINARY to open().

SVN revision: 61418
parent dc12586b
......@@ -516,3 +516,9 @@
eet_node_children_get, eet_node_next_get, eet_node_parent_get,
eet_node_type_get, eet_node_value_get, eet_node_name_get
* Fix segmentation faults in several eet_node functions
2011-07-16 Vincent Torri
* On Windows, open() in text mode followed by fdopen() in
binary mode does not create a stream in binary mode.
So add O_BINARY to open().
......@@ -475,7 +475,7 @@ eet_flush2(Eet_File *ef)
/* opening for write - delete old copy of file right away */
unlink(ef->path);
fd = open(ef->path, O_CREAT | O_TRUNC | O_RDWR, S_IRUSR | S_IWUSR);
fd = open(ef->path, O_CREAT | O_TRUNC | O_RDWR | O_BINARY, S_IRUSR | S_IWUSR);
fp = fdopen(fd, "wb");
if (!fp)
return EET_ERROR_NOT_WRITABLE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment