[libcxx-commits] [PATCH] D59607: libc++/win: Make once_flag have the same size as a pointer
Nico Weber via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Mar 20 11:31:37 PDT 2019
thakis created this revision.
thakis added a reviewer: EricWF.
Herald added subscribers: jfb, christof.
`unsigned long` is 32-bit on 32-bit systems and 64-bit on 64-bit systems
on LP64 systems -- which most Unix systems are, but Windows isn't.
Windows is LLP64, which means unsigned long is 32-bit even on 64-bit
systems.
pplwin.h contains
static_assert(alignof(void *) == alignof(::std::once_flag), ...)
which fails due to this problem.
Instead of unsigned long, use uintptr_t, which consistently is 32-bit
on 32-bit systems and 64-bit on 64-bit systems.
No functional change except on 64-bit Windows.
https://reviews.llvm.org/D59607
Files:
libcxx/include/mutex
libcxx/src/mutex.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59607.191545.patch
Type: text/x-patch
Size: 3449 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20190320/64c5dc5f/attachment.bin>
More information about the libcxx-commits
mailing list