Commit 21cd50b8 authored by Paul Eggert's avatar Paul Eggert
Browse files

Fix size bug on DOS_NT introduced by CIFS workaround.

* fileio.c (Fwrite_region): Use O_BINARY in checking code, too.

Fixes: debbugs:13149
parent 3908c576
2013-01-19 Paul Eggert <eggert@cs.ucla.edu> 2013-01-19 Paul Eggert <eggert@cs.ucla.edu>
   
Fix size bug on DOS_NT introduced by CIFS workaround (Bug#13149).
* fileio.c (Fwrite_region): Use O_BINARY in checking code, too.
Allow floating-point file offsets. Allow floating-point file offsets.
Problem reported by Vitalie Spinu in Problem reported by Vitalie Spinu in
<http://lists.gnu.org/archive/html/emacs-devel/2013-01/msg00411.html>. <http://lists.gnu.org/archive/html/emacs-devel/2013-01/msg00411.html>.
......
...@@ -4989,7 +4989,7 @@ This calls `write-region-annotate-functions' at the start, and ...@@ -4989,7 +4989,7 @@ This calls `write-region-annotate-functions' at the start, and
if (EMACS_TIME_VALID_P (modtime) if (EMACS_TIME_VALID_P (modtime)
&& ! (valid_timestamp_file_system && st.st_dev == timestamp_file_system)) && ! (valid_timestamp_file_system && st.st_dev == timestamp_file_system))
{ {
int desc1 = emacs_open (fn, O_WRONLY, 0); int desc1 = emacs_open (fn, O_WRONLY | O_BINARY, 0);
if (0 <= desc1) if (0 <= desc1)
{ {
struct stat st1; struct stat st1;
......
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