mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-27 05:00:15 +00:00
fdb7d390dd
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.
160 lines
5.3 KiB
Plaintext
160 lines
5.3 KiB
Plaintext
libc {
|
|
GLIBC_2.0 {
|
|
# global variables
|
|
_IO_list_all; _IO_stderr_; _IO_stdin_; _IO_stdout_;
|
|
|
|
# functions used in inline functions or macros
|
|
__getdelim;
|
|
|
|
# functions used in inline functions or macros
|
|
_IO_getc; _IO_peekc_unlocked; _IO_putc; _IO_feof; _IO_ferror;
|
|
__uflow; __underflow; __overflow;
|
|
|
|
# functions used in other libraries
|
|
__vsscanf; __vsnprintf;
|
|
|
|
# libio
|
|
_IO_adjust_column; _IO_clearerr; _IO_default_doallocate;
|
|
_IO_default_finish; _IO_default_pbackfail; _IO_default_uflow;
|
|
_IO_default_xsgetn; _IO_default_xsputn; _IO_do_write;
|
|
_IO_doallocbuf; _IO_fclose; _IO_fdopen; _IO_feof; _IO_ferror;
|
|
_IO_fflush; _IO_fgetc; _IO_fgetpos; _IO_fgets; _IO_file_attach;
|
|
_IO_file_close; _IO_file_close_it; _IO_file_doallocate;
|
|
_IO_file_fopen; _IO_file_init; _IO_file_jumps; _IO_file_open;
|
|
_IO_file_overflow; _IO_file_read; _IO_file_seek; _IO_file_seekoff;
|
|
_IO_file_setbuf; _IO_file_stat; _IO_file_sync; _IO_file_underflow;
|
|
_IO_file_write; _IO_file_xsputn; _IO_fileno; _IO_flockfile;
|
|
_IO_flush_all; _IO_flush_all_linebuffered; _IO_fopen; _IO_fprintf;
|
|
_IO_fputs; _IO_fread; _IO_free_backup_area; _IO_freopen;
|
|
_IO_fscanf; _IO_fseek; _IO_fsetpos; _IO_ftell; _IO_ftrylockfile;
|
|
_IO_funlockfile; _IO_fwrite; _IO_getc; _IO_getline; _IO_gets;
|
|
_IO_init; _IO_init_marker; _IO_link_in; _IO_marker_delta;
|
|
_IO_marker_difference; _IO_padn; _IO_pclose; _IO_peekc_locked;
|
|
_IO_perror; _IO_popen; _IO_printf; _IO_proc_close; _IO_proc_open;
|
|
_IO_putc; _IO_puts; _IO_remove_marker; _IO_rewind; _IO_scanf;
|
|
_IO_seekmark; _IO_seekoff; _IO_seekpos; _IO_setb; _IO_setbuf;
|
|
_IO_setbuffer; _IO_setlinebuf; _IO_setvbuf; _IO_sgetn;
|
|
_IO_sprintf; _IO_sputbackc; _IO_sscanf; _IO_str_init_readonly;
|
|
_IO_str_init_static; _IO_str_overflow; _IO_str_pbackfail;
|
|
_IO_str_seekoff; _IO_str_underflow; _IO_sungetc;
|
|
_IO_switch_to_get_mode; _IO_un_link; _IO_ungetc;
|
|
_IO_unsave_markers; _IO_vfprintf; _IO_vfscanf; _IO_vsprintf;
|
|
|
|
# variables in normal name space
|
|
stderr; stdin; stdout;
|
|
|
|
# c*
|
|
clearerr; clearerr_unlocked;
|
|
|
|
# f*
|
|
fclose; fcloseall; fdopen; feof; feof_locked; feof_unlocked; ferror;
|
|
ferror_locked; ferror_unlocked; fflush; fflush_locked; fflush_unlocked;
|
|
fgetc; fgetpos; fgets; fileno; fileno_locked; fileno_unlocked;
|
|
fopen; fopencookie; fputc; fputc_locked; fputc_unlocked; fputs;
|
|
fread; freopen; fseek; fsetpos; ftell; fwrite;
|
|
|
|
# g*
|
|
getc; getc_locked; getc_unlocked; getchar; getchar_unlocked; getdelim;
|
|
gets;
|
|
|
|
# o*
|
|
open_memstream; obstack_printf; obstack_vprintf;
|
|
|
|
# p*
|
|
pclose; popen; putc; putc_locked; putc_unlocked; putchar;
|
|
putchar_unlocked; puts;
|
|
|
|
# r*
|
|
rewind;
|
|
|
|
# s*
|
|
setbuf; setbuffer; setlinebuf; setvbuf;
|
|
|
|
# u*
|
|
ungetc;
|
|
|
|
# v*
|
|
vasprintf; vdprintf; vscanf; vsnprintf; vsprintf; vsscanf;
|
|
}
|
|
GLIBC_2.1 {
|
|
# global variables
|
|
_IO_2_1_stdin_; _IO_2_1_stdout_; _IO_2_1_stderr_;
|
|
|
|
# functions used in other libraries
|
|
_IO_fclose; _IO_fopen; _IO_fdopen; _IO_popen; __asprintf;
|
|
|
|
# functions used in libstdc++
|
|
_IO_do_write; _IO_file_attach; _IO_file_close_it; _IO_file_finish;
|
|
_IO_file_fopen; _IO_file_init; _IO_file_overflow; _IO_file_seekoff;
|
|
_IO_file_setbuf; _IO_file_sync; _IO_file_underflow;
|
|
_IO_file_write; _IO_file_xsputn; _IO_proc_open; _IO_proc_close;
|
|
|
|
# Changed getline function in libio.
|
|
_IO_getline_info;
|
|
|
|
# f*
|
|
fgetpos64; fopen64; freopen64; fseeko; fseeko64; fsetpos64; ftello;
|
|
ftello64; fopen; fclose; fdopen; fread_unlocked; fwrite_unlocked;
|
|
fgets_unlocked; fputs_unlocked; fgetc_unlocked;
|
|
|
|
# p*
|
|
pclose; popen;
|
|
}
|
|
GLIBC_2.2 {
|
|
# functions used in libstdc++
|
|
_IO_fgetpos; _IO_fgetpos64; _IO_fsetpos; _IO_fsetpos64;
|
|
_IO_wdo_write; _IO_wfile_jumps; _IO_wfile_overflow; _IO_wfile_seekoff;
|
|
_IO_wfile_setbuf; _IO_wfile_sync; _IO_wfile_underflow; _IO_wfile_xsputn;
|
|
_IO_adjust_wcolumn; _IO_free_wbackup_area; _IO_init_wmarker;
|
|
_IO_least_wmarker; _IO_seekwmark; _IO_sputbackwc; _IO_sungetwc;
|
|
_IO_switch_to_main_wget_area; _IO_switch_to_wbackup_area;
|
|
_IO_switch_to_wget_mode; _IO_unsave_wmarkers; _IO_wdefault_doallocate;
|
|
_IO_wdefault_finish; _IO_wdefault_pbackfail; _IO_wdefault_setbuf;
|
|
_IO_wdefault_uflow; _IO_wdefault_xsgetn; _IO_wdefault_xsputn;
|
|
_IO_wdoallocbuf; _IO_wmarker_delta; _IO_wsetb; __woverflow; __wuflow;
|
|
__wunderflow;
|
|
|
|
# LinuxThreads uses this protected interface
|
|
_IO_iter_begin; _IO_iter_end; _IO_iter_next; _IO_iter_file;
|
|
_IO_list_lock; _IO_list_unlock; _IO_list_resetlock;
|
|
|
|
# Functions to access FILE internals.
|
|
__fbufsize; __freading; __fwriting; __freadable; __fwritable; __flbf;
|
|
__fpurge; __fpending; __fsetlocking; _flushlbf;
|
|
|
|
# f*
|
|
fgetpos; fgetpos64; fgetwc; fgetwc_unlocked; fgetws; fgetws_unlocked;
|
|
fputwc; fputwc_unlocked; fputws; fputws_unlocked; fsetpos; fsetpos64;
|
|
fwide; fwprintf; fwscanf; fopencookie; fmemopen;
|
|
|
|
# g*
|
|
getwc; getwc_unlocked; getwchar; getwchar_unlocked;
|
|
|
|
# p*
|
|
putwc; putwc_unlocked; putwchar; putwchar_unlocked;
|
|
|
|
# s*
|
|
swprintf; swscanf;
|
|
|
|
# u*
|
|
ungetwc;
|
|
|
|
# v*
|
|
vfwprintf; vswprintf; vwprintf; vfwscanf; vswscanf; vwscanf;
|
|
|
|
# w*
|
|
wprintf; wscanf;
|
|
}
|
|
GLIBC_2.4 {
|
|
open_wmemstream;
|
|
}
|
|
GLIBC_2.22 {
|
|
# f*
|
|
fmemopen;
|
|
}
|
|
GLIBC_PRIVATE {
|
|
# Used by NPTL and librt
|
|
__libc_fatal;
|
|
}
|
|
}
|