mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 00:55:31 +00:00
Fix Windows build (#5188)
This commit is contained in:
parent
cb9dda19dd
commit
55a908e357
1 changed files with 7 additions and 1 deletions
|
@ -1,4 +1,6 @@
|
|||
#include <unistd.h>
|
||||
#ifndef _MSC_VER
|
||||
#include <unistd.h> // for isatty
|
||||
#endif
|
||||
#include <utility>
|
||||
|
||||
#include "math/polysat/log.h"
|
||||
|
@ -68,8 +70,12 @@ polysat_log(LogLevel msg_level, std::string fn, std::string /* pretty_fn */)
|
|||
size_t width = 20;
|
||||
size_t padding = width - std::min(width, fn.size());
|
||||
|
||||
#ifdef _MSC_VER
|
||||
char const* color = nullptr;
|
||||
#else
|
||||
char const* color = level_color(msg_level);
|
||||
if (color && !isatty(fd)) { color = nullptr; }
|
||||
#endif
|
||||
|
||||
if (color) { os << color; }
|
||||
os << "[" << fn << "] " << std::string(padding, ' ');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue