public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH glibc] Update BAD_TYPECHECK to work on x86_64
@ 2023-11-06  4:13 Flavio Cruz
  2023-11-06 22:30 ` Samuel Thibault
  0 siblings, 1 reply; 2+ messages in thread
From: Flavio Cruz @ 2023-11-06  4:13 UTC (permalink / raw)
  To: bug-hurd, libc-alpha

---
 sysdeps/mach/mach_rpc.h | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/sysdeps/mach/mach_rpc.h b/sysdeps/mach/mach_rpc.h
index 152f057ca7..ed81403be6 100644
--- a/sysdeps/mach/mach_rpc.h
+++ b/sysdeps/mach/mach_rpc.h
@@ -20,11 +20,8 @@
 
 /* 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");
-- 
2.39.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-11-06 22:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-06  4:13 [PATCH glibc] Update BAD_TYPECHECK to work on x86_64 Flavio Cruz
2023-11-06 22:30 ` Samuel Thibault

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).