[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] hurd_types.defs: redefine io_statbuf_t, timespec_t and fsys_
From: |
Samuel Thibault |
Subject: |
Re: [PATCH] hurd_types.defs: redefine io_statbuf_t, timespec_t and fsys_statfsbuf_t as true structs |
Date: |
Sun, 13 Nov 2022 00:42:55 +0100 |
User-agent: |
NeoMutt/20170609 (1.8.3) |
Hello,
Flavio Cruz, le sam. 12 nov. 2022 02:19:45 -0500, a ecrit:
> diff --git a/hurd/hurd_types.defs b/hurd/hurd_types.defs
> index 95399289..84e1c0ff 100644
> --- a/hurd/hurd_types.defs
> +++ b/hurd/hurd_types.defs
> -type timespec_t = struct[2] of int;
> +#if defined(__x86_64__)
> +type time_t = uint64_t;
> +type long = uint64_t;
> +#else
> +type time_t = uint32_t;
> +type long = uint32_t;
> +#endif /* defined(__x86_64__) */
Mmm, time_t is actually defined to slongword, i.e. int32_t or int64_t.
It's also very odd to make long an unsigned type.
> +type fsid_t = uint32_t;
? isn't it 64bit?
> +type blksize_t = uint32_t;
? isn't blksize_t a long?
> +// Dummy structure just to add padding to io_statbuf_t.
> +type io_statbuf_spare_int = struct[9] of int;
According to mach/hurd/bits/stat.h, it depends whether it's 32 or 64
bits.
> +// Needs to be kept in sync with bits/stat.h.
Rather explicit glibc/mach/hurd/bits/stat.h, and similarly for statfs.
> +type fsblkcnt64_t = uint64_t;
> +type fsfilcnt64_t = uint64_t;
> +type fsid_t = uint64_t;
This is a redefinition? mig doesn't complain?
Samuel