[OpenRISC] [PATCH v3 00/13] Glibc OpenRISC port

Stafford Horne
2021-12-23T21:26:50Z

On Thu, Dec 23, 2021 at 04:57:56PM +0100, Andreas Schwab wrote:
> On Dez 24 2021, Stafford Horne via Libc-alpha wrote:
>
> > It seems the write to the tmp file was failing due the re-open not passing
> > O_LARGEFILE.
>
> open64 implies O_LARGEFILE, so if that is making a difference, then your
> open64 is broken.

Right, that is what the docs say. This architecuture is 32-bits.

And the open64 path is generic.

Possibly this bit removing O_LARGEFILE is wrong?

In sysdeps/unix/sysv/linux/open64.c:

27 #ifdef __OFF_T_MATCHES_OFF64_T
28 # define EXTRA_OPEN_FLAGS 0
29 #else
30 # define EXTRA_OPEN_FLAGS O_LARGEFILE
31 #endif

Otherwise there is something is wrong on linux. It is explicitly checking
for the precense of O_LARGEFILE.

in fs/read_write.c in generic_write_check_limits:

if (!(file->f_flags & O_LARGEFILE))
max_size = MAX_NON_LFS;

> --
> Andreas Schwab, schwab at linux-m68k.org
> GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
> "And now for something completely different."