emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r117523: Minor fix for read_minibuf_noninteractive o


From: Eli Zaretskii
Subject: [Emacs-diffs] trunk r117523: Minor fix for read_minibuf_noninteractive on MS-Windows.
Date: Sat, 12 Jul 2014 07:48:09 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 117523
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/17839
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Sat 2014-07-12 10:47:40 +0300
message:
  Minor fix for read_minibuf_noninteractive on MS-Windows.
  
   src/minibuf.c (read_minibuf_noninteractive) [WINDOWSNT]: Switch
   stdin to binary mode only if it is connected to a terminal.
modified:
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/minibuf.c                  minibuf.c-20091113204419-o5vbwnq5f7feedwu-242
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2014-07-11 17:55:24 +0000
+++ b/src/ChangeLog     2014-07-12 07:47:40 +0000
@@ -1,3 +1,8 @@
+2014-07-12  Eli Zaretskii  <address@hidden>
+
+       * minibuf.c (read_minibuf_noninteractive) [WINDOWSNT]: Switch
+       stdin to binary mode only if it is connected to a terminal.
+
 2014-07-11  Paul Eggert  <address@hidden>
 
        Coalesce extern decls.

=== modified file 'src/minibuf.c'
--- a/src/minibuf.c     2014-07-11 17:55:24 +0000
+++ b/src/minibuf.c     2014-07-12 07:47:40 +0000
@@ -241,7 +241,8 @@
     {
       emacs_get_tty (fileno (stdin), &etty);
 #ifdef WINDOWSNT
-      _setmode (fileno (stdin), O_BINARY);
+      if (isatty (fileno (stdin)))
+       _setmode (fileno (stdin), O_BINARY);
 #endif
       suppress_echo_on_tty (fileno (stdin));
     }
@@ -282,7 +283,8 @@
       fprintf (stdout, "\n");
       emacs_set_tty (fileno (stdin), &etty, 0);
 #ifdef WINDOWSNT
-      _setmode (fileno (stdin), O_TEXT);
+      if (isatty (fileno (stdin)))
+       _setmode (fileno (stdin), O_TEXT);
 #endif
     }
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]