diff --git a/include/boost/config/compiler/clang.hpp b/include/boost/config/compiler/clang.hpp index 0fdf331f..da736bc4 100644 --- a/include/boost/config/compiler/clang.hpp +++ b/include/boost/config/compiler/clang.hpp @@ -98,11 +98,15 @@ // // Dynamic shared object (DSO) and dynamic-link library (DLL) support // -#if !defined(_WIN32) && !defined(__WIN32__) && !defined(WIN32) +#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__CYGWIN__) +# define BOOST_HAS_DECLSPEC +# define BOOST_SYMBOL_EXPORT __attribute__((__dllexport__)) +# define BOOST_SYMBOL_IMPORT __attribute__((__dllimport__)) +#else # define BOOST_SYMBOL_EXPORT __attribute__((__visibility__("default"))) # define BOOST_SYMBOL_IMPORT -# define BOOST_SYMBOL_VISIBLE __attribute__((__visibility__("default"))) #endif +#define BOOST_SYMBOL_VISIBLE __attribute__((__visibility__("default"))) // // The BOOST_FALLTHROUGH macro can be used to annotate implicit fall-through diff --git a/include/boost/config/compiler/gcc.hpp b/include/boost/config/compiler/gcc.hpp index 8296520a..4fe968a0 100644 --- a/include/boost/config/compiler/gcc.hpp +++ b/include/boost/config/compiler/gcc.hpp @@ -99,10 +99,10 @@ // Dynamic shared object (DSO) and dynamic-link library (DLL) support // #if __GNUC__ >= 4 -# if (defined(_WIN32) || defined(__WIN32__) || defined(WIN32)) && !defined(__CYGWIN__) +# if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__CYGWIN__) // All Win32 development environments, including 64-bit Windows and MinGW, define // _WIN32 or one of its variant spellings. Note that Cygwin is a POSIX environment, - // so does not define _WIN32 or its variants. + // so does not define _WIN32 or its variants, but still supports dllexport/dllimport. # define BOOST_HAS_DECLSPEC # define BOOST_SYMBOL_EXPORT __attribute__((__dllexport__)) # define BOOST_SYMBOL_IMPORT __attribute__((__dllimport__)) diff --git a/include/boost/config/compiler/intel.hpp b/include/boost/config/compiler/intel.hpp index 00396b03..0eea05b9 100644 --- a/include/boost/config/compiler/intel.hpp +++ b/include/boost/config/compiler/intel.hpp @@ -45,6 +45,7 @@ #undef BOOST_GCC_VERSION #undef BOOST_GCC_CXX11 +#undef BOOST_GCC // Broken in all versions up to 17 (newer versions not tested) #if (__INTEL_COMPILER <= 1700) && !defined(BOOST_NO_CXX14_CONSTEXPR) diff --git a/include/boost/cstdint.hpp b/include/boost/cstdint.hpp index 0b169132..c8474c46 100644 --- a/include/boost/cstdint.hpp +++ b/include/boost/cstdint.hpp @@ -34,6 +34,17 @@ #endif #include +// +// For the following code we get several warnings along the lines of: +// +// boost/cstdint.hpp:428:35: error: use of C99 long long integer constant +// +// So we declare this a system header to suppress these warnings. +// See also https://github.com/boostorg/config/issues/190 +// +#if defined(__GNUC__) && (__GNUC__ >= 4) +#pragma GCC system_header +#endif // // Note that GLIBC is a bit inconsistent about whether int64_t is defined or not @@ -408,16 +419,6 @@ INT#_C macros if they're not already defined (John Maddock). #if !defined(BOOST__STDC_CONSTANT_MACROS_DEFINED) && \ (!defined(INT8_C) || !defined(INT16_C) || !defined(INT32_C) || !defined(INT64_C)) // -// For the following code we get several warnings along the lines of: -// -// boost/cstdint.hpp:428:35: error: use of C99 long long integer constant -// -// So we declare this a system header to suppress these warnings. -// -#if defined(__GNUC__) && (__GNUC__ >= 4) -#pragma GCC system_header -#endif -// // Undef the macros as a precaution, since we may get here if has failed // to define them all, see https://svn.boost.org/trac/boost/ticket/12786 //