From fdb7d390dd0d96e4a8239c46f3aa64598b90842b Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Mon, 9 Jun 2014 16:19:25 -0300 Subject: 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. --- ChangeLog | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 0ed1cf361d..1cf34d58d4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,73 @@ +2015-07-08 Adhemerval Zanella + + [BZ #6544] + [BZ #11216] + [BZ #12836] + [BZ #13151] + [BZ #13152] + [BZ #14292] + * 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 Carlos O'Donell [BZ #18643] -- cgit 1.4.1