Re: [PATCH] no wrappers
From: Yury Norov
Date: Tue Jun 21 2016 - 02:05:38 EST
This patch is out of series. I sent it erroneously. Please ignore it.
On Tue, Jun 21, 2016 at 08:06:45AM +0300, Yury Norov wrote:
> Signed-off-by: Yury Norov <yury.norov@xxxxxxxxx>
> ---
> sysdeps/unix/sysv/linux/aarch64/ilp32/fallocate.c | 31 ++++++++++++++++++++++
> .../unix/sysv/linux/aarch64/ilp32/fallocate64.c | 1 +
> sysdeps/unix/sysv/linux/aarch64/ilp32/ftruncate.c | 1 +
> .../unix/sysv/linux/aarch64/ilp32/ftruncate64.c | 4 +++
> sysdeps/unix/sysv/linux/aarch64/ilp32/llseek.c | 22 +--------------
> sysdeps/unix/sysv/linux/aarch64/ilp32/lseek.c | 7 +++--
> sysdeps/unix/sysv/linux/aarch64/ilp32/mmap.c | 2 +-
> .../unix/sysv/linux/aarch64/ilp32/posix_fadvise.c | 1 +
> .../sysv/linux/aarch64/ilp32/posix_fadvise64.c | 2 ++
> sysdeps/unix/sysv/linux/aarch64/ilp32/pread.c | 6 +----
> sysdeps/unix/sysv/linux/aarch64/ilp32/pread64.c | 6 ++++-
> sysdeps/unix/sysv/linux/aarch64/ilp32/pwrite.c | 6 +----
> sysdeps/unix/sysv/linux/aarch64/ilp32/pwrite64.c | 6 ++++-
> sysdeps/unix/sysv/linux/aarch64/ilp32/readahead.c | 1 +
> sysdeps/unix/sysv/linux/aarch64/ilp32/truncate.c | 1 +
> sysdeps/unix/sysv/linux/aarch64/ilp32/truncate64.c | 4 +++
> 16 files changed, 65 insertions(+), 36 deletions(-)
> create mode 100644 sysdeps/unix/sysv/linux/aarch64/ilp32/fallocate.c
> create mode 100644 sysdeps/unix/sysv/linux/aarch64/ilp32/fallocate64.c
> create mode 100644 sysdeps/unix/sysv/linux/aarch64/ilp32/ftruncate.c
> create mode 100644 sysdeps/unix/sysv/linux/aarch64/ilp32/ftruncate64.c
> create mode 100644 sysdeps/unix/sysv/linux/aarch64/ilp32/posix_fadvise.c
> create mode 100644 sysdeps/unix/sysv/linux/aarch64/ilp32/posix_fadvise64.c
> create mode 100644 sysdeps/unix/sysv/linux/aarch64/ilp32/readahead.c
> create mode 100644 sysdeps/unix/sysv/linux/aarch64/ilp32/truncate.c
> create mode 100644 sysdeps/unix/sysv/linux/aarch64/ilp32/truncate64.c
>
> diff --git a/sysdeps/unix/sysv/linux/aarch64/ilp32/fallocate.c b/sysdeps/unix/sysv/linux/aarch64/ilp32/fallocate.c
> new file mode 100644
> index 0000000..4951d06
> --- /dev/null
> +++ b/sysdeps/unix/sysv/linux/aarch64/ilp32/fallocate.c
> @@ -0,0 +1,31 @@
> +/* Copyright (C) 2007-2016 Free Software Foundation, Inc.
> + This file is part of the GNU C Library.
> +
> + The GNU C Library is free software; you can redistribute it and/or
> + modify it under the terms of the GNU Lesser General Public
> + License as published by the Free Software Foundation; either
> + version 2.1 of the License, or (at your option) any later version.
> +
> + The GNU C Library is distributed in the hope that it will be useful,
> + but WITHOUT ANY WARRANTY; without even the implied warranty of
> + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> + Lesser General Public License for more details.
> +
> + You should have received a copy of the GNU Lesser General Public
> + License along with the GNU C Library; if not, see
> + <http://www.gnu.org/licenses/>. */
> +
> +#include <errno.h>
> +#include <fcntl.h>
> +#include <sysdep-cancel.h>
> +
> +
> +/* Reserve storage for the data of the file associated with FD. */
> +int
> +fallocate (int fd, int mode, __off_t offset, __off_t len)
> +{
> + return SYSCALL_CANCEL (fallocate, fd, mode,
> + __LONG_LONG_PAIR (offset >> 32, offset),
> + __LONG_LONG_PAIR (len >> 32, len));
> +}
> +weak_alias (fallocate, fallocate64)
> diff --git a/sysdeps/unix/sysv/linux/aarch64/ilp32/fallocate64.c b/sysdeps/unix/sysv/linux/aarch64/ilp32/fallocate64.c
> new file mode 100644
> index 0000000..f27735a
> --- /dev/null
> +++ b/sysdeps/unix/sysv/linux/aarch64/ilp32/fallocate64.c
> @@ -0,0 +1 @@
> +/* See sysdeps/unix/sysv/linux/aarch64/ilp32/fallocate.c */
> diff --git a/sysdeps/unix/sysv/linux/aarch64/ilp32/ftruncate.c b/sysdeps/unix/sysv/linux/aarch64/ilp32/ftruncate.c
> new file mode 100644
> index 0000000..fb5b598
> --- /dev/null
> +++ b/sysdeps/unix/sysv/linux/aarch64/ilp32/ftruncate.c
> @@ -0,0 +1 @@
> +/* See sysdeps/unix/sysv/linux/aarch64/ilp32/ftruncatei64.c */
> diff --git a/sysdeps/unix/sysv/linux/aarch64/ilp32/ftruncate64.c b/sysdeps/unix/sysv/linux/aarch64/ilp32/ftruncate64.c
> new file mode 100644
> index 0000000..bd0f5fe
> --- /dev/null
> +++ b/sysdeps/unix/sysv/linux/aarch64/ilp32/ftruncate64.c
> @@ -0,0 +1,4 @@
> +#include <sysdeps/unix/sysv/linux/arm/ftruncate64.c>
> +
> +weak_alias (__ftruncate64, __ftruncate)
> +weak_alias (__ftruncate64, ftruncate)
> diff --git a/sysdeps/unix/sysv/linux/aarch64/ilp32/llseek.c b/sysdeps/unix/sysv/linux/aarch64/ilp32/llseek.c
> index f1a3207..b00ca27 100644
> --- a/sysdeps/unix/sysv/linux/aarch64/ilp32/llseek.c
> +++ b/sysdeps/unix/sysv/linux/aarch64/ilp32/llseek.c
> @@ -1,21 +1 @@
> -#include <errno.h>
> -#include <unistd.h>
> -#include <sys/types.h>
> -
> -#include <sysdep.h>
> -#include <sys/syscall.h>
> -
> -#include "overflow.h"
> -
> -extern loff_t __llseek (int fd, loff_t offset, int whence);
> -
> -loff_t
> -__llseek (int fd, loff_t offset, int whence)
> -{
> - return INLINE_SYSCALL (_llseek, 3, fd, offset, whence);
> -}
> -weak_alias (__llseek, llseek)
> -strong_alias (__llseek, __libc_lseek64)
> -strong_alias (__llseek, __lseek64)
> -weak_alias (__llseek, lseek64)
> -
> +#include <sysdeps/unix/sysv/linux/generic/wordsize-32/llseek.c>
> diff --git a/sysdeps/unix/sysv/linux/aarch64/ilp32/lseek.c b/sysdeps/unix/sysv/linux/aarch64/ilp32/lseek.c
> index 85d8416..9f7792f 100644
> --- a/sysdeps/unix/sysv/linux/aarch64/ilp32/lseek.c
> +++ b/sysdeps/unix/sysv/linux/aarch64/ilp32/lseek.c
> @@ -1,4 +1,4 @@
> -/* Copyright (C) 2011-2015 Free Software Foundation, Inc.
> +/* Copyright (C) 2011-2016 Free Software Foundation, Inc.
> This file is part of the GNU C Library.
> Contributed by Chris Metcalf <cmetcalf@xxxxxxxxxx>, 2011.
>
> @@ -28,7 +28,10 @@
> off_t
> __lseek (int fd, off_t offset, int whence)
> {
> - return INLINE_SYSCALL (_llseek, 3, fd, offset, whence);
> + loff_t res;
> + int rc = INLINE_SYSCALL (_llseek, 5, fd, (off_t) (offset >> 32),
> + (off_t) offset, &res, whence);
> + return rc ?: lseek_overflow (res);
> }
> libc_hidden_def (__lseek)
> weak_alias (__lseek, lseek)
> diff --git a/sysdeps/unix/sysv/linux/aarch64/ilp32/mmap.c b/sysdeps/unix/sysv/linux/aarch64/ilp32/mmap.c
> index f30b1da..813ab64 100644
> --- a/sysdeps/unix/sysv/linux/aarch64/ilp32/mmap.c
> +++ b/sysdeps/unix/sysv/linux/aarch64/ilp32/mmap.c
> @@ -1 +1 @@
> -#include <sysdeps/unix/sysv/linux/generic/wordsize-32/mmap.c>
> +#include <sysdeps/unix/sysv/linux/arm/mmap.c>
> diff --git a/sysdeps/unix/sysv/linux/aarch64/ilp32/posix_fadvise.c b/sysdeps/unix/sysv/linux/aarch64/ilp32/posix_fadvise.c
> new file mode 100644
> index 0000000..4430e6e
> --- /dev/null
> +++ b/sysdeps/unix/sysv/linux/aarch64/ilp32/posix_fadvise.c
> @@ -0,0 +1 @@
> +#include <sysdeps/unix/sysv/linux/arm/posix_fadvise.c>
> diff --git a/sysdeps/unix/sysv/linux/aarch64/ilp32/posix_fadvise64.c b/sysdeps/unix/sysv/linux/aarch64/ilp32/posix_fadvise64.c
> new file mode 100644
> index 0000000..596c6a1
> --- /dev/null
> +++ b/sysdeps/unix/sysv/linux/aarch64/ilp32/posix_fadvise64.c
> @@ -0,0 +1,2 @@
> +#define __NR_arm_fadvise64_64 __NR_fadvise64_64
> +#include <sysdeps/unix/sysv/linux/arm/posix_fadvise64.c>
> diff --git a/sysdeps/unix/sysv/linux/aarch64/ilp32/pread.c b/sysdeps/unix/sysv/linux/aarch64/ilp32/pread.c
> index 0b68e29..96b7ccb 100644
> --- a/sysdeps/unix/sysv/linux/aarch64/ilp32/pread.c
> +++ b/sysdeps/unix/sysv/linux/aarch64/ilp32/pread.c
> @@ -1,5 +1 @@
> -#include <sysdeps/unix/sysv/linux/generic/wordsize-32/pread.c>
> -
> -weak_alias (__libc_pread, __pread64)
> -weak_alias (__libc_pread, __libc_pread64)
> -weak_alias (__libc_pread, pread64)
> +/* See sysdeps/unix/sysv/linux/aarch64/ilp32/pread64.c */
> diff --git a/sysdeps/unix/sysv/linux/aarch64/ilp32/pread64.c b/sysdeps/unix/sysv/linux/aarch64/ilp32/pread64.c
> index e19d5ad..7637028 100644
> --- a/sysdeps/unix/sysv/linux/aarch64/ilp32/pread64.c
> +++ b/sysdeps/unix/sysv/linux/aarch64/ilp32/pread64.c
> @@ -1 +1,5 @@
> -/* Declared in pread.c */
> +#include <sysdeps/unix/sysv/linux/arm/pread64.c>
> +
> +strong_alias (__libc_pread64, __libc_pread)
> +strong_alias (__libc_pread64, __pread)
> +weak_alias (__libc_pread64, pread)
> diff --git a/sysdeps/unix/sysv/linux/aarch64/ilp32/pwrite.c b/sysdeps/unix/sysv/linux/aarch64/ilp32/pwrite.c
> index 2bae52a..ddadc61 100644
> --- a/sysdeps/unix/sysv/linux/aarch64/ilp32/pwrite.c
> +++ b/sysdeps/unix/sysv/linux/aarch64/ilp32/pwrite.c
> @@ -1,5 +1 @@
> -#include <sysdeps/unix/sysv/linux/generic/wordsize-32/pwrite.c>
> -
> -weak_alias (__libc_pwrite, __pwrite64)
> -weak_alias (__libc_pwrite, __libc_pwrite64)
> -weak_alias (__libc_pwrite, pwrite64)
> +/* See sysdeps/unix/sysv/linux/aarch64/ilp32/pwrite64.c */
> diff --git a/sysdeps/unix/sysv/linux/aarch64/ilp32/pwrite64.c b/sysdeps/unix/sysv/linux/aarch64/ilp32/pwrite64.c
> index 5e65018..2089a05 100644
> --- a/sysdeps/unix/sysv/linux/aarch64/ilp32/pwrite64.c
> +++ b/sysdeps/unix/sysv/linux/aarch64/ilp32/pwrite64.c
> @@ -1 +1,5 @@
> -/* Defined in pwrite.c */
> +#include <sysdeps/unix/sysv/linux/arm/pwrite64.c>
> +
> +weak_alias (__libc_pwrite64, __libc_pwrite)
> +weak_alias (__libc_pwrite64, __pwrite)
> +weak_alias (__libc_pwrite64, pwrite)
> diff --git a/sysdeps/unix/sysv/linux/aarch64/ilp32/readahead.c b/sysdeps/unix/sysv/linux/aarch64/ilp32/readahead.c
> new file mode 100644
> index 0000000..80170c3
> --- /dev/null
> +++ b/sysdeps/unix/sysv/linux/aarch64/ilp32/readahead.c
> @@ -0,0 +1 @@
> +#include <sysdeps/unix/sysv/linux/arm/readahead.c>
> diff --git a/sysdeps/unix/sysv/linux/aarch64/ilp32/truncate.c b/sysdeps/unix/sysv/linux/aarch64/ilp32/truncate.c
> new file mode 100644
> index 0000000..23548a5
> --- /dev/null
> +++ b/sysdeps/unix/sysv/linux/aarch64/ilp32/truncate.c
> @@ -0,0 +1 @@
> +/* See sysdeps/unix/sysv/linux/aarch64/ilp32/truncate64.c */
> diff --git a/sysdeps/unix/sysv/linux/aarch64/ilp32/truncate64.c b/sysdeps/unix/sysv/linux/aarch64/ilp32/truncate64.c
> new file mode 100644
> index 0000000..56cb37f
> --- /dev/null
> +++ b/sysdeps/unix/sysv/linux/aarch64/ilp32/truncate64.c
> @@ -0,0 +1,4 @@
> +#include <sysdeps/unix/sysv/linux/arm/truncate64.c>
> +
> +weak_alias (truncate64, __truncate)
> +weak_alias (truncate64, truncate)
> --
> 2.7.4