From af6398009fc46d35ba447dc2b666fc7a97b53258 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 17 Jun 2012 14:47:11 +0000 Subject: [PATCH] -LRN: isatty equivalent for w32 --- src/fs/gnunet-download.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/fs/gnunet-download.c b/src/fs/gnunet-download.c index aa1da8f3d..e3fb10947 100644 --- a/src/fs/gnunet-download.c +++ b/src/fs/gnunet-download.c @@ -91,9 +91,12 @@ display_bar (unsigned long long x, unsigned int endeq; float ratio_complete; -#ifndef MINGW +#if !WINDOWS if (0 == isatty (1)) return; +#else + if (FILE_TYPE_CHAR != GetFileType (GetStdHandle (STD_OUTPUT_HANDLE))) + return; #endif ratio_complete = x/(float)n; endeq = ratio_complete * w; -- 2.25.1