aboutsummaryrefslogtreecommitdiff
path: root/libio
AgeCommit message (Collapse)AuthorFilesLines
2011-05-13Fix error messages in test.Ulrich Drepper1-4/+7
2011-05-13Fix file descriptor position after fcloseUlrich Drepper3-8/+146
fclose should leave the file descriptor position after the last read or written byte.
2011-04-22Use al possible bytes from fopen mode string.Eric Blake1-16/+16
2011-04-22Remove doubled words.Jim Meyering3-8/+8
2011-04-01Fix typos in comments.Ulrich Drepper1-7/+7
2011-03-04Optimize fmemopen a bit.Ulrich Drepper1-5/+6
2011-03-04Don't read past end of buffer in fmemopenAndreas Schwab1-2/+2
2010-09-05Remove undefined operationsAndreas Schwab4-15/+12
2010-06-14Fix a couple of __REDIRECT () __THROW occurrencesJakub Jelinek1-8/+8
This patch fixes some cases which fail to parse with C++.
2010-02-24Fix reporting of I/O errors in *dprintf functions.Ulrich Drepper1-1/+4
2010-01-10Fix standalone stdio.h inclusion.Ulrich Drepper1-2/+22
2009-11-19Fix getwc* and putwc* on non-wide streams.Ulrich Drepper1-6/+8
2009-10-30Implement mkstemps and mkstemps64.Ulrich Drepper1-2/+2
2009-10-29Fix return value of puts for very long strings.Ulrich Drepper1-2/+3
2009-09-19Remove some unused variables.Roland McGrath1-4/+0
2009-09-02Fix fsetpos on wide stream.Andreas Schwab3-36/+90
2009-09-01Cleanup _IO_wfile_seekoff.Andreas Schwab1-71/+39
This reformulates the in-buffer optimisation check to match the code in _IO_new_file_seekoff. No functional changes, but easier to understand.
2009-09-01Add hidden alias for fflush.Andreas Schwab1-0/+1
2009-06-16Run tst-fgetwc with necessary envvar.Ulrich Drepper1-0/+1
2009-06-15(do_test): Use de_DE.UTF-8 as locale name.Bruce Dubbs1-1/+1
2009-06-09(_IO_new_file_fopen): Don't prematurely stop parsing mode string.Ulrich Drepper1-3/+3
2009-05-16remove subsumed .gitignore entries and filesJim Meyering1-8/+0
2009-05-16remove mpn-copy.mk from .gitignore filesJim Meyering1-1/+1
2009-05-16remove COPYING* from .gitignore filesJim Meyering1-1/+1
2009-05-15rename each .cvsignore file to .gitignoreJim Meyering1-0/+0
2009-04-26* sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):Ulrich Drepper5-15/+16
Avoid warning by using may_alias attribute on ptrhack.
2009-04-25* libio/tst-widetext.input: Remove surrogates.Ulrich Drepper1-41/+0
2009-03-10* include/stdio.h (fmemopen): Add libc_hidden_proto.Ulrich Drepper1-1/+3
* libio/fmemopen.c (fmemopen): Add libc_hidden_def. * elf/sprof.c: Avoid warning about multi-line comment.
2009-02-26* libio/stdio.h: dprintf, fmemopen, getdelim, getline,Ulrich Drepper1-2/+6
open_memstream, and vdprintf are in POSIX 2008.
2009-02-05* sysdeps/unix/sysv/linux/sparc/bits/siginfo.h (struct sigevent):Ulrich Drepper1-2/+22
Add _tid slot to maintain consistency with kernel.
2009-02-042009-02-04 Ulrich Drepper <drepper@redhat.com>cvs/fedora-glibc-20090204T2135Ulrich Drepper3-13/+41
* libio/wfileops.c (_IO_wfile_underflow): Fix handling of incomplete characters at end of input buffer. * libio/Makefile (tests): Add tst-fgetwc. * libio/tst-fgetwc.c: New file. * libio/tst-fgetwc.input: New file.
2009-02-04Test of fgetwc on unbuffered stream.Ulrich Drepper1-0/+52
2008-08-14[BZ #6544]Ulrich Drepper1-4/+7
* libio/fmemopen.c: Implement binary mode. In this mode no NUL byte gets added to writes and seeks from the end use the length of the buffer and not the currently terminating NUL byte.
2008-07-27* libio/iopopen.c (_IO_new_proc_open): Remove unnecessary volatile.Ulrich Drepper1-2/+2
2008-07-27* posix/wordexp.c (exec_comm): Use pipe2 if possible to createUlrich Drepper1-0/+1
file descriptors with close-on-exec set. (exec_comm_child): Fix the case where the write end of the pipe is STDOUT_FILENO already. In case it is, clear close-on-exec.
2008-07-27* sysdeps/unix/sysv/linux/syscalls.list: Add __pipe2 alias.Ulrich Drepper3-24/+144
* io/pipe2.c: Likewise. * sysdeps/unix/sysv/linux/kernel-features.h: Define __ASSUME_PIPE2 instead of __ASSUME_PACCEPT. * include/unistd.h: Declare __have_pipe2. * libio/iopopen.c: Implement "e" flag. * libio/Makefile (tests): Add tst-popen1. * libio/tst-popen1.c: New file.
2008-07-27* sysdeps/unix/sysv/linux/bits/socket.h: Define PF_ISDN and AF_ISDN.Ulrich Drepper1-1/+1
* sysdeps/unix/sysv/linux/sparc/bits/socket.h: Likewise.
2008-07-26[BZ #6771]Ulrich Drepper1-1/+3
* libio/fileops.c (_IO_new_file_attach): Preserve errno around success call of _IO_SEEKOFF or calls which failed because the descriptor is for a pipe.
2008-07-08[BZ #6719]Ulrich Drepper1-1/+1
2008-07-08 Ulrich Drepper <drepper@redhat.com> [BZ #6719] * libio/iosetvbuf.c (_IO_setvbuf): Correctly clear buffering flags when selecting fully-buffered stream. Patch by Wang Xin <wxinee@gmail.com>.
2008-05-27Remove useless more "if" tests before "free".Ulrich Drepper2-6/+4
* include/inline-hashtab.h (htab_delete): Likewise. * libio/freopen.c (freopen): Likewise. * libio/freopen64.c (freopen64): Likewise. * locale/programs/ld-collate.c (collate_read): Likewise. * misc/fstab.c (libc_freeres_fn): Likewise. * posix/glob.c (globfree): Likewise.
2008-05-24* libio/stdio.h (vscanf): Fix -std=c99 redirect. Jakub Jelinek1-1/+1
* 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.
2008-04-09[BZ #5998]Ulrich Drepper2-4/+12
2008-04-09 Ulrich Drepper <drepper@redhat.com> [BZ #5998] * libio/iofwrite.c (_IO_fwrite): Return correct count if flushing in line-buffered stream failed. * libio/iofwrite_u.c (fwrite_unlocked): Likewise.
2008-03-19Remove useless "if" before "free".Ulrich Drepper2-4/+2
2008-03-05* include/stdio.h (__asprintf_chk, __dprintf_chk,cvs/fedora-glibc-20080305T0857Ulrich Drepper3-4/+99
__obstack_printf_chk): New prototypes. (__vasprintf_chk, __vdprintf_chk, __obstack_vprintf_chk): Likewise. Add libc_hidden_proto. * libio/obprintf.c (_IO_obstack_jumps): No longer static, add attribute_hidden. * libio/bits/stdio-ldbl.h (__asprintf_chk, __dprintf_chk, __obstack_printf_chk, __vasprintf_chk, __vdprintf_chk, __obstack_vprintf_chk): Add __LDBL_REDIR_DECL. * libio/bits/stdio2.h (__asprintf_chk, __dprintf_chk, __obstack_printf_chk, __vasprintf_chk, __vdprintf_chk, __obstack_vprintf_chk): New prototypes. (asprintf, __asprintf, dprintf, obstack_printf, vasprintf, vdprintf, obstack_vprintf): New inlines. * debug/dprintf_chk.c: New file. * debug/vdprintf_chk.c: New file. * debug/asprintf_chk.c: New file. * debug/vasprintf_chk.c: New file. * debug/obprintf_chk.c: New file. * debug/tst-chk1.c (do_test): Add asprintf and obstack_printf tests. * debug/Versions (__asprintf_chk, __dprintf_chk, __obstack_printf_chk, __vasprintf_chk, __vdprintf_chk, __obstack_vprintf_chk): Export @@GLIBC_2.8. * debug/Makefile: Build asprintf_chk, vasprintf_chk, dprintf_chk, vdprintf_chk and obprintf_chk, set CFLAGS for them. * sysdeps/ieee754/ldbl-opt/nldbl-compat.c (__nldbl___vasprintf_chk, __nldbl___vdprintf_chk, __nldbl___obstack_vprintf_chk): Add libc_hidden_proto. * sysdeps/ieee754/ldbl-opt/nldbl-compat.h (__nldbl___vasprintf_chk, __nldbl___vdprintf_chk, __nldbl___obstack_vprintf_chk): New prototypes. * sysdeps/ieee754/ldbl-opt/Versions (__nldbl___asprintf_chk, __nldbl___vasprintf_chk, __nldbl___dprintf_chk, __nldbl___vdprintf_chk, __nldbl___obstack_printf_chk, __nldbl___obstack_vprintf_chk): Export @@GLIBC_2.8. * sysdeps/ieee754/ldbl-opt/Makefile (libnldbl-calls): Add asprintf_chk, vasprintf_chk, dprintf_chk, vdprintf_chk, obstack_printf_chk and obstack_vprintf_chk. * sysdeps/ieee754/ldbl-opt/nldbl-obstack_vprintf_chk.c: New file. * sysdeps/ieee754/ldbl-opt/nldbl-dprintf_chk.c: New file. * sysdeps/ieee754/ldbl-opt/nldbl-obstack_printf_chk.c: New file. * sysdeps/ieee754/ldbl-opt/nldbl-asprintf_chk.c: New file. * sysdeps/ieee754/ldbl-opt/nldbl-vdprintf_chk.c: New file. * sysdeps/ieee754/ldbl-opt/nldbl-vasprintf_chk.c: New file.
2008-01-08(vscanf): Fix definition for loser compilers.Ulrich Drepper1-2/+2
2007-10-14* include/time.h: Declare __tzset_parse_tz and __tzset_compute.Ulrich Drepper1-1/+2
* time/tzset.c (tzset_internal): Break TZ string parsing out into __tzset_parse_tz and updating of daylight, timezone, tzname into update_vars. (__tz_compute): Renamed from tz_compute. Take additional parameters. (__tz_convert): Updating of tm_isdst, tm_zone, and tm_gmtoff now happens in __tz_compute. * time/tzfile.c (__tzfile_read): Also read TZ string. (find_transition): Fold into __tzfile_compute. (__tzfile_compute): For times beyond the last transition try to use the TZ string. * timezone/tst-timezone.c: Information in daylight and tzname does change for Asia/Tokyo timezone with more concrete information. Remove the test. * include/stdio.h: Add libc_hidden_proto for ftello. * libio/ftello.c: Add libc_hidden_def.
2007-10-13* libio/Makefile (tests): Add tst-ext2.Ulrich Drepper2-2/+60
* libio/tst-ext2.c: New file.
2007-10-13write-only streams. For read/write streams, check whether weUlrich Drepper1-3/+3
performed a read operation already.
2007-10-13[BZ #4359]Ulrich Drepper1-3/+4
2007-10-13 Ulrich Drepper <drepper@redhat.com> [BZ #4359] * libio/__freading.c (__freading): Don't return true for write-only streams.
2007-09-26* misc/sys/cdefs.h (__warndecl, __errordecl): For GCC 4.3+ defineUlrich Drepper1-18/+64
with __warning__/__error__ attributes. (__warnattr): Define. * stdlib/bits/stdlib.h (__realpath_chk_warn, __ptsname_r_chk_warn, __mbstowcs_chk_warn, __wcstombs_chk_warn): New aliases with __warnattr. (realpath, ptsname_r, mbstowcs, wcstombs): Call __*_chk_warn instead of __*_chk if compile time detectable overflow is found. * libio/bits/stdio2.h (__fgets_chk_warn, __fread_chk_warn, __fgets_unlocked_chk_warn, __fread_unlocked_chk_warn): New aliases with __warnattr. (fgets, fread, fgets_unlocked, fread_unlocked): Call __*_chk_warn instead of __*_chk if compile time detectable overflow is found. (__gets_alias): Rename to... (__gets_warn): ... this. Add __warnattr. (gets): Call __gets_warn instead of __gets_alias. * socket/bits/socket2.h (__recv_chk_warn, __recvfrom_chk_warn): New aliases with __warnattr. (recv, recvfrom): Call __*_chk_warn instead of __*_chk if compile time detectable overflow is found. * posix/bits/unistd.h (__read_chk_warn, __pread_chk_warn, __pread64_chk_warn, __readlink_chk_warn, __readlinkat_chk_warn, __getcwd_chk_warn, __confstr_chk_warn, __getgroups_chk_warn, __ttyname_r_chk_warn, __getlogin_r_chk_warn, __gethostname_chk_warn, __getdomainname_chk_warn): New aliases with __warnattr. (read, pread, pread64, readlink, readlinkat, getcwd, confstr, getgroups, ttyname_r, getlogin_r, gethostname, getdomainname): Call __*_chk_warn instead of __*_chk if compile time detectable overflow is found. (__getgroups_chk): Rename argument to __listlen from listlen. (__getwd_alias): Rename to... (__getwd_warn): ... this. Add __warnattr. (getwd): Call __getwd_warn instead of __getwd_alias. * wcsmbs/bits/wchar2.h (__wmemcpy_chk_warn, __wmemmove_chk_warn, __wmempcpy_chk_warn, __wmemset_chk_warn, __wcsncpy_chk_warn, __wcpncpy_chk_warn, __fgetws_chk_warn, __fgetws_unlocked_chk_warn, __mbsrtowcs_chk_warn, __wcsrtombs_chk_warn, __mbsnrtowcs_chk_warn, __wcsnrtombs_chk_warn): New aliases with __warnattr. (wmemcpy, wmemmove, wmempcpy, wmemset, mbsrtowcs, wcsrtombs, mbsnrtowcs, wcsnrtombs): Call __*_chk_warn instead of __*_chk if compile time detectable overflow is found. (wcsncpy, wcpncpy): Likewise. For constant __n fix check whether to use __*_chk or not. (fgetws, fgetws_unlocked): Divide __bos by sizeof (wchar_t), both in comparisons which function should be called and in __*_chk* arguments. Call __*_chk_warn instead of __*_chk if compile time detectable overflow is found. (swprintf, vswprintf): Divide __bos by sizeof (wchar_t) in __*_chk argument. * debug/tst-chk1.c (do_test): Add a few more tests.