Commit Graph

778 Commits

Author SHA1 Message Date
H.J. Lu 740b3dbee8 Add --enable-hardcoded-path-in-tests configure option 2013-01-11 07:14:18 -08:00
Joseph Myers 568035b787 Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
Joseph Myers f4cf5f2d8b Add script to update copyright notices and reformat some to facilitate its use. 2013-01-01 16:29:10 +00:00
Mike Frysinger eb6cbd249f [BZ #12724] libio: revert partial POSIX 2008 fclose support
In BZ #12724, partial support for POSIX 2008 fclose behavior was added.
Since it isn't entirely conforming to the spec, some applications are
known to be breaking in this intermediate state.  So revert the partial
support until we can get things fully implemented.

This reverts commit fcabc0f8b1.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-12-01 21:37:52 -05:00
Siddhesh Poyarekar de2fd463b1 Make fwrite return 0 on EOF 2012-11-28 01:00:50 +05:30
Siddhesh Poyarekar 2b766585f9 printf should return negative value on error
[BZ #11741]
Fixed bug where printf and family may return a spurious success when
printing padded formats.
2012-11-16 19:13:11 +05:30
Siddhesh Poyarekar b1848fdeec Note in a comment that references to C++ bits are obsolete
libio is not used by libstdc++ anymore, but there are references to
streambuf are all over.
2012-11-16 19:12:28 +05:30
Thomas Schwinge 341dd67392 Change type of constant to avoid a warning.
Warning has been introduced in commit 7583a88d1c.
2012-11-01 17:56:48 +01:00
Joseph Myers 03ac099f6b Define and use $(run-built-tests). 2012-10-24 00:08:46 +00:00
Joseph Myers ced52c719c Remove _G_OPEN64, _G_LSEEK64, _G_MMAP64, _G_FSTAT64 from _G_config.h. 2012-10-18 18:50:43 +00:00
Joseph Myers 472371b9b0 Remove _IO_pos_t. 2012-10-10 16:05:36 +00:00
Joseph Myers c8450f70fa Remove _G_off64_t and _G_stat64 from _G_config.h. 2012-10-09 15:09:32 +00:00
Siddhesh Poyarekar adb26faefe Don't flush write buffer for ftell
[BZ #5298]
Use write pointer state along with the file offset and/or the read
pointers to get the current file position.
2012-09-28 18:38:14 +05:30
Siddhesh Poyarekar 4573c6b098 Adjust wide data buffer pointers during fseek and ftell
[BZ #14543]
Set the internal buffer state correctly whenever the external buffer
state is modified by fseek by either computing the current
_IO_read_ptr/end for the internal buffer based on the new _IO_read_ptr
in the external buffer or converting the content read into the
external buffer, up to the extent of the requested fseek offset.
2012-09-28 18:21:39 +05:30
Joseph Myers 203e56032f Remove various _G_*_t type names. 2012-09-25 12:37:37 +00:00
Siddhesh Poyarekar 2b4f00d1a4 Fix minor typos in comments 2012-09-25 09:28:43 +05:30
Dmitry V. Levin 57c69bef13 Set "fail on error" mode directly in testsuite shell scripts 2012-09-25 02:48:31 +00:00
Joseph Myers 431531094f Remove _G_HAVE_SYS_WAIT and _IO_HAVE_SYS_WAIT. 2012-09-21 10:02:03 +00:00
Joseph Myers 8a26625d21 Remove _G_NEED_STDARG_H. 2012-09-20 14:41:02 +00:00
Joseph Myers b7aaa4d6d2 Remove _G_HAVE_IO_GETLINE_INFO. 2012-09-17 11:43:06 +00:00
Joseph Myers ad35fc005b Remove _G_HAVE_PRINTF_FP. 2012-09-13 16:13:09 +00:00
Joseph Myers 28361c5ee4 Remove _G_USING_THUNKS. 2012-09-10 22:05:49 +00:00
Joseph Myers 0e886ef96e Remove libio C++ vtable definitions. 2012-09-10 21:22:42 +00:00
H.J. Lu bcba7aa24d Run tst-fopenloc if $(build-shared) is yes 2012-09-10 11:13:54 -07:00
Siddhesh Poyarekar 1ffb8c9001 Fix typos in comments
* libio/fileops.c: Fix typos in comments.
        * libio/oldfileops.c: Likewise.
        * libio/wfileops.c: Likewise.
2012-09-05 22:04:57 +05:30
Joseph Myers 60160d83a0 Fix iogetdelim.c (latent) integer overflow (bug 9914). 2012-09-04 11:24:43 +00:00
Roland McGrath b2e1c56272 Make libio compile without _IO_MTSAFE_IO. 2012-08-17 09:35:36 -07:00
Roland McGrath c75ccd4c3a Clean up definition of _LIBC_REENTRANT and _IO_MTSAFE_IO. 2012-08-17 09:35:15 -07:00
Roland McGrath 03af952060 Clean up lockf64, fseeko64, ftello64, fgetpos64, fsetpos64 for off64_t == off_t. 2012-08-06 16:48:14 -07:00
Roland McGrath 2747bf9adf Clean up fopen64 for O_LARGEFILE==0. 2012-08-01 16:30:47 -07:00
Roland McGrath bea9b19322 Fix lots of bitrot for stub configurations. 2012-07-30 16:34:33 -07:00
Andreas Schwab d18ea0c5e6 Remove use of INTDEF/INTUSE in libio 2012-05-24 23:06:20 +02:00
Thomas Schwinge dc70356cbf Avoid dup3 PLT usage.
Fixes fallout from 5aa3a74a59.
2012-05-12 10:53:04 +08:00
Thomas Schwinge 37233df9d1 Hurd: #include <kernel-features.h> 2012-05-10 15:57:24 -07:00
Joseph Myers 54b71e0283 Fix conditions on checking versions of dprintf (bug 13775). 2012-05-03 18:42:37 +00:00
Marek Polacek 5ac3ea17df Fix attributes for fortify functions. 2012-04-29 15:34:20 +02:00
Roland McGrath ec98af7d1b Update comment for _io_write_fn
[BZ #2074]
	* libio/libio.h (__io_write_fn): Update comment.
2012-04-12 21:02:00 +02:00
Jim Meyering 288f9098cb Remove __wur from fwrite, fwrite_unlocked
[BZ #11959]
        * libio/stdio.h (fwrite, fwrite_unlocked): Remove __wur.
        It is not necessarily an error to ignore fwrite's return
        value.  One can reliably use ferror to test for errors after
        the fact.
2012-04-11 21:03:57 +02:00
David S. Miller 20fde22738 Remove xsputn small copy optimization.
* libio/fileops.c (_IO_new_file_xsputn): Don't try to optimize
	small copies by hand.
2012-03-29 14:38:27 -07:00
Joseph Myers c6e013c15e Always declare gets for C++ up to C++11 without checking __USE_GNU. 2012-03-09 22:08:39 +00:00
Ulrich Drepper a4300c7a4d Remove distribute variable from Makefiles 2012-03-07 05:17:13 -05:00
Roland McGrath 36c8acb4f8 BZ#13775: Fix vdprintf/dprintf ldbl-compat decl feature test conditional. 2012-02-27 14:00:47 -08:00
Paul Eggert 59ba27a63a Replace FSF snail mail address with URLs. 2012-02-09 23:18:22 +00:00
Marek Polacek 6b73181ac5 Remove _G_HAVE_SYS_CDEFS. 2012-02-09 17:09:55 +01:00
Marek Polacek 69db4f8f46 Remove PARAMS macros. 2012-01-31 20:02:53 +00:00
Joseph Myers c8a89e7dd5 Remove miscellaneous __STDC__ conditionals. 2012-01-30 21:20:32 +00:00
Joseph Myers 965a54a4ee Remove __STDC__ conditionals from non-installed headers. 2012-01-26 23:31:37 +00:00
Joseph Myers 7071ad79db Remove __STDC__ conditionals from installed headers. 2012-01-26 20:49:22 +00:00
Marek Polacek e0a309cf2a Don't always provide definition of gets checking version 2012-01-13 12:45:02 -05:00
Ulrich Drepper a784e50247 Remove pre-ISO C support
No more __const.
2012-01-07 23:57:22 -05:00
Ulrich Drepper c3a8723670 Do not declare gets in _GNU_SOURCE mode at all 2012-01-07 10:41:00 -05:00
Joseph Myers 8ecd6b2a12 Fix C11 header changes for C++. 2012-01-06 18:11:50 +00:00
Ulrich Drepper 16578fa7b3 Better gets prototype and fallout from removal 2012-01-01 07:17:22 -05:00
Ulrich Drepper 03a718297d Remove gets declaration 2012-01-01 07:17:20 -05:00
Marek Polacek aaddc98c25 Remove unused variables 2011-11-11 13:27:59 -05:00
Andreas Schwab 7583a88d1c Fix locking in _IO_flush_all_lockp 2011-11-07 15:20:59 +01:00
Ulrich Drepper 9beb233493 Mark a few more functions with __THROWNL. 2011-10-29 15:56:44 -04:00
Roland McGrath 94d44d9f4d Remove mention of open_obstack_stream, which has never existed in libio. 2011-10-26 16:53:02 -07:00
Ulrich Drepper ab6737ffd0 Avoid warning in iofwide 2011-10-15 09:52:26 -04:00
Ulrich Drepper f22e10748f Don't lock string streams in stream cleanup code 2011-09-09 16:15:25 -04:00
Andreas Jaeger a101b025af Fix fopen (non-existing-file, "re") errno 2011-08-20 09:12:49 -04:00
Ulrich Drepper 798be72d12 Define SEEK_DATA and SEEK_HOLE 2011-07-23 21:45:57 -04:00
Ulrich Drepper aec84f5395 Set stream errors in more cases
Also avoid unnecessarily setting errno when testing for TTY.
2011-05-21 00:42:06 -04:00
Ulrich Drepper ed690b2f24 Cleanup namespace use. 2011-05-19 21:09:29 -04:00
H.J. Lu 0a197a9dfe Fix fileops.c build for old kernels 2011-05-17 01:45:49 -04:00
Ulrich Drepper 94b7cc3711 Fix a few problems in fopen and freopen
fopen should set the FD_CLOEXEC flag if requested evenif the kernel does
not support an aotmic operation.

freopen should reuse the file descriptor for the stream.  This is
especially important for calls to change the standard streams (stin,
stdout, stderr).
2011-05-15 15:28:46 -04:00
Ulrich Drepper ca408c157c Initialize variable in _IO_new_file_close_it
The last change left a variable in some situations uninitialized.
2011-05-14 10:59:54 -04:00
Ulrich Drepper 20030ae6d7 Fix error messages in test. 2011-05-13 21:10:29 -04:00
Ulrich Drepper fcabc0f8b1 Fix file descriptor position after fclose
fclose should leave the file descriptor position after the last read
or written byte.
2011-05-13 21:08:45 -04:00
Eric Blake b722481ac2 Use al possible bytes from fopen mode string. 2011-04-22 23:40:57 -04:00
Jim Meyering ded5b9b7c7 Remove doubled words. 2011-04-22 21:34:32 -04:00
Ulrich Drepper 4c1423edfb Fix typos in comments. 2011-04-01 10:39:30 -04:00
Ulrich Drepper 13a804de8f Optimize fmemopen a bit. 2011-03-04 00:49:46 -05:00
Andreas Schwab 9d25c392ba Don't read past end of buffer in fmemopen 2011-03-04 00:48:00 -05:00
Andreas Schwab 817328eea7 Remove undefined operations 2010-09-05 13:55:08 +02:00
Jakub Jelinek f32f28695d Fix a couple of __REDIRECT () __THROW occurrences
This patch fixes some cases which fail to parse with C++.
2010-06-14 08:18:26 -07:00
Ulrich Drepper 7ca890b88e Fix reporting of I/O errors in *dprintf functions. 2010-02-24 16:07:57 -08:00
Ulrich Drepper cd2f000c07 Fix standalone stdio.h inclusion. 2010-01-10 00:39:22 -08:00
Ulrich Drepper df1934daa7 Fix getwc* and putwc* on non-wide streams. 2009-11-19 10:29:16 -08:00
Ulrich Drepper 7f3146e789 Implement mkstemps and mkstemps64. 2009-10-30 00:11:07 -07:00
Ulrich Drepper cc88b371a5 Fix return value of puts for very long strings. 2009-10-29 16:03:07 -07:00
Roland McGrath 487a6d7735 Remove some unused variables. 2009-09-19 17:19:41 -07:00
Andreas Schwab 5d2e69766a Fix fsetpos on wide stream. 2009-09-02 19:45:33 -07:00
Andreas Schwab d840539e12 Cleanup _IO_wfile_seekoff.
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-01 15:36:22 -07:00
Andreas Schwab 5182cbc5ab Add hidden alias for fflush. 2009-09-01 15:31:09 -07:00
Ulrich Drepper eae3208e24 Run tst-fgetwc with necessary envvar. 2009-06-16 07:48:27 -07:00
Bruce Dubbs 4155d92633 (do_test): Use de_DE.UTF-8 as locale name. 2009-06-15 17:27:48 -07:00
Ulrich Drepper 0d74e04361 (_IO_new_file_fopen): Don't prematurely stop parsing mode string. 2009-06-09 06:59:02 -07:00
Jim Meyering edeabc047e remove subsumed .gitignore entries and files 2009-05-16 10:41:40 +02:00
Jim Meyering 8636153326 remove mpn-copy.mk from .gitignore files 2009-05-16 10:38:54 +02:00
Jim Meyering bb87237534 remove COPYING* from .gitignore files 2009-05-16 10:38:53 +02:00
Jim Meyering 2e180a2622 rename each .cvsignore file to .gitignore 2009-05-15 18:13:37 +02:00
Ulrich Drepper f521be31b9 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
Avoid warning by using may_alias attribute on ptrhack.
2009-04-26 18:06:47 +00:00
Ulrich Drepper 1332704275 * libio/tst-widetext.input: Remove surrogates. 2009-04-25 08:39:43 +00:00
Ulrich Drepper a99e59d771 * include/stdio.h (fmemopen): Add libc_hidden_proto.
* libio/fmemopen.c (fmemopen): Add libc_hidden_def.

	* elf/sprof.c: Avoid warning about multi-line comment.
2009-03-10 15:26:57 +00:00
Ulrich Drepper f503060bbb * libio/stdio.h: dprintf, fmemopen, getdelim, getline,
open_memstream, and vdprintf are in POSIX 2008.
2009-02-26 15:44:18 +00:00
Ulrich Drepper a71433e7fd * sysdeps/unix/sysv/linux/sparc/bits/siginfo.h (struct sigevent):
Add _tid slot to maintain consistency with kernel.
2009-02-05 00:21:43 +00:00
Ulrich Drepper 82f2e9c6bd 2009-02-04 Ulrich Drepper <drepper@redhat.com>
* 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-04 21:27:48 +00:00
Ulrich Drepper 3d44c0b219 Test of fgetwc on unbuffered stream. 2009-02-04 21:25:31 +00:00
Ulrich Drepper 7b3ba2c4eb [BZ #6544]
* 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-08-14 06:37:17 +00:00
Ulrich Drepper 372aece0e4 * libio/iopopen.c (_IO_new_proc_open): Remove unnecessary volatile. 2008-07-27 22:34:39 +00:00
Ulrich Drepper e038616f4a * posix/wordexp.c (exec_comm): Use pipe2 if possible to create
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 19:08:19 +00:00
Ulrich Drepper d6e0c2a67d * sysdeps/unix/sysv/linux/syscalls.list: Add __pipe2 alias.
* 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 18:26:13 +00:00
Ulrich Drepper 11ed3eaed9 * sysdeps/unix/sysv/linux/bits/socket.h: Define PF_ISDN and AF_ISDN.
* sysdeps/unix/sysv/linux/sparc/bits/socket.h: Likewise.
2008-07-27 08:25:37 +00:00
Ulrich Drepper c4a710b6b0 [BZ #6771]
* 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-26 23:42:14 +00:00
Ulrich Drepper 38dc8fad64 [BZ #6719]
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-07-08 16:21:11 +00:00
Ulrich Drepper 62605cbfcb Remove useless more "if" tests before "free".
* 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-27 06:04:07 +00:00
Jakub Jelinek ad8a551196 * 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-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-05-24 18:14:36 +00:00
Ulrich Drepper a7925a24fe [BZ #5998]
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-04-09 07:42:19 +00:00
Ulrich Drepper 72e6cdfa2c Remove useless "if" before "free". 2008-03-19 06:43:34 +00:00
Ulrich Drepper dff3751503 * include/stdio.h (__asprintf_chk, __dprintf_chk,
__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-03-05 07:05:13 +00:00
Ulrich Drepper 4e3be9d651 (vscanf): Fix definition for loser compilers. 2008-01-08 01:18:40 +00:00
Ulrich Drepper fa76dde2cf * include/time.h: Declare __tzset_parse_tz and __tzset_compute.
* 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-14 09:15:45 +00:00
Ulrich Drepper 7e39d8025d * libio/Makefile (tests): Add tst-ext2.
* libio/tst-ext2.c: New file.
2007-10-13 07:33:09 +00:00
Ulrich Drepper ed36f224c3 write-only streams. For read/write streams, check whether we
performed a read operation already.
2007-10-13 07:20:46 +00:00
Ulrich Drepper 0ea4967708 [BZ #4359]
2007-10-13  Ulrich Drepper  <drepper@redhat.com>
	[BZ #4359]
	* libio/__freading.c (__freading): Don't return true for
	write-only streams.
2007-10-13 07:11:11 +00:00
Ulrich Drepper d6cd6bf4de * misc/sys/cdefs.h (__warndecl, __errordecl): For GCC 4.3+ define
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.
2007-09-26 20:45:18 +00:00
Ulrich Drepper 874aa52349 * include/stdio.h (__isoc99_fscanf, __isoc99_scanf,
__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.
2007-09-18 19:04:01 +00:00
Ulrich Drepper de1c3ebb59 * misc/sys/cdefs.h (__va_arg_pack): Define for GCC 4.3+.
* misc/bits/syslog.h (syslog): When __va_arg_pack is defined,
	implement as __extern_always_inline function.
	(vsyslog): Define as __extern_always_inline function unconditionally.
	* libio/bits/stdio2.h (sprintf, snprintf, printf, fprintf):
	When __va_arg_pack is defined, implement as __extern_always_inline
	functions.
	(vsprintf, vsnprintf, vprintf, vfprintf): Define as
	__extern_always_inline functions unconditionally.
	* libio/bits/stdio.h (vprintf): Ifdef out the inline when
	bits/stdio2.h will be included.
	* wcsmbs/bits/wchar2.h (__swprintf_alias): New redirect.
	(swprintf, wprintf, fwprintf): When __va_arg_pack is defined,
	implement as __extern_always_inline functions.
	(vswprintf, vwprintf, vfwprintf): Define as
	__extern_always_inline functions unconditionally.
	* debug/tst-chk1.c (do_test): Enable remaining tests for C++.

2007-09-03  Jakub Jelinek  <jakub@redhat.com>

	* misc/sys/cdefs.h (__extern_inline, __extern_always_inline): Only
	define in C++ for GCC 4.3+, in C++ always use __gnu_inline__
	attribute.
	* include/features.h (__USE_EXTERN_INLINES): Define only when
	__extern_inline is defined.
	* stdlib/stdlib.h: Include bits/stdlib.h when __extern_always_inline
	is defined instead of when not __cplusplus.
	* misc/sys/syslog.h: Include bits/syslog.h when __extern_always_inline
	is defined instead of when not __cplusplus.
	* socket/sys/socket.h: Include bits/socket2.h when
	__extern_always_inline is defined instead of when not __cplusplus.
	* libio/stdio.h: Include bits/stdio2.h when __extern_always_inline
	is defined instead of when not __cplusplus.
	* posix/unistd.h: Include bits/unistd.h when __extern_always_inline
	is defined instead of when not __cplusplus.
	* string/string.h: Include bits/string3.h when __extern_always_inline
	is defined instead of when not __cplusplus.
	* wcsmbs/wchar.h: Include bits/wchar2.h when __extern_always_inline
	is defined instead of when not __cplusplus.
	(btowc, wctob): Don't guard the inlines with ifndef __cplusplus.
	* io/fcntl.h: Don't include bits/fcntl2.h if __extern_always_inline
	is not defined.
	* misc/bits/syslog-ldbl.h: Guard *_chk stuff with
	defined __extern_always_inline instead of !defined __cplusplus.
	* libio/bits/stdio-ldbl.h: Likewise.
	* wcsmbs/bits/wchar-ldbl.h: Likewise.
	* misc/bits/syslog.h (syslog): Don't define for C++.
	(vsyslog): Use __extern_always_inline function for C++ instead of
	a macro.
	* libio/bits/stdio.h (__STDIO_INLINE): Define to __extern_inline
	whenever that macro is defined.
	(vprintf): Don't provide the inline for C++.
	(fread_unlocked, fwrite_unlocked): Don't define the macros for C++.
	* libio/bits/stdio2.h (sprintf, snprintf, printf, fprintf): Don't
	define the macros for C++.
	(vsprintf, vsnprintf, vprintf, vfprintf): Define as
	__extern_always_inline functions for C++.
	* io/sys/stat.h (stat, lstat, fstat, fstatat, mknod, mknodat,
	stat64, lstat64, fstat64, fstatat64): Don't define if not
	__USE_EXTERN_INLINES.
	* wcsmbs/bits/wchar2.h: Fix #error message.
	(swprintf, wprintf, fwprintf): Don't define the macros for C++.
	(vswprintf, vwprintf, vfwprintf): Define using
	__extern_always_inline functions for C++.
	* string/bits/string3.h: Don't #undef macros if __cplusplus.
	(memcpy, memmove, mempcpy, memset, bcopy, bzero, strcpy, stpcpy,
	strncpy, strcat, strncat): Define as __extern_always_inline
	functions instead of macros for C++.
	* math/bits/cmathcalls.h: Guard __extern_inline routines with
	defined __extern_inline.
	* sysdeps/alpha/fpu/bits/mathinline.h (__MATH_INLINE): Define
	to __extern_inline whenever that macro is defined.
	* sysdeps/ia64/fpu/bits/mathinline.h (__MATH_INLINE): Likewise.
	* sysdeps/i386/fpu/bits/mathinline.h (__MATH_INLINE): Likewise.
	* sysdeps/i386/i486/bits/string.h (__STRING_INLINE): Likewise.
	* sysdeps/s390/bits/string.h (__STRING_INLINE): Likewise.
	* sysdeps/s390/fpu/bits/mathinline.h (__MATH_INLINE): Likewise.
	* sysdeps/powerpc/fpu/bits/mathinline.h (__MATH_INLINE): Likewise.
	* sysdeps/x86_64/fpu/bits/mathinline.h (__MATH_INLINE): Likewise.
	* sysdeps/sparc/fpu/bits/mathinline.h (__MATH_INLINE): Likewise.
	* sysdeps/unix/sysv/linux/sys/sysmacros.h (gnu_dev_major,
	gnu_dev_minor, gnu_dev_makedev): Remove __extern_inline from
	prototypes.  Only provide __extern_inline routines if
	__USE_EXTERN_INLINES.
	* debug/Makefile: Add rules to build and run tst-{,lfs}chk{4,5,6}
	tests.
	* debug/tst-chk1.c (do_prepare, do_test): Allow compilation as C++.
	For now avoid some *printf tests in C++.  Skip all testing
	if __USE_FORTIFY_LEVEL is defined, but __extern_always_inline macro
	is not.
	* debug/tst-chk4.cc: New file.
	* debug/tst-chk5.cc: New file.
	* debug/tst-chk6.cc: New file.
	* debug/tst-lfschk4.cc: New file.
	* debug/tst-lfschk5.cc: New file.
	* debug/tst-lfschk6.cc: New file.
	* include/wchar.h (__vfwprintf_chk, __vswprintf_chk): Avoid
	prototypes in C++.
	* include/stdio.h (__sprintf_chk, __snprintf_chk, __vsprintf_chk,
	__vsnprintf_chk, __printf_chk, __fprintf_chk, __vprintf_chk,
	__vfprintf_chk, __fgets_unlocked_chk, __fgets_chk): Likewise.
2007-09-15 02:38:04 +00:00
Ulrich Drepper 3586b2b60b * libio/bits/stdio2.h (__fread_chk, __fread_unlocked_chk): New
prototypes.
	(__fread_alias, __fread_unlocked_alias): New aliases.
	(fread): New extern inline.
	(fread_unlocked): Likewise.  Undef macro before definition of
	the inline function.
	* debug/Makefile (routines): Add fread_chk and fread_u_chk.
	(CFLAGS-fread_chk.c, CFLAGS-fread_u_chk.c): Add.
	* debug/Versions (libc): Export __fread_chk@@GLIBC_2.7
	and __fread_unlocked_chk@@GLIBC_2.7.
	* debug/fread_chk.c: New file.
	* debug/fread_u_chk.c: New file.
	* debug/tst-chk1.c (do_test): Add fread and fread_unlocked tests.
2007-08-28 20:33:49 +00:00
Ulrich Drepper d7e23b02a4 * nscd/connections.c: Use O_CLOEXEC is possible. Use mkostemp
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.
2007-08-11 02:48:28 +00:00
Ulrich Drepper cedb410957 * locale/programs/ld-monetary.c (monetary_finish): Avoid range check
for int_frac_digits and frac_digits.

	* login/logout.c (logout): Avoid aliasing violation.
	* login/logwtmp.c (logwtmp): Likewise.

	* libio/genops.c (_IO_un_link): Avoid aliasing violation.
2007-07-28 20:45:36 +00:00
Ulrich Drepper 7b503bcc13 * iconv/gconv_int.h (__GCONV_NULCONV): New internal only error code.
* iconv/gconv_cache.c (__gconv_lookup_cache): Return __GCONV_NULCONV
	if from and to charsets are the same.
	* iconv/gconv_db.c (__gconv_find_transform): Likewise.
	* intl/dcigettext.c (_nl_find_msg): Return NULL even if __gconv_open
	returns __GCONV_NOCONV, but not for __GCONV_NULCONV.

2007-07-17  Jakub Jelinek  <jakub@redhat.com>

	* wcsmbs/wchar.h: Only define wint_t if __need_wint_t.
	Don't define wint_t when __need_mbstate_t unless it
	is necessary.
	(__mbstate_t): Use __WINT_TYPE__ rather than wint_t
	in the typedef if possible.
	* wctype/wctype.h (wint_t): Define by including
	wchar.h with __need_wint_t instead of including stddef.h
	with __need_wint_t and as fallback definining it ourselves.
	* iconv/gconv.h (__need_wint_t): Define before including
	wchar.h.
	* sysdeps/gnu/_G_config.h: Don't include gconv.h if not _LIBC
	or _GLIBCPP_USE_WCHAR_T.
	(__need_wchar_t): Don't define
	if not _LIBC or _GLIBCPP_USE_WCHAR_T.
	(__need_wint_t): Don't define before including stddef.h,
	define before including wchar.h only if _LIBC or
	_GLIBCPP_USE_WCHAR_T.
	(_G_iconv_t): Don't define if not _LIBC or _GLIBCPP_USE_WCHAR_T.
	* sysdeps/mach/hurd/_G_config.h: Likewise.
	* sysdeps/generic/_G_config.h: Likewise.
	* libio/libio.h (__wunderflow, __wuflow, __woverflow): Only
	prototype if _LIBC or _GLIBCPP_USE_WCHAR_T.
	(_IO_getwc_unlocked, _IO_putwc_unlocked): Only define
	if _LIBC or _GLIBCPP_USE_WCHAR_T.
2007-07-28 19:02:07 +00:00
Ulrich Drepper 65d834b0ad (_IO_new_file_fopen): Recognize 'e' flag and set O_CLOEXEC is needed. 2007-07-22 18:37:10 +00:00
Ulrich Drepper b257c726a4 * libio/libioP.h (_IO_acquire_lock_clear_flags2_fct): New function.
* debug/vfwprintf_chk.c (__vfwprintf_chk): Use
	_IO_acquire_lock_clear_flags2 instead of _IO_acquire_lock.
	* debug/vprintf_chk.c (__vprintf_chk): Likewise.
	* debug/vwprintf_chk.c (__vwprintf_chk): Likewise.
	* debug/vfprintf_chk.c (__vfprintf_chk): Likewise.
	* debug/fwprintf_chk.c (__fwprintf_chk): Likewise.
	* debug/printf_chk.c (__printf_chk): Likewise.
	* debug/fprintf_chk.c (__fprintf_chk): Likewise.
	* debug/wprintf_chk.c (__wprintf_chk): Likewise.

	* sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
	Define.
2007-07-19 17:12:59 +00:00
Ulrich Drepper d8d7feefa7 (_IO_new_proc_open): Don't close child_std_end if one of proc_file_chain streams has that fileno. 2007-07-19 17:02:07 +00:00
Ulrich Drepper 0923a2c896 * stdio-common/vfscanf.c (_IO_vfscanf): Add additional test for EOF
in loop to look for conversion specifier to avoid testing of
	wrong errno value.
	* stdio-common/Makefile (tests): Add bug18, bug18a, bug19, bug19a.
	* stdio-common/bug18a.c: New file.
	* stdio-common/bug19.c: New file.
	* stdio-common/bug19a.c: New file.
2007-07-08 04:41:34 +00:00
Ulrich Drepper e9055017f6 * libio/wstrops.c (_IO_wstr_underflow): Clear errno before
returning WEOF.
	* stdio-common/Makefile (tests): Add bug18a.
	* stdio-common/bug18a.c: New file.
2007-07-07 21:38:43 +00:00
Ulrich Drepper c2c7bd3f86 [BZ #4745]
2007-07-07  Ulrich Drepper  <drepper@redhat.com>
	[BZ #4745]
	* libio/strops.c (_IO_str_underflow): Clear errno before returning
	EOF.
	* stdio-common/Makefile (tests): Add bug18.
	* stdio-common/bug18.c: New file.
2007-07-07 18:29:30 +00:00
Jakub Jelinek 9c8d03d952 * libio/bits/stdio.h (fgetc_unlocked): Add extern inline optimized
version.
2007-04-25  Jakub Jelinek  <jakub@redhat.com>

	* libio/bits/stdio.h (fgetc_unlocked): Add extern inline optimized
	version.
2007-04-25 14:35:54 +00:00
Ulrich Drepper 993a5d6645 * libio/genops.c (_IO_default_finish): Call _IO_lock_fini
after _IO_un_link, not before it.
2007-04-16 23:29:46 +00:00
Ulrich Drepper 0fca3153e7 * libio/libio.h (__underflow, __uflow, __overflow, __wunderflow,
__wuflow, __woverflow, _IO_getc, _IO_putc, _IO_peekc_locked, _IO_padn,
	_IO_sgetn, _IO_seekoff, _IO_seekpos, _IO_getwc, _IO_putwc, _IO_wpadn):
	Remove __THROW.
	* libio/fileops.c (new_do_write, _IO_file_xsgetn_mmap,
	_IO_file_xsgetn_maybe_mmap): Likewise.
	* libio/oldfileops.c (old_do_write): Likewise.
	* libio/libioP.h (_IO_switch_to_get_mode, _IO_switch_to_wget_mode,
	_IO_init_marker, _IO_init_wmarker, _IO_default_uflow,
	_IO_wdefault_uflow, _IO_default_setbuf, _IO_default_seekpos,
	_IO_do_write, _IO_new_do_write, _IO_old_do_write, _IO_wdo_write,
	_IO_flush_all_lockp, _IO_flush_all, _IO_cleanup,
	_IO_flush_all_linebuffered, _IO_new_fgetpos, _IO_old_fgetpos,
	_IO_new_fsetpos, _IO_old_fsetpos, _IO_new_fgetpos64,
	_IO_old_fgetpos64, _IO_new_fsetpos64, _IO_old_fsetpos64,
	_IO_file_setbuf, _IO_file_seekoff, _IO_file_xsputn, _IO_file_xsgetn,
	_IO_file_underflow, _IO_file_underflow_mmap,
	_IO_file_underflow_maybe_mmap, _IO_file_overflow, _IO_file_attach,
	_IO_file_open, _IO_file_fopen, _IO_file_write, _IO_file_read,
	_IO_file_sync, _IO_file_close_it, _IO_file_finish,
	_IO_new_file_attach, _IO_new_file_close_it, _IO_new_file_finish,
	_IO_new_file_fopen, _IO_new_file_setbuf, _IO_file_setbuf_mmap,
	_IO_new_file_sync, _IO_new_file_underflow, _IO_new_file_overflow,
	_IO_new_file_seekoff, _IO_new_file_write, _IO_new_file_xsputn,
	_IO_old_file_setbuf, _IO_old_file_seekoff, _IO_old_file_xsputn,
	_IO_old_file_underflow, _IO_old_file_overflow, _IO_old_file_attach,
	_IO_old_file_fopen, _IO_old_file_write, _IO_old_file_sync,
	_IO_old_file_close_it, _IO_old_file_finish, _IO_wfile_xsputn,
	_IO_wfile_setbuf, _IO_wfile_sync, _IO_wfile_underflow,
	_IO_wfile_overflow, _IO_wfile_seekoff, _IO_old_proc_open,
	_IO_old_proc_close, _IO_getdelim, _IO_flush_all_internal,
	_IO_adjust_column_internal, _IO_default_uflow_internal,
	_IO_default_xsgetn_internal, _IO_wdefault_xsputn_internal,
	_IO_wdefault_xsgetn_internal, _IO_wdefault_uflow_internal,
	_IO_file_setbuf_internal, _IO_file_seekoff_internal,
	_IO_file_xsputn_internal, _IO_file_xsgetn_internal,
	_IO_file_close_it_internal, _IO_file_underflow_internal,
	_IO_file_overflow_internal, _IO_file_attach_internal,
	_IO_file_fopen_internal, _IO_file_sync_internal,
	_IO_file_finish_internal, _IO_wfile_xsputn_internal,
	_IO_wfile_seekoff_internal, _IO_wfile_sync_internal,
	_IO_switch_to_wget_mode_internal, _IO_padn_internal,
	_IO_switch_to_get_mode_internal, _IO_seekoff_unlocked,
	_IO_seekpos_unlocked): Likewise.
	(_IO_strtod, _IO_dtoa, _IO_outfloat, _IO_read, _IO_write,
	_IO_lseek, _IO_close, _IO_fstat): Remove unused prototypes.
2007-04-16 23:15:58 +00:00
Ulrich Drepper 9ce2a14013 (__underflow, __uflow, __overflow, __wunderflow, __wuflow, __woverflow, _IO_getc, _IO_putc, _IO_peekc_locked, _IO_padn, _IO_sgetn, _IO_seekoff, _IO_seekpos, _IO_getwc, _IO_putwc, _IO_wpadn): Remove __THROW. 2007-04-16 23:14:04 +00:00
Ulrich Drepper b037a293a4 * configure.in (libc_cv_gnu89_inline): Test for -fgnu89-inline.
* config.make.in (gnu89-inline-CFLAGS): New variable.
	* Makeconfig (CFLAGS): Use $(gnu89-inline-CFLAGS) together with
	-std=gnu99.
	* misc/sys/cdefs.h (__extern_inline, __extern_always_inline): Define.
	* argp/argp.h: Use it.
	* bits/mathinline.h: Likewise.
	* bits/sigset.h: Likewise.
	* bits/string.h: Likewise.
	* ctype/ctype.h: Likewise.
	* hurd/hurd.h: Likewise.
	* hurd/hurd/fd.h: Likewise.
	* hurd/hurd/port.h: Likewise.
	* hurd/hurd/signal.h: Likewise.
	* hurd/hurd/threadvar.h: Likewise.
	* hurd/hurd/userlink.h: Likewise.
	* io/sys/stat.h: Likewise.
	* libio/bits/stdio.h: Likewise.
	* libio/bits/stdio2.h: Likewise.
	* mach/lock-intern.h: Likewise.
	* mach/mach/mig_support.h: Likewise.
	* math/bits/cmathcalls.h: Likewise.
	* posix/bits/unistd.h: Likewise.
	* socket/bits/socket2.h: Likewise.
	* stdlib/bits/stdlib.h: Likewise.
	* stdlib/stdlib.h: Likewise.
	* string/argz.h: Likewise.
	* string/bits/string2.h: Likewise.
	* string/bits/string3.h: Likewise.
	* sysdeps/alpha/fpu/bits/mathinline.h: Likewise.
	* sysdeps/generic/inttypes.h: Likewise.
	* sysdeps/generic/machine-lock.h: Likewise.
	* sysdeps/generic/machine-sp.h: Likewise.
	* sysdeps/i386/fpu/bits/mathinline.h: Likewise.
	* sysdeps/i386/i486/bits/string.h: Likewise.
	* sysdeps/ia64/fpu/bits/mathinline.h: Likewise.
	* sysdeps/mach/alpha/machine-lock.h: Likewise.
	* sysdeps/mach/alpha/machine-sp.h: Likewise.
	* sysdeps/mach/i386/machine-lock.h: Likewise.
	* sysdeps/mach/powerpc/machine-lock.h: Likewise.
	* sysdeps/mach/powerpc/machine-sp.h: Likewise.
	* sysdeps/powerpc/fpu/bits/mathinline.h: Likewise.
	* sysdeps/s390/bits/string.h: Likewise.
	* sysdeps/s390/fpu/bits/mathinline.h: Likewise.
	* sysdeps/sparc/fpu/bits/mathinline.h: Likewise.
	* sysdeps/unix/bsd/bsd4.4/bits/socket.h: Likewise.
	* sysdeps/unix/sysv/linux/bits/sigset.h: Likewise.
	* sysdeps/unix/sysv/linux/bits/socket.h: Likewise.
	* sysdeps/unix/sysv/linux/sys/sysmacros.h: Likewise.
	* sysdeps/x86_64/fpu/bits/mathinline.h: Likewise.
	* wcsmbs/bits/wchar2.h: Likewise.
	* wcsmbs/wchar.h: Likewise.
	* stdlib/gmp.h: Likewise.  Include <features.h> to get
	__extern_inline definition.

	* locale/programs/ld-ctype.c (find_translit): Return NULL if ctype is
	NULL.
2007-03-17 17:04:28 +00:00
Ulrich Drepper 2e0e802af0 [BZ #2648]
* locales/pl_PL: Fix currency_symbol and its placement.
2007-02-17 18:58:25 +00:00
Ulrich Drepper 11bf311edc [BZ #2510, BZ #2830, BZ #3137, BZ #3313, BZ #3426, BZ #3465, BZ #3480, BZ #3483, BZ #3493, BZ #3514, BZ #3515, BZ #3664, BZ #3673, BZ #3674]
2007-01-11  Jakub Jelinek  <jakub@redhat.com>
	* sysdeps/i386/soft-fp/sfp-machine.h: Remove.
	* sysdeps/x86_64/soft-fp/sfp-machine.h: Likewise.
2007-01-10  Ulrich Drepper  <drepper@redhat.com>
	* io/fts.c: Make sure fts_cur is always valid after return from
	fts_read.
	Patch by Miloslav Trmac <mitr@redhat.com>.
2006-10-27  Richard Sandiford  <richard@codesourcery.com>
	* elf/elf.h (R_MIPS_GLOB_DAT): Define.
	(R_MIPS_NUM): Bump by 1.
2007-01-03  Jakub Jelinek  <jakub@redhat.com>
	* posix/execvp.c: Include alloca.h.
	(allocate_scripts_argv): Renamed to...
	(scripts_argv): ... this.  Don't allocate buffer here nor count
	arguments.
	(execvp): Use alloca if possible.
	* posix/Makefile: Add rules to build and run tst-vfork3 test.
	* posix/tst-vfork3.c: New test.
	* stdlib/Makefile (tst-strtod3-ENV): Define.
2007-01-02  Ulrich Drepper  <drepper@redhat.com>
	* posix/getconf.c: Update copyright year.
	* nss/getent.c: Likewise.
	* iconv/iconvconfig.c: Likewise.
	* iconv/iconv_prog.c: Likewise.
	* elf/ldconfig.c: Likewise.
	* catgets/gencat.c: Likewise.
	* csu/version.c: Likewise.
	* elf/ldd.bash.in: Likewise.
	* elf/sprof.c (print_version): Likewise.
	* locale/programs/locale.c: Likewise.
	* locale/programs/localedef.c: Likewise.
	* nscd/nscd.c (print_version): Likewise.
	* debug/xtrace.sh: Likewise.
	* malloc/memusage.sh: Likewise.
	* malloc/mtrace.pl: Likewise.
	* debug/catchsegv.sh: Likewise.
2006-12-24  Ulrich Drepper  <drepper@redhat.com>
	* malloc/malloc.c (sYSMALLOc): Remove some unnecessary alignment
	attempts.
2006-12-23  Ulrich Drepper  <drepper@redhat.com>
	* posix/wordexp.c: Remove some unnecessary tests.
2006-12-20  SUGIOKA Toshinobu  <sugioka@itonet.co.jp>

	* sysdeps/unix/sysv/linux/sh/bits/shm.h: New file.

	* nss/getXXbyYY_r.c: Include atomic.h.
	(INTERNAL (REENTRANT_NAME)): Write startp after start_fct,
	add atomic_write_barrier () in between.

2006-11-28  Jakub Jelinek  <jakub@redhat.com>
	* elf/dl-support.c: Include dl-procinfo.h.
	* sysdeps/powerpc/dl-procinfo.h (PPC_PLATFORM_POWER4,
	PPC_PLATFORM_PPC970, PPC_PLATFORM_POWER5, PPC_PLATFORM_POWER5_PLUS,
	PPC_PLATFORM_POWER6, PPC_PLATFORM_CELL_BE, PPC_PLATFORM_POWER6X):
	Define.
	(_dl_string_platform): Use PPC_PLATFORM_* macros instead of
	hardcoded constants.
	* sysdeps/powerpc/dl-procinfo.c (_dl_powerpc_platform): Use
	PPC_PLATFORM_* macros for array designators.
2006-11-11  Steven Munroe  <sjmunroe@us.ibm.com>
	* sysdeps/powerpc/dl-procinfo.c (_dl_powerpc_cap_flags): Add 3 new cap
	names to the beginning.
	(_dl_powerpc_platforms): Add "power6x".
	* sysdeps/powerpc/dl-procinfo.h (_DL_HWCAP_FIRST): Decrease.
	(HWCAP_IMPORTANT): Add PPC_FEATURE_HAS_DFP.
	(_DL_PLATFORMS_COUNT): Increase.
	(_dl_string_platform): Handle power6x case.
	* sysdeps/powerpc/sysdep.h (PPC_FEATURE_PA6T, PPC_FEATURE_HAS_DFP,
	PPC_FEATURE_POWER6_EXT): Define.
	(PPC_FEATURE_POWER5, PPC_FEATURE_POWER5_PLUS): Correct Comment.
	[-2^31 .. 2^31) range.
	* sysdeps/unix/sysv/linux/bits/statvfs.h: Define ST_RELATIME.
	* sysdeps/unix/sysv/linux/internal_statvfs.c (__statvfs_getflags):
	Handle relatime mount option.

2006-12-13  Jakub Jelinek  <jakub@redhat.com>
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S: Include
	kernel-features.h.

2006-12-11  Ulrich Drepper  <drepper@redhat.com>

	* stdlib/strtod_l.c (____STRTOF_INTERNAL): Parse thousand
	separators also if no non-zero digits found.
	* stdlib/Makefile (tests): Add tst-strtod3.
	[BZ #3664]
	* stdlib/strtod_l.c (____STRTOF_INTERNAL): Fix test to recognize
	empty parsed strings.
	* stdlib/Makefile (tests): Add tst-strtod2.
	* stdlib/tst-strtod2.c: New file.

	[BZ #3673]
	* stdlib/strtod_l.c (____STRTOF_INTERNAL): Fix exp_limit
	computation.
	* stdlib/Makefile (tests): Add tst-atof2.
	* stdlib/tst-atof2.c: New file.

	[BZ #3674]
	* stdlib/strtod_l.c (____STRTOF_INTERNAL): Adjust exponent value
	correctly if removing trailing zero of hex-float.
	* stdlib/Makefile (tests): Add tst-atof1.
	* stdlib/tst-atof1.c: New file.

	* misc/mntent_r.c (__hasmntopt): Check p[optlen] even when p == rest.
	Start searching for next comma at p rather than rest.
	* misc/Makefile (tests): Add tst-mntent2.
	* misc/tst-mntent2.c: New test.

2006-12-08  Ulrich Drepper  <drepper@redhat.com>
	* malloc/memusage.c: Handle realloc with new size of zero and
	non-NULL pointer correctly.
	(me): Really write first record twice.
	(struct entry): Make format bi-arch safe.
	(dest): Write out more realloc statistics.
	* malloc/memusagestat.c (struct entry): Make format bi-arch safe.
2006-12-05  Jakub Jelinek  <jakub@redhat.com>
	* nis/nis_subr.c (nis_getnames): Revert last change.
2006-12-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
	* sysdeps/unix/sysv/linux/sh/sys/io.h: Removed.
2006-11-30  H.J. Lu  <hongjiu.lu@intel.com>
	* sysdeps/i386/i686/memcmp.S: Use jump table as the base of
	jump table entries.

2006-11-30  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* sysdeps/unix/sysv/linux/i386/clone.S: Provide CFI for the outermost
	`clone' function to ensure proper unwinding stop of gdb.
	* sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.

2006-12-01  Ulrich Drepper  <drepper@redhat.com>

	* nscd/nscd.init: Remove obsolete and commented-out -S option
	handling.

2006-11-23  Jakub Jelinek  <jakub@redhat.com>

	[BZ #3514]
	* manual/string.texi (strncmp): Fix pastos from wcscmp description.

	[BZ #3515]
	* manual/string.texi (strtok): Remove duplicate paragraph.

2006-12-01  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* sysdeps/unix/sysv/linux/x86_64/sigaction.c: Fix compatibility with
	libgcc not supporting `rflags' unwinding (register # >= 17).

2006-11-30  Jakub Jelinek  <jakub@redhat.com>

	* sunrpc/svc_run.c (svc_run): Set my_pollfd to new_pollfd if realloc
	succeeded.

2006-11-29  Daniel Jacobowitz  <dan@codesourcery.com>
	    Jakub Jelinek  <jakub@redhat.com>
	    Jan Kratochvil  <jan.kratochvil@redhat.com>

	* sysdeps/unix/sysv/linux/x86_64/sigaction.c (restore_rt): Add correct
	unwind information.
	* sysdeps/unix/sysv/linux/x86_64/Makefile: Provide symbols for
	'restore_rt' even in the 'signal' directory.
	* sysdeps/unix/sysv/linux/x86_64/ucontext_i.sym: Extend the regs list.
	malloc crashed.  Don't allocate memory unnecessarily in each
	loop.
2006-10-21  Jakub Jelinek  <jakub@redhat.com>
	* resolv/mapv4v6addr.h (map_v4v6_address): Fix last change.
2006-11-20  Ulrich Drepper  <drepper@redhat.com>
	* resolv/mapv4v6addr.h (map_v4v6_address): Optimize a bit.
2006-11-18  Bruno Haible  <bruno@clisp.org>
	* sysdeps/unix/sysv/linux/i386/getgroups.c (__getgroups): Invoke
	__sysconf only after having tried to call getgroups32.
2006-11-19  Ulrich Drepper  <drepper@redhat.com>
	* nss/nss_files/files-hosts.c (LINE_PARSER): Support IPv6-style
	addresses for IPv4 queries if they can be mapped.
2006-11-16  Jakub Jelinek  <jakub@redhat.com>
	* sysdeps/x86_64/fpu/s_copysignf.S (__copysignf): Switch to .text.
	* sysdeps/x86_64/fpu/s_copysign.S (__copysign): Likewise.
	(signmask): Add .size directive.
	(othermask): Add .type directive.
2006-11-14  Ulrich Drepper  <drepper@redhat.com>
	* po/nl.po: Update from translation team.
	* timezone/zdump.c: Redo fix for BZ #3137.
2006-11-14  Jakub Jelinek  <jakub@redhat.com>
	* nss/nss_files/files-alias.c (get_next_alias): Set line back
	to first_unused after parsing :include: file.
	* timezone/africa: Update from tzdata2006o.
	* timezone/antarctica: Likewise.
	* timezone/asia: Likewise.
	* timezone/australasia: Likewise.
	* timezone/backward: Likewise.
	* timezone/europe: Likewise.
	* timezone/iso3166.tab: Likewise.
	* timezone/northamerica: Likewise.
	* timezone/southamerica: Likewise.
	* timezone/zone.tab: Likewise.

	* time/tzfile.c (__tzfile_read): Extend to handle new file format
	on machines with 64-bit time_t.

	* timezone/checktab.awk: Update from tzcode2006o.
	* timezone/ialloc.c: Likewise.
	* timezone/private.h: Likewise.
	* timezone/scheck.c: Likewise.
	* timezone/tzfile.h: Likewise.
	* timezone/tzselect.ksh: Likewise.
	* timezone/zdump.c: Likewise.
	* timezone/zic.c: Likewise.

	[BZ #3483]
	* elf/ldconfig.c (main): Call setlocale and textdomain.
	Patch mostly by Benno Schulenberg <bensberg@justemail.net>.

	[BZ #3480]
	* manual/argp.texi: Fix typos.
	* manual/charset.texi: Likewise.
	* manual/errno.texi: Likewise.
	* manual/filesys.texi: Likewise.
	* manual/lang.texi: Likewise.
	* manual/maint.texi: Likewise.
	* manual/memory.texi: Likewise.
	* manual/message.texi: Likewise.
	* manual/resource.texi: Likewise.
	* manual/search.texi: Likewise.
	* manual/signal.texi: Likewise.
	* manual/startup.texi: Likewise.
	* manual/stdio.texi: Likewise.
	* manual/sysinfo.texi: Likewise.
	* manual/syslog.texi: Likewise.
	* manual/time.texi: Likewise.
	Patch by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.

	[BZ #3465]
	* sunrpc/clnt_raw.c: Minimal message improvements.
	* sunrpc/pm_getmaps.c: Likewise.
	* nis/nss_nisplus/nisplus-publickey.c: Likewise.
	* nis/nis_print_group_entry.c: Likewise.
	* locale/programs/repertoire.c: Likewise.
	* locale/programs/charmap.c: Likewise.
	* malloc/memusage.sh: Likewise.
	* elf/dl-deps.c: Likewise.
	* locale/programs/ld-collate.c: Likewise.
	* libio/vswprintf.c: Likewise.
	* malloc/memusagestat.c: Likewise.
	* sunrpc/auth_unix.c: Likewise.
	* sunrpc/rpc_main.c: Likewise.
	* nscd/cache.c: Likewise.
	* locale/programs/repertoire.c: Unify output messages.
	* locale/programs/charmap.c: Likewise.
	* locale/programs/ld-ctype.c: Likewise.
	* locale/programs/ld-monetary.c: Likewise.
	* locale/programs/ld-numeric.c: Likewise.
	* locale/programs/ld-time.c: Likewise.
	* elf/ldconfig.c: Likewise.
	* nscd/selinux.c: Likewise.
	* elf/cache.c: Likewise.
	Patch mostly by Benno Schulenberg <bensberg@justemail.net>.

2006-11-10  Jakub Jelinek  <jakub@redhat.com>

	* string/strxfrm_l.c (STRXFRM): Fix trailing \1 optimization
	if N is one bigger than return value.
	* string/tst-strxfrm2.c (do_test): Also test strxfrm with l1 + 1
	and l1 last arguments, if buf is defined, verify the return value
	equals to strlen (buf) and verify no byte beyond passed length
	is modified.

2006-11-10  Ulrich Drepper  <drepper@redhat.com>

	* po/sv.po: Update from translation team.

	* sysdeps/gnu/siglist.c (__old_sys_siglist, __old_sys_sigabbrev):
	Use __new_sys_siglist instead of _sys_siglist_internal as
	second macro argument.
	(_old_sys_siglist): Use declare_symbol_alias macro instead of
	strong_alias.
2006-11-09  Ulrich Drepper  <drepper@redhat.com>

	[BZ #3493]
	* posix/unistd.h (sysconf): Remove const attribute.

	* sysdeps/posix/getaddrinfo.c (getaddrinfo): Fix test for
	temporary or deprecated addresses.
	Patch by Sridhar Samudrala <sri@us.ibm.com>.

	* string/Makefile (tests): Add tst-strxfrm2.
	* string/tst-strxfrm2.c: New file.

2006-10-09  Jakub Jelinek  <jakub@redhat.com>

	* elf/dl-debug.c (_dl_debug_initialize): Check r->r_map for 0
	rather than r->r_brk.
	* string/strxfrm_l.c (STRXFRM): Do the trailing \1 removal
	optimization even if needed > n.

2006-11-07  Jakub Jelinek  <jakub@redhat.com>

	* include/libc-symbols.h (declare_symbol): Rename to...
	(declare_symbol_alias): ... this.  Add ORIGINAL argument, imply
	strong_alias (ORIGINAL, SYMBOL) in asm to make sure it preceedes
	.size directive.
	* sysdeps/gnu/errlist-compat.awk: Adjust for declare_symbol_alias
	changes.
	* sysdeps/gnu/siglist.c: Likewise.

2006-11-03  Steven Munroe  <sjmunroe@us.ibm.com>

	* sysdeps/powerpc/fpu/bits/mathinline.h
	[__LIBC_INTERNAL_MATH_INLINES]: Moved to ...
	* sysdeps/powerpc/fpu/math_private.h: ...here.  New file.

2006-11-05  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/unix/sysv/linux/i386/sysconf.c (intel_check_word):
	Update handling of cache descriptor 0x49 for new models.
	* sysdeps/unix/sysv/linux/x86_64/sysconf.c (intel_check_word):
	Likewise.

2006-11-02  Ulrich Drepper  <drepper@redhat.com>

	* configure.in: Work around ld --help change and avoid -z relro
	test completely if the architecture doesn't care about security.

2006-11-01  Ulrich Drepper  <drepper@redhat.com>

	* po/sv.po: Update from translation team.

2006-10-31  Ulrich Drepper  <drepper@redhat.com>

	* stdlib/atexit.c (atexit): Don't mark as hidden when used to
	generate compatibility version.

2006-10-29  Ulrich Drepper  <drepper@redhat.com>

	* configure.in: Relax -z relro requirement a bit.

	* po/sv.po: Update from translation team.

2006-10-29  Jakub Jelinek  <jakub@redhat.com>

	* elf/dl-sym.c (do_sym): Use RTLD_SINGLE_THREAD_P.
	* elf/dl-runtime.c (_dl_fixup, _dl_profile_fixup): Likewise.
	* elf/dl-close.c (_dl_close_worker): Likewise.
	* elf/dl-open.c (_dl_open_worker): Likewise.
	* sysdeps/generic/sysdep-cancel.h (RTLD_SINGLE_THREAD_P): Define.

	* configure.in: Require assembler support for visibility, compiler
	support for visibility and aliases, linker support for various -z
	options.
	* Makeconfig: Remove conditional code which now is unnecessary.
	* config.h.in: Likewise.
	* config.make.in: Likewise.
	* dlfcn/Makefile: Likewise.
	* elf/Makefile: Likewise.
	* elf/dl-load.c: Likewise.
	* elf/rtld.c: Likewise.
	* include/libc-symbols.h: Likewise.
	* include/stdio.h: Likewise.
	* io/Makefile: Likewise.
	* io/fstat.c: Likewise.
	* io/fstat64.c: Likewise.
	* io/fstatat.c: Likewise.
	* io/fstatat64.c: Likewise.
	* io/lstat.c: Likewise.
	* io/lstat64.c: Likewise.
	* io/mknod.c: Likewise.
	* io/mknodat.c: Likewise.
	* io/stat.c: Likewise.
	* io/stat64.c: Likewise.
	* libio/stdio.c: Likewise.
	* nscd/Makefile: Likewise.
	* stdlib/Makefile: Likewise.
	* stdlib/atexit.c: Likewise.
	* sysdeps/generic/ldsodefs.h: Likewise.
	* sysdeps/i386/dl-machine.h: Likewise.
	* sysdeps/i386/sysdep.h: Likewise.
	* sysdeps/i386/i686/memcmp.S: Likewise.
	* sysdeps/powerpc/powerpc32/sysdep.h: Likewise.
	* sysdeps/unix/sysv/linux/i386/sigaction.c: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/sigaction.c: Likewise.

	* Makerules: USE_TLS support is now default.
	* tls.make.c: Likewise.
	* csu/Versions: Likewise.
	* csu/libc-start.c: Likewise.
	* csu/libc-tls.c: Likewise.
	* csu/version.c: Likewise.
	* dlfcn/dlinfo.c: Likewise.
	* elf/dl-addr.c: Likewise.
	* elf/dl-cache.c: Likewise.
	* elf/dl-close.c: Likewise.
	* elf/dl-iteratephdr.c: Likewise.
	* elf/dl-load.c: Likewise.
	* elf/dl-lookup.c: Likewise.
	* elf/dl-object.c: Likewise.
	* elf/dl-open.c: Likewise.
	* elf/dl-reloc.c: Likewise.
	* elf/dl-support.c: Likewise.
	* elf/dl-sym.c: Likewise.
	* elf/dl-sysdep.c: Likewise.
	* elf/dl-tls.c: Likewise.
	* elf/ldconfig.c: Likewise.
	* elf/rtld.c: Likewise.
	* elf/tst-tls-dlinfo.c: Likewise.
	* elf/tst-tls1.c: Likewise.
	* elf/tst-tls10.h: Likewise.
	* elf/tst-tls14.c: Likewise.
	* elf/tst-tls2.c: Likewise.
	* elf/tst-tls3.c: Likewise.
	* elf/tst-tls4.c: Likewise.
	* elf/tst-tls5.c: Likewise.
	* elf/tst-tls6.c: Likewise.
	* elf/tst-tls7.c: Likewise.
	* elf/tst-tls8.c: Likewise.
	* elf/tst-tls9.c: Likewise.
	* elf/tst-tlsmod1.c: Likewise.
	* elf/tst-tlsmod13.c: Likewise.
	* elf/tst-tlsmod13a.c: Likewise.
	* elf/tst-tlsmod14a.c: Likewise.
	* elf/tst-tlsmod2.c: Likewise.
	* elf/tst-tlsmod3.c: Likewise.
	* elf/tst-tlsmod4.c: Likewise.
	* elf/tst-tlsmod5.c: Likewise.
	* elf/tst-tlsmod6.c: Likewise.
	* include/errno.h: Likewise.
	* include/link.h: Likewise.
	* include/tls.h: Likewise.
	* locale/global-locale.c: Likewise.
	* locale/localeinfo.h: Likewise.
	* malloc/arena.c: Likewise.
	* malloc/hooks.c: Likewise.
	* malloc/malloc.c: Likewise.
	* resolv/Versions: Likewise.
	* sysdeps/alpha/dl-machine.h: Likewise.
	* sysdeps/alpha/libc-tls.c: Likewise.
	* sysdeps/generic/ldsodefs.h: Likewise.
	* sysdeps/generic/tls.h: Likewise.
	* sysdeps/i386/dl-machine.h: Likewise.
	* sysdeps/ia64/dl-machine.h: Likewise.
	* sysdeps/ia64/libc-tls.c: Likewise.
	* sysdeps/mach/hurd/fork.c: Likewise.
	* sysdeps/mach/hurd/i386/tls.h: Likewise.
	* sysdeps/powerpc/powerpc32/dl-machine.c: Likwise.
	* sysdeps/powerpc/powerpc32/dl-machine.h: Likewise.
	* sysdeps/powerpc/powerpc64/dl-machine.h: Likewise.
	* sysdeps/s390/libc-tls.c: Likewise.
	* sysdeps/s390/s390-32/dl-machine.h: Likewise.
	* sysdeps/s390/s390-64/dl-machine.h: Likewise.
	* sysdeps/sh/dl-machine.h: Likewise.
	* sysdeps/sparc/sparc32/dl-machine.h: Likewise.
	* sysdeps/sparc/sparc64/dl-machine.h: Likewise.
	* sysdeps/x86_64/dl-machine.h: Likewise.

	[BZ #3426]
	* stdlib/stdlib.h: Adjust comment for canonicalize_file_name to
	reality.

2006-10-27  Jakub Jelinek  <jakub@redhat.com>

	* elf/dl-lookup.c (_dl_debug_bindings): Remove unused symbol_scope
	argument.
	(_dl_lookup_symbol_x): Adjust caller.

	* sysdeps/generic/ldsodefs.h (struct link_namespaces): Remove
	_ns_global_scope.
	* elf/rtld.c (dl_main): Don't initialize _ns_global_scope.

	* elf/dl-libc.c: Revert l_scope name changes.
	* elf/dl-load.c: Likewise.
	* elf/dl-object.c: Likewise.
	* elf/rtld.c: Likewise.
	* elf/dl-close.c (_dl_close): Likewise.
	* elf/dl-open.c (dl_open_worker): Likewise.  If not SINGLE_THREAD_P,
	always use __rtld_mrlock_{change,done}.  Always free old scope list
	here if not l_scope_mem.
	* elf/dl-runtime.c (_dl_fixup, _dl_profile_fixup): Revert l_scope name
	change.  Never free scope list here.  Just __rtld_mrlock_lock before
	the lookup and __rtld_mrlock_unlock it after the lookup.
	* elf/dl-sym.c: Likewise.
	* include/link.h (struct r_scoperec): Remove.
	(struct link_map): Replace l_scoperec with l_scope, l_scoperec_mem
	with l_scope_mem and l_scoperec_lock with l_scope_lock.

2006-10-25  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/gnu/netinet/tcp.h: Define TCP_CONGESTION.

2006-10-18  Ulrich Drepper  <drepper@redhat.com>

	* configure.in: Disable building profile libraries by default.

2006-10-18  Ulrich Drepper  <drepper@redhat.com>

	* elf/dl-lookup.c (_dl_lookup_symbol_x): Add warning to
	_dl_lookup_symbol_x code.

2006-10-17  Jakub Jelinek  <jakub@redhat.com>

	* elf/dl-runtime.c: Include sysdep-cancel.h.
	(_dl_fixup, _dl_profile_fixup): Use __rtld_mrlock_* and
	scoperec->nusers only if !SINGLE_THREAD_P.  Use atomic_*
	instead of catomic_* macros.
	* elf/dl-sym.c: Include sysdep-cancel.h.
	(do_sym): Use __rtld_mrlock_* and scoperec->nusers only
	if !SINGLE_THREAD_P.  Use atomic_* instead of catomic_* macros.
	* elf/dl-close.c: Include sysdep-cancel.h.
	(_dl_close): Use __rtld_mrlock_* and scoperec->nusers only
	if !SINGLE_THREAD_P.  Use atomic_* instead of catomic_* macros.
	* elf/dl-open.c: Include sysdep-cancel.h.
	(dl_open_worker): Use __rtld_mrlock_* and scoperec->nusers only
	if !SINGLE_THREAD_P.  Use atomic_* instead of catomic_* macros.

2006-10-17  Jakub Jelinek  <jakub@redhat.com>

	[BZ #3313]
	* malloc/malloc.c (malloc_consolidate): Set maxfb to address of last
	fastbin rather than end of fastbin array.

2006-10-18  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/i386/i486/bits/atomic.h (catomic_decrement): Use correct
	body macro.
	* sysdeps/x86_64/bits/atomic.h
	(__arch_c_compare_and_exchange_val_64_acq): Add missing casts.
	(catomic_decrement): Use correct body macro.

2006-10-17  Jakub Jelinek  <jakub@redhat.com>

	* include/atomic.h: Add a unique prefix to all local variables
	in macros.
	* csu/tst-atomic.c (do_test): Test also catomic_* macros.

2006-10-14  Ulrich Drepper  <drepper@redhat.com>

	* resolv/arpa/nameser.h: Document that ns_t_a6 is deprecated.

	[BZ #3313]
	* malloc/malloc.c (malloc_consolidate): Don't use get_fast_max to
	determine highest fast bin to consolidate, always look into all of
	them.
	(do_check_malloc_state): Only require for empty bins for large
	sizes in main arena.

	* libio/stdio.h: Add more __wur attributes.

2006-11-12  Andreas Jaeger  <aj@suse.de>

	[BZ #2510]
	* manual/search.texi (Hash Search Function): Clarify.
	(Array Search Function): Clarify.

2006-11-12  Joseph Myers  <joseph@codesourcery.com>

	[BZ #2830]
	* math/atest-exp.c (main): Cast hex value to mp_limb_t before
	shifting.
	* math/atest-exp2.c (read_mpn_hex): Likewise.
	* math/atest-sincos.c (main): Likewise.

	* sysdeps/unix/sysv/linux/syscalls.list: Add epoll_pwait.
	* sysdeps/unix/sysv/linux/sys/epoll.h: Declare epoll_pwait.
	* sysdeps/unix/sysv/linux/Versions (libc): Add epoll_pwait for
	version GLIBC_2.6.
	* Versions.def: Add GLIBC_2.6 for libc.

	* sysdeps/i386/i486/bits/atomic.h: Add catomic_* support.

2006-10-11  Jakub Jelinek  <jakub@redhat.com>

	* malloc/malloc.c (_int_malloc): Remove unused any_larger variable.

	* nis/nis_defaults.c (__nis_default_access): Don't call getenv twice.

	* nis/nis_subr.c (nis_getnames): Use __secure_getenv instead of getenv.
	* sysdeps/generic/unsecvars.h: Add NIS_PATH.

2006-10-11  Ulrich Drepper  <drepper@redhat.com>

	* include/atomic.c: Define catomic_* operations.
	* sysdeps/x86_64/bits/atomic.h: Likewise.  Fix a few minor problems.
	* stdlib/cxa_finalize.c: Use catomic_* operations instead of atomic_*.
	* malloc/memusage.c: Likewise.
	* gmon/mcount.c: Likewise.
	* elf/dl-close.c: Likewise.
	* elf/dl-open.c: Likewise.
	* elf/dl-profile.c: Likewise.
	* elf/dl-sym.c: Likewise.
	* elf/dl-runtime.c: Likewise.
	* elf/dl-fptr.c: Likewise.
	* resolv/res_libc.c: Likewise.

2006-10-10  Roland McGrath  <roland@frob.com>
	* sysdeps/mach/hurd/utimes.c: Use a union to avoid an improper cast.
	* sysdeps/mach/hurd/futimes.c: Likewise.
	* sysdeps/mach/hurd/lutimes.c: Likewise.

2006-10-09  Ulrich Drepper  <drepper@redhat.com>
	    Jakub Jelinek  <jakub@redhat.com>

	Implement reference counting of scope records.
	* elf/dl-close.c (_dl_close): Remove all scopes from removed objects
	from the list in objects which remain.  Always allocate new scope
	record.
	* elf/dl-open.c (dl_open_worker): When growing array for scopes,
	don't resize, allocate a new one.
	* elf/dl-runtime.c: Update reference counters before using a scope
	array.
	* elf/dl-sym.c: Likewise.
	* elf/dl-libc.c: Adjust for l_scope name change.
	* elf/dl-load.c: Likewise.
	* elf/dl-object.c: Likewise.
	* elf/rtld.c: Likewise.
	* include/link.h: Include <rtld-lowlevel.h>.  Define struct
	r_scoperec.  Replace r_scope with pointer to r_scoperec structure.
	Add l_scoperec_lock.
	* sysdeps/generic/ldsodefs.h: Include <rtld-lowlevel.h>.
	* sysdeps/generic/rtld-lowlevel.h: New file.

	* include/atomic.h: Rename atomic_and to atomic_and_val and
	atomic_or to atomic_or_val.  Define new macros atomic_and and
	atomic_or which do not return values.
	* sysdeps/x86_64/bits/atomic.h: Define atomic_and and atomic_or.
	Various cleanups.
	* sysdeps/i386/i486/bits/atomic.h: Likewise.

	* po/sv.po: Update from translation team.

2006-10-07  Ulrich Drepper  <drepper@redhat.com>

	* Versions.def: Add GLIBC_2.6 to libpthread.

	* include/shlib-compat.h (SHLIB_COMPAT): Expand parameters before use.
	(versioned_symbol): Likewise.
	(compat_symbol): Likewise.

	* po/tr.po: Update from translation team.
	* nis/Banner: Removed.  It's been integral part forever and the
	author info is incomplete anyway.
	* libio/Banner: Likewise.

2006-10-06  Ulrich Drepper  <drepper@redhat.com>

	* version.h (VERSION): Bump to 2.5.90 for new development tree.
2007-01-11 21:51:07 +00:00
Jakub Jelinek 32c075e1f0 . 2007-07-31 13:33:18 +00:00
Ulrich Drepper 1e88bd0f1b [BZ #2337]
2006-12-13  Ulrich Drepper  <drepper@redhat.com>
	[BZ #2337]
	* libio/Makefile (tests): Add tst-setvbuf1.
	* libio/tst-setvbuf1.c: New file.

2006-12-08  Jakub Jelinek  <jakub@redhat.com>

	[BZ #2337]
	* libio/genops.c (__uflow): Fix a typo.
	* libio/wfiledoalloc.c (_IO_wfile_doallocate): Don't stat
	nor set _IO_LINE_BUF bit here.  Size the wide buffer based on
	the narrow buffer size.

2006-11-24  Jakub Jelinek  <jakub@redhat.com>

	[BZ #2337]
	* libio/libio.h (_IO_FLAGS2_USER_WBUF): Define.
	* libio/wgenops.c (_IO_wsetb, _IO_wdefault_finish): Test and set
	_IO_FLAGS2_USER_WBUF bit in _flags2 instead of _IO_USER_BUF bit
	in _flags.
	* libio/wstrops.c (_IO_wstr_overflow, enlarge_userbuf,
	_IO_wstr_finish): Likewise.
	* libio/wmemstream.c (open_wmemstream): Likewise.
	* libio/fileops.c (_IO_new_file_close_it): Call _IO_set[bgp]
	even for wide streams.
2006-12-13 23:17:54 +00:00
Ulrich Drepper e1b370832c [BZ #3465]
* sunrpc/clnt_raw.c: Minimal message improvements.
	* sunrpc/pm_getmaps.c: Likewise.
	* nis/nss_nisplus/nisplus-publickey.c: Likewise.
	* nis/nis_print_group_entry.c: Likewise.
	* locale/programs/repertoire.c: Likewise.
	* locale/programs/charmap.c: Likewise.
	* malloc/memusage.sh: Likewise.
	* elf/dl-deps.c: Likewise.
	* locale/programs/ld-collate.c: Likewise.
	* libio/vswprintf.c: Likewise.
	* malloc/memusagestat.c: Likewise.
	* sunrpc/auth_unix.c: Likewise.
	* sunrpc/rpc_main.c: Likewise.
	* nscd/cache.c: Likewise.
	* locale/programs/repertoire.c: Unify output messages.
	* locale/programs/charmap.c: Likewise.
	* locale/programs/ld-ctype.c: Likewise.
	* locale/programs/ld-monetary.c: Likewise.
	* locale/programs/ld-numeric.c: Likewise.
	* locale/programs/ld-time.c: Likewise.
	* elf/ldconfig.c: Likewise.
	* nscd/selinux.c: Likewise.
	* elf/cache.c: Likewise.
	Patch mostly by Benno Schulenberg <bensberg@justemail.net>.
2006-11-10 20:55:22 +00:00
Ulrich Drepper 78fbd00f39 * configure.in: Require assembler support for visibility, compiler
support for visibility and aliases, linker support for various -z
	options.
	* Makeconfig: Remove conditional code which now is unnecessary.
	* config.h.in: Likewise.
	* config.make.in: Likewise.
	* dlfcn/Makefile: Likewise.
	* elf/Makefile: Likewise.
	* elf/dl-load.c: Likewise.
	* elf/rtld.c: Likewise.
	* include/libc-symbols.h: Likewise.
	* include/stdio.h: Likewise.
	* io/Makefile: Likewise.
	* io/fstat.c: Likewise.
	* io/fstat64.c: Likewise.
	* io/fstatat.c: Likewise.
	* io/fstatat64.c: Likewise.
	* io/lstat.c: Likewise.
	* io/lstat64.c: Likewise.
	* io/mknod.c: Likewise.
	* io/mknodat.c: Likewise.
	* io/stat.c: Likewise.
	* io/stat64.c: Likewise.
	* libio/stdio.c: Likewise.
	* nscd/Makefile: Likewise.
	* stdlib/Makefile: Likewise.
	* stdlib/atexit.c: Likewise.
	* sysdeps/generic/ldsodefs.h: Likewise.
	* sysdeps/i386/dl-machine.h: Likewise.
	* sysdeps/i386/sysdep.h: Likewise.
	* sysdeps/i386/i686/memcmp.S: Likewise.
	* sysdeps/powerpc/powerpc32/sysdep.h: Likewise.
	* sysdeps/unix/sysv/linux/i386/sigaction.c: Likewise.
	* sysdeps/unix/sysv/linux/x86_64/sigaction.c: Likewise.
2006-10-28 06:44:41 +00:00
Ulrich Drepper 75aaf98ff8 * libio/stdio.h: Add more __wur attributes. 2006-10-13 19:52:02 +00:00
Ulrich Drepper 52c24bc31e * libio/Banner: Likewise. 2006-10-06 20:39:03 +00:00
Ulrich Drepper f01e40699c * posix/glob.c (glob_in_dir): Add some comments and asserts to
explain why there are no leaks.
2006-09-30 15:09:35 +00:00
Ulrich Drepper 1c31aa7979 * libio/stdio.h: Move open_wmemstream prototype to ...
* wcsmbs/wchar.h: ... here.
2006-09-27 15:57:56 +00:00
Ulrich Drepper 107b8a922a [BZ #1996]
2006-08-14  Ulrich Drepper  <drepper@redhat.com>
	[BZ #1996]
	* libio/memstream.c (open_memstream): Allocate initial buffer with
	calloc.
	* libio/wmemstream.c (open_wmemstream): Likewise.
	* libio/strops.c: Pretty printing.
	(_IO_str_overflow): Clear uninitialized part of the new buffer.
	(enlarge_userbuf): New function.
	(_IO_str_seekoff): Call it if seek position is larger than current
	buffer.
	* libio/wstrops.c: Likewise.
	* libio/vasprintf.c: Add comment as to why we do not have to use
	calloc instead of malloc to allocate initial buffer.
	* libio/Makefile (tests): Add bug-memstream1 and bug-wmemstream1.
	* libio/bug-memstream1.c: New file.
	* libio/bug-wmemstream1.c: New file.
2006-08-14 22:16:14 +00:00
Ulrich Drepper 8999373483 * libio/wstrops.c: Remove dead macro definitions and comments.
* libio/strops.c: Likewise.
2006-08-14 04:44:32 +00:00
Ulrich Drepper 0292b0dd6c * libio/fmemopen.c (fmemopen): Free stream memory in case of
invalid length [Coverity CID 106].

	* nss/nss_files/files-key.c (search): Close stream before
	successful return [Coverity CID 107].

	* io/fts.c (fts_open): Don't allocate parent if *argv==NULL
	[Coverity CID 108].

	* sunrpc/rpc_cout.c (inline_struct): Free sizestr after use
	[Coverity CID 110, 109].

	* sunrpc/rpc_scan.c (docppline): Free file string if it is not
	going to be used [Coverity CID 111].

	* sysdeps/unix/sysv/linux/getsourcefilter.c (getsourcefilter): Free
	memory if socket level value cannot be retrieved [Coverity CID 112].

	* nis/nis_clone_dir.c (nis_clone_directory): Free all memory in
	error case [Coverity CID 114].

	* nis/nis_clone_res.c (nis_clone_result): Free all memory in the
	error cases [Coverity CID 115].

	* sunrpc/rpc_parse.c (get_definition): Free defp if tok ==
	TOK_EOF [Coverity CID 116].

	* sysdeps/unix/sysv/linux/setsourcefilter.c (setsourcefilter): Free
	memory if socket level value cannot be retrieved [Coverity CID 117].

	* elf/cache.c (save_cache): Initialize pad to avoid writing
	uninitialized data to disk.

	* elf/cache.c (save_cache): Free file_entries_new [Coverity CID 118].

	* intl/finddomain.c (_nl_find_domain): Avoid strdup of expand
	locale name, use strdupa.  Remove free call [Coverity CID 119].

	* sunrpc/rpc_main.c (generate_guard): Avoid extra allocation and
	the resulting leak [Coverity CID 121].

	* sunrpc/rpc_main.c (mkfile_output): Free all allocated memory
	[Coverity CID 122].

	* sunrpc/rpc_main.c (h_output): Free guard after we are done
	[Coverity CID 123].

	* sunrpc/svc_udp.c (cache_set): Free victim if newbuf allocation
	fails [Coverity CID 126].

	* sunrpc/svc_udp.c (svcudp_enablecache): Free memory in error
	cases [Coverity CID 127].

	* nis/nis_table.c (__create_ib_request): Free ibreq in case strdup
	fails [Coverity CID 128].

	* nis/nis_getservlist.c (nis_getservlist): Free all memory in case
	of an error [Coverity CID 130, 129].

	* nis/nis_print_group_entry.c (nis_print_group_entry): If
	nis_lookup call failed, return.  Free lookup result in error
	cases [Coverity CID 131].

	* nis/nis_removemember.c (nis_removemember): Free all memory in
	error cases [Coverity CID 132].

	* nis/nss_nisplus/nisplus-alias.c (_nss_nisplus_getaliasbyname_r):
	Always free lookup result [Coverity CID 134].

	* nis/nss_nisplus/nisplus-ethers.c (_nss_nisplus_gethostton_r):
	Always free lookup result [Coverity CID 135].

	* nis/nss_nisplus/nisplus-ethers.c (_nss_nisplus_getntohost_r):
	Always free lookup result [Coverity CID 136].

	* nis/nss_nisplus/nisplus-network.c (_nss_nisplus_getnetbyaddr_r):
	Before retrying, free old result [Coverity CID 137].

	* nis/nss_nisplus/nisplus-publickey.c (_nss_nisplus_netname2user):
	Free res in case UID is zero [Coverity CID 138].

	* nis/ypclnt.c (yp_update): Always free master string
	[Coverity CID 140].

	* nis/nis_creategroup.c (nis_creategroup): Free all memory in
	error cases [Coverity CID 143, 142, 141].

	* nis/nss_nis/nis-publickey.c (_nss_nis_getpublickey): Free result
	if yp_match call succeeded [Coverity CID 155].

	* nis/nss_nis/nis-publickey.c (_nss_nis_getsecretkey): Free string
	allocated in yp_match at all times [Coverity CID 157, 156].

	* nscd/nscd.c (write_pid): Close stream also if writing failed
	[Coverity CID 165].

	* nis/nis_table.c (nis_add_entry): Move test for NULL parameter
	ahead of first use [Coverity CID 167].

	* nis/nss_nis/nis-alias.c (_nss_nis_getaliasbyname_r): Move test
	for NULL parameter ahead of first use [Coverity CID 168].

	* intl/finddomain.c (_nl_find_domain): We never return NULL if we
	found the locale [Coverity CID 169].

	* inet/getnameinfo.c (getnameinfo): __getservbyport_r does not set
	herrno [Coverity CID 178].

	* nis/nis_checkpoint.c (nis_checkpoint): Don't access and returned
	freed object [Coverity CID 182].
2006-04-07 04:29:25 +00:00
Roland McGrath e2c7e1de2b * include/fcntl.h: Declare __openat, __open64. Use libc_hidden_proto.
* io/openat.c (__openat): Define instead of openat.
	Use libc_hidden_def.  Define openat with weak_alias.
	* io/openat64.c (__openat64): Define instead of openat64.
	Use libc_hidden_def.  Define openat64 with weak_alias.
	* sysdeps/unix/sysv/linux/openat.c: Likewise.

	* libio/genops.c: Include <sched.h> for __sched_yield decl.
2006-03-01 05:32:59 +00:00
Ulrich Drepper d369ad760d [BZ #2226]
2006-02-12  Ulrich Drepper  <drepper@redhat.com>
	* io/ftw.c: Start using *at functions.
	* io/ftw64.c: Likewise.

	* sysdeps/generic/not-cancel.h: Define openat_not_cancel,
	openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
	* sysdeps/unix/sysv/linux/not-cancel.h: Likewise.

	* sysdeps/unix/sysv/linux/openat.c: Create separate _nocancel
	functions.

	* io/fxstatat.c: Add __fxstatat alias.
	* sysdeps/unix/sysv/linux/wordsize-64/fxstatat.c: Likewise.
	* sysdeps/unix/sysv/linux/fxstatat.c: Likewise.  Add support for
	newfstatat syscall.
	* sysdeps/unix/sysv/linux/i386/fxstatat.c: Add __fxstatat alias.
	Add support for fstatat64 syscall.
	* include/sys/stat.h: Declare __fxstatat.
	* io/fxstatat64.c: Add __fxstatat64 alias.
	* sysdeps/unix/sysv/linux/fxstatat64.c: Add support for fstatat64
	syscall.

	* dirent/fdopendir.c: Add __fdopendir alias.
	* sysdeps/unix/fdopendir.c: Likewise.
	* sysdeps/mach/hurd/fdopendir.c: Likewise.
	* include/dirent.h: Add __fdopendir declaration.

	[BZ #2226]
	* libio/wgenops.c (_IO_wsetb): Use correct size of wide char
	buffer in FREE_BUF call.
2006-02-12 21:41:44 +00:00
Roland McGrath 8d24de8b21 * libio/genops.c: Include <stdbool.h>. 2006-02-01 20:00:03 +00:00