This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC v1 07/16] RISC-V: Use 64-bit time_t and off_t for RV32 and RV64
On Sun, Jun 23, 2019 at 12:18 PM Arnd Bergmann <arnd@arndb.de> wrote:
>
> On Sat, Jun 22, 2019 at 6:47 AM Alistair Francis
> <alistair.francis@wdc.com> wrote:
>
> > +#define __SSIZE_T_TYPE __SWORD_TYPE
> > +#define __SYSCALL_SLONG_TYPE __SQUAD_TYPE
> > +#define __SYSCALL_ULONG_TYPE __UQUAD_TYPE
>
> Fairly sure you want __SYSCALL_SLONG_TYPE to be __SWORD_TYPE
> not __SQUAD_TYPE here. Only x86/x32 is special here.
I get some strange compiler errors if I do that, it looks like the
offset into some structures don't line up (I don't have the log handy
unfortunately).
>
> > +#define __CPU_MASK_TYPE __UQUAD_TYPE
> > +
> > +/* Tell the libc code that off_t and off64_t are actually the same type
> > + for all ABI purposes, even if possibly expressed as different base types
> > + for C type-checking purposes. */
> > +# define __OFF_T_MATCHES_OFF64_T 1
> > +
> > +#ifdef __LP64__
> > +/* Same for ino_t and ino64_t. */
> > +# define __INO_T_MATCHES_INO64_T 1
> > +
> > +/* And for rlim_t and rlim64_t. */
> > +# define __RLIM_T_MATCHES_RLIM64_T 1
> > +#else
> > +# define __RLIM_T_MATCHES_RLIM64_T 0
> > +#endif
>
> However, rlim_t, ino_t and off_t are all 64-bit and match their *64_t
> counterparts, so drop the #ifdef here.
Fixed.
Alistair
>
> Arnd