[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH glibc] Update hurd/hurdselect.c to be more portable.
From: |
Samuel Thibault |
Subject: |
Re: [PATCH glibc] Update hurd/hurdselect.c to be more portable. |
Date: |
Sat, 6 May 2023 21:47:24 +0200 |
User-agent: |
NeoMutt/20170609 (1.8.3) |
Flavio Cruz, le ven. 05 mai 2023 00:20:39 -0400, a ecrit:
> + /* 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
Now that it is static, rather move it to
> +++ b/sysdeps/mach/mach_rpc.h
> +
> +/* 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; \
> + _t.t = *(type); _c.t = *(check);_t.w != _c.w; }))
so it is tied to what it matters for?