From fb89e6906192df2ee7e3746e6d129f15d7d2d3d0 Mon Sep 17 00:00:00 2001 From: VoR0220 Date: Fri, 13 May 2016 13:51:41 -0500 Subject: much better and simpler way of handling this --- solc/CommandLineInterface.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp index 003ad030..21624b3b 100644 --- a/solc/CommandLineInterface.cpp +++ b/solc/CommandLineInterface.cpp @@ -22,6 +22,13 @@ */ #include "CommandLineInterface.h" +#ifdef _WIN32 // windows + #include + #define isatty _isatty + #define fileno _fileno +#else // unix + #include +#endif #include #include #include @@ -478,7 +485,7 @@ Allowed options)", return false; } - if (m_args.count("help")) + if (m_args.count("help") || (isatty(fileno(stdin)) && _argc == 1)) { cout << desc; return false; -- cgit