This allows to use any compatible types with INTERLOCKED_* macros, not just
the ones strictly matching the particular implementation of the intrinsics.
In particular, this fixes compilation for Cygwin64, which is an LP64 target,
meaning that long is 64-bit and _Interlocked* intrinsics use a different
integer type for its 32-bit integer arguments.
Additionally, enable use of intrin.h on Cygwin (32-bit).
The test has been updated to explicitly use 32-bit integer arguments.
This new set of tests verify sizes and binary layouts of types, constant
values and signatures of some of the Windows functions.
Additionally, this commit changes how tests are run. On platforms other
than Windows and Cygwin, the tests are disabled from building instead of
making them a no-op. This allows to simplify the tests slightly and reduce
the code duplication.
Despite that the library now appears at the top level in the filesystem and
namespace, it is still not intended to be used by Boost users - the library
is purposed as an internal tool for Boost needs.
The old headers are still present and define the old namespace as an alias
to the new namespace. Thus backward compatibility is preserved. These headers
will be removed as soon as all dependent libraries are updated.
While at it, also made some nonessential cleanup in headers.