From 67fab5c9ecc0190044b822140128c10de398ca76 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Thu, 8 Mar 2018 06:53:28 +0200 Subject: [PATCH] Clang x64 warns that __stdcall is ignored, so don't use it there --- include/boost/smart_ptr/detail/yield_k.hpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/include/boost/smart_ptr/detail/yield_k.hpp b/include/boost/smart_ptr/detail/yield_k.hpp index f8ca6b6..e32d5aa 100644 --- a/include/boost/smart_ptr/detail/yield_k.hpp +++ b/include/boost/smart_ptr/detail/yield_k.hpp @@ -60,16 +60,27 @@ namespace detail { #if !defined( BOOST_USE_WINDOWS_H ) && !BOOST_PLAT_WINDOWS_RUNTIME + +#if defined(__clang__) && defined(__x86_64__) +// clang x64 warns that __stdcall is ignored +# define BOOST_SP_STDCALL +#else +# define BOOST_SP_STDCALL __stdcall +#endif + #if !BOOST_COMP_CLANG || !defined __MINGW32__ - extern "C" void __stdcall Sleep( unsigned long ms ); + extern "C" void BOOST_SP_STDCALL Sleep( unsigned long ms ); #else #include <_mingw.h> #if !defined __MINGW64_VERSION_MAJOR - extern "C" void __stdcall Sleep( unsigned long ms ); + extern "C" void BOOST_SP_STDCALL Sleep( unsigned long ms ); #else - extern "C" __declspec(dllimport) void __stdcall Sleep( unsigned long ms ); + extern "C" __declspec(dllimport) void BOOST_SP_STDCALL Sleep( unsigned long ms ); #endif #endif + +#undef BOOST_SP_STDCALL + #endif inline void yield( unsigned k )