about summary refs log tree commit diff
path: root/stdio-common
Commit message (Collapse)AuthorAgeFilesLines
* Fix allocation when handling positional parameters in printf.Petr Baudis2011-02-203-3/+25
|
* Conditionalize use of SIGRTMIN in psiginfo.Samuel Thibault2011-02-161-1/+6
|
* Fix two printf handler issues.Jakub Jelinek2011-02-152-7/+13
|
* Fix grouping when rounding increases number of integer digits.Ulrich Drepper2011-01-123-9/+102
|
* Always allow overwriting printf modifiers etc.Ulrich Drepper2010-12-241-7/+13
|
* psiginfo relied too much on sys_siglist.Ulrich Drepper2010-10-111-2/+21
|
* Unify psiginfo output.Ulrich Drepper2010-10-111-5/+6
|
* tst-fmemopen: Do not write test file in $srcdir.Roland McGrath2010-04-191-6/+12
|
* Fix printf format warning for si_band.Richard Henderson2010-03-261-1/+1
| | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
* Add support for XPG7 testing.Ulrich Drepper2010-01-091-11/+11
| | | | | The header conformance testing code needed extending for XPG7. This exposed a few bugs in the headers. There are more changes to come.
* Avoid warning in scanf test.Ulrich Drepper2009-10-301-1/+0
|
* Implement mkstemps and mkstemps64.Ulrich Drepper2009-10-305-10/+11
|
* Check for integer overflows in formatting functionsAndreas Schwab2009-09-292-20/+40
|
* Print sign of NaN values.Ulrich Drepper2009-08-233-23/+122
|
* Preserve SSE registers in runtime relocations on x86-64.Ulrich Drepper2009-07-292-0/+2
| | | | | | | | | | SSE registers are used for passing parameters and must be preserved in runtime relocations. This is inside ld.so enforced through the tests in tst-xmmymm.sh. But the malloc routines used after startup come from libc.so and can be arbitrarily complex. It's overkill to save the SSE registers all the time because of that. These calls are rare. Instead we save them on demand. The new infrastructure put in place in this patch makes this possible and efficient.
* remove subsumed .gitignore entries and filesJim Meyering2009-05-161-8/+0
|
* remove mpn-copy.mk from .gitignore filesJim Meyering2009-05-161-1/+1
|
* remove COPYING* from .gitignore filesJim Meyering2009-05-161-1/+1
|
* rename each .cvsignore file to .gitignoreJim Meyering2009-05-151-0/+0
|
* * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):Ulrich Drepper2009-04-261-3/+3
| | | | Avoid warning by using may_alias attribute on ptrhack.
* * sysdeps/i386/fpu/s_cos.S: Set errno for ±Inf.Ulrich Drepper2009-04-261-1/+1
| | | | | | | | | | | | | | | | | * sysdeps/i386/fpu/s_cosf.S: Likewise. * sysdeps/i386/fpu/s_cosl.S: Likewise. * sysdeps/i386/fpu/s_sin.S: Likewise. * sysdeps/i386/fpu/s_sinf.S: Likewise. * sysdeps/i386/fpu/s_sinl.S: Likewise. * sysdeps/ieee754/dbl-64/s_sin.c: Likewise. * sysdeps/ieee754/flt-32/s_cosf.c: Likewise. * sysdeps/ieee754/flt-32/s_sinf.c: Likewise. * sysdeps/ieee754/ldbl-96/s_cosl.c: Likewise. * sysdeps/ieee754/ldbl-96/s_sinl.c: Likewise. * sysdeps/x86_64/fpu/s_cosl.S: Likewise. * sysdeps/x86_64/fpu/s_sinl.S: Likewise. * math/libm-test.inc: Add tests for errno after sin/cos calls with ±Inf.
* * stdio-common/stdio_lim.h.in (L_cuserid): Not part of POSIX sinceUlrich Drepper2009-04-251-2/+4
| | | | the 2001 revision.
* * stdio-common/psiginfo.c: Include <errno.h>.Ulrich Drepper2009-04-241-0/+1
|
* * stdio-common/printf.h: Add missing const to register_printf_modifier.Ulrich Drepper2009-04-232-3/+3
| | | | | | | | | * stdio-common/reg-modifier.c: Likewise. 2009-04-22 Andrew Stubbs <ams@codesourcery.com> * sysdeps/sh/sh4/setjmp.S (__sigsetjmp): Adjust JB_SIZE when there is no FPU.
* * sysdeps/x86-64/strrchr.S: New file.Ulrich Drepper2009-04-141-1/+1
|
* * stdio-common/printf.h (struct printf_info): Add user element.Ulrich Drepper2009-04-1110-88/+491
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New types printf_arginfo_size_function, printf_va_arg_function. Declare register_printf_specifier, register_printf_modifier, register_printf_type. * stdio-common/printf-parse.h (struct printf_spec): Add size element. (union printf_arg): Add pa_user element. Adjust __printf_arginfo_table type. Add __printf_va_arg_table, __printf_modifier_table, __handle_registered_modifier_mb, and __handle_registered_modifier_wc declarations. * stdio-common/printf-parsemb.c: Recognize registered modifiers. If registered arginfo call failed try normal specifier. * stdio-common/printf-prs.c: Pass additional parameter to arginfo function. * stdio-common/Makefile (routines): Add reg-modifier and reg-type. * stdio-common/Versions: Export register_printf_modifier, register_printf_type, and register_printf_specifier for GLIBC_2.10. * stdio-common/reg-modifier.c: New file. * stdio-common/reg-type.c: New file. * stdio-common/reg-printf.c (__register_printf_specifier): New function. Mostly the old __register_printf_function function but uses locking and type of third parameter changed. (__register_printf_function): Implement using __register_printf_specifier. * stdio-common/vfprintf.c (vfprintf): Collect argument sizes in calls to arginfo functions. Allocate enough memory for user-defined types. Call new va_arg functions to get user-defined types. Try installed handlers even for existing format specifiers first.
* Simplified code and possible copy problem fixed.Ulrich Drepper2009-04-101-17/+3
|
* * stdio-common/vfprintf.c (vfprintf): Slightly more compact code.Ulrich Drepper2009-04-101-8/+15
|
* * libio/stdio.h: dprintf, fmemopen, getdelim, getline,Ulrich Drepper2009-02-261-0/+5
| | | | open_memstream, and vdprintf are in POSIX 2008.
* * locale/langinfo.h: nl_langinfo_l is in POSIX 2008.Ulrich Drepper2009-02-265-2/+249
| | | | | | | | | | | | | * locale/xlocale.h: Define locale_t type. * locale/locale.h: duplocale, freelocale, newlocale, uselocale are in POSIX 2008. Don't define locale_t here. * stdlib/monetary.h: strfmon_l is in POSIX 2008. * signal/signal.h: Declare psignal and psiginfo for POSIX 2008. * stdio-common/psiginfo.c: New file. * stdio-common/psiginfo-data.h: New file. * stdio-common/psiginfo-define.h: New file. * stdio-common/Makefile (routines): Add psiginfo. * stdio-common/Versions: Export psiginfo for GLIBC_2.10.
* [BZ #9823]Ulrich Drepper2009-02-061-2/+2
| | | | | | 2009-02-06 Ulrich Drepper <drepper@redhat.com> [BZ #9823] * stdio-common/psignal.c (psignal): Fix test for empty string.
* * stdio-common/printf_fp.c (___printf_fp): Give wide outout codeUlrich Drepper2008-07-261-0/+4
| | | | the same treatment as narow output code in last patch.
* [BZ #6698]Ulrich Drepper2008-07-253-13/+38
| | | | | | | | | | * stdio-common/_i18n_number.h (_i18n_number_rewrite): Take additional parameter for end of buffer. If temporary copy is too large use malloc. * stdio-common/vfprintf.c: Adjust for _i18n_number_rewrite interface change. * stdio-common/printf_fp.c (__printf_fp): Likewise.. Account for string rewrite when allocating buffer.
* * locale/setlocale.c (setlocale): Take the setlocale lock earlier.Ulrich Drepper2008-07-201-2/+7
|
* * stdio-common/vfprintf.c (_IO_helper_overflow): In case _IO_sputn cvs/fedora-glibc-20080716T0944Ulrich Drepper2008-07-151-1/+5
| | | | doesn't manage to write anything, fail.
* * stdio-common/Makefile: Add rules to build and run tst-setvbuf1.Ulrich Drepper2008-07-083-2/+27
| | | | | * stdio-common/tst-setvbuf1.c: New file. * stdio-common/tst-setvbuf1.expect: New file.
* * libio/stdio.h (vscanf): Fix -std=c99 redirect. Jakub Jelinek2008-05-245-2/+376
| | | | | | | | | | | | | | | | | | * stdio-common/Makefile (tests): Add scanf16 and scanf17. (CFLAGS-scanf17.c): New. * stdio-common/scanf14.c (main): Add fscanf and scanf tests. * stdio-common/scanf15.c (main): Likewise. * stdio-common/scanf16.c: New test. * stdio-common/scanf17.c: New test. 2008-05-24 Jakub Jelinek <jakub@redhat.com> * libio/stdio.h (vscanf): Fix -std=c99 redirect. * stdio-common/Makefile (tests): Add scanf16 and scanf17. (CFLAGS-scanf17.c): New. * stdio-common/scanf14.c (main): Add fscanf and scanf tests. * stdio-common/scanf15.c (main): Likewise. * stdio-common/scanf16.c: New test. * stdio-common/scanf17.c: New test.
* * stdio-common/vfprintf.c (vfprintf): Correct overflow test.Ulrich Drepper2008-03-301-1/+2
|
* [BZ #5424, BZ #5428, BZ #5451]Ulrich Drepper2007-12-103-10/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 2007-12-08 Ulrich Drepper <drepper@redhat.com> [BZ #5424] * stdio-common/vfprintf.c: Do not overflow when adding to done. * stdio-common/Makefile (tests): Add bug22. * stdio-common/bug22.c: New file. [BZ #5451] * time/getdate.c: Fix filling in default values. * time/bug-getdate1.c: New file. * time/Makefile: Add rules to build and run bug-getdate1. * iconvdata/ebcdic-is-friss.c: Use 8bit-gap instead of 8bit-generic. * iconvdata/ebcdic-es.c: Likewise. * iconvdata/ebcdic-es-a.c: Likewise. * iconvdata/ebcdic-uk.c: Likewise. * iconvdata/iso8859-16.c: Likewise. * iconvdata/viscii.c: Likewise. * iconvdata/iso8859-9e.c: Likewise. * iconvdata/Makefile: Adjust appropriately. [BZ #5428] * wcsmbs/wchar.h: Unconditionally undefine __need_mbstate and __need_wint_t. * iconvdata/gconv-modules: Likewise.
* [BZ #5441, BZ #5452, BZ #5454]Ulrich Drepper2007-12-073-2/+17
| | | | | | | | | | | | | | | | | | | | | | 2007-12-07 Ulrich Drepper <drepper@redhat.com> [BZ #5441] * stdio-common/vfscanf.c (_IO_vfwscanf): Don't free ptrs_to_free structure, it's allocated with alloca. * stdio-common/Makefile (tests): Add bug21. * stdio-common/bug21.c: New file. 2007-12-06 Aurelien Jarno <aurelien@aurel32.net> [BZ #5452] * sysdeps/unix/sysv/linux/bits/sched.h: Use __extension__ keyword for gcc's braced-groups. 2007-12-07 Ulrich Drepper <drepper@redhat.com> [BZ #5454] * inet/ether_line.c: Strip hostname of whitespaces. * inet/Makefile (tests): Add tst-ether_line. * inet/tst-ether_line.c: New file.
* * stdio-common/vfprintf.c (vfprintf): Compute necessary buffer sizeUlrich Drepper2007-11-062-14/+21
| | | | | | with size_t type. * stdio-common/printf_fp.c (__print_fp): Change chars_needed type to size_t. Add casts where needed.
* * stdio-common/Makefile (tests): Add bug20.Ulrich Drepper2007-10-282-1/+33
| | | | * stdio-common/bug20.c: New file.
* [BZ #5225]Ulrich Drepper2007-10-281-8/+10
| | | | | * stdio-common/vfscanf.c (_IO_vfwscanf): Don't misuse wp pointer to keep track of end of %[ format string element.
* * stdio-common/printf-parse.h: Include string.h and wchar.h.Ulrich Drepper2007-10-104-56/+24
| | | | | | | | | | | | | (__find_specwc): Change into __extern_always_inline function. (__find_specmb): Likewise. Remove ps argument. Use __strchrnul. (__parse_one_specmb): Remove ps argument. * stdio-common/vfprintf.c (vfprintf): Remove mbstate variable. Adjust __find_specmb and __parse_one_specmb callers. * stdio-common/printf-prs.c (parse_printf_format): Likewise. * stdio-common/printf-parsemb.c (__find_specwc, __find_specmb): Removed. (__parse_one_specmb): Remove ps argument, adjust __find_specmb caller.
* * include/stdio.h (__isoc99_fscanf, __isoc99_scanf,Ulrich Drepper2007-09-1812-58/+784
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | __isoc99_sscanf, __isoc99_vscanf): New prototypes. (__isoc99_vsscanf, __isoc99_vfscanf): New prototypes, add libc_hidden_proto. * include/wchar.h (__isoc99_fwscanf, __isoc99_wscanf, __isoc99_swscanf, __isoc99_vwscanf): New prototypes. (__isoc99_vswscanf, __isoc99_vfwscanf): New prototypes, add libc_hidden_proto. * libio/stdio.h (fscanf, scanf, sscanf, vfscanf, vscanf, vsscanf): Redirect to __isoc99_* if strict ISO C99 or POSIX conformance requested. * wcsmbs/wchar.h (fwscanf, wscanf, swscanf, vfwscanf, vwscanf, vswscanf): Redirect to __isoc99_* if strict ISO C99 or POSIX conformance requested. * libio/bits/stdio-ldbl.h (fscanf, scanf, sscanf, vfscanf, vscanf, vsscanf): Redirect to __nldbl___isoc99_* if strict ISO C99 or POSIX conformance requested. * wcsmbs/bits/wchar-ldbl.h (fwscanf, wscanf, swscanf, vfwscanf, vwscanf, vswscanf): Redirect to __nldbl___isoc99_* if strict ISO C99 or POSIX conformance requested. * stdio-common/Versions (libc): Export __isoc99_scanf@@GLIBC_2.7, __isoc99_vscanf@@GLIBC_2.7, __isoc99_fscanf@@GLIBC_2.7, __isoc99_vfscanf@@GLIBC_2.7, __isoc99_sscanf@@GLIBC_2.7 and __isoc99_vsscanf@@GLIBC_2.7. * stdio-common/Makefile (routines): Add isoc99_scanf, isoc99_vscanf, isoc99_fscanf, isoc99_vfscanf, isoc99_sscanf and isoc99_vsscanf. (tests): Add scanf14. (CFLAGS-vfprintf.c, CFLAGS-fprintf.c, CFLAGS-printf.c, CFLAGS-vfwprintf.c, CFLAGS-vfscanf.c, CFLAGS-vfwscanf.c, CFLAGS-fscanf.c, CFLAGS-scanf.c, CFLAGS-isoc99_vfscanf.c, CFLAGS-isoc99_vscanf.c, CFLAGS-isoc99_fscanf.c, CFLAGS-isoc99_scanf.c): Add $(exceptions). (CFLAGS-scanf15.c): Add various -I paths to prevent the compiler from using internal headers. * wcsmbs/Versions (libc): Export __isoc99_wscanf@@GLIBC_2.7, __isoc99_vwscanf@@GLIBC_2.7, __isoc99_fwscanf@@GLIBC_2.7, __isoc99_vfwscanf@@GLIBC_2.7, __isoc99_swscanf@@GLIBC_2.7 and __isoc99_vswscanf@@GLIBC_2.7. * wcsmbs/Makefile (routines): Add isoc99_wscanf, isoc99_vwscanf, isoc99_fwscanf, isoc99_vfwscanf, isoc99_swscanf and isoc99_vswscanf. (CFLAGS-isoc99_wscanf.c, CFLAGS-isoc99_fwscanf.c, CFLAGS-isoc99_vwscanf.c, CFLAGS-isoc99_vfwscanf.c): Add $(exceptions). (CPPFLAGS): Add -D_IO_MTSAFE_IO if needed. * stdio-common/isoc99_scanf.c: New file. * stdio-common/isoc99_vsscanf.c: New file. * stdio-common/isoc99_vscanf.c: New file. * stdio-common/isoc99_vfscanf.c: New file. * stdio-common/isoc99_fscanf.c: New file. * stdio-common/isoc99_sscanf.c: New file. * wcsmbs/isoc99_fwscanf.c: New file. * wcsmbs/isoc99_vswscanf.c: New file. * wcsmbs/isoc99_swscanf.c: New file. * wcsmbs/isoc99_wscanf.c: New file. * wcsmbs/isoc99_vwscanf.c: New file. * wcsmbs/isoc99_vfwscanf.c: New file. * libio/libio.h (_IO_FLAGS2_SCANF_STD): Define. * libio/libioP.h (_IO_acquire_lock_clear_flags2_fct): Also clear _IO_FLAGS2_SCANF_STD bit from _flags2. * stdio-common/vfscanf.c (_IO_vfscanf_internal): Don't handle %as, %aS and %a[ if _IO_FLAGS2_SCANF_STD is set in _flags2. * stdio-common/scanf14.c: New test. * stdio-common/scanf15.c: New test. * sysdeps/ieee754/ldbl-opt/Makefile (libnldbl-calls): Add isoc99_scanf, isoc99_fscanf, isoc99_sscanf, isoc99_vscanf, isoc99_vfscanf, isoc99_vsscanf, isoc99_wscanf, isoc99_fwscanf, isoc99_swscanf, isoc99_vwscanf, isoc99_vfwscanf and isoc99_vswscanf. * sysdeps/ieee754/ldbl-opt/Versions (libc): Export __nldbl___isoc99_scanf@@GLIBC_2.7, __nldbl___isoc99_fscanf@@GLIBC_2.7, __nldbl___isoc99_sscanf@@GLIBC_2.7, __nldbl___isoc99_vscanf@@GLIBC_2.7, __nldbl___isoc99_vfscanf@@GLIBC_2.7, __nldbl___isoc99_vsscanf@@GLIBC_2.7, __nldbl___isoc99_wscanf@@GLIBC_2.7, __nldbl___isoc99_fwscanf@@GLIBC_2.7, __nldbl___isoc99_swscanf@@GLIBC_2.7, __nldbl___isoc99_vwscanf@@GLIBC_2.7, __nldbl___isoc99_vfwscanf@@GLIBC_2.7 and __nldbl___isoc99_vswscanf@@GLIBC_2.7. * sysdeps/ieee754/ldbl-opt/nldbl-compat.h (__isoc99_scanf, __isoc99_fscanf, __isoc99_sscanf, __isoc99_vscanf, __isoc99_vfscanf, __isoc99_vsscanf, __isoc99_wscanf, __isoc99_fwscanf, __isoc99_swscanf, __isoc99_vwscanf, __isoc99_vfwscanf, __isoc99_vswscanf): Add NLDBL_DECL. * sysdeps/ieee754/ldbl-opt/nldbl-compat.c (__nldbl___isoc99_scanf, __nldbl___isoc99_fscanf, __nldbl___isoc99_sscanf, __nldbl___isoc99_vscanf, __nldbl___isoc99_vfscanf, __nldbl___isoc99_vsscanf, __nldbl___isoc99_wscanf, __nldbl___isoc99_fwscanf, __nldbl___isoc99_swscanf, __nldbl___isoc99_vwscanf, __nldbl___isoc99_vfwscanf, __nldbl___isoc99_vswscanf): New functions. * sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vfscanf.c: New file. * sysdeps/ieee754/ldbl-opt/nldbl-isoc99_swscanf.c: New file. * sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vwscanf.c: New file. * sysdeps/ieee754/ldbl-opt/nldbl-isoc99_wscanf.c: New file. * sysdeps/ieee754/ldbl-opt/nldbl-isoc99_scanf.c: New file. * sysdeps/ieee754/ldbl-opt/nldbl-isoc99_sscanf.c: New file. * sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vsscanf.c: New file. * sysdeps/ieee754/ldbl-opt/nldbl-isoc99_fwscanf.c: New file. * sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vfwscanf.c: New file. * sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vswscanf.c: New file. * sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vscanf.c: New file. * sysdeps/ieee754/ldbl-opt/nldbl-isoc99_fscanf.c: New file. * stdio-common/Makefile (tests): Add scanf13. (scanf13-ENV): New. * stdio-common/vfscanf.c (_IO_vfscanf_internal): Handle m modifier followed by l. (STRING_ARG): Add width argument. (_IO_vfscanf_internal) <case L_('c')>: Handle %mc. <case L_('C')>: Handle %mlc and %mC. <case L_('s'), case L_('S'), case L_('[')>: Adjust STRING_ARG arguments. * stdio-common/scanf13.c: New test. * libio/libioP.h (_IO_acquire_lock_clear_flags2_fct): Clear the _IO_FLAGS2_FORTIFY bit from _flags2 rather than _flags. type and __THROW marker of splice, vmsplice, and tee.
* * stdio-common/vfscanf.c (_IO_vfwscanf): Add support for 'm'Ulrich Drepper2007-09-151-3/+96
| | | | modifier. Patch by Jakub Jelinek.
* * stdio-common/Makefile: Avoid format string warning for tst-sprint.Ulrich Drepper2007-08-261-0/+2
|
* [BZ #4588]Ulrich Drepper2007-08-221-7/+7
| | | | | * stdio-common/tempnam.c: Fix comment, it is not checked that TMPDIR points to a writable directory.
* * nscd/connections.c: Use O_CLOEXEC is possible. Use mkostempUlrich Drepper2007-08-116-16/+20
| | | | | | | | | | | | | | | | | | | | | | | | | instead of mkstemp. * misc/Makefile (routines): Add mkostemp and mkostemp64. * misc/Versions: Export mkostemp and mkostemp64 for GLIBC_2.7. * misc/mkostemp.c: New file. * misc/mkostemp64.c: New file. * stdlib/stdlib.h: Declare the new functions. * sysdeps/posix/tempname.c: Add new parameter which is added to the flags for open. Remove __GT_BIGFILE handling. * stdio-common/tempname.c: Likewise. * include/stdio.h: Adjust __gen_tempname prototype. Renumber __GT_* constants. * libio/oldtmpfile.c: Adjust for __gen_tempname interface change. * misc/mkdtemp.c: Likewise. * misc/mkstemp.c: Likewise. * misc/mkstemp64.c: Likewise. * misc/mktemp.c: Likewise. * stdio-common/tempnam.c: Likewise. * stdio-common/tmpfile.c: Likewise. * stdio-common/tmpfile64.c: Likewise. * stdio-common/tmpnam.c: Likewise. * stdio-common/tmpnam_r.c: Likewise.
* * stdlib/tst-strtod2.c (do_test): Use %tu in fmt string for ptrdiff_tUlrich Drepper2007-08-011-1/+1
| | | | | | | | | | | | | | | | value. * stdio-common/tst-fmemopen2.c (do_test): Avoid fmt string warning if off_t is different rank from size_t. * sysdeps/generic/unwind-dw2.c (extract_cie_info, execute_cfa_program, uw_frame_state_for): Avoid type punning warnings. * sysdeps/generic/unwind-dw2-fde-glibc.c (_Unwind_IteratePhdrCallback): Likewise. * sysdeps/generic/unwind-dw2-fde.c (_Unwind_Find_FDE): Likewise. (binary_search_single_encoding_fdes, binary_search_mixed_encoding_fdes, get_cie_encoding, linear_search_fdes): Don't mix char and unsigned char pointers.