[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH hurd 6/12] hurd: Fix modes_t and speeds_t types on 64-bit
From: |
Samuel Thibault |
Subject: |
Re: [RFC PATCH hurd 6/12] hurd: Fix modes_t and speeds_t types on 64-bit |
Date: |
Sun, 12 Feb 2023 16:22:54 +0100 |
User-agent: |
NeoMutt/20170609 (1.8.3) |
Sergey Bugaev, le dim. 12 févr. 2023 18:15:57 +0300, a ecrit:
> On Sun, Feb 12, 2023 at 6:00 PM Samuel Thibault <samuel.thibault@gnu.org>
> wrote:
> > We don't need these to be 64bits, 32bit will be completely large enough.
> >
> > Which issue did you actually encounter?
>
> Well, these MIG definitions need to match the ones in C/glibc. In
> hurd/ioctl_types.h (in the Hurd tree) there is
>
> typedef tcflag_t modes_t[4];
> typedef speed_t speeds_t[2];
>
> and then in bits/termios.h (in the glibc tree)
>
> /* Type of terminal control flag masks. */
> typedef unsigned long int tcflag_t;
>
> /* Type of control characters. */
> typedef unsigned char cc_t;
>
> /* Type of baud rate specifiers. */
> typedef long int speed_t;
>
> which is why I changed the MIG ones to long. We could do it the other
> way around, make our own bits/termios.h and define them as fixed-size
> 32 bit ints.
I'd rather say drop the "long" part, to avoid having to pull the
stdint.h header in. Nowadays' BSD headers just use the int type,
notably.
Samuel
- Re: [RFC PATCH glibc 1/12] hurd: Refactor readlinkat(), (continued)
[RFC PATCH glibc 9/12] mach: Look for mach_i386.defs on x86_64 too, Sergey Bugaev, 2023/02/12
Re: [RFC PATCH glibc 9/12] mach: Look for mach_i386.defs on x86_64 too, Joseph Myers, 2023/02/16
[RFC PATCH glibc 4/12] hurd: Fix xattr error value, Sergey Bugaev, 2023/02/12