mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-16 10:00:12 +00:00
827b823783
This patch adds internal alias for __pread, __pread64, and __pwrite
following the already in place one for __pwrite64. This is not used
in any implementation but on microblaze on preadv/pwritev fallback
(since it does not define __ASSUME_PREADV).
In fact it was signaled by commit c35db50ff5
which update the expected
localptl.data for the architecture based on resulted value. This patch
updates the plt for microblaze now that p{read,write}{64} are correctly
routed to use internal alias.
Checked on x86_64-linux-gnu and a build for all supported architectures
(no all variants although).
* include/unistd.h (__pread): Add libc_hidden_proto.
(__pread64): Likewise.
(__pwrite): Likewise.
* sysdeps/unix/sysv/linux/microblaze/localplt.data [libc.so]
(__pread64): Remove.
* sysdeps/unix/sysv/linux/pread.c (__pread64): Add libc_hidden_weak.
* sysdeps/unix/sysv/linux/pread64.c (__pread64): Likewise.
* sysdeps/unix/sysv/linux/pwrite.c (__pwrite): Likewise.
38 lines
1.2 KiB
C
38 lines
1.2 KiB
C
/* Copyright (C) 1997-2017 Free Software Foundation, Inc.
|
|
This file is part of the GNU C Library.
|
|
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
|
|
|
|
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 <unistd.h>
|
|
#include <sysdep-cancel.h>
|
|
|
|
#ifndef __OFF_T_MATCHES_OFF64_T
|
|
|
|
# ifndef __NR_pwrite
|
|
# define __NR_pwrite __NR_pwrite64
|
|
# endif
|
|
|
|
ssize_t
|
|
__libc_pwrite (int fd, const void *buf, size_t count, off_t offset)
|
|
{
|
|
return SYSCALL_CANCEL (pwrite, fd, buf, count, SYSCALL_LL_PRW (offset));
|
|
}
|
|
|
|
strong_alias (__libc_pwrite, __pwrite)
|
|
libc_hidden_weak (__pwrite)
|
|
weak_alias (__libc_pwrite, pwrite)
|
|
#endif
|