[Unison-hackers] prompts require newline in Cygwin

Jerome Vouillon Jerome.Vouillon at pps.jussieu.fr
Mon Jun 28 07:16:43 EDT 2010


On Thu, Jun 17, 2010 at 05:51:41PM -0400, Andrew Schulman wrote:
> This applies to version 2.40, but not 2.27 or 2.32.  It seems that the
> uitext.ml code has been rewritten since 2.32 - there was no supportSignals
> flag then.  I took a quick look at it and I think I can probably work out
> what change is needed for Cygwin, but if you can easily suggest the
> comparable patch for 2.32 and earlier, please do.  Thanks, Andrew.

Try the following patch.

-- Jerome

Index: uitext.ml
===================================================================
--- uitext.ml   (révision 436)
+++ uitext.ml   (copie de travail)
@@ -71,13 +71,13 @@
       Unix.tcsetattr Unix.stdin Unix.TCSANOW state
 
 let restoreTerminal() =
-  if Util.osType = `Unix && not (Prefs.read dumbtty) then
+  if (Util.osType = `Unix || Util.isCygwin) && not (Prefs.read dumbtty) then
     Sys.set_signal Sys.sigcont Sys.Signal_default;
   defaultTerminal ();
   cbreakMode := None
 
 let setupTerminal() =
-  if Util.osType = `Unix && not (Prefs.read dumbtty) then
+  if (Util.osType = `Unix || Util.isCygwin) && not (Prefs.read dumbtty) then
     try
       cbreakMode := Some (Unix.tcgetattr Unix.stdin);
       let suspend _ =


More information about the Unison-hackers mailing list