]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix size bug on DOS_NT introduced by CIFS workaround.
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 19 Jan 2013 12:29:10 +0000 (04:29 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 19 Jan 2013 12:29:10 +0000 (04:29 -0800)
* fileio.c (Fwrite_region): Use O_BINARY in checking code, too.

Fixes: debbugs:13149
src/ChangeLog
src/fileio.c

index c6bd70e2a04434244433bad0c34a07b411b82dba..57b367826975f91a95cfd2697f074d2243d7d418 100644 (file)
@@ -1,5 +1,8 @@
 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>.
index 24f4fa8c4430b214ae3317bce72f7035c36451da..a2413c8a52f2e74931e5d1a1014f32a127bfa535 100644 (file)
@@ -4989,7 +4989,7 @@ This calls `write-region-annotate-functions' at the start, and
   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;