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/system.hh.in | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/system.hh.in') diff --git a/src/system.hh.in b/src/system.hh.in index 54bcf7a9..105436f6 100644 --- a/src/system.hh.in +++ b/src/system.hh.in @@ -60,12 +60,12 @@ #define HAVE_EDIT @HAVE_EDIT@ #define HAVE_GETTEXT @HAVE_GETTEXT@ -#define HAVE_ACCESS @HAVE_ACCESS@ -#define HAVE_REALPATH @HAVE_REALPATH@ -#define HAVE_GETPWUID @HAVE_GETPWUID@ -#define HAVE_GETPWNAM @HAVE_GETPWNAM@ -#define HAVE_IOCTL @HAVE_IOCTL@ -#define HAVE_ISATTY @HAVE_ISATTY@ +#cmakedefine HAVE_ACCESS +#cmakedefine HAVE_REALPATH +#cmakedefine HAVE_GETPWUID +#cmakedefine HAVE_GETPWNAM +#cmakedefine HAVE_IOCTL +#cmakedefine HAVE_ISATTY #define HAVE_UNIX_PIPES @HAVE_UNIX_PIPES@ @@ -144,16 +144,16 @@ typedef std::ostream::pos_type ostream_pos_type; #endif #include -#if defined(WIN32) +#if defined(_WIN32) #include #else #include #endif -#if HAVE_GETPWUID || HAVE_GETPWNAM +#if defined(HAVE_GETPWUID) || defined(HAVE_GETPWNAM) #include #endif -#if HAVE_IOCTL +#ifdef HAVE_IOCTL #include #endif -- cgit v1.2.3