From d0b3e9d59e79016d3650a3a4b304121e5b80e229 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Sun, 28 Jan 2018 18:37:04 +0000 Subject: [PATCH] Config: Fix up cygwin support as follows: * Define BOOST_HAS_STDINT_H in more situations. * Disable BOOST_NO_CXX14_HDR_SHARED_MUTEX in -std=c++XX mode as the std header doesn't compile (cygwin bug). * Add more tests to CI. --- appveyor.yml | 16 ++++++++++------ include/boost/config/platform/cygwin.hpp | 11 +++++++++++ include/boost/cstdint.hpp | 2 +- 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index c41150ee..3278fd66 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -30,14 +30,18 @@ environment: - ARGS: --toolset=msvc-12.0 address-model=64 - ARGS: --toolset=msvc-14.0 address-model=64 - ARGS: --toolset=msvc-14.0 address-model=64 cxxflags=-std:c++latest - - ARGS: --toolset=gcc address-model=64 + - ARGS: --toolset=gcc address-model=64 cxxstd=03,11,14,1z PATH: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin;%PATH% - - ARGS: --toolset=gcc address-model=64 cxxflags=-std=gnu++1z - PATH: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin;%PATH% - - ARGS: --toolset=gcc address-model=32 - PATH: C:\mingw-w64\i686-5.3.0-posix-dwarf-rt_v4-rev0\mingw32\bin;%PATH% - - ARGS: --toolset=gcc address-model=32 linkflags=-Wl,-allow-multiple-definition + - ARGS: --toolset=gcc address-model=64 cxxstd=03,11,14,1z + PATH: C:\mingw-w64\i686-5.3.0-posix-dwarf-rt_v4-rev0\mingw64\bin;%PATH% + - ARGS: --toolset=gcc address-model=64 cxxstd=03,11,14,1z + PATH: C:\mingw-w64\x86_64-7.2.0-posix-seh-rt_v5-rev1\mingw64\bin;%PATH% + - ARGS: --toolset=gcc address-model=32 linkflags=-Wl,-allow-multiple-definition cxxstd=03,11,14,1z PATH: C:\MinGW\bin;%PATH% + - ARGS: --toolset=gcc address-model=64 cxxstd=03,11,14,1z + PATH: C:\cygwin64\bin;%PATH% + - ARGS: --toolset=gcc address-model=32 cxxstd=03,11,14,1z + PATH: C:\cygwin\bin;%PATH% install: - cd .. diff --git a/include/boost/config/platform/cygwin.hpp b/include/boost/config/platform/cygwin.hpp index 8ecc4a4a..6dd7e57c 100644 --- a/include/boost/config/platform/cygwin.hpp +++ b/include/boost/config/platform/cygwin.hpp @@ -38,10 +38,21 @@ #ifdef _STDINT_H #define BOOST_HAS_STDINT_H #endif +#if __GNUC__ > 5 && !defined(BOOST_HAS_STDINT_H) +# define BOOST_HAS_STDINT_H +#endif /// Cygwin has no fenv.h #define BOOST_NO_FENV_H +// Cygwin has it's own which breaks unless the correct compiler flags are used: +#ifndef BOOST_NO_CXX14_HDR_SHARED_MUTEX +#include +#if !(__XSI_VISIBLE >= 500 || __POSIX_VISIBLE >= 200112) +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif +#endif + // boilerplate code: #include diff --git a/include/boost/cstdint.hpp b/include/boost/cstdint.hpp index 5e1411a5..0b169132 100644 --- a/include/boost/cstdint.hpp +++ b/include/boost/cstdint.hpp @@ -60,7 +60,7 @@ # include // There is a bug in Cygwin two _C macros -# if defined(__STDC_CONSTANT_MACROS) && defined(__CYGWIN__) +# if defined(INTMAX_C) && defined(__CYGWIN__) # undef INTMAX_C # undef UINTMAX_C # define INTMAX_C(c) c##LL