3
0
Fork 0
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:
Jakob Rath 2021-04-15 18:18:20 +02:00 committed by GitHub
parent cb9dda19dd
commit 55a908e357
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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, ' ');