diff options
author | VoR0220 <catalanor0220@gmail.com> | 2016-05-14 02:51:41 +0800 |
---|---|---|
committer | VoR0220 <catalanor0220@gmail.com> | 2016-05-14 02:51:41 +0800 |
commit | fb89e6906192df2ee7e3746e6d129f15d7d2d3d0 (patch) | |
tree | b099866e5fa2a1bbc10da593cdaa495e1a9b3f2c /solc | |
parent | 73ede5bb38e41ec2b96899105ef4a5badcb4be68 (diff) | |
download | dexon-solidity-fb89e6906192df2ee7e3746e6d129f15d7d2d3d0.tar.gz dexon-solidity-fb89e6906192df2ee7e3746e6d129f15d7d2d3d0.tar.zst dexon-solidity-fb89e6906192df2ee7e3746e6d129f15d7d2d3d0.zip |
much better and simpler way of handling this
Diffstat (limited to 'solc')
-rw-r--r-- | solc/CommandLineInterface.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
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 <io.h> + #define isatty _isatty + #define fileno _fileno +#else // unix + #include <unistd.h> +#endif #include <string> #include <iostream> #include <fstream> @@ -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; |