glibc/sysdeps/unix/sysv/linux
Adhemerval Zanella fdb7d390dd libio: fmemopen rewrite to POSIX compliance
This patch added a new fmemopen version, for glibc 2.22, that aims to be
POSIX complaint.  It fixes some long-stading glibc fmemopen issues, such
as:

* it changes the way fseek with SEEK_END works on fmemopen to seek
  relative to buffer size instead of first '\0'.  This is default mode and
  'b' opening mode does not change internal behavior (bz#6544).

* fix apending opening mode to use as start position either first null
  byte of len specified in function call (bz#13152 and #13151).

* remove binary option 'b' and internal different handling (bz#12836)

* fix seek/SEE_END with negative values (bz#14292).

A compatibility symbol is provided to with old behavior for older symbols
version (2.2.5).

	* include/stdio.h (fmemopen): Remove hidden prototype.
	(__fmemopen): Add new hidden prototype.
	* libio/Makefile: Add oldfmemopen object.
	* libio/Versions [GLIBC_2.22]: Add new fmemopen symbol.
	* libio/fmemopen.c (__fmemopen): Function rewrite to be POSIX
	compliance.
	* libio/oldfmemopen.c: New file: old fmemopen implementation for
	symbol compatibility.
	* stdio-common/Makefile [tests]: Add new tst-fmemopen3.
	* stdio-common/psiginfo.c [psiginfo]: Call __fmemopen instead of
	fmemopen.
	* stdio-common/tst-fmemopen3.c: New file: more fmemopen tests, focus
	on append and read mode.
	* sysdeps/unix/sysv/linux/aarch64/libc.abilist [GLIBC_2.22]: Add
	fmemopen.
	* sysdeps/unix/sysv/linux/alpha/libc.abilist [GLIBC_2.22]: Likewise.
	* sysdeps/unix/sysv/linux/arm/libc.abilist [GLIBC_2.22]: Likewise.
	* sysdeps/unix/sysv/linux/i386/libc.abilist [GLIBC_2.22]: Likewise.
	* sysdeps/unix/sysv/linux/ia64/libc.abilist [GLIBC_2.22]:
	Likewise.
	* sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
	[GLIBC_2.22]: Likewise.
	* sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist [GLIBC_2.22]:
	Likewise.
	* sysdeps/unix/sysv/linux/microblaze/libc.abilist [GLIBC_2.22]:
	Likewise.
	* sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
	[GLIBC_2.22]: Likewise.
	* sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
	[GLIBC_2.22]: Likewise.
	* sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
	[GLIBC_2.22]: Likewise.
	* sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
	[GLIBC_2.22]: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
	[GLIBC_2.22]: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
	[GLIBC_2.22]: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/libc.abilist
	[GLIBC_2.22]: Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist [GLIBC_2.22]:
	Likewise.
	* sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist [GLIBC_2.22]:
	Likewise.
	* sysdeps/unix/sysv/linux/sh/libc.abilist [GLIBC_2.22]: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
	[GLIBC_2.22]: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
	[GLIBC_2.22]: Likewise.
	* sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libc.abilist
	[GLIBC_2.22]: Likewise.
	* sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libc.abilist
	[GLIBC_2.22]: Likewise.
	* sysdeps/unix/sysv/linux/tile/tilepro/libc.abilist [GLIBC_2.22]:
	Likewise.
	* sysdeps/unix/sysv/linux/x86_64/64/libc.abilist [GLIBC_2.22]:
	Likewise.
	* sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist [GLIBC_2.22]:
	Likewise.
	* sysdeps/unix/sysv/linux/hppa/libc.abilist [GLIBC_2.22]: Likewise.
	* sysdeps/unix/sysv/linux/nios2/libc.abilist [GLIBC_2.22]: Likewise.
2015-07-08 12:07:21 -03:00
..
aarch64 libio: fmemopen rewrite to POSIX compliance 2015-07-08 12:07:21 -03:00
alpha libio: fmemopen rewrite to POSIX compliance 2015-07-08 12:07:21 -03:00
arm libio: fmemopen rewrite to POSIX compliance 2015-07-08 12:07:21 -03:00
bits Add missing Advanced API (RFC3542) (1) defines. 2015-07-08 10:58:23 -04:00
generic Fix mq_notify socket, recv namespace (bug 18546). 2015-06-17 20:20:08 +00:00
hppa libio: fmemopen rewrite to POSIX compliance 2015-07-08 12:07:21 -03:00
i386 libio: fmemopen rewrite to POSIX compliance 2015-07-08 12:07:21 -03:00
ia64 libio: fmemopen rewrite to POSIX compliance 2015-07-08 12:07:21 -03:00
include/sys
m68k libio: fmemopen rewrite to POSIX compliance 2015-07-08 12:07:21 -03:00
microblaze libio: fmemopen rewrite to POSIX compliance 2015-07-08 12:07:21 -03:00
mips libio: fmemopen rewrite to POSIX compliance 2015-07-08 12:07:21 -03:00
net
netash
netatalk
netax25
neteconet
netinet
netipx
netiucv
netpacket
netrom
netrose
nfs
nios2 libio: fmemopen rewrite to POSIX compliance 2015-07-08 12:07:21 -03:00
powerpc libio: fmemopen rewrite to POSIX compliance 2015-07-08 12:07:21 -03:00
s390 libio: fmemopen rewrite to POSIX compliance 2015-07-08 12:07:21 -03:00
scsi
sh libio: fmemopen rewrite to POSIX compliance 2015-07-08 12:07:21 -03:00
sparc libio: fmemopen rewrite to POSIX compliance 2015-07-08 12:07:21 -03:00
sys Update headers for Linux 4.0, 4.1 definitions. 2015-06-29 14:38:46 +00:00
tile libio: fmemopen rewrite to POSIX compliance 2015-07-08 12:07:21 -03:00
wordsize-64 Fix pathconf statvfs namespace (bug 18507). 2015-06-09 19:52:01 +00:00
x86 x86: Remove vsyscall usage 2015-06-09 18:10:19 -03:00
x86_64 libio: fmemopen rewrite to POSIX compliance 2015-07-08 12:07:21 -03:00
_exit.c
_G_config.h
a.out.h
accept4.c nptl: Rewrite cancellation macros 2015-06-04 18:58:36 -03:00
accept.c Remove socket.S implementation 2015-05-22 17:38:06 -03:00
adjtime.c
aio_misc.h
aio_sigqueue.c
arch-fork.h
bind.c Remove socket.S implementation 2015-05-22 17:38:06 -03:00
check_native.c
check_pf.c
check-cpuset.h
clock_getcpuclockid.c
clock_getres.c Consolidate vDSO macros and usage 2015-05-26 10:10:36 -03:00
clock_gettime.c Consolidate vDSO macros and usage 2015-05-26 10:10:36 -03:00
clock_nanosleep.c
clock_settime.c
clock.c
cmsg_nxthdr.c
configure
configure.ac
connect.c Remove socket.S implementation 2015-05-22 17:38:06 -03:00
createthread.c
default-sched.h
device-nrs.h
dl-brk.c
dl-execstack.c
dl-fxstatat64.c
dl-getcwd.c
dl-librecon.h
dl-openat64.c linux: open and openat ignore 'mode' with O_TMPFILE in flags 2015-02-24 13:19:22 +05:30
dl-opendir.c
dl-origin.c
dl-osinfo.h
dl-sbrk.c
dl-sysdep.c
dl-sysdep.h
dl-vdso.c
dl-vdso.h
dl-writev.h
epoll_pwait.c nptl: Rewrite cancellation macros 2015-06-04 18:58:36 -03:00
errqueue.h
eventfd_read.c
eventfd_write.c
eventfd.c
exit-thread.h
faccessat.c
fallocate64.c nptl: Rewrite cancellation macros 2015-06-04 18:58:36 -03:00
fallocate.c nptl: Rewrite cancellation macros 2015-06-04 18:58:36 -03:00
fatal-prepare.h
fchmodat.c
fcntl.c
fd_to_filename.h
fexecve.c
fips-private.h
fpathconf.c
fstatfs64.c
fstatvfs64.c
fstatvfs.c Fix pathconf statvfs namespace (bug 18507). 2015-06-09 19:52:01 +00:00
ftime.c
ftruncate64.c
futimens.c
futimes.c
futimesat.c
fxstat64.c
fxstat.c
fxstatat64.c
fxstatat.c
gai_sigqueue.c
getclktck.c
getcwd.c
getdents64.c
getdents.c
getdirentries64.c
getdirentries.c
getdtsz.c
gethostid.c
getipv4sourcefilter.c
getloadavg.c
getlogin_r.c Fix getlogin_r namespace (bug 18527). 2015-06-12 20:02:30 +00:00
getlogin.c
getpagesize.c
getpeername.c Remove socket.S implementation 2015-05-22 17:38:06 -03:00
getpid.c
getpriority.c Fix nice getpriority, setpriority namespace (bug 18553). 2015-06-17 20:22:39 +00:00
getpt.c
getrlimit64.c Fix posix_spawn getrlimit64 namespace (bug 17991). 2015-02-18 00:26:35 +00:00
getsockname.c Remove socket.S implementation 2015-05-22 17:38:06 -03:00
getsockopt.c Remove socket.S implementation 2015-05-22 17:38:06 -03:00
getsourcefilter.c
getsysstats.c
gettimeofday.c Consolidate gettimeofday across aarch64/s390/tile 2015-05-26 17:03:35 -03:00
grantpt.c
if_index.c
ifaddrs.c
ifreq.c
Implies
internal_statvfs64.c
internal_statvfs.c
ipc_priv.h
kernel_sigaction.h
kernel_stat.h
kernel_termios.h
kernel-features.h Remove socket.S implementation 2015-05-22 17:38:06 -03:00
kernel-posix-cpu-timers.h
kernel-posix-timers.h
ldd-rewrite.sed
lddlibc4.c
ldsodefs.h
libc_fatal.c
linux_fsinfo.h
listen.c Remove socket.S implementation 2015-05-22 17:38:06 -03:00
llseek.c
local-setxid.h
lowlevellock-futex.h
lseek64.c
lutimes.c
lxstat64.c
lxstat.c
makedev.c
Makefile Remove socket.S implementation 2015-05-22 17:38:06 -03:00
malloc-sysdep.h
mmap64.c
mq_close.c
mq_getattr.c
mq_notify.c Fix mq_notify socket, recv namespace (bug 18546). 2015-06-17 20:20:08 +00:00
mq_open.c
mq_receive.c Fix mq_receive, mq_send mq_timed* namespace (bug 18545). 2015-06-17 20:19:04 +00:00
mq_send.c Fix mq_receive, mq_send mq_timed* namespace (bug 18545). 2015-06-17 20:19:04 +00:00
mq_unlink.c
msgctl.c
msgget.c
msgrcv.c nptl: Rewrite cancellation macros 2015-06-04 18:58:36 -03:00
msgsnd.c nptl: Rewrite cancellation macros 2015-06-04 18:58:36 -03:00
netlinkaccess.h
nice.c
not-cancel.h Use inline syscalls for non-cancellable versions 2015-06-04 14:52:34 -03:00
nptl-signals.h
nscd_setup_thread.c
ntp_gettime.c
ntp_gettimex.c
open64.c nptl: Rewrite cancellation macros 2015-06-04 18:58:36 -03:00
openat64.c
openat.c nptl: Rewrite cancellation macros 2015-06-04 18:58:36 -03:00
opendir.c
opensock.c
pathconf.c Fix pathconf basename namespace (bug 18444). 2015-05-22 17:09:36 +00:00
pathconf.h
paths.h
posix_fadvise64.c
posix_fadvise.c
posix_fallocate64.c __ASSUME_FALLOCATE is always true on 32-bit architectures 2015-05-05 08:28:35 +02:00
posix_fallocate.c __ASSUME_FALLOCATE is always true on 32-bit architectures 2015-05-05 08:28:35 +02:00
posix_madvise.c
ppoll.c nptl: Rewrite cancellation macros 2015-06-04 18:58:36 -03:00
pread64.c nptl: Rewrite cancellation macros 2015-06-04 18:58:36 -03:00
pread.c nptl: Rewrite cancellation macros 2015-06-04 18:58:36 -03:00
preadv64.c
preadv.c nptl: Rewrite cancellation macros 2015-06-04 18:58:36 -03:00
prlimit.c
prof-freq.c
profil.c
pselect.c nptl: Rewrite cancellation macros 2015-06-04 18:58:36 -03:00
pt-raise.c
pthread_getaffinity.c
pthread_getcpuclockid.c
pthread_getname.c
pthread_kill.c
pthread_setaffinity.c pthread_setaffinity (Linux variant): Rewrite to use VLA instead of alloca 2015-03-23 16:34:48 +01:00
pthread_setname.c
pthread_sigmask.c
pthread_sigqueue.c
pthread-pids.h NaCl: Set tid field to a unique value. 2015-05-20 14:52:05 -07:00
ptrace.c
ptsname.c
pwrite64.c nptl: Rewrite cancellation macros 2015-06-04 18:58:36 -03:00
pwrite.c nptl: Rewrite cancellation macros 2015-06-04 18:58:36 -03:00
pwritev64.c
pwritev.c nptl: Rewrite cancellation macros 2015-06-04 18:58:36 -03:00
raise.c
readahead.c
readdir64_r.c
readdir64.c
readonly-area.c
reboot.c
recv.c Fix mq_notify socket, recv namespace (bug 18546). 2015-06-17 20:20:08 +00:00
recvfrom.c Remove socket.S implementation 2015-05-22 17:38:06 -03:00
recvmmsg.c nptl: Rewrite cancellation macros 2015-06-04 18:58:36 -03:00
recvmsg.c Remove socket.S implementation 2015-05-22 17:38:06 -03:00
remove.c
sa_len.c
safe-fatal.h
sched_getaffinity.c
sched_getcpu.c Consolidate sched_getcpu 2015-06-09 14:56:21 -03:00
sched_setaffinity.c
segfault.c
semctl.c
semget.c
semop.c
semtimedop.c
send.c Remove socket.S implementation 2015-05-22 17:38:06 -03:00
sendmmsg.c nptl: Rewrite cancellation macros 2015-06-04 18:58:36 -03:00
sendmsg.c Remove socket.S implementation 2015-05-22 17:38:06 -03:00
sendto.c Remove socket.S implementation 2015-05-22 17:38:06 -03:00
setegid.c
seteuid.c
setgid.c
setgroups.c
sethostid.c
setipv4sourcefilter.c
setregid.c
setresgid.c
setresuid.c
setreuid.c
setrlimit64.c
setsockopt.c Remove socket.S implementation 2015-05-22 17:38:06 -03:00
setsourcefilter.c
setuid.c
shlib-versions
shm-directory.c
shmat.c
shmctl.c
shmdt.c
shmget.c
shutdown.c Remove socket.S implementation 2015-05-22 17:38:06 -03:00
sigaction.c
siglist.h
signal.c
signalfd.c
sigpending.c
sigprocmask.c
sigqueue.c
sigreturn.c
sigset-cvt-mask.h
sigstack.c
sigsuspend.c nptl: Rewrite cancellation macros 2015-06-04 18:58:36 -03:00
sigtimedwait.c nptl: Rewrite cancellation macros 2015-06-04 18:58:36 -03:00
sigwait.c
sigwaitinfo.c nptl: Rewrite cancellation macros 2015-06-04 18:58:36 -03:00
sizes.h
sleep.c
socket.c Fix mq_notify socket, recv namespace (bug 18546). 2015-06-17 20:20:08 +00:00
socketcall.h Remove socket.S implementation 2015-05-22 17:38:06 -03:00
socketpair.c Remove socket.S implementation 2015-05-22 17:38:06 -03:00
speed.c
statfs64.c
statvfs64.c
statvfs.c Fix pathconf statvfs namespace (bug 18507). 2015-06-09 19:52:01 +00:00
sync_file_range.c nptl: Rewrite cancellation macros 2015-06-04 18:58:36 -03:00
syscalls.list Fix mq_receive, mq_send mq_timed* namespace (bug 18545). 2015-06-17 20:19:04 +00:00
sysconf.c
sysctl.c
sysctl.mk
sysdep-vdso.h Consolidate vDSO macros and usage 2015-05-26 10:10:36 -03:00
syslog.c
system.c
tcdrain.c nptl: Rewrite cancellation macros 2015-06-04 18:58:36 -03:00
tcflow.c
tcflush.c
tcgetattr.c
tcgetpgrp.c
tcsendbrk.c
tcsetattr.c
tcsetpgrp.c
termio.h
time.c
timer_create.c
timer_delete.c
timer_getoverr.c
timer_gettime.c
timer_routines.c nptl: Rewrite cancellation macros 2015-06-04 18:58:36 -03:00
timer_settime.c
times.c
timespec_get.c x86: clock_gettime and timespec_get vDSO cleanup 2015-06-01 22:25:02 -03:00
truncate64.c
tst-align-clone.c
tst-clone.c
tst-fanotify.c
tst-getcpu.c Print more information in tst-getcpu failure case. 2015-06-24 13:56:46 -07:00
tst-getpid1.c
tst-getpid2.c
tst-setgetname.c
ttyname_r.c
ttyname.c
ualarm.c
umount2.S
umount.S
unlockpt.c
updwtmp.c
ustat.c
utimensat.c
utimes.c
utmp_file.c
Versions
vfork.c
wait3.c
wait.c nptl: Rewrite cancellation macros 2015-06-04 18:58:36 -03:00
waitid.c nptl: Rewrite cancellation macros 2015-06-04 18:58:36 -03:00
waitpid.c nptl: Rewrite cancellation macros 2015-06-04 18:58:36 -03:00
xmknod.c
xmknodat.c
xstat64.c
xstat.c
xstatconv.c
xstatconv.h