From c193cc3a5b4dbf39e19744cf4d30e616298eaa86 Mon Sep 17 00:00:00 2001 From: Evan Mallory Date: Sat, 17 Sep 2016 13:29:09 -0400 Subject: Fix build under msys32; add Appveyor continuous build * Appveyor is a continuous integration platform for Windows that is free for open source projects. See latest test build here: https://ci.appveyor.com/project/Evan/ledger/build/artifacts * Changed WIN32 to _WIN32 because this article http://nadeausoftware.com/articles/2012/01/c_c_tip_how_use_compiler_predefined_macros_detect_operating_system claims that it is defined by the greatest number of compilers. * Modified HAVE_ISATTY and other system defines so that system.hh compiles when cmake fails to find the relevant function. * Add missing include in test/unit/t_value.cc Almost all tests fail when you run them on msys32. I will address that in a future PR. --- src/select.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/select.cc') diff --git a/src/select.cc b/src/select.cc index 1c69b2bf..8e7786e6 100644 --- a/src/select.cc +++ b/src/select.cc @@ -145,14 +145,14 @@ value_t select_command(call_scope_t& args) string thus_far = ""; std::size_t cols = 0; -#if HAVE_IOCTL +#ifdef HAVE_IOCTL struct winsize ws; #endif if (report.HANDLED(columns_)) cols = lexical_cast(report.HANDLER(columns_).value); else if (const char * columns_env = std::getenv("COLUMNS")) cols = lexical_cast(columns_env); -#if HAVE_IOCTL +#ifdef HAVE_IOCTL else if (ioctl(STDIN_FILENO, TIOCGWINSZ, &ws) != -1) cols = ws.ws_col; #endif -- cgit v1.2.3