Browse Source

Update contrib/restricted/boost/winapi to 1.79.0

robot-contrib 2 years ago
parent
commit
a89864f26d

+ 5 - 3
contrib/restricted/boost/winapi/README.md

@@ -5,9 +5,11 @@ Windows API declarations without <windows.h>, for internal Boost use.
 
 ### Build Status
 
-Master: [![AppVeyor](https://ci.appveyor.com/api/projects/status/dkb233de24u30x9a/branch/master?svg=true)](https://ci.appveyor.com/project/Lastique/winapi/branch/master) [![Travis CI](https://travis-ci.org/boostorg/winapi.svg?branch=master)](https://travis-ci.org/boostorg/winapi)
-Develop: [![AppVeyor](https://ci.appveyor.com/api/projects/status/dkb233de24u30x9a/branch/develop?svg=true)](https://ci.appveyor.com/project/Lastique/winapi/branch/develop) [![Travis CI](https://travis-ci.org/boostorg/winapi.svg?branch=develop)](https://travis-ci.org/boostorg/winapi)
+Branch          | AppVeyor | Test Matrix | Dependencies |
+:-------------: | -------- | ----------- | ------------ |
+[`master`](https://github.com/boostorg/winapi/tree/master) | [![AppVeyor](https://ci.appveyor.com/api/projects/status/dkb233de24u30x9a/branch/master?svg=true)](https://ci.appveyor.com/project/Lastique/winapi/branch/master) | [![Tests](https://img.shields.io/badge/matrix-master-brightgreen.svg)](http://www.boost.org/development/tests/master/developer/winapi.html) | [![Dependencies](https://img.shields.io/badge/deps-master-brightgreen.svg)](https://pdimov.github.io/boostdep-report/master/winapi.html)
+[`develop`](https://github.com/boostorg/winapi/tree/develop) | [![AppVeyor](https://ci.appveyor.com/api/projects/status/dkb233de24u30x9a/branch/develop?svg=true)](https://ci.appveyor.com/project/Lastique/winapi/branch/develop) | [![Tests](https://img.shields.io/badge/matrix-develop-brightgreen.svg)](http://www.boost.org/development/tests/develop/developer/winapi.html) | [![Dependencies](https://img.shields.io/badge/deps-develop-brightgreen.svg)](https://pdimov.github.io/boostdep-report/develop/winapi.html)
 
 ### License
 
-Distributed under the [Boost Software License, Version 1.0](http://boost.org/LICENSE_1_0.txt).
+Distributed under the [Boost Software License, Version 1.0](https://boost.org/LICENSE_1_0.txt).

+ 178 - 106
contrib/restricted/boost/winapi/include/boost/detail/interlocked.hpp

@@ -5,6 +5,7 @@
 //  boost/detail/interlocked.hpp
 //
 //  Copyright 2005 Peter Dimov
+//  Copyright 2018, 2019 Andrey Semashev
 //
 //  Distributed under the Boost Software License, Version 1.0. (See
 //  accompanying file LICENSE_1_0.txt or copy at
@@ -13,75 +14,150 @@
 
 #include <boost/config.hpp>
 
-// MS compatible compilers support #pragma once
 #ifdef BOOST_HAS_PRAGMA_ONCE
 #pragma once
 #endif
 
-#if defined( BOOST_USE_WINDOWS_H )
+// BOOST_INTERLOCKED_HAS_INTRIN_H
 
-# include <windows.h>
+// VC9 has intrin.h, but it collides with <utility>
+#if defined( BOOST_MSVC ) && BOOST_MSVC >= 1600
 
-# define BOOST_INTERLOCKED_INCREMENT InterlockedIncrement
-# define BOOST_INTERLOCKED_DECREMENT InterlockedDecrement
-# define BOOST_INTERLOCKED_COMPARE_EXCHANGE InterlockedCompareExchange
-# define BOOST_INTERLOCKED_EXCHANGE InterlockedExchange
-# define BOOST_INTERLOCKED_EXCHANGE_ADD InterlockedExchangeAdd
-# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER InterlockedCompareExchangePointer
-# define BOOST_INTERLOCKED_EXCHANGE_POINTER InterlockedExchangePointer
+# define BOOST_INTERLOCKED_HAS_INTRIN_H
 
-#elif defined( BOOST_USE_INTRIN_H )
+// Unlike __MINGW64__, __MINGW64_VERSION_MAJOR is defined by MinGW-w64 for both 32 and 64-bit targets.
+#elif defined( __MINGW64_VERSION_MAJOR )
 
-#include <intrin.h>
+// MinGW-w64 provides intrin.h for both 32 and 64-bit targets.
+# define BOOST_INTERLOCKED_HAS_INTRIN_H
+
+#elif defined( __CYGWIN__ )
+
+// Cygwin and Cygwin64 provide intrin.h. On Cygwin64 we have to use intrin.h because it's an LP64 target,
+// where long is 64-bit and therefore _Interlocked* functions have different signatures.
+# define BOOST_INTERLOCKED_HAS_INTRIN_H
+
+// Intel C++ on Windows on VC10+ stdlib
+#elif defined( BOOST_INTEL_WIN ) && defined( _CPPLIB_VER ) && _CPPLIB_VER >= 520
+
+# define BOOST_INTERLOCKED_HAS_INTRIN_H
+
+// clang-cl on Windows on VC10+ stdlib
+#elif defined( __clang__ ) && defined( _MSC_VER ) && defined( _CPPLIB_VER ) && _CPPLIB_VER >= 520
+
+# define BOOST_INTERLOCKED_HAS_INTRIN_H
+
+#endif
+
+#if !defined(__LP64__)
+#define BOOST_INTERLOCKED_LONG32 long
+#else
+#define BOOST_INTERLOCKED_LONG32 int
+#endif
+
+#if defined( BOOST_USE_WINDOWS_H )
+
+# include <windows.h>
 
-# define BOOST_INTERLOCKED_INCREMENT _InterlockedIncrement
-# define BOOST_INTERLOCKED_DECREMENT _InterlockedDecrement
-# define BOOST_INTERLOCKED_COMPARE_EXCHANGE _InterlockedCompareExchange
-# define BOOST_INTERLOCKED_EXCHANGE _InterlockedExchange
-# define BOOST_INTERLOCKED_EXCHANGE_ADD _InterlockedExchangeAdd
+# define BOOST_INTERLOCKED_INCREMENT(dest) \
+    InterlockedIncrement((BOOST_INTERLOCKED_LONG32*)(dest))
+# define BOOST_INTERLOCKED_DECREMENT(dest) \
+    InterlockedDecrement((BOOST_INTERLOCKED_LONG32*)(dest))
+# define BOOST_INTERLOCKED_COMPARE_EXCHANGE(dest, exchange, compare) \
+    InterlockedCompareExchange((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(exchange), (BOOST_INTERLOCKED_LONG32)(compare))
+# define BOOST_INTERLOCKED_EXCHANGE(dest, exchange) \
+    InterlockedExchange((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(exchange))
+# define BOOST_INTERLOCKED_EXCHANGE_ADD(dest, add) \
+    InterlockedExchangeAdd((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(add))
+# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest, exchange, compare) \
+    InterlockedCompareExchangePointer((void**)(dest), (void*)(exchange), (void*)(compare))
+# define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest, exchange) \
+    InterlockedExchangePointer((void**)(dest), (void*)(exchange))
+
+#elif defined( BOOST_USE_INTRIN_H ) || defined( BOOST_INTERLOCKED_HAS_INTRIN_H )
 
-# if defined(_M_IA64) || defined(_M_AMD64) || defined(__x86_64__) || defined(__x86_64)
+#include <intrin.h>
 
-#  define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER _InterlockedCompareExchangePointer
-#  define BOOST_INTERLOCKED_EXCHANGE_POINTER _InterlockedExchangePointer
+# define BOOST_INTERLOCKED_INCREMENT(dest) \
+    _InterlockedIncrement((BOOST_INTERLOCKED_LONG32*)(dest))
+# define BOOST_INTERLOCKED_DECREMENT(dest) \
+    _InterlockedDecrement((BOOST_INTERLOCKED_LONG32*)(dest))
+# define BOOST_INTERLOCKED_COMPARE_EXCHANGE(dest, exchange, compare) \
+    _InterlockedCompareExchange((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(exchange), (BOOST_INTERLOCKED_LONG32)(compare))
+# define BOOST_INTERLOCKED_EXCHANGE(dest, exchange) \
+    _InterlockedExchange((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(exchange))
+# define BOOST_INTERLOCKED_EXCHANGE_ADD(dest, add) \
+    _InterlockedExchangeAdd((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(add))
+
+// Note: Though MSVC-12 defines _InterlockedCompareExchangePointer and _InterlockedExchangePointer in intrin.h, the latter
+//       is actually broken as it conflicts with winnt.h from Windows SDK 8.1.
+# if (defined(_MSC_VER) && _MSC_VER >= 1900) || \
+  (defined(_M_IA64) || defined(_M_AMD64) || defined(__x86_64__) || defined(__x86_64) || defined(_M_ARM64))
+
+#  define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest, exchange, compare) \
+     _InterlockedCompareExchangePointer((void**)(dest), (void*)(exchange), (void*)(compare))
+#  define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest, exchange) \
+     _InterlockedExchangePointer((void**)(dest), (void*)(exchange))
 
 # else
 
-#  define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest,exchange,compare) \
-    ((void*)BOOST_INTERLOCKED_COMPARE_EXCHANGE((long volatile*)(dest),(long)(exchange),(long)(compare)))
-#  define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest,exchange) \
-    ((void*)BOOST_INTERLOCKED_EXCHANGE((long volatile*)(dest),(long)(exchange)))
+#  define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest, exchange, compare) \
+    ((void*)BOOST_INTERLOCKED_COMPARE_EXCHANGE((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(exchange), (BOOST_INTERLOCKED_LONG32)(compare)))
+#  define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest, exchange) \
+    ((void*)BOOST_INTERLOCKED_EXCHANGE((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(exchange)))
 
 # endif
 
 #elif defined(_WIN32_WCE)
 
-// under Windows CE we still have old-style Interlocked* functions
+#if _WIN32_WCE >= 0x600
 
-extern "C" long __cdecl InterlockedIncrement( long volatile* );
-extern "C" long __cdecl InterlockedDecrement( long volatile* );
-extern "C" long __cdecl InterlockedCompareExchange( long volatile*, long, long );
-extern "C" long __cdecl InterlockedExchange( long volatile*, long );
-extern "C" long __cdecl InterlockedExchangeAdd( long volatile*, long );
+extern "C" BOOST_INTERLOCKED_LONG32 __cdecl _InterlockedIncrement( BOOST_INTERLOCKED_LONG32 volatile * );
+extern "C" BOOST_INTERLOCKED_LONG32 __cdecl _InterlockedDecrement( BOOST_INTERLOCKED_LONG32 volatile * );
+extern "C" BOOST_INTERLOCKED_LONG32 __cdecl _InterlockedCompareExchange( BOOST_INTERLOCKED_LONG32 volatile *, BOOST_INTERLOCKED_LONG32, BOOST_INTERLOCKED_LONG32 );
+extern "C" BOOST_INTERLOCKED_LONG32 __cdecl _InterlockedExchange( BOOST_INTERLOCKED_LONG32 volatile *, BOOST_INTERLOCKED_LONG32 );
+extern "C" BOOST_INTERLOCKED_LONG32 __cdecl _InterlockedExchangeAdd( BOOST_INTERLOCKED_LONG32 volatile *, BOOST_INTERLOCKED_LONG32 );
 
-# define BOOST_INTERLOCKED_INCREMENT InterlockedIncrement
-# define BOOST_INTERLOCKED_DECREMENT InterlockedDecrement
-# define BOOST_INTERLOCKED_COMPARE_EXCHANGE InterlockedCompareExchange
-# define BOOST_INTERLOCKED_EXCHANGE InterlockedExchange
-# define BOOST_INTERLOCKED_EXCHANGE_ADD InterlockedExchangeAdd
+# define BOOST_INTERLOCKED_INCREMENT(dest) \
+    _InterlockedIncrement((BOOST_INTERLOCKED_LONG32*)(dest))
+# define BOOST_INTERLOCKED_DECREMENT(dest) \
+    _InterlockedDecrement((BOOST_INTERLOCKED_LONG32*)(dest))
+# define BOOST_INTERLOCKED_COMPARE_EXCHANGE(dest, exchange, compare) \
+    _InterlockedCompareExchange((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(exchange), (BOOST_INTERLOCKED_LONG32)(compare))
+# define BOOST_INTERLOCKED_EXCHANGE(dest, exchange) \
+    _InterlockedExchange((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(exchange))
+# define BOOST_INTERLOCKED_EXCHANGE_ADD(dest, add) \
+    _InterlockedExchangeAdd((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(add))
 
-# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest,exchange,compare) \
-    ((void*)BOOST_INTERLOCKED_COMPARE_EXCHANGE((long*)(dest),(long)(exchange),(long)(compare)))
-# define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest,exchange) \
-    ((void*)BOOST_INTERLOCKED_EXCHANGE((long*)(dest),(long)(exchange)))
+#else // _WIN32_WCE >= 0x600
 
-#elif defined( BOOST_MSVC ) || defined( BOOST_INTEL_WIN )
-
-#if defined( BOOST_MSVC ) && BOOST_MSVC >= 1400
+// under Windows CE we still have old-style Interlocked* functions
 
-#include <intrin.h>
+extern "C" BOOST_INTERLOCKED_LONG32 __cdecl InterlockedIncrement( BOOST_INTERLOCKED_LONG32 * );
+extern "C" BOOST_INTERLOCKED_LONG32 __cdecl InterlockedDecrement( BOOST_INTERLOCKED_LONG32 * );
+extern "C" BOOST_INTERLOCKED_LONG32 __cdecl InterlockedCompareExchange( BOOST_INTERLOCKED_LONG32 *, BOOST_INTERLOCKED_LONG32, BOOST_INTERLOCKED_LONG32 );
+extern "C" BOOST_INTERLOCKED_LONG32 __cdecl InterlockedExchange( BOOST_INTERLOCKED_LONG32 *, BOOST_INTERLOCKED_LONG32 );
+extern "C" BOOST_INTERLOCKED_LONG32 __cdecl InterlockedExchangeAdd( BOOST_INTERLOCKED_LONG32 *, BOOST_INTERLOCKED_LONG32 );
+
+# define BOOST_INTERLOCKED_INCREMENT(dest) \
+    InterlockedIncrement((BOOST_INTERLOCKED_LONG32*)(dest))
+# define BOOST_INTERLOCKED_DECREMENT(dest) \
+    InterlockedDecrement((BOOST_INTERLOCKED_LONG32*)(dest))
+# define BOOST_INTERLOCKED_COMPARE_EXCHANGE(dest, exchange, compare) \
+    InterlockedCompareExchange((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(exchange), (BOOST_INTERLOCKED_LONG32)(compare))
+# define BOOST_INTERLOCKED_EXCHANGE(dest, exchange) \
+    InterlockedExchange((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(exchange))
+# define BOOST_INTERLOCKED_EXCHANGE_ADD(dest, add) \
+    InterlockedExchangeAdd((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(add))
+
+#endif // _WIN32_WCE >= 0x600
+
+# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest, exchange, compare) \
+    ((void*)BOOST_INTERLOCKED_COMPARE_EXCHANGE((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(exchange), (BOOST_INTERLOCKED_LONG32)(compare)))
+# define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest, exchange) \
+    ((void*)BOOST_INTERLOCKED_EXCHANGE((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(exchange)))
 
-#else
+#elif defined( BOOST_MSVC ) || defined( BOOST_INTEL_WIN )
 
 # if defined( __CLRCALL_PURE_OR_CDECL )
 #  define BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL __CLRCALL_PURE_OR_CDECL
@@ -89,13 +165,11 @@ extern "C" long __cdecl InterlockedExchangeAdd( long volatile*, long );
 #  define BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL __cdecl
 # endif
 
-extern "C" long BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL _InterlockedIncrement( long volatile * );
-extern "C" long BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL _InterlockedDecrement( long volatile * );
-extern "C" long BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL _InterlockedCompareExchange( long volatile *, long, long );
-extern "C" long BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL _InterlockedExchange( long volatile *, long );
-extern "C" long BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL _InterlockedExchangeAdd( long volatile *, long );
-
-# undef BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL
+extern "C" BOOST_INTERLOCKED_LONG32 BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL _InterlockedIncrement( BOOST_INTERLOCKED_LONG32 volatile * );
+extern "C" BOOST_INTERLOCKED_LONG32 BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL _InterlockedDecrement( BOOST_INTERLOCKED_LONG32 volatile * );
+extern "C" BOOST_INTERLOCKED_LONG32 BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL _InterlockedCompareExchange( BOOST_INTERLOCKED_LONG32 volatile *, BOOST_INTERLOCKED_LONG32, BOOST_INTERLOCKED_LONG32 );
+extern "C" BOOST_INTERLOCKED_LONG32 BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL _InterlockedExchange( BOOST_INTERLOCKED_LONG32 volatile *, BOOST_INTERLOCKED_LONG32 );
+extern "C" BOOST_INTERLOCKED_LONG32 BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL _InterlockedExchangeAdd( BOOST_INTERLOCKED_LONG32 volatile *, BOOST_INTERLOCKED_LONG32 );
 
 # if defined( BOOST_MSVC ) && BOOST_MSVC >= 1310
 #  pragma intrinsic( _InterlockedIncrement )
@@ -105,53 +179,44 @@ extern "C" long BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL _InterlockedExchangeAdd(
 #  pragma intrinsic( _InterlockedExchangeAdd )
 # endif
 
-#endif
+# if defined(_M_IA64) || defined(_M_AMD64) || defined(_M_ARM64)
 
-# if defined(_M_IA64) || defined(_M_AMD64)
+extern "C" void* BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL _InterlockedCompareExchangePointer( void* volatile *, void*, void* );
+extern "C" void* BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL _InterlockedExchangePointer( void* volatile *, void* );
 
-extern "C" void* __cdecl _InterlockedCompareExchangePointer( void* volatile *, void*, void* );
-extern "C" void* __cdecl _InterlockedExchangePointer( void* volatile *, void* );
+#  if defined( BOOST_MSVC ) && BOOST_MSVC >= 1310
+#   pragma intrinsic( _InterlockedCompareExchangePointer )
+#   pragma intrinsic( _InterlockedExchangePointer )
+#  endif
 
-#  define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER _InterlockedCompareExchangePointer
-#  define BOOST_INTERLOCKED_EXCHANGE_POINTER _InterlockedExchangePointer
+#  define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest, exchange, compare) \
+     _InterlockedCompareExchangePointer((void**)(dest), (void*)(exchange), (void*)(compare))
+#  define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest, exchange) \
+     _InterlockedExchangePointer((void**)(dest), (void*)(exchange))
 
 # else
 
-#  define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest,exchange,compare) \
-    ((void*)BOOST_INTERLOCKED_COMPARE_EXCHANGE((long volatile*)(dest),(long)(exchange),(long)(compare)))
-#  define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest,exchange) \
-    ((void*)BOOST_INTERLOCKED_EXCHANGE((long volatile*)(dest),(long)(exchange)))
+#  define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest, exchange, compare) \
+    ((void*)BOOST_INTERLOCKED_COMPARE_EXCHANGE((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(exchange), (BOOST_INTERLOCKED_LONG32)(compare)))
+#  define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest, exchange) \
+    ((void*)BOOST_INTERLOCKED_EXCHANGE((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(exchange)))
 
 # endif
 
-# define BOOST_INTERLOCKED_INCREMENT _InterlockedIncrement
-# define BOOST_INTERLOCKED_DECREMENT _InterlockedDecrement
-# define BOOST_INTERLOCKED_COMPARE_EXCHANGE _InterlockedCompareExchange
-# define BOOST_INTERLOCKED_EXCHANGE _InterlockedExchange
-# define BOOST_INTERLOCKED_EXCHANGE_ADD _InterlockedExchangeAdd
-
-// Unlike __MINGW64__, __MINGW64_VERSION_MAJOR is defined by MinGW-w64 for both 32 and 64-bit targets.
-#elif defined(__MINGW64_VERSION_MAJOR)
-
-// MinGW-w64 provides intrin.h for both 32 and 64-bit targets.
-#include <intrin.h>
+# undef BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL
 
-# define BOOST_INTERLOCKED_INCREMENT _InterlockedIncrement
-# define BOOST_INTERLOCKED_DECREMENT _InterlockedDecrement
-# define BOOST_INTERLOCKED_COMPARE_EXCHANGE _InterlockedCompareExchange
-# define BOOST_INTERLOCKED_EXCHANGE _InterlockedExchange
-# define BOOST_INTERLOCKED_EXCHANGE_ADD _InterlockedExchangeAdd
-# if defined(__x86_64__) || defined(__x86_64)
-#  define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER _InterlockedCompareExchangePointer
-#  define BOOST_INTERLOCKED_EXCHANGE_POINTER _InterlockedExchangePointer
-# else
-#  define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest,exchange,compare) \
-    ((void*)BOOST_INTERLOCKED_COMPARE_EXCHANGE((long volatile*)(dest),(long)(exchange),(long)(compare)))
-#  define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest,exchange) \
-    ((void*)BOOST_INTERLOCKED_EXCHANGE((long volatile*)(dest),(long)(exchange)))
-# endif
+# define BOOST_INTERLOCKED_INCREMENT(dest) \
+    _InterlockedIncrement((BOOST_INTERLOCKED_LONG32*)(dest))
+# define BOOST_INTERLOCKED_DECREMENT(dest) \
+    _InterlockedDecrement((BOOST_INTERLOCKED_LONG32*)(dest))
+# define BOOST_INTERLOCKED_COMPARE_EXCHANGE(dest, exchange, compare) \
+    _InterlockedCompareExchange((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(exchange), (BOOST_INTERLOCKED_LONG32)(compare))
+# define BOOST_INTERLOCKED_EXCHANGE(dest, exchange) \
+    _InterlockedExchange((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(exchange))
+# define BOOST_INTERLOCKED_EXCHANGE_ADD(dest, add) \
+    _InterlockedExchangeAdd((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(add))
 
-#elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) || defined( __CYGWIN__ )
+#elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ )
 
 #define BOOST_INTERLOCKED_IMPORT __declspec(dllimport)
 
@@ -161,13 +226,13 @@ namespace boost
 namespace detail
 {
 
-extern "C" BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedIncrement( long volatile * );
-extern "C" BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedDecrement( long volatile * );
-extern "C" BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedCompareExchange( long volatile *, long, long );
-extern "C" BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedExchange( long volatile *, long );
-extern "C" BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedExchangeAdd( long volatile *, long );
+extern "C" BOOST_INTERLOCKED_IMPORT BOOST_INTERLOCKED_LONG32 __stdcall InterlockedIncrement( BOOST_INTERLOCKED_LONG32 volatile * );
+extern "C" BOOST_INTERLOCKED_IMPORT BOOST_INTERLOCKED_LONG32 __stdcall InterlockedDecrement( BOOST_INTERLOCKED_LONG32 volatile * );
+extern "C" BOOST_INTERLOCKED_IMPORT BOOST_INTERLOCKED_LONG32 __stdcall InterlockedCompareExchange( BOOST_INTERLOCKED_LONG32 volatile *, BOOST_INTERLOCKED_LONG32, BOOST_INTERLOCKED_LONG32 );
+extern "C" BOOST_INTERLOCKED_IMPORT BOOST_INTERLOCKED_LONG32 __stdcall InterlockedExchange( BOOST_INTERLOCKED_LONG32 volatile *, BOOST_INTERLOCKED_LONG32 );
+extern "C" BOOST_INTERLOCKED_IMPORT BOOST_INTERLOCKED_LONG32 __stdcall InterlockedExchangeAdd( BOOST_INTERLOCKED_LONG32 volatile *, BOOST_INTERLOCKED_LONG32 );
 
-# if defined(_M_IA64) || defined(_M_AMD64)
+# if defined(_M_IA64) || defined(_M_AMD64) || defined(_M_ARM64)
 extern "C" BOOST_INTERLOCKED_IMPORT void* __stdcall InterlockedCompareExchangePointer( void* volatile *, void*, void* );
 extern "C" BOOST_INTERLOCKED_IMPORT void* __stdcall InterlockedExchangePointer( void* volatile *, void* );
 # endif
@@ -176,20 +241,27 @@ extern "C" BOOST_INTERLOCKED_IMPORT void* __stdcall InterlockedExchangePointer(
 
 } // namespace boost
 
-# define BOOST_INTERLOCKED_INCREMENT ::boost::detail::InterlockedIncrement
-# define BOOST_INTERLOCKED_DECREMENT ::boost::detail::InterlockedDecrement
-# define BOOST_INTERLOCKED_COMPARE_EXCHANGE ::boost::detail::InterlockedCompareExchange
-# define BOOST_INTERLOCKED_EXCHANGE ::boost::detail::InterlockedExchange
-# define BOOST_INTERLOCKED_EXCHANGE_ADD ::boost::detail::InterlockedExchangeAdd
-
-# if defined(_M_IA64) || defined(_M_AMD64)
-#  define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER ::boost::detail::InterlockedCompareExchangePointer
-#  define BOOST_INTERLOCKED_EXCHANGE_POINTER ::boost::detail::InterlockedExchangePointer
+# define BOOST_INTERLOCKED_INCREMENT(dest) \
+    ::boost::detail::InterlockedIncrement((BOOST_INTERLOCKED_LONG32*)(dest))
+# define BOOST_INTERLOCKED_DECREMENT(dest) \
+    ::boost::detail::InterlockedDecrement((BOOST_INTERLOCKED_LONG32*)(dest))
+# define BOOST_INTERLOCKED_COMPARE_EXCHANGE(dest, exchange, compare) \
+    ::boost::detail::InterlockedCompareExchange((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(exchange), (BOOST_INTERLOCKED_LONG32)(compare))
+# define BOOST_INTERLOCKED_EXCHANGE(dest, exchange) \
+    ::boost::detail::InterlockedExchange((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(exchange))
+# define BOOST_INTERLOCKED_EXCHANGE_ADD(dest, add) \
+    ::boost::detail::InterlockedExchangeAdd((BOOST_INTERLOCKED_LONG32*)(dest), (BOOST_INTERLOCKED_LONG32)(add))
+
+# if defined(_M_IA64) || defined(_M_AMD64) || defined(_M_ARM64)
+#  define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest, exchange, compare) \
+     ::boost::detail::InterlockedCompareExchangePointer((void**)(dest), (void*)(exchange), (void*)(compare))
+#  define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest, exchange) \
+     ::boost::detail::InterlockedExchangePointer((void**)(dest), (void*)(exchange))
 # else
-#  define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest,exchange,compare) \
-    ((void*)BOOST_INTERLOCKED_COMPARE_EXCHANGE((long volatile*)(dest),(long)(exchange),(long)(compare)))
-#  define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest,exchange) \
-    ((void*)BOOST_INTERLOCKED_EXCHANGE((long volatile*)(dest),(long)(exchange)))
+#  define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest, exchange, compare) \
+    ((void*)BOOST_INTERLOCKED_COMPARE_EXCHANGE((BOOST_INTERLOCKED_LONG32 volatile*)(dest),(BOOST_INTERLOCKED_LONG32)(exchange),(BOOST_INTERLOCKED_LONG32)(compare)))
+#  define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest, exchange) \
+    ((void*)BOOST_INTERLOCKED_EXCHANGE((BOOST_INTERLOCKED_LONG32*)(dest),(BOOST_INTERLOCKED_LONG32)(exchange)))
 # endif
 
 #else

+ 4 - 0
contrib/restricted/boost/winapi/include/boost/detail/winapi/get_current_process.hpp

@@ -10,6 +10,10 @@
 #ifndef BOOST_DETAIL_WINAPI_GET_CURRENT_PROCESS_HPP
 #define BOOST_DETAIL_WINAPI_GET_CURRENT_PROCESS_HPP
 
+#include <boost/config/header_deprecated.hpp>
+
+BOOST_HEADER_DEPRECATED("<boost/winapi/get_current_process.hpp>")
+
 #include <boost/winapi/get_current_process.hpp>
 #include <boost/detail/winapi/detail/deprecated_namespace.hpp>
 

+ 4 - 0
contrib/restricted/boost/winapi/include/boost/detail/winapi/get_current_thread.hpp

@@ -10,6 +10,10 @@
 #ifndef BOOST_DETAIL_WINAPI_GET_CURRENT_THREAD_HPP
 #define BOOST_DETAIL_WINAPI_GET_CURRENT_THREAD_HPP
 
+#include <boost/config/header_deprecated.hpp>
+
+BOOST_HEADER_DEPRECATED("<boost/winapi/get_current_thread.hpp>")
+
 #include <boost/winapi/get_current_thread.hpp>
 #include <boost/detail/winapi/detail/deprecated_namespace.hpp>
 

+ 4 - 0
contrib/restricted/boost/winapi/include/boost/detail/winapi/get_last_error.hpp

@@ -10,6 +10,10 @@
 #ifndef BOOST_DETAIL_WINAPI_GET_LAST_ERROR_HPP
 #define BOOST_DETAIL_WINAPI_GET_LAST_ERROR_HPP
 
+#include <boost/config/header_deprecated.hpp>
+
+BOOST_HEADER_DEPRECATED("<boost/winapi/get_last_error.hpp>")
+
 #include <boost/winapi/get_last_error.hpp>
 #include <boost/detail/winapi/detail/deprecated_namespace.hpp>
 

+ 4 - 0
contrib/restricted/boost/winapi/include/boost/detail/winapi/get_process_times.hpp

@@ -10,6 +10,10 @@
 #ifndef BOOST_DETAIL_WINAPI_GET_PROCESS_TIMES_HPP
 #define BOOST_DETAIL_WINAPI_GET_PROCESS_TIMES_HPP
 
+#include <boost/config/header_deprecated.hpp>
+
+BOOST_HEADER_DEPRECATED("<boost/winapi/get_process_times.hpp>")
+
 #include <boost/winapi/get_process_times.hpp>
 #include <boost/detail/winapi/detail/deprecated_namespace.hpp>
 

+ 4 - 0
contrib/restricted/boost/winapi/include/boost/detail/winapi/get_thread_times.hpp

@@ -10,6 +10,10 @@
 #ifndef BOOST_DETAIL_WINAPI_GET_THREAD_TIMES_HPP
 #define BOOST_DETAIL_WINAPI_GET_THREAD_TIMES_HPP
 
+#include <boost/config/header_deprecated.hpp>
+
+BOOST_HEADER_DEPRECATED("<boost/winapi/get_thread_times.hpp>")
+
 #include <boost/winapi/get_thread_times.hpp>
 #include <boost/detail/winapi/detail/deprecated_namespace.hpp>
 

+ 4 - 0
contrib/restricted/boost/winapi/include/boost/detail/winapi/time.hpp

@@ -10,6 +10,10 @@
 #ifndef BOOST_DETAIL_WINAPI_TIME_HPP_
 #define BOOST_DETAIL_WINAPI_TIME_HPP_
 
+#include <boost/config/header_deprecated.hpp>
+
+BOOST_HEADER_DEPRECATED("<boost/winapi/time.hpp>")
+
 #include <boost/winapi/time.hpp>
 #include <boost/detail/winapi/detail/deprecated_namespace.hpp>
 

+ 4 - 0
contrib/restricted/boost/winapi/include/boost/detail/winapi/timers.hpp

@@ -10,6 +10,10 @@
 #ifndef BOOST_DETAIL_WINAPI_TIMERS_HPP
 #define BOOST_DETAIL_WINAPI_TIMERS_HPP
 
+#include <boost/config/header_deprecated.hpp>
+
+BOOST_HEADER_DEPRECATED("<boost/winapi/timers.hpp>")
+
 #include <boost/winapi/timers.hpp>
 #include <boost/detail/winapi/detail/deprecated_namespace.hpp>
 

+ 37 - 34
contrib/restricted/boost/winapi/include/boost/winapi/access_rights.hpp

@@ -9,6 +9,7 @@
 #define BOOST_WINAPI_ACCESS_RIGHTS_HPP_INCLUDED_
 
 #include <boost/winapi/basic_types.hpp>
+#include <boost/winapi/detail/header.hpp>
 
 #ifdef BOOST_HAS_PRAGMA_ONCE
 #pragma once
@@ -19,56 +20,56 @@ namespace winapi {
 
 #if defined( BOOST_USE_WINDOWS_H )
 
-const DWORD_ DELETE_ = DELETE;
-const DWORD_ READ_CONTROL_ = READ_CONTROL;
-const DWORD_ WRITE_DAC_ = WRITE_DAC;
-const DWORD_ WRITE_OWNER_ = WRITE_OWNER;
-const DWORD_ SYNCHRONIZE_ = SYNCHRONIZE;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DELETE_ = DELETE;
+BOOST_CONSTEXPR_OR_CONST DWORD_ READ_CONTROL_ = READ_CONTROL;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WRITE_DAC_ = WRITE_DAC;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WRITE_OWNER_ = WRITE_OWNER;
+BOOST_CONSTEXPR_OR_CONST DWORD_ SYNCHRONIZE_ = SYNCHRONIZE;
 
-const DWORD_ STANDARD_RIGHTS_ALL_ = STANDARD_RIGHTS_ALL;
-const DWORD_ STANDARD_RIGHTS_EXECUTE_ = STANDARD_RIGHTS_EXECUTE;
-const DWORD_ STANDARD_RIGHTS_READ_ = STANDARD_RIGHTS_READ;
-const DWORD_ STANDARD_RIGHTS_REQUIRED_ = STANDARD_RIGHTS_REQUIRED;
-const DWORD_ STANDARD_RIGHTS_WRITE_ = STANDARD_RIGHTS_WRITE;
+BOOST_CONSTEXPR_OR_CONST DWORD_ STANDARD_RIGHTS_ALL_ = STANDARD_RIGHTS_ALL;
+BOOST_CONSTEXPR_OR_CONST DWORD_ STANDARD_RIGHTS_EXECUTE_ = STANDARD_RIGHTS_EXECUTE;
+BOOST_CONSTEXPR_OR_CONST DWORD_ STANDARD_RIGHTS_READ_ = STANDARD_RIGHTS_READ;
+BOOST_CONSTEXPR_OR_CONST DWORD_ STANDARD_RIGHTS_REQUIRED_ = STANDARD_RIGHTS_REQUIRED;
+BOOST_CONSTEXPR_OR_CONST DWORD_ STANDARD_RIGHTS_WRITE_ = STANDARD_RIGHTS_WRITE;
 
-const DWORD_ SPECIFIC_RIGHTS_ALL_ = SPECIFIC_RIGHTS_ALL;
+BOOST_CONSTEXPR_OR_CONST DWORD_ SPECIFIC_RIGHTS_ALL_ = SPECIFIC_RIGHTS_ALL;
 
-const DWORD_ ACCESS_SYSTEM_SECURITY_ = ACCESS_SYSTEM_SECURITY;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ACCESS_SYSTEM_SECURITY_ = ACCESS_SYSTEM_SECURITY;
 
-const DWORD_ MAXIMUM_ALLOWED_ = MAXIMUM_ALLOWED;
+BOOST_CONSTEXPR_OR_CONST DWORD_ MAXIMUM_ALLOWED_ = MAXIMUM_ALLOWED;
 
-const DWORD_ GENERIC_ALL_ = GENERIC_ALL;
-const DWORD_ GENERIC_EXECUTE_ = GENERIC_EXECUTE;
-const DWORD_ GENERIC_WRITE_ = GENERIC_WRITE;
-const DWORD_ GENERIC_READ_ = GENERIC_READ;
+BOOST_CONSTEXPR_OR_CONST DWORD_ GENERIC_ALL_ = GENERIC_ALL;
+BOOST_CONSTEXPR_OR_CONST DWORD_ GENERIC_EXECUTE_ = GENERIC_EXECUTE;
+BOOST_CONSTEXPR_OR_CONST DWORD_ GENERIC_WRITE_ = GENERIC_WRITE;
+BOOST_CONSTEXPR_OR_CONST DWORD_ GENERIC_READ_ = GENERIC_READ;
 
 typedef ::ACCESS_MASK ACCESS_MASK_;
 typedef ::PACCESS_MASK PACCESS_MASK_;
 
 #else // defined( BOOST_USE_WINDOWS_H )
 
-const DWORD_ DELETE_ = 0x00010000;
-const DWORD_ READ_CONTROL_ = 0x00020000;
-const DWORD_ WRITE_DAC_ = 0x00040000;
-const DWORD_ WRITE_OWNER_ = 0x00080000;
-const DWORD_ SYNCHRONIZE_ = 0x00100000;
+BOOST_CONSTEXPR_OR_CONST DWORD_ DELETE_ = 0x00010000;
+BOOST_CONSTEXPR_OR_CONST DWORD_ READ_CONTROL_ = 0x00020000;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WRITE_DAC_ = 0x00040000;
+BOOST_CONSTEXPR_OR_CONST DWORD_ WRITE_OWNER_ = 0x00080000;
+BOOST_CONSTEXPR_OR_CONST DWORD_ SYNCHRONIZE_ = 0x00100000;
 
-const DWORD_ STANDARD_RIGHTS_ALL_ = 0x001F0000;
-const DWORD_ STANDARD_RIGHTS_EXECUTE_ = READ_CONTROL_;
-const DWORD_ STANDARD_RIGHTS_READ_ = READ_CONTROL_;
-const DWORD_ STANDARD_RIGHTS_REQUIRED_ = 0x000F0000;
-const DWORD_ STANDARD_RIGHTS_WRITE_ = READ_CONTROL_;
+BOOST_CONSTEXPR_OR_CONST DWORD_ STANDARD_RIGHTS_ALL_ = 0x001F0000;
+BOOST_CONSTEXPR_OR_CONST DWORD_ STANDARD_RIGHTS_EXECUTE_ = READ_CONTROL_;
+BOOST_CONSTEXPR_OR_CONST DWORD_ STANDARD_RIGHTS_READ_ = READ_CONTROL_;
+BOOST_CONSTEXPR_OR_CONST DWORD_ STANDARD_RIGHTS_REQUIRED_ = 0x000F0000;
+BOOST_CONSTEXPR_OR_CONST DWORD_ STANDARD_RIGHTS_WRITE_ = READ_CONTROL_;
 
-const DWORD_ SPECIFIC_RIGHTS_ALL_ = 0x0000FFFF;
+BOOST_CONSTEXPR_OR_CONST DWORD_ SPECIFIC_RIGHTS_ALL_ = 0x0000FFFF;
 
-const DWORD_ ACCESS_SYSTEM_SECURITY_ = 0x01000000;
+BOOST_CONSTEXPR_OR_CONST DWORD_ ACCESS_SYSTEM_SECURITY_ = 0x01000000;
 
-const DWORD_ MAXIMUM_ALLOWED_ = 0x02000000;
+BOOST_CONSTEXPR_OR_CONST DWORD_ MAXIMUM_ALLOWED_ = 0x02000000;
 
-const DWORD_ GENERIC_ALL_ = 0x10000000;
-const DWORD_ GENERIC_EXECUTE_ = 0x20000000;
-const DWORD_ GENERIC_WRITE_ = 0x40000000;
-const DWORD_ GENERIC_READ_ = 0x80000000;
+BOOST_CONSTEXPR_OR_CONST DWORD_ GENERIC_ALL_ = 0x10000000;
+BOOST_CONSTEXPR_OR_CONST DWORD_ GENERIC_EXECUTE_ = 0x20000000;
+BOOST_CONSTEXPR_OR_CONST DWORD_ GENERIC_WRITE_ = 0x40000000;
+BOOST_CONSTEXPR_OR_CONST DWORD_ GENERIC_READ_ = 0x80000000;
 
 typedef DWORD_ ACCESS_MASK_;
 typedef ACCESS_MASK_* PACCESS_MASK_;
@@ -78,4 +79,6 @@ typedef ACCESS_MASK_* PACCESS_MASK_;
 }
 }
 
+#include <boost/winapi/detail/footer.hpp>
+
 #endif // BOOST_WINAPI_ACCESS_RIGHTS_HPP_INCLUDED_

Some files were not shown because too many files changed in this diff