Message ID | 20230531113749.22479-1-adhemerval.zanella@linaro.org |
---|---|
State | New |
Headers | show |
Series | [v2] io: Fix F_GETLK64, F_SETLK64, and F_SETLKW64 for powerpc64 | expand |
On Mai 31 2023, Adhemerval Zanella via Libc-alpha wrote: > diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h b/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h > index 0905cd833c..33fe09f218 100644 > --- a/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h > +++ b/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h > @@ -33,6 +33,16 @@ > # define __O_LARGEFILE 0200000 > #endif > > +#if __WORDSIZE == 64 > +# define F_GETLK 5 > +# define F_SETLK 6 > +# define F_SETLKW 7 > + > +# define F_GETLK64 12 > +# define F_SETLK64 13 > +# define F_SETLKW64 14 Do you actually need the latter three? They are the same as the generic definitions. I think the subject is wrong, it's actually the F_GETLK/F_SETLK/F_SETLKW constants that are wrong.
On 31/05/23 08:57, Andreas Schwab wrote: > On Mai 31 2023, Adhemerval Zanella via Libc-alpha wrote: > >> diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h b/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h >> index 0905cd833c..33fe09f218 100644 >> --- a/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h >> +++ b/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h >> @@ -33,6 +33,16 @@ >> # define __O_LARGEFILE 0200000 >> #endif >> >> +#if __WORDSIZE == 64 >> +# define F_GETLK 5 >> +# define F_SETLK 6 >> +# define F_SETLKW 7 >> + >> +# define F_GETLK64 12 >> +# define F_SETLK64 13 >> +# define F_SETLKW64 14 > > Do you actually need the latter three? They are the same as the generic > definitions. Indeed we do not need it, I will remove it. I think the subject is wrong, it's actually the > F_GETLK/F_SETLK/F_SETLKW constants that are wrong. > Hum, I used the largefile name because the generic code will use it to define the F_GETLK/F_SETLK/F_SETLKW.
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h b/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h index 0905cd833c..33fe09f218 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h @@ -33,6 +33,16 @@ # define __O_LARGEFILE 0200000 #endif +#if __WORDSIZE == 64 +# define F_GETLK 5 +# define F_SETLK 6 +# define F_SETLKW 7 + +# define F_GETLK64 12 +# define F_SETLK64 13 +# define F_SETLKW64 14 +#endif + struct flock { short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */