1
0
Fork 0
mirror of https://github.com/eosswedenorg/antelope-keygen synced 2026-06-18 04:00:03 +02:00

move src dir to cli and add it's own cmake file.

This commit is contained in:
Henrik Hautakoski 2020-04-07 22:37:05 +02:00
parent 526b87670b
commit ba0efa2dd7
15 changed files with 48 additions and 43 deletions

21
cli/isatty.cpp Normal file
View file

@ -0,0 +1,21 @@
#if _WIN32
#include <io.h>
#else
#include <unistd.h>
#define _isatty isatty
#define _fileno fileno
#endif
#include "isatty.h"
namespace eoskeygen {
bool isatty(int fd) {
return ::_isatty(fd);
}
bool isatty(FILE* fd) {
// fileno() segfaults if fd is null.
return fd ? isatty(_fileno(fd)) : false;
}
} // namespace eoskeygen