changeset 635:c680d6e03c87

Write to file. Writing o console damage most wrapping commands.
author Oleksandr Gavenko <gavenkoa@gmail.com>
date Mon, 31 Jul 2017 00:39:49 +0300
parents 44b6346fd952
children f15da8a6231a
files cygwin/cygrun/cygrun.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/cygwin/cygrun/cygrun.c	Tue Jun 13 01:09:50 2017 +0300
+++ b/cygwin/cygrun/cygrun.c	Mon Jul 31 00:39:49 2017 +0300
@@ -41,11 +41,11 @@
 #ifdef __CYGWIN__
     sprintf(log, "/tmp/cygrun-%s.log", cmd);
 #endif
-#ifdef _MSC_VER
+#if defined(_MSC_VER) || defined( __WIN32__)
     sprintf(log, "%s/cygrun-%s.log", getenv("TMP"), cmd);
 #endif
-    /* FILE *f = fopen(log, "ab"); */
-    FILE *f = stdout;
+    FILE *f = fopen(log, "ab");
+    /* FILE *f = stdout; */
     if (!f)
         return 1;
     fprintf(f, "====== %s ======\n", cmd);