This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 4/5] Consolidate Linux fcntl implementation


On Mai 23 2017, Adhemerval Zanella <adhemerval.zanella@linaro.org> wrote:

> 	* sysdeps/unix/sysv/linux/arm/fcntl.c: Remove file.
> 	* sysdeps/unix/sysv/linux/generic/wordsize-32/fcntl.c: Likewise.
> 	* sysdeps/unix/sysv/linux/hppa/fcntl.c: Likewise.
> 	* sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.
> 	* sysdeps/unix/sysv/linux/m68k/fcntl.c: Likewise.
> 	* sysdeps/unix/sysv/linux/microblaze/fcntl.c: Likewise.
> 	* sysdeps/unix/sysv/linux/mips/mips32/fcntl.c: Likewise.
> 	* sysdeps/unix/sysv/linux/mips/mips64/n32/fcntl.c: Likewise.
> 	* sysdeps/unix/sysv/linux/powerpc/powerpc32/fcntl.c: Likewise.
> 	* sysdeps/unix/sysv/linux/s390/s390-32/fcntl.c: Likewise.
> 	* sysdeps/unix/sysv/linux/sh/fcntl.c: Likewise.
> 	* sysdeps/unix/sysv/linux/sparc/sparc32/fcntl.c: Likewise.
> 	* sysdeps/unix/sysv/linux/fcntl.c: New file.

That's not a new file.

> 	* sysdeps/unix/sysv/linux/powerpc/powerpc64/fcntl.c: Refactor to
> 	use default implementation.

> diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/fcntl.c b/sysdeps/unix/sysv/linux/powerpc/powerpc64/fcntl.c
> index 85ae8a2..d382d08 100644
> --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/fcntl.c
> +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/fcntl.c
> @@ -15,51 +15,18 @@
>     License along with the GNU C Library; if not, see
>     <http://www.gnu.org/licenses/>.  */
>  
> -#include <assert.h>
> -#include <errno.h>
> -#include <sysdep-cancel.h>	/* Must come before <fcntl.h>.  */
> +#include <unistd.h>
>  #include <fcntl.h>
> -#include <stdarg.h>
>  
> -#include <sys/syscall.h>
> -
> -
> -#ifndef NO_CANCELLATION
> -int
> -__fcntl_nocancel (int fd, int cmd, ...)
> +static inline int
> +__libc_fcntl_adjust_cmd (int cmd)

No need for __libc prefix, since this is static.

Ok with those changes.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]