* fileio.c (Fwrite_region): Use O_BINARY in checking code, too.
Fixes: debbugs:13149
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.
Problem reported by Vitalie Spinu in
<http://lists.gnu.org/archive/html/emacs-devel/2013-01/msg00411.html>.
if (EMACS_TIME_VALID_P (modtime)
&& ! (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)
{
struct stat st1;