mirror of
git://sourceware.org/git/glibc.git
synced 2025-03-06 20:58:33 +01:00
Update BAD_TYPECHECK to work on x86_64
Message-ID: <ZUhn7LOcgLOJjKZr@jupiter.tail36e24.ts.net>
This commit is contained in:
parent
f957f47df7
commit
5dd3bda59c
1 changed files with 3 additions and 6 deletions
|
@ -20,11 +20,8 @@
|
||||||
|
|
||||||
/* Macro used by MIG to cleanly check the type. */
|
/* Macro used by MIG to cleanly check the type. */
|
||||||
#define BAD_TYPECHECK(type, check) __glibc_unlikely (({ \
|
#define BAD_TYPECHECK(type, check) __glibc_unlikely (({ \
|
||||||
union { mach_msg_type_t t; uint32_t w; } _t, _c; \
|
union { mach_msg_type_t t; uintptr_t w; } _t, _c; \
|
||||||
_t.t = *(type); _c.t = *(check);_t.w != _c.w; }))
|
_t.t = *(type); _c.t = *(check);_t.w != _c.w; }))
|
||||||
|
|
||||||
/* TODO: add this assertion for x86_64. */
|
_Static_assert (sizeof (uintptr_t) == sizeof (mach_msg_type_t),
|
||||||
#ifndef __x86_64__
|
"mach_msg_type_t needs to be the same size as uintptr_t");
|
||||||
_Static_assert (sizeof (uint32_t) == sizeof (mach_msg_type_t),
|
|
||||||
"mach_msg_type_t needs to be the same size as uint32_t");
|
|
||||||
#endif
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue