Update sysdeps/mach/hurd/ioctl.c to make it more portable
commit3f433cb895dee51dee57cb487bc33b1425fa7ef6
authorFlavio Cruz <flaviocruz@gmail.com>
Thu, 4 May 2023 04:06:46 +0000 (4 00:06 -0400)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Fri, 5 May 2023 00:22:31 +0000 (5 02:22 +0200)
tree4e572cfd37119954c676cf613c71fc7313aa9e4e
parent1a62d7e5c396aa755f10d283dc3a6bc0eb496be4
Update sysdeps/mach/hurd/ioctl.c to make it more portable

Summary of the changes:
- Update msg_align to use ALIGN_UP like we have done in previous
  patches. Use it below whenever necessary to avoid repeating the same
  alignment logic.
- Define BAD_TYPECHECK to make it easier to do type checking in a few
  places below.
- Update io2mach_type to use designated initializers.
- Make RetCodeType use mach_msg_type_t. mach_msg_type_t is 8 byte for
  x86_64, so this make it portable.
- Also call msg_align for _IOT_COUNT2/_IOT_TYPE2 since it is more
  correct.
Message-Id: <ZFMvVsuFKwIy2dUS@jupiter.tail36e24.ts.net>
sysdeps/mach/hurd/ioctl.c