diff --git a/include/boost/detail/atomic_count.hpp b/include/boost/detail/atomic_count.hpp index 5321232..decb95d 100644 --- a/include/boost/detail/atomic_count.hpp +++ b/include/boost/detail/atomic_count.hpp @@ -1,8 +1,8 @@ #ifndef BOOST_DETAIL_ATOMIC_COUNT_HPP_INCLUDED #define BOOST_DETAIL_ATOMIC_COUNT_HPP_INCLUDED -#if _MSC_VER >= 1020 -#pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once #endif // diff --git a/include/boost/detail/atomic_count_win32.hpp b/include/boost/detail/atomic_count_win32.hpp index 0f00c43..8f9ad7f 100644 --- a/include/boost/detail/atomic_count_win32.hpp +++ b/include/boost/detail/atomic_count_win32.hpp @@ -1,8 +1,8 @@ #ifndef BOOST_DETAIL_ATOMIC_COUNT_WIN32_HPP_INCLUDED #define BOOST_DETAIL_ATOMIC_COUNT_WIN32_HPP_INCLUDED -#if _MSC_VER >= 1020 -#pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once #endif // diff --git a/include/boost/detail/lightweight_mutex.hpp b/include/boost/detail/lightweight_mutex.hpp index 1310da3..91a338a 100644 --- a/include/boost/detail/lightweight_mutex.hpp +++ b/include/boost/detail/lightweight_mutex.hpp @@ -1,8 +1,8 @@ #ifndef BOOST_DETAIL_LIGHTWEIGHT_MUTEX_HPP_INCLUDED #define BOOST_DETAIL_LIGHTWEIGHT_MUTEX_HPP_INCLUDED -#if _MSC_VER >= 1020 -#pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once #endif // diff --git a/include/boost/detail/lwm_irix.hpp b/include/boost/detail/lwm_irix.hpp index 2a55161..6e5e57f 100644 --- a/include/boost/detail/lwm_irix.hpp +++ b/include/boost/detail/lwm_irix.hpp @@ -1,10 +1,6 @@ #ifndef BOOST_DETAIL_LWM_IRIX_HPP_INCLUDED #define BOOST_DETAIL_LWM_IRIX_HPP_INCLUDED -#if _MSC_VER >= 1020 -#pragma once -#endif - // // boost/detail/lwm_irix.hpp // diff --git a/include/boost/detail/lwm_linux.hpp b/include/boost/detail/lwm_linux.hpp index 62d8e64..e4c23c3 100644 --- a/include/boost/detail/lwm_linux.hpp +++ b/include/boost/detail/lwm_linux.hpp @@ -1,10 +1,6 @@ #ifndef BOOST_DETAIL_LWM_LINUX_HPP_INCLUDED #define BOOST_DETAIL_LWM_LINUX_HPP_INCLUDED -#if _MSC_VER >= 1020 -#pragma once -#endif - // // boost/detail/lwm_linux.hpp // diff --git a/include/boost/detail/lwm_nop.hpp b/include/boost/detail/lwm_nop.hpp index 671a5b0..d07ff1d 100644 --- a/include/boost/detail/lwm_nop.hpp +++ b/include/boost/detail/lwm_nop.hpp @@ -1,8 +1,8 @@ #ifndef BOOST_DETAIL_LWM_NOP_HPP_INCLUDED #define BOOST_DETAIL_LWM_NOP_HPP_INCLUDED -#if _MSC_VER >= 1020 -#pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once #endif // diff --git a/include/boost/detail/lwm_pthreads.hpp b/include/boost/detail/lwm_pthreads.hpp index 8ee5550..1f5f2c9 100644 --- a/include/boost/detail/lwm_pthreads.hpp +++ b/include/boost/detail/lwm_pthreads.hpp @@ -1,8 +1,8 @@ #ifndef BOOST_DETAIL_LWM_PTHREADS_HPP_INCLUDED #define BOOST_DETAIL_LWM_PTHREADS_HPP_INCLUDED -#if _MSC_VER >= 1020 -#pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once #endif // diff --git a/include/boost/detail/lwm_win32.hpp b/include/boost/detail/lwm_win32.hpp index 6d37068..d60c8b6 100644 --- a/include/boost/detail/lwm_win32.hpp +++ b/include/boost/detail/lwm_win32.hpp @@ -1,8 +1,8 @@ #ifndef BOOST_DETAIL_LWM_WIN32_HPP_INCLUDED #define BOOST_DETAIL_LWM_WIN32_HPP_INCLUDED -#if _MSC_VER >= 1020 -#pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once #endif // diff --git a/include/boost/detail/lwm_win32_cs.hpp b/include/boost/detail/lwm_win32_cs.hpp index 8b40ae9..0a03588 100644 --- a/include/boost/detail/lwm_win32_cs.hpp +++ b/include/boost/detail/lwm_win32_cs.hpp @@ -1,8 +1,8 @@ #ifndef BOOST_DETAIL_LWM_WIN32_CS_HPP_INCLUDED #define BOOST_DETAIL_LWM_WIN32_CS_HPP_INCLUDED -#if _MSC_VER >= 1020 -#pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once #endif // diff --git a/include/boost/detail/shared_count.hpp b/include/boost/detail/shared_count.hpp index 417071c..3ade9f9 100644 --- a/include/boost/detail/shared_count.hpp +++ b/include/boost/detail/shared_count.hpp @@ -1,8 +1,8 @@ #ifndef BOOST_DETAIL_SHARED_COUNT_HPP_INCLUDED #define BOOST_DETAIL_SHARED_COUNT_HPP_INCLUDED -#if _MSC_VER >= 1020 -#pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once #endif // diff --git a/include/boost/intrusive_ptr.hpp b/include/boost/intrusive_ptr.hpp index 6135bb6..9d713a8 100644 --- a/include/boost/intrusive_ptr.hpp +++ b/include/boost/intrusive_ptr.hpp @@ -119,7 +119,7 @@ public: return p_; } -#if BOOST_WORKAROUND(__SUNPRO_CC, <= 0x530) +#if defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, <= 0x530) operator bool () const { @@ -235,7 +235,7 @@ template std::ostream & operator<< (std::ostream & os, intrusive_ptr #else -# if BOOST_WORKAROUND(BOOST_MSVC, <= 1200 && __SGI_STL_PORT) +# if defined(BOOST_MSVC) && BOOST_WORKAROUND(BOOST_MSVC, <= 1200 && __SGI_STL_PORT) // MSVC6 has problems finding std::basic_ostream through the using declaration in namespace _STL using std::basic_ostream; template basic_ostream & operator<< (basic_ostream & os, intrusive_ptr const & p) diff --git a/include/boost/scoped_array.hpp b/include/boost/scoped_array.hpp index 6d33a56..1930f20 100644 --- a/include/boost/scoped_array.hpp +++ b/include/boost/scoped_array.hpp @@ -86,7 +86,7 @@ public: // implicit conversion to "bool" -#if BOOST_WORKAROUND(__SUNPRO_CC, <= 0x530) +#if defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, <= 0x530) operator bool () const { diff --git a/include/boost/scoped_ptr.hpp b/include/boost/scoped_ptr.hpp index 464822b..429d295 100644 --- a/include/boost/scoped_ptr.hpp +++ b/include/boost/scoped_ptr.hpp @@ -103,7 +103,7 @@ public: // implicit conversion to "bool" -#if BOOST_WORKAROUND(__SUNPRO_CC, <= 0x530) +#if defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, <= 0x530) operator bool () const { diff --git a/include/boost/shared_array.hpp b/include/boost/shared_array.hpp index 5ee8ff7..2009efd 100644 --- a/include/boost/shared_array.hpp +++ b/include/boost/shared_array.hpp @@ -95,7 +95,7 @@ public: // implicit conversion to "bool" -#if BOOST_WORKAROUND(__SUNPRO_CC, <= 0x530) +#if defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, <= 0x530) operator bool () const { diff --git a/include/boost/shared_ptr.hpp b/include/boost/shared_ptr.hpp index 8cb6d1e..d33eb77 100644 --- a/include/boost/shared_ptr.hpp +++ b/include/boost/shared_ptr.hpp @@ -246,7 +246,7 @@ public: // implicit conversion to "bool" -#if BOOST_WORKAROUND(__SUNPRO_CC, <= 0x530) +#if defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, <= 0x530) operator bool () const { @@ -398,7 +398,7 @@ template std::ostream & operator<< (std::ostream & os, shared_ptr co #else -# if BOOST_WORKAROUND(BOOST_MSVC, <= 1200 && __SGI_STL_PORT) +# if defined(BOOST_MSVC) && BOOST_WORKAROUND(BOOST_MSVC, <= 1200 && __SGI_STL_PORT) // MSVC6 has problems finding std::basic_ostream through the using declaration in namespace _STL using std::basic_ostream; template basic_ostream & operator<< (basic_ostream & os, shared_ptr const & p)