]> sourceware.org Git - glibc.git/commitdiff
Update BAD_TYPECHECK to work on x86_64
authorFlavio Cruz <flaviocruz@gmail.com>
Mon, 6 Nov 2023 04:13:32 +0000 (23:13 -0500)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Mon, 6 Nov 2023 22:24:48 +0000 (23:24 +0100)
Message-ID: <ZUhn7LOcgLOJjKZr@jupiter.tail36e24.ts.net>

sysdeps/mach/mach_rpc.h

index 152f057ca7c2b7b3f649297c0721da582a7ad4bb..ed81403be626542beb4e41cf3c67bfeba43ba14e 100644 (file)
 
 /* Macro used by MIG to cleanly check the type.  */
 #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; }))
 
-/* TODO: add this assertion for x86_64.  */
-#ifndef __x86_64__
-_Static_assert (sizeof (uint32_t) == sizeof (mach_msg_type_t),
-                "mach_msg_type_t needs to be the same size as uint32_t");
-#endif
+_Static_assert (sizeof (uintptr_t) == sizeof (mach_msg_type_t),
+                "mach_msg_type_t needs to be the same size as uintptr_t");
This page took 0.045617 seconds and 5 git commands to generate.