Update hurd/intr-msg.c to be more portable
authorFlavio Cruz <flaviocruz@gmail.com>
Thu, 4 May 2023 04:08:12 +0000 (00:08 -0400)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Fri, 5 May 2023 00:24:38 +0000 (02:24 +0200)
commit4571fb8fe64644c79d91a8f76c148a05b7088ea8
tree64aba6c13a443bdbe62f8f1f3ea0ef57b93335d4
parent3f433cb895dee51dee57cb487bc33b1425fa7ef6
Update hurd/intr-msg.c to be more portable

Summary of the changes:
- Introduce BAD_TYPECHECK from MiG to make it simpler to do type
  checking.
- Replace int type with mach_msg_type_t. This assumes that
  mach_msg_type_t is always the same size as int which is not true for
  x86_64.
- Calculate the size and align using PTR_ALIGN_UP, which is a bit
  cleaner and similar to what we do elsewhere.
- Define mach_msg_type_t to check using designated initializers.
Message-Id: <ZFMvrIkvoCSxqB/C@jupiter.tail36e24.ts.net>
hurd/intr-msg.c