From a77a3b723f1cb7ddcb9313888d779b48551e0501 Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Sat, 17 Dec 2011 16:56:36 +0100 Subject: [PATCH] Disable again buffering at startup Partially revert efd21679980dfd59 Without this patch SF does not send "bestmove" to GUI. No functional change. Signed-off-by: Marco Costalba --- src/main.cpp | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 1a83097..fcb7e40 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -17,6 +17,7 @@ along with this program. If not, see . */ +#include #include #include @@ -35,6 +36,9 @@ extern void kpk_bitbase_init(); int main(int argc, char* argv[]) { + // Disable output buffering: printf() does not work correctly otherwise + setvbuf(stdout, NULL, _IONBF, 0); + bitboards_init(); Position::init(); kpk_bitbase_init(); -- 1.7.0.4