From 2d0fc4dcfcc35cdc3756e548e354488d48e8e1e9 Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Tue, 10 Jun 2014 13:45:36 -0400 Subject: tile: move sysdeps/unix/sysv/linux/tile nptl files. --- sysdeps/unix/sysv/linux/tile/tilepro/libc.abilist | 2093 +++++++++++++++++++++ 1 file changed, 2093 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/tile/tilepro/libc.abilist (limited to 'sysdeps/unix/sysv/linux/tile/tilepro/libc.abilist') diff --git a/sysdeps/unix/sysv/linux/tile/tilepro/libc.abilist b/sysdeps/unix/sysv/linux/tile/tilepro/libc.abilist new file mode 100644 index 0000000000..caf74b89e1 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tile/tilepro/libc.abilist @@ -0,0 +1,2093 @@ +GLIBC_2.12 + GLIBC_2.12 A + _Exit F + _IO_2_1_stderr_ D 0xa0 + _IO_2_1_stdin_ D 0xa0 + _IO_2_1_stdout_ D 0xa0 + _IO_adjust_column F + _IO_adjust_wcolumn F + _IO_default_doallocate F + _IO_default_finish F + _IO_default_pbackfail F + _IO_default_uflow F + _IO_default_xsgetn F + _IO_default_xsputn F + _IO_do_write F + _IO_doallocbuf F + _IO_fclose F + _IO_fdopen F + _IO_feof F + _IO_ferror F + _IO_fflush F + _IO_fgetpos F + _IO_fgetpos64 F + _IO_fgets F + _IO_file_attach F + _IO_file_close F + _IO_file_close_it F + _IO_file_doallocate F + _IO_file_finish F + _IO_file_fopen F + _IO_file_init F + _IO_file_jumps D 0x54 + _IO_file_open F + _IO_file_overflow F + _IO_file_read F + _IO_file_seek F + _IO_file_seekoff F + _IO_file_setbuf F + _IO_file_stat F + _IO_file_sync F + _IO_file_underflow F + _IO_file_write F + _IO_file_xsputn F + _IO_flockfile F + _IO_flush_all F + _IO_flush_all_linebuffered F + _IO_fopen F + _IO_fprintf F + _IO_fputs F + _IO_fread F + _IO_free_backup_area F + _IO_free_wbackup_area F + _IO_fsetpos F + _IO_fsetpos64 F + _IO_ftell F + _IO_ftrylockfile F + _IO_funlockfile F + _IO_fwrite F + _IO_getc F + _IO_getline F + _IO_getline_info F + _IO_gets F + _IO_init F + _IO_init_marker F + _IO_init_wmarker F + _IO_iter_begin F + _IO_iter_end F + _IO_iter_file F + _IO_iter_next F + _IO_least_wmarker F + _IO_link_in F + _IO_list_all D 0x4 + _IO_list_lock F + _IO_list_resetlock F + _IO_list_unlock F + _IO_marker_delta F + _IO_marker_difference F + _IO_padn F + _IO_peekc_locked F + _IO_popen F + _IO_printf F + _IO_proc_close F + _IO_proc_open F + _IO_putc F + _IO_puts F + _IO_remove_marker F + _IO_seekmark F + _IO_seekoff F + _IO_seekpos F + _IO_seekwmark F + _IO_setb F + _IO_setbuffer F + _IO_setvbuf F + _IO_sgetn F + _IO_sprintf F + _IO_sputbackc F + _IO_sputbackwc F + _IO_sscanf F + _IO_str_init_readonly F + _IO_str_init_static F + _IO_str_overflow F + _IO_str_pbackfail F + _IO_str_seekoff F + _IO_str_underflow F + _IO_sungetc F + _IO_sungetwc F + _IO_switch_to_get_mode F + _IO_switch_to_main_wget_area F + _IO_switch_to_wbackup_area F + _IO_switch_to_wget_mode F + _IO_un_link F + _IO_ungetc F + _IO_unsave_markers F + _IO_unsave_wmarkers F + _IO_vfprintf F + _IO_vfscanf F + _IO_vsprintf F + _IO_wdefault_doallocate F + _IO_wdefault_finish F + _IO_wdefault_pbackfail F + _IO_wdefault_uflow F + _IO_wdefault_xsgetn F + _IO_wdefault_xsputn F + _IO_wdo_write F + _IO_wdoallocbuf F + _IO_wfile_jumps D 0x54 + _IO_wfile_overflow F + _IO_wfile_seekoff F + _IO_wfile_sync F + _IO_wfile_underflow F + _IO_wfile_xsputn F + _IO_wmarker_delta F + _IO_wsetb F + ___brk_addr D 0x4 + __adjtimex F + __after_morecore_hook D 0x4 + __argz_count F + __argz_next F + __argz_stringify F + __asprintf F + __asprintf_chk F + __assert F + __assert_fail F + __assert_perror_fail F + __backtrace F + __backtrace_symbols F + __backtrace_symbols_fd F + __bsd_getpgrp F + __bzero F + __check_rhosts_file D 0x4 + __chk_fail F + __clone F + __close F + __cmsg_nxthdr F + __confstr_chk F + __connect F + __ctype_b_loc F + __ctype_get_mb_cur_max F + __ctype_tolower_loc F + __ctype_toupper_loc F + __curbrk D 0x4 + __cxa_at_quick_exit F + __cxa_atexit F + __cxa_finalize F + __cyg_profile_func_enter F + __cyg_profile_func_exit F + __daylight D 0x4 + __dcgettext F + __default_morecore F + __dgettext F + __dprintf_chk F + __dup2 F + __duplocale F + __endmntent F + __environ D 0x4 + __errno_location F + __fbufsize F + __fcntl F + __ffs F + __fgets_chk F + __fgets_unlocked_chk F + __fgetws_chk F + __fgetws_unlocked_chk F + __finite F + __finitef F + __flbf F + __fork F + __fpending F + __fprintf_chk F + __fpu_control D 0x4 + __fpurge F + __fread_chk F + __fread_unlocked_chk F + __freadable F + __freading F + __free_hook D 0x4 + __freelocale F + __fsetlocking F + __fwprintf_chk F + __fwritable F + __fwriting F + __fxstat F + __fxstat64 F + __fxstatat F + __fxstatat64 F + __getcwd_chk F + __getdelim F + __getdomainname_chk F + __getgroups_chk F + __gethostname_chk F + __getlogin_r_chk F + __getmntent_r F + __getpagesize F + __getpgid F + __getpid F + __gets_chk F + __gettimeofday F + __getwd_chk F + __gmtime_r F + __h_errno_location F + __isalnum_l F + __isalpha_l F + __isascii_l F + __isblank_l F + __iscntrl_l F + __isctype F + __isdigit_l F + __isgraph_l F + __isinf F + __isinff F + __islower_l F + __isnan F + __isnanf F + __isoc99_fscanf F + __isoc99_fwscanf F + __isoc99_scanf F + __isoc99_sscanf F + __isoc99_swscanf F + __isoc99_vfscanf F + __isoc99_vfwscanf F + __isoc99_vscanf F + __isoc99_vsscanf F + __isoc99_vswscanf F + __isoc99_vwscanf F + __isoc99_wscanf F + __isprint_l F + __ispunct_l F + __isspace_l F + __isupper_l F + __iswalnum_l F + __iswalpha_l F + __iswblank_l F + __iswcntrl_l F + __iswctype F + __iswctype_l F + __iswdigit_l F + __iswgraph_l F + __iswlower_l F + __iswprint_l F + __iswpunct_l F + __iswspace_l F + __iswupper_l F + __iswxdigit_l F + __isxdigit_l F + __ivaliduser F + __key_decryptsession_pk_LOCAL D 0x4 + __key_encryptsession_pk_LOCAL D 0x4 + __key_gendes_LOCAL D 0x4 + __libc_allocate_rtsig F + __libc_calloc F + __libc_current_sigrtmax F + __libc_current_sigrtmin F + __libc_free F + __libc_freeres F + __libc_init_first F + __libc_mallinfo F + __libc_malloc F + __libc_mallopt F + __libc_memalign F + __libc_pvalloc F + __libc_realloc F + __libc_sa_len F + __libc_start_main F + __libc_valloc F + __longjmp_chk F + __lseek F + __lxstat F + __lxstat64 F + __malloc_hook D 0x4 + __malloc_initialize_hook D 0x4 + __mbrlen F + __mbrtowc F + __mbsnrtowcs_chk F + __mbsrtowcs_chk F + __mbstowcs_chk F + __mcount F + __memalign_hook D 0x4 + __memcpy_chk F + __memmove_chk F + __mempcpy F + __mempcpy_chk F + __mempcpy_small F + __memset_chk F + __monstartup F + __morecore D 0x4 + __nanosleep F + __newlocale F + __nl_langinfo_l F + __nss_configure_lookup F + __nss_database_lookup F + __nss_group_lookup F + __nss_hostname_digits_dots F + __nss_hosts_lookup F + __nss_next F + __nss_passwd_lookup F + __obstack_printf_chk F + __obstack_vprintf_chk F + __open F + __open64 F + __open64_2 F + __open_2 F + __openat64_2 F + __openat_2 F + __overflow F + __pipe F + __poll F + __posix_getopt F + __pread64 F + __pread64_chk F + __pread_chk F + __printf_chk F + __printf_fp F + __profile_frequency F + __progname D 0x4 + __progname_full D 0x4 + __ptsname_r_chk F + __pwrite64 F + __rawmemchr F + __rcmd_errstr D 0x4 + __read F + __read_chk F + __readlink_chk F + __readlinkat_chk F + __realloc_hook D 0x4 + __realpath_chk F + __recv_chk F + __recvfrom_chk F + __register_atfork F + __res_init F + __res_nclose F + __res_ninit F + __res_randomid F + __res_state F + __rpc_thread_createerr F + __rpc_thread_svc_fdset F + __rpc_thread_svc_max_pollfd F + __rpc_thread_svc_pollfd F + __sbrk F + __sched_cpualloc F + __sched_cpucount F + __sched_cpufree F + __sched_get_priority_max F + __sched_get_priority_min F + __sched_getparam F + __sched_getscheduler F + __sched_setscheduler F + __sched_yield F + __secure_getenv F + __select F + __setmntent F + __setpgid F + __sigaction F + __sigaddset F + __sigdelset F + __sigismember F + __signbit F + __signbitf F + __sigpause F + __sigsetjmp F + __sigsuspend F + __snprintf_chk F + __sprintf_chk F + __stack_chk_fail F + __statfs F + __stpcpy F + __stpcpy_chk F + __stpcpy_small F + __stpncpy F + __stpncpy_chk F + __strcasecmp F + __strcasecmp_l F + __strcasestr F + __strcat_chk F + __strcoll_l F + __strcpy_chk F + __strcpy_small F + __strcspn_c1 F + __strcspn_c2 F + __strcspn_c3 F + __strdup F + __strerror_r F + __strfmon_l F + __strftime_l F + __strncasecmp_l F + __strncat_chk F + __strncpy_chk F + __strndup F + __strpbrk_c2 F + __strpbrk_c3 F + __strsep_1c F + __strsep_2c F + __strsep_3c F + __strsep_g F + __strspn_c1 F + __strspn_c2 F + __strspn_c3 F + __strtod_internal F + __strtod_l F + __strtof_internal F + __strtof_l F + __strtok_r F + __strtok_r_1c F + __strtol_internal F + __strtol_l F + __strtold_internal F + __strtold_l F + __strtoll_internal F + __strtoll_l F + __strtoul_internal F + __strtoul_l F + __strtoull_internal F + __strtoull_l F + __strverscmp F + __strxfrm_l F + __swprintf_chk F + __sysconf F + __syslog_chk F + __sysv_signal F + __timezone D 0x4 + __toascii_l F + __tolower_l F + __toupper_l F + __towctrans F + __towctrans_l F + __towlower_l F + __towupper_l F + __ttyname_r_chk F + __tzname D 0x8 + __uflow F + __underflow F + __uselocale F + __vasprintf_chk F + __vdprintf_chk F + __vfork F + __vfprintf_chk F + __vfscanf F + __vfwprintf_chk F + __vprintf_chk F + __vsnprintf F + __vsnprintf_chk F + __vsprintf_chk F + __vsscanf F + __vswprintf_chk F + __vsyslog_chk F + __vwprintf_chk F + __wait F + __waitpid F + __wcpcpy_chk F + __wcpncpy_chk F + __wcrtomb_chk F + __wcscasecmp_l F + __wcscat_chk F + __wcscoll_l F + __wcscpy_chk F + __wcsftime_l F + __wcsncasecmp_l F + __wcsncat_chk F + __wcsncpy_chk F + __wcsnrtombs_chk F + __wcsrtombs_chk F + __wcstod_internal F + __wcstod_l F + __wcstof_internal F + __wcstof_l F + __wcstol_internal F + __wcstol_l F + __wcstold_internal F + __wcstold_l F + __wcstoll_internal F + __wcstoll_l F + __wcstombs_chk F + __wcstoul_internal F + __wcstoul_l F + __wcstoull_internal F + __wcstoull_l F + __wcsxfrm_l F + __wctomb_chk F + __wctrans_l F + __wctype_l F + __wmemcpy_chk F + __wmemmove_chk F + __wmempcpy_chk F + __wmemset_chk F + __woverflow F + __wprintf_chk F + __write F + __wuflow F + __wunderflow F + __xmknod F + __xmknodat F + __xpg_basename F + __xpg_sigpause F + __xpg_strerror_r F + __xstat F + __xstat64 F + _authenticate F + _dl_mcount_wrapper F + _dl_mcount_wrapper_check F + _environ D 0x4 + _exit F + _flush_cache F + _flushlbf F + _libc_intl_domainname D 0x5 + _longjmp F + _mcleanup F + _mcount F + _nl_default_dirname D 0x12 + _nl_domain_bindings D 0x4 + _nl_msg_cat_cntr D 0x4 + _null_auth D 0xc + _obstack_allocated_p F + _obstack_begin F + _obstack_begin_1 F + _obstack_free F + _obstack_memory_used F + _obstack_newchunk F + _res D 0x200 + _res_hconf D 0x30 + _rpc_dtablesize F + _seterr_reply F + _setjmp F + _sys_errlist D 0x21c + _sys_nerr D 0x4 + _sys_siglist D 0x104 + _tolower F + _toupper F + a64l F + abort F + abs F + accept F + accept4 F + access F + acct F + addmntent F + addseverity F + adjtime F + adjtimex F + advance F + alarm F + alphasort F + alphasort64 F + argp_err_exit_status D 0x4 + argp_error F + argp_failure F + argp_help F + argp_parse F + argp_program_bug_address D 0x4 + argp_program_version D 0x4 + argp_program_version_hook D 0x4 + argp_state_help F + argp_usage F + argz_add F + argz_add_sep F + argz_append F + argz_count F + argz_create F + argz_create_sep F + argz_delete F + argz_extract F + argz_insert F + argz_next F + argz_replace F + argz_stringify F + asctime F + asctime_r F + asprintf F + atof F + atoi F + atol F + atoll F + authdes_create F + authdes_getucred F + authdes_pk_create F + authnone_create F + authunix_create F + authunix_create_default F + backtrace F + backtrace_symbols F + backtrace_symbols_fd F + basename F + bcmp F + bcopy F + bdflush F + bind F + bind_textdomain_codeset F + bindresvport F + bindtextdomain F + brk F + bsd_signal F + bsearch F + btowc F + bzero F + cacheflush F + calloc F + callrpc F + canonicalize_file_name F + capget F + capset F + catclose F + catgets F + catopen F + cbc_crypt F + cfgetispeed F + cfgetospeed F + cfmakeraw F + cfree F + cfsetispeed F + cfsetospeed F + cfsetspeed F + chdir F + chflags F + chmod F + chown F + chroot F + clearenv F + clearerr F + clearerr_unlocked F + clnt_broadcast F + clnt_create F + clnt_pcreateerror F + clnt_perrno F + clnt_perror F + clnt_spcreateerror F + clnt_sperrno F + clnt_sperror F + clntraw_create F + clnttcp_create F + clntudp_bufcreate F + clntudp_create F + clntunix_create F + clock F + clone F + close F + closedir F + closelog F + confstr F + connect F + copysign F + copysignf F + copysignl F + creat F + creat64 F + create_module F + ctermid F + ctime F + ctime_r F + cuserid F + daemon F + daylight D 0x4 + dcgettext F + dcngettext F + delete_module F + des_setparity F + dgettext F + difftime F + dirfd F + dirname F + div F + dl_iterate_phdr F + dngettext F + dprintf F + drand48 F + drand48_r F + dup F + dup2 F + dup3 F + duplocale F + dysize F + eaccess F + ecb_crypt F + ecvt F + ecvt_r F + endaliasent F + endfsent F + endgrent F + endhostent F + endmntent F + endnetent F + endnetgrent F + endprotoent F + endpwent F + endrpcent F + endservent F + endsgent F + endspent F + endttyent F + endusershell F + endutent F + endutxent F + environ D 0x4 + envz_add F + envz_entry F + envz_get F + envz_merge F + envz_remove F + envz_strip F + epoll_create F + epoll_create1 F + epoll_ctl F + epoll_pwait F + epoll_wait F + erand48 F + erand48_r F + err F + error F + error_at_line F + error_message_count D 0x4 + error_one_per_line D 0x4 + error_print_progname D 0x4 + errx F + ether_aton F + ether_aton_r F + ether_hostton F + ether_line F + ether_ntoa F + ether_ntoa_r F + ether_ntohost F + euidaccess F + eventfd F + eventfd_read F + eventfd_write F + execl F + execle F + execlp F + execv F + execve F + execvp F + execvpe F + exit F + faccessat F + fallocate F + fallocate64 F + fattach F + fchdir F + fchflags F + fchmod F + fchmodat F + fchown F + fchownat F + fclose F + fcloseall F + fcntl F + fcvt F + fcvt_r F + fdatasync F + fdetach F + fdopen F + fdopendir F + feof F + feof_unlocked F + ferror F + ferror_unlocked F + fexecve F + fflush F + fflush_unlocked F + ffs F + ffsl F + ffsll F + fgetc F + fgetc_unlocked F + fgetgrent F + fgetgrent_r F + fgetpos F + fgetpos64 F + fgetpwent F + fgetpwent_r F + fgets F + fgets_unlocked F + fgetsgent F + fgetsgent_r F + fgetspent F + fgetspent_r F + fgetwc F + fgetwc_unlocked F + fgetws F + fgetws_unlocked F + fgetxattr F + fileno F + fileno_unlocked F + finite F + finitef F + finitel F + flistxattr F + flock F + flockfile F + fmemopen F + fmtmsg F + fnmatch F + fopen F + fopen64 F + fopencookie F + fork F + fpathconf F + fprintf F + fputc F + fputc_unlocked F + fputs F + fputs_unlocked F + fputwc F + fputwc_unlocked F + fputws F + fputws_unlocked F + fread F + fread_unlocked F + free F + freeaddrinfo F + freeifaddrs F + freelocale F + fremovexattr F + freopen F + freopen64 F + frexp F + frexpf F + frexpl F + fscanf F + fseek F + fseeko F + fseeko64 F + fsetpos F + fsetpos64 F + fsetxattr F + fstatfs F + fstatfs64 F + fstatvfs F + fstatvfs64 F + fsync F + ftell F + ftello F + ftello64 F + ftime F + ftok F + ftruncate F + ftruncate64 F + ftrylockfile F + fts_children F + fts_close F + fts_open F + fts_read F + fts_set F + ftw F + ftw64 F + funlockfile F + futimens F + futimes F + futimesat F + fwide F + fwprintf F + fwrite F + fwrite_unlocked F + fwscanf F + gai_strerror F + gcvt F + get_avphys_pages F + get_current_dir_name F + get_kernel_syms F + get_myaddress F + get_nprocs F + get_nprocs_conf F + get_phys_pages F + getaddrinfo F + getaliasbyname F + getaliasbyname_r F + getaliasent F + getaliasent_r F + getc F + getc_unlocked F + getchar F + getchar_unlocked F + getcontext F + getcwd F + getdate F + getdate_err D 0x4 + getdate_r F + getdelim F + getdirentries F + getdirentries64 F + getdomainname F + getdtablesize F + getegid F + getenv F + geteuid F + getfsent F + getfsfile F + getfsspec F + getgid F + getgrent F + getgrent_r F + getgrgid F + getgrgid_r F + getgrnam F + getgrnam_r F + getgrouplist F + getgroups F + gethostbyaddr F + gethostbyaddr_r F + gethostbyname F + gethostbyname2 F + gethostbyname2_r F + gethostbyname_r F + gethostent F + gethostent_r F + gethostid F + gethostname F + getifaddrs F + getipv4sourcefilter F + getitimer F + getline F + getloadavg F + getlogin F + getlogin_r F + getmntent F + getmntent_r F + getmsg F + getnameinfo F + getnetbyaddr F + getnetbyaddr_r F + getnetbyname F + getnetbyname_r F + getnetent F + getnetent_r F + getnetgrent F + getnetgrent_r F + getnetname F + getopt F + getopt_long F + getopt_long_only F + getpagesize F + getpass F + getpeername F + getpgid F + getpgrp F + getpid F + getpmsg F + getppid F + getpriority F + getprotobyname F + getprotobyname_r F + getprotobynumber F + getprotobynumber_r F + getprotoent F + getprotoent_r F + getpt F + getpublickey F + getpw F + getpwent F + getpwent_r F + getpwnam F + getpwnam_r F + getpwuid F + getpwuid_r F + getresgid F + getresuid F + getrlimit F + getrlimit64 F + getrpcbyname F + getrpcbyname_r F + getrpcbynumber F + getrpcbynumber_r F + getrpcent F + getrpcent_r F + getrpcport F + getrusage F + gets F + getsecretkey F + getservbyname F + getservbyname_r F + getservbyport F + getservbyport_r F + getservent F + getservent_r F + getsgent F + getsgent_r F + getsgnam F + getsgnam_r F + getsid F + getsockname F + getsockopt F + getsourcefilter F + getspent F + getspent_r F + getspnam F + getspnam_r F + getsubopt F + gettext F + gettimeofday F + getttyent F + getttynam F + getuid F + getusershell F + getutent F + getutent_r F + getutid F + getutid_r F + getutline F + getutline_r F + getutmp F + getutmpx F + getutxent F + getutxid F + getutxline F + getw F + getwc F + getwc_unlocked F + getwchar F + getwchar_unlocked F + getwd F + getxattr F + glob F + glob64 F + glob_pattern_p F + globfree F + globfree64 F + gmtime F + gmtime_r F + gnu_dev_major F + gnu_dev_makedev F + gnu_dev_minor F + gnu_get_libc_release F + gnu_get_libc_version F + grantpt F + group_member F + gsignal F + gtty F + h_errlist D 0x14 + h_nerr D 0x4 + hasmntopt F + hcreate F + hcreate_r F + hdestroy F + hdestroy_r F + herror F + host2netname F + hsearch F + hsearch_r F + hstrerror F + htonl F + htons F + iconv F + iconv_close F + iconv_open F + if_freenameindex F + if_indextoname F + if_nameindex F + if_nametoindex F + imaxabs F + imaxdiv F + in6addr_any D 0x10 + in6addr_loopback D 0x10 + index F + inet6_opt_append F + inet6_opt_find F + inet6_opt_finish F + inet6_opt_get_val F + inet6_opt_init F + inet6_opt_next F + inet6_opt_set_val F + inet6_option_alloc F + inet6_option_append F + inet6_option_find F + inet6_option_init F + inet6_option_next F + inet6_option_space F + inet6_rth_add F + inet6_rth_getaddr F + inet6_rth_init F + inet6_rth_reverse F + inet6_rth_segments F + inet6_rth_space F + inet_addr F + inet_aton F + inet_lnaof F + inet_makeaddr F + inet_netof F + inet_network F + inet_nsap_addr F + inet_nsap_ntoa F + inet_ntoa F + inet_ntop F + inet_pton F + init_module F + initgroups F + initstate F + initstate_r F + innetgr F + inotify_add_watch F + inotify_init F + inotify_init1 F + inotify_rm_watch F + insque F + ioctl F + iruserok F + iruserok_af F + isalnum F + isalnum_l F + isalpha F + isalpha_l F + isascii F + isastream F + isatty F + isblank F + isblank_l F + iscntrl F + iscntrl_l F + isctype F + isdigit F + isdigit_l F + isfdtype F + isgraph F + isgraph_l F + isinf F + isinff F + isinfl F + islower F + islower_l F + isnan F + isnanf F + isnanl F + isprint F + isprint_l F + ispunct F + ispunct_l F + isspace F + isspace_l F + isupper F + isupper_l F + iswalnum F + iswalnum_l F + iswalpha F + iswalpha_l F + iswblank F + iswblank_l F + iswcntrl F + iswcntrl_l F + iswctype F + iswctype_l F + iswdigit F + iswdigit_l F + iswgraph F + iswgraph_l F + iswlower F + iswlower_l F + iswprint F + iswprint_l F + iswpunct F + iswpunct_l F + iswspace F + iswspace_l F + iswupper F + iswupper_l F + iswxdigit F + iswxdigit_l F + isxdigit F + isxdigit_l F + jrand48 F + jrand48_r F + key_decryptsession F + key_decryptsession_pk F + key_encryptsession F + key_encryptsession_pk F + key_gendes F + key_get_conv F + key_secretkey_is_set F + key_setnet F + key_setsecret F + kill F + killpg F + klogctl F + l64a F + labs F + lchmod F + lchown F + lckpwdf F + lcong48 F + lcong48_r F + ldexp F + ldexpf F + ldexpl F + ldiv F + lfind F + lgetxattr F + link F + linkat F + listen F + listxattr F + llabs F + lldiv F + llistxattr F + llseek F + loc1 D 0x4 + loc2 D 0x4 + localeconv F + localtime F + localtime_r F + lockf F + lockf64 F + locs D 0x4 + longjmp F + lrand48 F + lrand48_r F + lremovexattr F + lsearch F + lseek F + lseek64 F + lsetxattr F + lutimes F + madvise F + makecontext F + mallinfo F + malloc F + malloc_get_state F + malloc_info F + malloc_set_state F + malloc_stats F + malloc_trim F + malloc_usable_size F + mallopt F + mallwatch D 0x4 + mblen F + mbrlen F + mbrtowc F + mbsinit F + mbsnrtowcs F + mbsrtowcs F + mbstowcs F + mbtowc F + mcheck F + mcheck_check_all F + mcheck_pedantic F + mcount F + memalign F + memccpy F + memchr F + memcmp F + memcpy F + memfrob F + memmem F + memmove F + mempcpy F + memrchr F + memset F + mincore F + mkdir F + mkdirat F + mkdtemp F + mkfifo F + mkfifoat F + mkostemp F + mkostemp64 F + mkostemps F + mkostemps64 F + mkstemp F + mkstemp64 F + mkstemps F + mkstemps64 F + mktemp F + mktime F + mlock F + mlockall F + mmap F + mmap64 F + modf F + modff F + modfl F + moncontrol F + monstartup F + mount F + mprobe F + mprotect F + mrand48 F + mrand48_r F + mremap F + msgctl F + msgget F + msgrcv F + msgsnd F + msync F + mtrace F + munlock F + munlockall F + munmap F + muntrace F + nanosleep F + netname2host F + netname2user F + newlocale F + nfsservctl F + nftw F + nftw64 F + ngettext F + nice F + nl_langinfo F + nl_langinfo_l F + nrand48 F + nrand48_r F + ntohl F + ntohs F + ntp_adjtime F + ntp_gettime F + ntp_gettimex F + obstack_alloc_failed_handler D 0x4 + obstack_exit_failure D 0x4 + obstack_free F + obstack_printf F + obstack_vprintf F + on_exit F + open F + open64 F + open_memstream F + open_wmemstream F + openat F + openat64 F + opendir F + openlog F + optarg D 0x4 + opterr D 0x4 + optind D 0x4 + optopt D 0x4 + parse_printf_format F + passwd2des F + pathconf F + pause F + pclose F + perror F + personality F + pipe F + pipe2 F + pivot_root F + pmap_getmaps F + pmap_getport F + pmap_rmtcall F + pmap_set F + pmap_unset F + poll F + popen F + posix_fadvise F + posix_fadvise64 F + posix_fallocate F + posix_fallocate64 F + posix_madvise F + posix_memalign F + posix_openpt F + posix_spawn F + posix_spawn_file_actions_addclose F + posix_spawn_file_actions_adddup2 F + posix_spawn_file_actions_addopen F + posix_spawn_file_actions_destroy F + posix_spawn_file_actions_init F + posix_spawnattr_destroy F + posix_spawnattr_getflags F + posix_spawnattr_getpgroup F + posix_spawnattr_getschedparam F + posix_spawnattr_getschedpolicy F + posix_spawnattr_getsigdefault F + posix_spawnattr_getsigmask F + posix_spawnattr_init F + posix_spawnattr_setflags F + posix_spawnattr_setpgroup F + posix_spawnattr_setschedparam F + posix_spawnattr_setschedpolicy F + posix_spawnattr_setsigdefault F + posix_spawnattr_setsigmask F + posix_spawnp F + ppoll F + prctl F + pread F + pread64 F + preadv F + preadv64 F + printf F + printf_size F + printf_size_info F + profil F + program_invocation_name D 0x4 + program_invocation_short_name D 0x4 + pselect F + psiginfo F + psignal F + pthread_attr_destroy F + pthread_attr_getdetachstate F + pthread_attr_getinheritsched F + pthread_attr_getschedparam F + pthread_attr_getschedpolicy F + pthread_attr_getscope F + pthread_attr_init F + pthread_attr_setdetachstate F + pthread_attr_setinheritsched F + pthread_attr_setschedparam F + pthread_attr_setschedpolicy F + pthread_attr_setscope F + pthread_cond_broadcast F + pthread_cond_destroy F + pthread_cond_init F + pthread_cond_signal F + pthread_cond_timedwait F + pthread_cond_wait F + pthread_condattr_destroy F + pthread_condattr_init F + pthread_equal F + pthread_exit F + pthread_getschedparam F + pthread_mutex_destroy F + pthread_mutex_init F + pthread_mutex_lock F + pthread_mutex_unlock F + pthread_self F + pthread_setcancelstate F + pthread_setcanceltype F + pthread_setschedparam F + ptrace F + ptsname F + ptsname_r F + putc F + putc_unlocked F + putchar F + putchar_unlocked F + putenv F + putgrent F + putmsg F + putpmsg F + putpwent F + puts F + putsgent F + putspent F + pututline F + pututxline F + putw F + putwc F + putwc_unlocked F + putwchar F + putwchar_unlocked F + pvalloc F + pwrite F + pwrite64 F + pwritev F + pwritev64 F + qecvt F + qecvt_r F + qfcvt F + qfcvt_r F + qgcvt F + qsort F + qsort_r F + query_module F + quick_exit F + quotactl F + raise F + rand F + rand_r F + random F + random_r F + rawmemchr F + rcmd F + rcmd_af F + re_comp F + re_compile_fastmap F + re_compile_pattern F + re_exec F + re_match F + re_match_2 F + re_search F + re_search_2 F + re_set_registers F + re_set_syntax F + re_syntax_options D 0x4 + read F + readahead F + readdir F + readdir64 F + readdir64_r F + readdir_r F + readlink F + readlinkat F + readv F + realloc F + realpath F + reboot F + recv F + recvfrom F + recvmmsg F + recvmsg F + regcomp F + regerror F + regexec F + regfree F + register_printf_function F + register_printf_modifier F + register_printf_specifier F + register_printf_type F + registerrpc F + remap_file_pages F + remove F + removexattr F + remque F + rename F + renameat F + revoke F + rewind F + rewinddir F + rexec F + rexec_af F + rexecoptions D 0x4 + rindex F + rmdir F + rpc_createerr D 0x10 + rpmatch F + rresvport F + rresvport_af F + rtime F + ruserok F + ruserok_af F + ruserpass F + sbrk F + scalbn F + scalbnf F + scalbnl F + scandir F + scandir64 F + scanf F + sched_get_priority_max F + sched_get_priority_min F + sched_getaffinity F + sched_getcpu F + sched_getparam F + sched_getscheduler F + sched_rr_get_interval F + sched_setaffinity F + sched_setparam F + sched_setscheduler F + sched_yield F + seed48 F + seed48_r F + seekdir F + select F + semctl F + semget F + semop F + semtimedop F + send F + sendfile F + sendfile64 F + sendmsg F + sendto F + set_dataplane F + setaliasent F + setbuf F + setbuffer F + setcontext F + setdomainname F + setegid F + setenv F + seteuid F + setfsent F + setfsgid F + setfsuid F + setgid F + setgrent F + setgroups F + sethostent F + sethostid F + sethostname F + setipv4sourcefilter F + setitimer F + setjmp F + setlinebuf F + setlocale F + setlogin F + setlogmask F + setmntent F + setnetent F + setnetgrent F + setpgid F + setpgrp F + setpriority F + setprotoent F + setpwent F + setregid F + setresgid F + setresuid F + setreuid F + setrlimit F + setrlimit64 F + setrpcent F + setservent F + setsgent F + setsid F + setsockopt F + setsourcefilter F + setspent F + setstate F + setstate_r F + settimeofday F + setttyent F + setuid F + setusershell F + setutent F + setutxent F + setvbuf F + setxattr F + sgetsgent F + sgetsgent_r F + sgetspent F + sgetspent_r F + shmat F + shmctl F + shmdt F + shmget F + shutdown F + sigaction F + sigaddset F + sigaltstack F + sigandset F + sigblock F + sigdelset F + sigemptyset F + sigfillset F + siggetmask F + sighold F + sigignore F + siginterrupt F + sigisemptyset F + sigismember F + siglongjmp F + signal F + signalfd F + sigorset F + sigpause F + sigpending F + sigprocmask F + sigqueue F + sigrelse F + sigreturn F + sigset F + sigsetmask F + sigstack F + sigsuspend F + sigtimedwait F + sigvec F + sigwait F + sigwaitinfo F + sleep F + snprintf F + sockatmark F + socket F + socketpair F + splice F + sprintf F + sprofil F + srand F + srand48 F + srand48_r F + srandom F + srandom_r F + sscanf F + ssignal F + sstk F + statfs F + statfs64 F + statvfs F + statvfs64 F + stderr D 0x4 + stdin D 0x4 + stdout D 0x4 + step F + stime F + stpcpy F + stpncpy F + strcasecmp F + strcasecmp_l F + strcasestr F + strcat F + strchr F + strchrnul F + strcmp F + strcoll F + strcoll_l F + strcpy F + strcspn F + strdup F + strerror F + strerror_l F + strerror_r F + strfmon F + strfmon_l F + strfry F + strftime F + strftime_l F + strlen F + strncasecmp F + strncasecmp_l F + strncat F + strncmp F + strncpy F + strndup F + strnlen F + strpbrk F + strptime F + strptime_l F + strrchr F + strsep F + strsignal F + strspn F + strstr F + strtod F + strtod_l F + strtof F + strtof_l F + strtoimax F + strtok F + strtok_r F + strtol F + strtol_l F + strtold F + strtold_l F + strtoll F + strtoll_l F + strtoq F + strtoul F + strtoul_l F + strtoull F + strtoull_l F + strtoumax F + strtouq F + strverscmp F + strxfrm F + strxfrm_l F + stty F + svc_exit F + svc_fdset D 0x80 + svc_getreq F + svc_getreq_common F + svc_getreq_poll F + svc_getreqset F + svc_max_pollfd D 0x4 + svc_pollfd D 0x4 + svc_register F + svc_run F + svc_sendreply F + svc_unregister F + svcauthdes_stats D 0xc + svcerr_auth F + svcerr_decode F + svcerr_noproc F + svcerr_noprog F + svcerr_progvers F + svcerr_systemerr F + svcerr_weakauth F + svcfd_create F + svcraw_create F + svctcp_create F + svcudp_bufcreate F + svcudp_create F + svcudp_enablecache F + svcunix_create F + svcunixfd_create F + swab F + swapcontext F + swapoff F + swapon F + swprintf F + swscanf F + symlink F + symlinkat F + sync F + sync_file_range F + sys_errlist D 0x21c + sys_nerr D 0x4 + sys_sigabbrev D 0x104 + sys_siglist D 0x104 + syscall F + sysconf F + sysctl F + sysinfo F + syslog F + system F + sysv_signal F + tcdrain F + tcflow F + tcflush F + tcgetattr F + tcgetpgrp F + tcgetsid F + tcsendbreak F + tcsetattr F + tcsetpgrp F + tdelete F + tdestroy F + tee F + telldir F + tempnam F + textdomain F + tfind F + time F + timegm F + timelocal F + timerfd_create F + timerfd_gettime F + timerfd_settime F + times F + timezone D 0x4 + tmpfile F + tmpfile64 F + tmpnam F + tmpnam_r F + toascii F + tolower F + tolower_l F + toupper F + toupper_l F + towctrans F + towctrans_l F + towlower F + towlower_l F + towupper F + towupper_l F + tr_break F + truncate F + truncate64 F + tsearch F + ttyname F + ttyname_r F + ttyslot F + twalk F + tzname D 0x8 + tzset F + ualarm F + ulckpwdf F + ulimit F + umask F + umount F + umount2 F + uname F + ungetc F + ungetwc F + unlink F + unlinkat F + unlockpt F + unsetenv F + unshare F + updwtmp F + updwtmpx F + uselib F + uselocale F + user2netname F + usleep F + ustat F + utime F + utimensat F + utimes F + utmpname F + utmpxname F + valloc F + vasprintf F + vdprintf F + verr F + verrx F + versionsort F + versionsort64 F + vfork F + vfprintf F + vfscanf F + vfwprintf F + vfwscanf F + vhangup F + vlimit F + vmsplice F + vprintf F + vscanf F + vsnprintf F + vsprintf F + vsscanf F + vswprintf F + vswscanf F + vsyslog F + vtimes F + vwarn F + vwarnx F + vwprintf F + vwscanf F + wait F + wait3 F + wait4 F + waitid F + waitpid F + warn F + warnx F + wcpcpy F + wcpncpy F + wcrtomb F + wcscasecmp F + wcscasecmp_l F + wcscat F + wcschr F + wcschrnul F + wcscmp F + wcscoll F + wcscoll_l F + wcscpy F + wcscspn F + wcsdup F + wcsftime F + wcsftime_l F + wcslen F + wcsncasecmp F + wcsncasecmp_l F + wcsncat F + wcsncmp F + wcsncpy F + wcsnlen F + wcsnrtombs F + wcspbrk F + wcsrchr F + wcsrtombs F + wcsspn F + wcsstr F + wcstod F + wcstod_l F + wcstof F + wcstof_l F + wcstoimax F + wcstok F + wcstol F + wcstol_l F + wcstold F + wcstold_l F + wcstoll F + wcstoll_l F + wcstombs F + wcstoq F + wcstoul F + wcstoul_l F + wcstoull F + wcstoull_l F + wcstoumax F + wcstouq F + wcswcs F + wcswidth F + wcsxfrm F + wcsxfrm_l F + wctob F + wctomb F + wctrans F + wctrans_l F + wctype F + wctype_l F + wcwidth F + wmemchr F + wmemcmp F + wmemcpy F + wmemmove F + wmempcpy F + wmemset F + wordexp F + wordfree F + wprintf F + write F + writev F + wscanf F + xdecrypt F + xdr_accepted_reply F + xdr_array F + xdr_authdes_cred F + xdr_authdes_verf F + xdr_authunix_parms F + xdr_bool F + xdr_bytes F + xdr_callhdr F + xdr_callmsg F + xdr_char F + xdr_cryptkeyarg F + xdr_cryptkeyarg2 F + xdr_cryptkeyres F + xdr_des_block F + xdr_double F + xdr_enum F + xdr_float F + xdr_free F + xdr_getcredres F + xdr_hyper F + xdr_int F + xdr_int16_t F + xdr_int32_t F + xdr_int64_t F + xdr_int8_t F + xdr_key_netstarg F + xdr_key_netstres F + xdr_keybuf F + xdr_keystatus F + xdr_long F + xdr_longlong_t F + xdr_netnamestr F + xdr_netobj F + xdr_opaque F + xdr_opaque_auth F + xdr_pmap F + xdr_pmaplist F + xdr_pointer F + xdr_quad_t F + xdr_reference F + xdr_rejected_reply F + xdr_replymsg F + xdr_rmtcall_args F + xdr_rmtcallres F + xdr_short F + xdr_sizeof F + xdr_string F + xdr_u_char F + xdr_u_hyper F + xdr_u_int F + xdr_u_long F + xdr_u_longlong_t F + xdr_u_quad_t F + xdr_u_short F + xdr_uint16_t F + xdr_uint32_t F + xdr_uint64_t F + xdr_uint8_t F + xdr_union F + xdr_unixcred F + xdr_vector F + xdr_void F + xdr_wrapstring F + xdrmem_create F + xdrrec_create F + xdrrec_endofrecord F + xdrrec_eof F + xdrrec_skiprecord F + xdrstdio_create F + xencrypt F + xprt_register F + xprt_unregister F +GLIBC_2.15 + GLIBC_2.15 A + __fdelt_chk F + __fdelt_warn F + clock_adjtime F + fanotify_init F + fanotify_mark F + name_to_handle_at F + open_by_handle_at F + posix_spawn F + posix_spawnp F + prlimit F + prlimit64 F + process_vm_readv F + process_vm_writev F + scandirat F + scandirat64 F + sendmmsg F + setns F + syncfs F +GLIBC_2.16 + GLIBC_2.16 A + __getauxval F + __poll_chk F + __ppoll_chk F + aligned_alloc F + c16rtomb F + c32rtomb F + getauxval F + mbrtoc16 F + mbrtoc32 F + timespec_get F +GLIBC_2.17 + GLIBC_2.17 A + clock_getcpuclockid F + clock_getres F + clock_gettime F + clock_nanosleep F + clock_settime F + secure_getenv F +GLIBC_2.18 + GLIBC_2.18 A + __cxa_thread_atexit_impl F -- cgit v1.2.3 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 ++++++ NEWS | 42 ++-- include/stdio.h | 3 + libio/Makefile | 2 +- libio/Versions | 4 + libio/fmemopen.c | 140 ++++------- libio/oldfmemopen.c | 265 +++++++++++++++++++++ stdio-common/Makefile | 2 +- stdio-common/psiginfo.c | 2 +- stdio-common/tst-fmemopen3.c | 206 ++++++++++++++++ sysdeps/unix/sysv/linux/aarch64/libc.abilist | 3 + sysdeps/unix/sysv/linux/alpha/libc.abilist | 3 + sysdeps/unix/sysv/linux/arm/libc.abilist | 3 + sysdeps/unix/sysv/linux/hppa/libc.abilist | 3 + sysdeps/unix/sysv/linux/i386/libc.abilist | 3 + sysdeps/unix/sysv/linux/ia64/libc.abilist | 3 + sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist | 3 + sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist | 3 + sysdeps/unix/sysv/linux/microblaze/libc.abilist | 3 + .../unix/sysv/linux/mips/mips32/fpu/libc.abilist | 3 + .../unix/sysv/linux/mips/mips32/nofpu/libc.abilist | 3 + .../unix/sysv/linux/mips/mips64/n32/libc.abilist | 3 + .../unix/sysv/linux/mips/mips64/n64/libc.abilist | 3 + sysdeps/unix/sysv/linux/nios2/libc.abilist | 3 + .../sysv/linux/powerpc/powerpc32/fpu/libc.abilist | 3 + .../linux/powerpc/powerpc32/nofpu/libc.abilist | 3 + .../unix/sysv/linux/powerpc/powerpc64/libc.abilist | 3 + sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist | 3 + sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist | 3 + sysdeps/unix/sysv/linux/sh/libc.abilist | 3 + sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist | 3 + sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist | 3 + .../sysv/linux/tile/tilegx/tilegx32/libc.abilist | 3 + .../sysv/linux/tile/tilegx/tilegx64/libc.abilist | 3 + sysdeps/unix/sysv/linux/tile/tilepro/libc.abilist | 3 + sysdeps/unix/sysv/linux/x86_64/64/libc.abilist | 3 + sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist | 3 + 37 files changed, 703 insertions(+), 114 deletions(-) create mode 100644 libio/oldfmemopen.c create mode 100644 stdio-common/tst-fmemopen3.c (limited to 'sysdeps/unix/sysv/linux/tile/tilepro/libc.abilist') 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] diff --git a/NEWS b/NEWS index 23388ae9a6..ae0b753cde 100644 --- a/NEWS +++ b/NEWS @@ -9,24 +9,25 @@ Version 2.22 * The following bugs are resolved with this release: - 438, 4719, 6792, 13028, 13064, 14094, 14841, 14906, 14958, 15319, - 15467, 15790, 15969, 16159, 16339, 16350, 16351, 16352, 16353, 16361, - 16512, 16526, 16538, 16559, 16560, 16704, 16783, 16850, 17053, 17090, - 17195, 17269, 17293, 17322, 17403, 17523, 17542, 17569, 17581, 17588, - 17596, 17620, 17621, 17628, 17631, 17692, 17711, 17715, 17776, 17779, - 17792, 17833, 17836, 17841, 17912, 17916, 17930, 17932, 17944, 17949, - 17964, 17965, 17967, 17969, 17977, 17978, 17987, 17991, 17996, 17998, - 17999, 18007, 18019, 18020, 18029, 18030, 18032, 18034, 18036, 18038, - 18039, 18042, 18043, 18046, 18047, 18049, 18068, 18080, 18093, 18100, - 18104, 18110, 18111, 18116, 18125, 18128, 18138, 18185, 18196, 18197, - 18206, 18210, 18211, 18217, 18219, 18220, 18221, 18234, 18244, 18245, - 18247, 18287, 18319, 18324, 18333, 18346, 18371, 18397, 18409, 18410, - 18412, 18418, 18422, 18434, 18435, 18444, 18468, 18469, 18470, 18479, - 18483, 18495, 18496, 18497, 18498, 18502, 18507, 18508, 18512, 18513, - 18519, 18520, 18522, 18527, 18528, 18529, 18530, 18532, 18533, 18534, - 18536, 18539, 18540, 18542, 18544, 18545, 18546, 18547, 18549, 18553, - 18557, 18558, 18569, 18583, 18585, 18586, 18592, 18593, 18594, 18602, - 18612, 18613, 18619, 18633, 18641, 18643. + 438, 4719, 6544, 6792, 11216, 12836, 13028, 13064, 13151, 13152, 14094, + 14292, 14841, 14906, 14958, 15319, 15467, 15790, 15969, 16159, 16339, + 16350, 16351, 16352, 16353, 16361, 16512, 16526, 16538, 16559, 16560, + 16704, 16783, 16850, 17053, 17090, 17195, 17269, 17293, 17322, 17403, + 17523, 17542, 17569, 17581, 17588, 17596, 17620, 17621, 17628, 17631, + 17692, 17711, 17715, 17776, 17779, 17792, 17833, 17836, 17841, 17912, + 17916, 17930, 17932, 17944, 17949, 17964, 17965, 17967, 17969, 17977, + 17978, 17987, 17991, 17996, 17998, 17999, 18007, 18019, 18020, 18029, + 18030, 18032, 18034, 18036, 18038, 18039, 18042, 18043, 18046, 18047, + 18049, 18068, 18080, 18093, 18100, 18104, 18110, 18111, 18116, 18125, + 18128, 18138, 18185, 18196, 18197, 18206, 18210, 18211, 18217, 18219, + 18220, 18221, 18234, 18244, 18245, 18247, 18287, 18319, 18324, 18333, + 18346, 18371, 18397, 18409, 18410, 18412, 18418, 18422, 18434, 18435, + 18444, 18468, 18469, 18470, 18479, 18483, 18495, 18496, 18497, 18498, + 18502, 18507, 18508, 18512, 18513, 18519, 18520, 18522, 18527, 18528, + 18529, 18530, 18532, 18533, 18534, 18536, 18539, 18540, 18542, 18544, + 18545, 18546, 18547, 18549, 18553, 18557, 18558, 18569, 18583, 18585, + 18586, 18592, 18593, 18594, 18602, 18612, 18613, 18619, 18633, 18641. + 18643. * Cache information can be queried via sysconf() function on s390 e.g. with _SC_LEVEL1_ICACHE_SIZE as argument. @@ -65,6 +66,11 @@ Version 2.22 Shared library libmvec.so is linked in as needed when using -lm (no need to specify -lmvec explicitly for not static builds). Visit for detailed information. + +* A new fmemopen implementation has been added with the goal of POSIX + compliance. The new implementation fixes the following long-standing + issues: BZ#6544, BZ#11216, BZ#12836, BZ#13151, BZ#13152, and BZ#14292. The + old implementation is still present for use be by existing binaries. Version 2.21 diff --git a/include/stdio.h b/include/stdio.h index 5e50e63b70..31718f953d 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -197,6 +197,9 @@ gets (char *__str) } # endif +extern FILE * __fmemopen (void *buf, size_t len, const char *mode); +libc_hidden_proto (__fmemopen) + __END_DECLS # endif diff --git a/libio/Makefile b/libio/Makefile index 097cfaedda..7b3bcf90fe 100644 --- a/libio/Makefile +++ b/libio/Makefile @@ -46,7 +46,7 @@ routines := \ __fbufsize __freading __fwriting __freadable __fwritable __flbf \ __fpurge __fpending __fsetlocking \ \ - libc_fatal fmemopen + libc_fatal fmemopen oldfmemopen tests = tst_swprintf tst_wprintf tst_swscanf tst_wscanf tst_getwc tst_putwc \ tst_wprintf2 tst-widetext test-fmemopen tst-ext tst-ext2 \ diff --git a/libio/Versions b/libio/Versions index 8df89d2150..2a1d6e6c85 100644 --- a/libio/Versions +++ b/libio/Versions @@ -148,6 +148,10 @@ libc { GLIBC_2.4 { open_wmemstream; } + GLIBC_2.22 { + # f* + fmemopen; + } GLIBC_PRIVATE { # Used by NPTL and librt __libc_fatal; diff --git a/libio/fmemopen.c b/libio/fmemopen.c index 06e5ab8002..e6e6a49f76 100644 --- a/libio/fmemopen.c +++ b/libio/fmemopen.c @@ -1,7 +1,6 @@ -/* Fmemopen implementation. - Copyright (C) 2000-2015 Free Software Foundation, Inc. +/* fmemopen implementation. + Copyright (C) 2015 Free Software Foundation, Inc. This file is part of the GNU C Library. - Contributed by Hanno Mueller, kontakt@hanno.de, 2000. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -17,54 +16,10 @@ License along with the GNU C Library; if not, see . */ -/* - * fmemopen() - "my" version of a string stream - * Hanno Mueller, kontakt@hanno.de - * - * - * I needed fmemopen() for an application that I currently work on, - * but couldn't find it in libio. The following snippet of code is an - * attempt to implement what glibc's documentation describes. - * - * - * - * I already see some potential problems: - * - * - I never used the "original" fmemopen(). I am sure that "my" - * fmemopen() behaves differently than the original version. - * - * - The documentation doesn't say wether a string stream allows - * seeks. I checked the old fmemopen implementation in glibc's stdio - * directory, wasn't quite able to see what is going on in that - * source, but as far as I understand there was no seek there. For - * my application, I needed fseek() and ftell(), so it's here. - * - * - "append" mode and fseek(p, SEEK_END) have two different ideas - * about the "end" of the stream. - * - * As described in the documentation, when opening the file in - * "append" mode, the position pointer will be set to the first null - * character of the string buffer (yet the buffer may already - * contain more data). For fseek(), the last byte of the buffer is - * used as the end of the stream. - * - * - It is unclear to me what the documentation tries to say when it - * explains what happens when you use fmemopen with a NULL - * buffer. - * - * Quote: "fmemopen [then] allocates an array SIZE bytes long. This - * is really only useful if you are going to write things to the - * buffer and then read them back in again." - * - * What does that mean if the original fmemopen() did not allow - * seeking? How do you read what you just wrote without seeking back - * to the beginning of the stream? - * - * - I think there should be a second version of fmemopen() that does - * not add null characters for each write. (At least in my - * application, I am not actually using strings but binary data and - * so I don't need the stream to add null characters on its own.) - */ +/* fmemopen() from 2.22 and forward works as defined by POSIX. It also + provides an older symbol, version 2.2.5, that behaves different regarding + SEEK_END (libio/oldfmemopen.c). */ + #include #include @@ -79,25 +34,23 @@ typedef struct fmemopen_cookie_struct fmemopen_cookie_t; struct fmemopen_cookie_struct { - char *buffer; - int mybuffer; - int binmode; - size_t size; - _IO_off64_t pos; - size_t maxpos; + char *buffer; /* memory buffer. */ + int mybuffer; /* allocated my buffer? */ + int append; /* buffer open for append? */ + size_t size; /* buffer length in bytes. */ + _IO_off64_t pos; /* current position at the buffer. */ + size_t maxpos; /* max position in buffer. */ }; static ssize_t fmemopen_read (void *cookie, char *b, size_t s) { - fmemopen_cookie_t *c; - - c = (fmemopen_cookie_t *) cookie; + fmemopen_cookie_t *c = (fmemopen_cookie_t *) cookie; - if (c->pos + s > c->size) + if (c->pos + s > c->maxpos) { - if ((size_t) c->pos == c->size) + if ((size_t) c->pos == c->maxpos) return 0; s = c->size - c->pos; } @@ -115,29 +68,28 @@ fmemopen_read (void *cookie, char *b, size_t s) static ssize_t fmemopen_write (void *cookie, const char *b, size_t s) { - fmemopen_cookie_t *c; + fmemopen_cookie_t *c = (fmemopen_cookie_t *) cookie;; + _IO_off64_t pos = c->append ? c->maxpos : c->pos; int addnullc; - c = (fmemopen_cookie_t *) cookie; - - addnullc = c->binmode == 0 && (s == 0 || b[s - 1] != '\0'); + addnullc = (s == 0 || b[s - 1] != '\0'); - if (c->pos + s + addnullc > c->size) + if (pos + s + addnullc > c->size) { if ((size_t) (c->pos + addnullc) >= c->size) { __set_errno (ENOSPC); return 0; } - s = c->size - c->pos - addnullc; + s = c->size - pos - addnullc; } - memcpy (&(c->buffer[c->pos]), b, s); + memcpy (&(c->buffer[pos]), b, s); - c->pos += s; - if ((size_t) c->pos > c->maxpos) + pos += s; + if ((size_t) pos > c->maxpos) { - c->maxpos = c->pos; + c->maxpos = pos; if (addnullc) c->buffer[c->maxpos] = '\0'; } @@ -150,9 +102,7 @@ static int fmemopen_seek (void *cookie, _IO_off64_t *p, int w) { _IO_off64_t np; - fmemopen_cookie_t *c; - - c = (fmemopen_cookie_t *) cookie; + fmemopen_cookie_t *c = (fmemopen_cookie_t *) cookie; switch (w) { @@ -165,7 +115,7 @@ fmemopen_seek (void *cookie, _IO_off64_t *p, int w) break; case SEEK_END: - np = (c->binmode ? c->size : c->maxpos) - *p; + np = c->maxpos + *p; break; default: @@ -184,9 +134,7 @@ fmemopen_seek (void *cookie, _IO_off64_t *p, int w) static int fmemopen_close (void *cookie) { - fmemopen_cookie_t *c; - - c = (fmemopen_cookie_t *) cookie; + fmemopen_cookie_t *c = (fmemopen_cookie_t *) cookie; if (c->mybuffer) free (c->buffer); @@ -197,18 +145,11 @@ fmemopen_close (void *cookie) FILE * -fmemopen (void *buf, size_t len, const char *mode) +__fmemopen (void *buf, size_t len, const char *mode) { cookie_io_functions_t iof; fmemopen_cookie_t *c; - if (__glibc_unlikely (len == 0)) - { - einval: - __set_errno (EINVAL); - return NULL; - } - c = (fmemopen_cookie_t *) malloc (sizeof (fmemopen_cookie_t)); if (c == NULL) return NULL; @@ -231,26 +172,38 @@ fmemopen (void *buf, size_t len, const char *mode) if (__glibc_unlikely ((uintptr_t) len > -(uintptr_t) buf)) { free (c); - goto einval; + __set_errno (EINVAL); + return NULL; } c->buffer = buf; - if (mode[0] == 'w') + /* POSIX states that w+ mode should truncate the buffer. */ + if (mode[0] == 'w' && mode[1] == '+') c->buffer[0] = '\0'; c->maxpos = strnlen (c->buffer, len); } + + /* Mode | starting position (cookie::pos) | size (cookie::size) + ------ |----------------------------------|----------------------------- + read | beginning of the buffer | size argument + write | beginning of the buffer | zero + append | first null or size buffer + 1 | first null or size argument + */ + c->size = len; - if (mode[0] == 'a') + if (mode[0] == 'r') + c->maxpos = len; + + c->append = mode[0] == 'a'; + if (c->append) c->pos = c->maxpos; else c->pos = 0; - c->binmode = mode[0] != '\0' && mode[1] == 'b'; - iof.read = fmemopen_read; iof.write = fmemopen_write; iof.seek = fmemopen_seek; @@ -258,4 +211,5 @@ fmemopen (void *buf, size_t len, const char *mode) return _IO_fopencookie (c, mode, iof); } -libc_hidden_def (fmemopen) +libc_hidden_def (__fmemopen) +versioned_symbol (libc, __fmemopen, fmemopen, GLIBC_2_22); diff --git a/libio/oldfmemopen.c b/libio/oldfmemopen.c new file mode 100644 index 0000000000..8e35672327 --- /dev/null +++ b/libio/oldfmemopen.c @@ -0,0 +1,265 @@ +/* Fmemopen implementation. + Copyright (C) 2000-2015 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Hanno Mueller, kontakt@hanno.de, 2000. + + 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 + . */ + +/* + * fmemopen() - "my" version of a string stream + * Hanno Mueller, kontakt@hanno.de + * + * + * I needed fmemopen() for an application that I currently work on, + * but couldn't find it in libio. The following snippet of code is an + * attempt to implement what glibc's documentation describes. + * + * + * + * I already see some potential problems: + * + * - I never used the "original" fmemopen(). I am sure that "my" + * fmemopen() behaves differently than the original version. + * + * - The documentation doesn't say wether a string stream allows + * seeks. I checked the old fmemopen implementation in glibc's stdio + * directory, wasn't quite able to see what is going on in that + * source, but as far as I understand there was no seek there. For + * my application, I needed fseek() and ftell(), so it's here. + * + * - "append" mode and fseek(p, SEEK_END) have two different ideas + * about the "end" of the stream. + * + * As described in the documentation, when opening the file in + * "append" mode, the position pointer will be set to the first null + * character of the string buffer (yet the buffer may already + * contain more data). For fseek(), the last byte of the buffer is + * used as the end of the stream. + * + * - It is unclear to me what the documentation tries to say when it + * explains what happens when you use fmemopen with a NULL + * buffer. + * + * Quote: "fmemopen [then] allocates an array SIZE bytes long. This + * is really only useful if you are going to write things to the + * buffer and then read them back in again." + * + * What does that mean if the original fmemopen() did not allow + * seeking? How do you read what you just wrote without seeking back + * to the beginning of the stream? + * + * - I think there should be a second version of fmemopen() that does + * not add null characters for each write. (At least in my + * application, I am not actually using strings but binary data and + * so I don't need the stream to add null characters on its own.) + */ + +#include "libioP.h" + +#if SHLIB_COMPAT (libc, GLIBC_2_2, GLIBC_2_22) + +#include +#include +#include +#include +#include +#include +#include + + +typedef struct fmemopen_cookie_struct fmemopen_cookie_t; +struct fmemopen_cookie_struct +{ + char *buffer; + int mybuffer; + int binmode; + size_t size; + _IO_off64_t pos; + size_t maxpos; +}; + + +static ssize_t +fmemopen_read (void *cookie, char *b, size_t s) +{ + fmemopen_cookie_t *c; + + c = (fmemopen_cookie_t *) cookie; + + if (c->pos + s > c->size) + { + if ((size_t) c->pos == c->size) + return 0; + s = c->size - c->pos; + } + + memcpy (b, &(c->buffer[c->pos]), s); + + c->pos += s; + if ((size_t) c->pos > c->maxpos) + c->maxpos = c->pos; + + return s; +} + + +static ssize_t +fmemopen_write (void *cookie, const char *b, size_t s) +{ + fmemopen_cookie_t *c; + int addnullc; + + c = (fmemopen_cookie_t *) cookie; + + addnullc = c->binmode == 0 && (s == 0 || b[s - 1] != '\0'); + + if (c->pos + s + addnullc > c->size) + { + if ((size_t) (c->pos + addnullc) >= c->size) + { + __set_errno (ENOSPC); + return 0; + } + s = c->size - c->pos - addnullc; + } + + memcpy (&(c->buffer[c->pos]), b, s); + + c->pos += s; + if ((size_t) c->pos > c->maxpos) + { + c->maxpos = c->pos; + if (addnullc) + c->buffer[c->maxpos] = '\0'; + } + + return s; +} + + +static int +fmemopen_seek (void *cookie, _IO_off64_t *p, int w) +{ + _IO_off64_t np; + fmemopen_cookie_t *c; + + c = (fmemopen_cookie_t *) cookie; + + switch (w) + { + case SEEK_SET: + np = *p; + break; + + case SEEK_CUR: + np = c->pos + *p; + break; + + case SEEK_END: + np = (c->binmode ? c->size : c->maxpos) - *p; + break; + + default: + return -1; + } + + if (np < 0 || (size_t) np > c->size) + return -1; + + *p = c->pos = np; + + return 0; +} + + +static int +fmemopen_close (void *cookie) +{ + fmemopen_cookie_t *c; + + c = (fmemopen_cookie_t *) cookie; + + if (c->mybuffer) + free (c->buffer); + free (c); + + return 0; +} + + +FILE * +__old_fmemopen (void *buf, size_t len, const char *mode) +{ + cookie_io_functions_t iof; + fmemopen_cookie_t *c; + + if (__glibc_unlikely (len == 0)) + { + einval: + __set_errno (EINVAL); + return NULL; + } + + c = (fmemopen_cookie_t *) malloc (sizeof (fmemopen_cookie_t)); + if (c == NULL) + return NULL; + + c->mybuffer = (buf == NULL); + + if (c->mybuffer) + { + c->buffer = (char *) malloc (len); + if (c->buffer == NULL) + { + free (c); + return NULL; + } + c->buffer[0] = '\0'; + c->maxpos = 0; + } + else + { + if (__glibc_unlikely ((uintptr_t) len > -(uintptr_t) buf)) + { + free (c); + goto einval; + } + + c->buffer = buf; + + if (mode[0] == 'w') + c->buffer[0] = '\0'; + + c->maxpos = strnlen (c->buffer, len); + } + + c->size = len; + + if (mode[0] == 'a') + c->pos = c->maxpos; + else + c->pos = 0; + + c->binmode = mode[0] != '\0' && mode[1] == 'b'; + + iof.read = fmemopen_read; + iof.write = fmemopen_write; + iof.seek = fmemopen_seek; + iof.close = fmemopen_close; + + return _IO_fopencookie (c, mode, iof); +} +compat_symbol (libc, __old_fmemopen, fmemopen, GLIBC_2_2); +#endif diff --git a/stdio-common/Makefile b/stdio-common/Makefile index 8567056402..d0bf0e1083 100644 --- a/stdio-common/Makefile +++ b/stdio-common/Makefile @@ -57,7 +57,7 @@ tests := tstscanf test_rdwr test-popen tstgetln test-fseek \ bug19 bug19a tst-popen2 scanf13 scanf14 scanf15 bug20 bug21 bug22 \ scanf16 scanf17 tst-setvbuf1 tst-grouping bug23 bug24 \ bug-vfprintf-nargs tst-long-dbl-fphex tst-fphex-wide tst-sprintf3 \ - bug25 tst-printf-round bug23-2 bug23-3 bug23-4 bug26 + bug25 tst-printf-round bug23-2 bug23-3 bug23-4 bug26 tst-fmemopen3 test-srcs = tst-unbputc tst-printf diff --git a/stdio-common/psiginfo.c b/stdio-common/psiginfo.c index 3aff5012d3..30847ea6aa 100644 --- a/stdio-common/psiginfo.c +++ b/stdio-common/psiginfo.c @@ -60,7 +60,7 @@ void psiginfo (const siginfo_t *pinfo, const char *s) { char buf[512]; - FILE *fp = fmemopen (buf, sizeof (buf), "w"); + FILE *fp = __fmemopen (buf, sizeof (buf), "w"); if (fp == NULL) { const char *colon; diff --git a/stdio-common/tst-fmemopen3.c b/stdio-common/tst-fmemopen3.c new file mode 100644 index 0000000000..be481539ca --- /dev/null +++ b/stdio-common/tst-fmemopen3.c @@ -0,0 +1,206 @@ +/* fmemopen tests for append and read mode. + Copyright (C) 2015 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 + . */ + +#include +#include +#include +#include + +static void +print_buffer (const char *s, size_t n) +{ + size_t i; + for (i=0; i