Commit Graph

506 Commits

Author SHA1 Message Date
Liubov Dmitrieva
fc2ee42abe Add optimized wcslen and strnlen for x86-32 2011-10-23 15:17:23 -04:00
Ulrich Drepper
afb05e8157 Fix WS 2011-10-23 14:15:06 -04:00
Liubov Dmitrieva
2d09f82f8a Add wcschr test cases 2011-10-23 14:14:26 -04:00
Liubov Dmitrieva
619fcccaa3 Add wcslen test cases 2011-10-23 14:11:50 -04:00
Ulrich Drepper
dc150e52d5 More WS fixes 2011-10-23 13:35:48 -04:00
Liubov Dmitrieva
95584d3b33 Fix signedness in wcscmp comparison 2011-10-23 13:34:15 -04:00
Ulrich Drepper
855d156018 Optimize x86-64 rawmemchr and add test 2011-10-19 22:22:29 -04:00
Liubov Dmitrieva
be13f7bff6 Optimized memcmp and wmemcmp for x86-64 and x86-32 2011-10-15 11:10:08 -04:00
Andreas Schwab
5298ffa828 Add memrchr tests 2011-10-13 13:34:41 +02:00
Liubov Dmitrieva
951fbcec70 Optimized memchr, memrchr, rawmemchr for x86-32 2011-10-12 11:42:04 -04:00
Liubov Dmitrieva
42622229a9 delete 4 lines with unused "define" macros in test-memcmp 2011-10-07 11:52:49 -04:00
Denis Zaitceff
f3cdd46748 string/strncat.c: fix compilation for some architectures 2011-09-09 12:45:03 -04:00
Ulrich Drepper
762011fe9f Move wide char tests to wcsmbs directory 2011-09-08 18:01:07 -04:00
Liubov Dmitrieva
4badf7e8d7 New comprehensive test for wmemcmp 2011-09-08 17:51:50 -04:00
Roland McGrath
69f6309711 More warning patrol. 2011-08-14 16:42:06 -07:00
Ulrich Drepper
16292eddd7 Provide better output in string tests
If IMPL is called with a macro for the first parameter the macro does not
get expanded before the string is stored in the impl_t data structure.
2011-08-04 17:47:24 -04:00
Ulrich Drepper
cb7e923b71 Cleanup wcscmp test addition 2011-08-04 17:43:30 -04:00
Liubov Dmitrieva
cff8293390 New comprehensive test for wcscmp 2011-08-04 16:04:15 -04:00
Ulrich Drepper
a65c0b7a32 Add more tests for strcat and strncat. 2011-07-21 06:56:25 -04:00
Liubov Dmitrieva
99710781cc Improve 64 bit strcat functions with SSE2/SSSE3 2011-07-19 17:11:54 -04:00
Andreas Schwab
e0e7228480 Fix alloca accounting in strxfm 2011-07-19 15:03:57 -04:00
Ulrich Drepper
6f0eec6710 Add string/test-strncat.c 2011-07-06 21:44:29 -04:00
Ulrich Drepper
adcd5c15d2 Fix last change
And optimize a bit.
2011-05-21 16:19:06 -04:00
Ulrich Drepper
7ea72f9996 Always fill output buffer in XPG strerror function 2011-05-21 12:11:36 -04:00
Ulrich Drepper
7e4afad5bc Nicer output for negative error numbers in strerror_r 2011-05-21 12:09:23 -04:00
Andreas Schwab
821ae7137b Revert "Fix strncmp page test to limit length to size of object"
This reverts commit e513f34605.
2011-04-07 08:21:00 +02:00
Andreas Schwab
e513f34605 Fix strncmp page test to limit length to size of object 2011-04-05 13:45:23 +02:00
Ulrich Drepper
786e84c533 Fix whitespace issue. 2011-03-21 05:38:07 -04:00
H.J. Lu
c97a1282a4 Handle page boundaries in x86 SSE4.2 strncmp. 2011-03-21 05:35:38 -04:00
Ulrich Drepper
98727dbea2 Change XPG-compliant strerror_r function to return error code. 2010-12-25 13:56:48 -05:00
Jakub Jelinek
42acbb92c8 Fix -D_FORTIFY_SOURCE memmove and bcop 2010-12-09 10:38:18 -05:00
H.J. Lu
8ca52c6e3b Fix one exit path in x86-64 SSE4.2 str{,n}casecmp. 2010-11-10 03:05:37 -05:00
Ulrich Drepper
c54ff5c67e Add missing file. 2010-10-26 00:23:45 -04:00
Andreas Krebbel
f09677388a Fix concurrency problem between dl_open and dl_iterate_phdr 2010-10-26 00:23:14 -04:00
Ulrich Drepper
67a67b950b Add test case for strstr problem. 2010-10-06 13:48:51 -04:00
Eric Blake
5fb308bca2 Fix strstr and memmem algorithm. 2010-10-06 13:48:07 -04:00
Ulrich Drepper
45db99c7d0 Fix handling of tail bytes of buffer in SSE2/SSSE3 x86-64 version strn{,case}cmp 2010-10-03 22:10:30 -04:00
Ulrich Drepper
e9f82e0d1d Add optimized strncasecmp versions for x86-64. 2010-08-14 22:04:01 -07:00
Ulrich Drepper
42e08a5438 Implement optimized strcaecmp for x86-64. 2010-07-30 00:14:04 -07:00
Ulrich Drepper
fe36dd025e Fix tolower operation in strcasestr. 2010-07-30 00:09:07 -07:00
Ulrich Drepper
24fb0f88ed Add optimized x86-64 implementation of strnlen.
While at it, beef up the test suite for strnlen and add performance
tests for it, too.
2010-07-26 08:37:08 -07:00
Ulrich Drepper
dbc676d4ff Add performance tests for strstr and strcasestr. 2010-07-23 22:27:53 -07:00
H.J. Lu
6fb8cbcb58 Improve 64bit memcpy/memmove for Atom, Core 2 and Core i7
This patch includes optimized 64bit memcpy/memmove for Atom, Core 2 and
Core i7.  It improves memcpy by up to 3X on Atom, up to 4X on Core 2 and
up to 1X on Core i7.  It also improves memmove by up to 3X on Atom, up to
4X on Core 2 and up to 2X on Core i7.
2010-06-30 08:26:11 -07:00
H.J. Lu
6cc2b8a6df Fix bugs in x86-32 strcmp-sse4.S and strcmp-ssse3.S 2010-04-15 07:49:30 -07:00
H.J. Lu
8863605af9 Test case for last x86 memcmp problem 2010-03-24 12:14:03 -07:00
Ulrich Drepper
cd5c5f7051 Relax onditions in strings.h. 2010-01-14 16:16:21 -08:00
Ulrich Drepper
18598ff105 Cleanup strings.h.
Cleanup the strings.h header for XPG7 and update the tests.
2010-01-10 02:08:32 -08:00
Ulrich Drepper
f095bb7204 Add support for XPG7 testing.
The header conformance testing code needed extending for XPG7.  This
exposed a few bugs in the headers.  There are more changes to come.
2010-01-09 10:56:41 -08:00
Caolan McNamara
6515a01fc1 Avoid memset warning in one case. 2009-11-10 06:29:13 -08:00
H.J. Lu
2b7a8664fa SSE4.2 strstr/strcasestr for x86-64.
This patch implements SSE4.2 strstr/strcasestr, using Knuth-Morris-Pratt
string searching algorithm.
2009-07-20 21:06:50 -07:00
H.J. Lu
ab6a873fe0 SSSE3 strcpy/stpcpy for x86-64
This patch adds SSSE3 strcpy/stpcpy. I got up to 4X speed up on Core 2
and Core i7.  I disabled it on Atom since SSSE3 version is slower for
shorter (<64byte) data.
2009-07-02 03:39:03 -07:00
H.J. Lu
772f4e6a1b Add SSE4.2 support for strcmp and strncmp on x86-64. 2009-06-22 20:38:41 -07:00
Jakub Jelinek
fab8238de6 Fix x86-64 memchr for large lengths. 2009-06-16 10:23:31 -07:00
Andreas Schwab
ff6ff38db2 Remove redundant .gitignore files. 2009-05-16 10:18:34 +02:00
Jim Meyering
2e180a2622 rename each .cvsignore file to .gitignore 2009-05-15 18:13:37 +02:00
Ulrich Drepper
15417de3e0 * string/stratcliff.c (do_test): Test for zero length
STRNLEN, MEMCHR, STRNCPY, STPNCPY, MEMCPY, MEMPCPY and memccpy
	at the end of the page.
2009-05-09 14:45:07 +00:00
Ulrich Drepper
ddba0f1700 * string/stratcliff.c (do_test): Add memchr tests..
* sysdeps/x86_64/memchr.S: Fix handling of end of buffer after
	first read quad word.
2009-04-07 14:53:04 +00:00
Ulrich Drepper
4bcb2658ff * string/strverscmp.c (__strverscmp): Fix last cleanups.
* string/tst-svc.input: Add new test case.
	* string/tst-svc.expect: Adjust.
	* string/Makefile: Don't ignore tst-svc error.
2009-04-07 06:51:59 +00:00
Ulrich Drepper
71a5bd3e17 [BZ #5807]
2009-03-15  Ulrich Drepper  <drepper@redhat.com>
	[BZ #5807]
	* string/strlen.c (strlen): Fix omission in the expression to test
	for NUL bytes.
2009-03-15 09:03:38 +00:00
Ulrich Drepper
1f7c90a722 [BZ #9893]
* sysdeps/x86_64/dl-trampoline.S (_dl_runtime_profile): Fix
	alignement of La_x86_64_regs.  Store xmm parameters.
	Patch mostly by Jiri Olsa <olsajiri@gmail.com>.
2009-03-14 23:57:33 +00:00
Ulrich Drepper
4546646233 [BZ #9913]
* string/strverscmp.c (__strverscmp): Fix case of different digits
	in fractional part of string.
	Patch by Jingyu Liu <jyliu@fortinet.com>.
	* string/Makefile (tests): Add tst-svc2.
	* string/tst-svc2.c: New file.

	* string/strverscmp.c (__strverscmp): Optimize size of tables.
2009-03-14 20:15:21 +00:00
Ulrich Drepper
6cbe890a9d * wctype/wctype.h: The *_l functions are in POSIX 2008.
* wcsmbs/wchar.h: mbsnrtowcs, open_wmemstream, wcpcpy, wcpncpy,
	wcscasecmp, wcsdup, wcsncasecmp, wcsnlen, wcsnrtombs,
	wcscasecmp_l, wcsncasecmp_l, wcscoll_l, and wcsxfrm_l.
	* sysdeps/mach/hurd/bits/posix_opt.h: Reset value of macros from
	200112L to 200809L.
	* sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
	* posix/getconf.c (vars): Add _SC_THREAD_ROBUST_PRIO_INHERIT and
	_SC_THREAD_ROBUST_PRIO_PROTECT entries.
	* bits/confname.h: Add _SC_THREAD_ROBUST_PRIO_INHERIT and
	_SC_THREAD_ROBUST_PRIO_PROTECT.
	* posix/unistd.h: fexecve is in POSIX 2008.
	* time/time.h: strftime_l is in POSIX 2008.
	* io/sys/stat.h: futimens is in POSIX 2008.
	* string/strings.h: strcasecmp_l and strncasecmp_l are in POSIX 2008.
	* string/string.h: stpcpy, stpncpy, strndup, strnlen, strsignal,
	strcoll_l, strerror_l, and strxfrm_l are in POSIX 2008.
	* stdlib/stdlib.h: mkdtemp is in POSIX 2008.
2009-02-26 16:53:30 +00:00
Ulrich Drepper
8585cb7454 * string/string.h (memchr, strchr, strrchr, strpbrk, strstr, index,
rindex): For C++ add inlines so that they can be recognized as
	builtins.
	* string/strings.h: Define correct C++ prototypes for gcc 4.4.
2009-01-30 16:47:57 +00:00
Ulrich Drepper
d8387c7b7b Jakub Jelinek <jakub@redhat.com>
* string.h: Define correct C++ prototypes for gcc 4.4.
	* wchar.h: Likewise.

2009-01-29  Ulrich Drepper  <drepper@redhat.com>
2009-01-29 18:36:39 +00:00
Ulrich Drepper
f63abf584c * string/Makefile (strop-tests): Add memmem.
* string/test-memmem.c: New file.
	* string/test-string.h (BUF1PAGES): Define to 1 if undefined.
	(test_init): Size buf1 according to BUF1PAGES.

	* stdio-common/scanf16.c: New file.
	* stdio-common/scanf17.c: New file.
	* scripts/data/localplt-sparc64-linux-gnu.data: New file.
2008-05-25 00:17:34 +00:00
Ulrich Drepper
e92799fc45 * string/endian.h: Define new fixed-size hto* and *toh macros only
is __USE_BSD.
2008-05-21 23:39:35 +00:00
Ulrich Drepper
74e1338588 * string/strcasestr.c (CMP_FUNC): Use __strncasecmp, not strncasecmp. 2008-05-16 18:19:18 +00:00
Ulrich Drepper
0caca71ac9 * string/Makefile (distribute): Add str-two-way.h.
2008-03-29  Eric Blake	<ebb9@byu.net>

	Rewrite string searches to O(n) rather than O(n^2).
	* string/str-two-way.h: New file.  For linear fixed-allocation
	string searching.
	* string/memmem.c: New implementation.
	* string/strstr.c: New implementation.
	* string/strcasestr.c: New implementation.

	* sysdeps/posix/getaddrinfo.c (getaddrinfo): Call _res_hconf_init
2008-05-15 04:42:20 +00:00
Ulrich Drepper
2f9a1be867 [BZ #6442]
* string/endian.h: Add macros for fixed-size endian conversion.
	* bits/byteswap.h: Allow inclusion from <endian.h>.
	* sysdeps/i386/bits/byteswap.h: Likewise.
	* sysdeps/ia64/bits/byteswap.h: Likewise.
	* sysdeps/s390/bits/byteswap.h: Likewise.
	* sysdeps/x86_64/bits/byteswap.h: Likewise.
	* string/Makefile (tests): Add tst-endian.
	* string/tst-endian.c: New file.
2008-05-15 02:54:33 +00:00
Ulrich Drepper
3490f01de4 * string/tester.c (test_memcmp): Add a few more tests.
Patch by Mats Erik Andersson <ynglingatal@comhem.se>.
2008-05-11 08:55:42 +00:00
Ulrich Drepper
3eb9c80984 [BZ #6007]
2008-03-31  Ulrich Drepper  <drepper@redhat.com>
	[BZ #6007]
	* string/strfry.c: Handle empty strings again.
2008-03-31 18:30:26 +00:00
Ulrich Drepper
ebca8f730e [BZ #5614]
2008-01-15  Ulrich Drepper  <drepper@redhat.com>
	[BZ #5614]
	* string/bits/string2.h (__strtok_r_1c): Always update *__NEXTP.
	(__strtok_r): Simplify.
	* string/tester.c (test_strtok_r): Add test case for futile search
	with single-character seach string.
2008-01-15 19:11:51 +00:00
Ulrich Drepper
a83b5649c5 [BZ #5113]
* string/bits/string2.h (__strdup): Cast parameters to calloc to
	avoid warning with -Wconversion.
	(__strndup): Likewise.
	Patch to 50% by Christian Iseli <christian.iseli@licr.org>.
2007-10-05 21:21:08 +00:00
Ulrich Drepper
e5dd21787d * string/bits/string3.h (memcpy, memmove, mempcpy, memset, bcopy,
bzero, strcpy, stpcpy, strncpy, strcat, strncat): Use
	__extern_always_inline functions unconditionally, drop macros.
2007-10-03 18:33:57 +00:00
Ulrich Drepper
33a667def7 * de_DE.in: Adjust for correct handling of backward direction sorting. 2007-10-02 17:17:59 +00:00
Ulrich Drepper
9cc198f65b [BZ #4963]
* wcsmbs/wcsnlen.c: Don't reference before checking the length.
	* string/stratcliff.c: Make usable to test wide char functions.
	* wcsmbs/wcsatcliff.c: New file.
	* wcsmbs/Makefiel (tests): Add wcsatcliff.
2007-09-23 18:27:55 +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
0008163a30 * nis/nis_table.c (nis_list): Don't fail if __follow_path returned
NIS_NOTFOUND.
2007-08-22 16:04:18 +00:00
Ulrich Drepper
682e4437a0 [BZ #4582]
* debug/segfault.c: Fix typos in comments.
2007-08-22 07:04:23 +00:00
Ulrich Drepper
c306d80735 (strfry): Make result more random. 2007-05-08 03:27:35 +00:00
Ulrich Drepper
965cba048c * elf/dl-open.c (dl_open_worker): Declare l in 2 different
smaller scopes.
	* elf/dl-dst.h (DL_DST_REQ_STATIC): Add l as macro argument.
	(DL_DST_REQUIRED): Adjust user.

	* include/dlfcn.h (struct link_map): New forward decl.

	* inet/getnameinfo.c: Include stddef.h.
	(getnameinfo): Use offsetof.

	* time/tst-mktime2.c (do_test): Don't rely on signed wrap.

	* stdio-common/vfprintf.c (_itoa): Undef before redefining.

	* string/strerror_l.c: Include stdlib.h.
2007-03-17 17:09:13 +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
4a44ce79c6 * sysdeps/unix/sysv/linux/i386/sysdep.h (PTR_MANGLE): Roll value before
returning.
	(PTR_DEMANGLE): Real definition now that it's not the same as
	PRT_MANGLE anymore.
	* sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise.

	* string/strerror_l.c: New file.
	* string/Makefile (routines): Add strerror_l.
	* string/string.h: Declare strerror_l.
	* string/Versions: Export strerror_l for GLIBC_2.6.

	* nscd/connections.c (nscd_run): Don't define MAXKEYLEN here.
2007-02-01 16:14:15 +00:00
Ulrich Drepper
df859a0c15 * 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.

2007-01-03  Ulrich Drepper  <drepper@redhat.com>

	* string/Makefile (tst-strxfrm2-ENV): Define.
	* stdlib/Makefile (tst-strtod3-ENV): Define.
2007-01-03 23:02:17 +00:00
Ulrich Drepper
52a33795d3 * 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 15:20:59 +00:00
Ulrich Drepper
2f334ad5c3 * string/Makefile (tests): Add tst-strxfrm2.
* string/tst-strxfrm2.c: New file.

	* string/strxfrm_l.c (STRXFRM): Do the trailing \1 removal
	optimization even if needed > n.
2006-11-09 20:20:23 +00:00
Ulrich Drepper
59776aef0b [BZ #2751]
2006-05-15  Mike Frysinger  <vapier@gentoo.org>
	[BZ #2751]
	* string/strchr.c: Add cast to avoid warning.
2006-08-22 06:47:33 +00:00
Ulrich Drepper
4259230fd1 * intl/dcigettext.c (DCIGETTEXT): If _nl_find_msg returns -1 don't
look further, return original strings.
	(_nl_find_msg): Do not return found translation if the conversion
	failed.  Either signal the string is unusable or that something went
	wrong and the original should be used.

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

	* string/_strerror.c (__strerror_r): Add __builtin_expect.
2006-06-22 23:59:32 +00:00
Ulrich Drepper
9009e8f814 * string/Makefile (tests): Add bug-envz1.
* string/bug-enz1.c: New file.
2006-06-04 16:36:04 +00:00
Ulrich Drepper
fdc02996d4 [BZ #2703]
2006-06-02  Ryan S. Arnold  <rsa@us.ibm.com>
	[BZ #2703]
	* string/envz.c (envz_strip): Correct erroneously reversed src
	and dest parameters to memmove() invocation.
2006-06-04 04:35:55 +00:00
Ulrich Drepper
400cc70af5 * io/ftw.c (open_dir_stream): Return right away if REALLOC fails.
[Coverity CID 229, 230]

	* argp/argp-help.c (hol_entry_help): Handle STATE==NULL in ARG and
	DGETTEXT calls.
	(hol_help): Likewise.  [Coverity CID 226, 227]

	* string/argz-replace.c (__argz_replace): Unconditionally call
	free on SRC.  [Coverity CID 225]

	* nis/nis_creategroup.c (nis_creategroup): No need to duplicate
	the return value of __nis_default_owner and __nis_default_group,
	it has been especially allocated.  [Coverity CID 224]
2006-05-10 06:39:15 +00:00
Roland McGrath
359157a5a7 [BZ #2508]
2006-04-04  Roland McGrath  <roland@redhat.com>
	* string/Makefile (CFLAGS-inl-tester.c): New variable.
	(CFLAGS-tst-inlcall.c): Likewise.

	[BZ #2508]
	* nscd/Makefile ($(objpfx)nscd_stat.o: sysincludes): Move setting
	inside [$(have-selinux) = yes].
	($(objpfx)selinux.o: sysincludes): Likewise.

	* iconvdata/Makefile (generate-8bit-table): Use LC_ALL=C.
	(generate-8bit-gap-table): Likewise.
	($(objpfx)iso8859-7jp.stmp): Likewise.
	Reported by S.Çağlar Onur <caglar@uludag.org.tr>.
2006-04-04 08:40:47 +00:00
Roland McGrath
24d58fb41d * string/tester.c (test_strnlen): New function.
(test_strchr): Call it.
	(test_strncat): Test lengths where the sign bit is set.
	(test_strncmp): Likewise.
2006-02-20 21:48:49 +00:00
Ulrich Drepper
bc795d0b30 [BZ #2126]
* sysdeps/i386/i686/strtok.S: Store pointer to NUL byte if NULL is
	returned.
	* sysdeps/i386/strtok.S: Likewise.
	* sysdeps/x86_64/strtok.S: Likewise.
	* string/Makefile (tests): Add bug-strtok1.
	* string/bug-strtok1.c: New file.
2006-01-10 00:25:07 +00:00
Roland McGrath
0317eaecb1 * posix/tst-execle1.c (do_test): Add a const.
* posix/tst-execle2.c (do_test): Likewise.

	* posix/transbug.c (run_test): Add some casts.
	* posix/bug-regex22.c (main): Likewise.
	* posix/bug-regex5.c (main): Likewise.
	* wcsmbs/tst-mbsrtowcs.c (main): Likewise.
	* string/test-strspn.c (do_test, do_random_tests): Likewise.
	* string/test-strrchr.c (do_test, do_random_tests): Likewise.
	* string/test-strlen.c (do_random_tests): Likewise.
	* string/test-strpbrk.c (do_test, do_random_tests): Likewise.
	* string/test-strcmp.c (do_random_tests): Likewise.
	* string/test-strchr.c (do_test, do_random_tests): Likewise.
	* string/test-strcat.c (do_test, do_random_tests): Likewise.
	* string/test-strncpy.c (do_random_tests): Likewise.
	* string/test-strcpy.c (do_test, do_random_tests): Likewise.
	* string/test-memccpy.c (do_test): Likewise.
	* string/test-memmove.c (do_test, do_random_tests): Likewise.
	* string/test-memcpy.c (do_test, do_random_tests): Likewise.
	* string/test-memcmp.c (do_test, do_random_tests): Likewise.
	* string/test-memchr.c (do_test, do_random_tests): Likewise.
	* dlfcn/bug-atexit1.c (do_test): Fix up prototype in cast.
	* stdio-common/tst-fgets.c (do_test): Add a cast.
	* iconvdata/bug-iconv4.c (xiconv): Add a cast.

	* locale/programs/simple-hash.c (insert_entry_2): Remove useless casts.

	* resolv/herror.c (herror): Remove unused extern decl.

	* libio/obprintf.c: Include "strfile.h".

	* elf/order2mod2.c (init): Cast ignored value to void.

	* stdio-common/tstdiomisc.c: If FLT_EVAL_METHOD is 2, use long
2005-12-27 22:50:12 +00:00
Ulrich Drepper
9d13fb2413 Moved to csu/errno-loc.c. 2005-12-14 15:06:39 +00:00
Ulrich Drepper
b6ab06cef4 2005-12-13 Ulrich Drepper <drepper@redhat.com> 2005-12-14 08:43:25 +00:00
Ulrich Drepper
8f84d93108 [BZ #1877]
2005-11-17  Steven Munroe  <sjmunroe@us.ibm.com>
	[BZ #1877]
	* string/test-strncmp.c (do_test_limit): Handle zero length and
	non-zero align values.
	(test_main): Correct do_test_limit tests for 64-bit.

2005-11-15  Steven Munroe  <sjmunroe@us.ibm.com>

	* sysdeps/powerpc/sysdep.h (PPC_FEATURE_HAS_SPE,
	PPC_FEATURE_HAS_EFP_SINGLE, PPC_FEATURE_HAS_EFP_DOUBLE,
	PPC_FEATURE_NO_TB, PPC_FEATURE_POWER4, PPC_FEATURE_POWER5,
	PPC_FEATURE_POWER5_PLUS, PPC_FEATURE_CELL, PPC_FEATURE_970):
	Define to match 2.6.15 kernel.

	* sysdeps/powerpc/fpu/e_sqrt.c: Remove dl-procinfo.h include.
	* sysdeps/powerpc/fpu/e_sqrtf.c: Likewise.
	* sysdeps/powerpc/fpu/w_sqrtf.c: Likewise.
2005-11-18 00:12:44 +00:00
Ulrich Drepper
8ce9ea74cc [BZ #1877]
2005-11-17  Steven Munroe  <sjmunroe@us.ibm.com>
	[BZ #1877]
	* string/test-strncmp.c (do_test_limit): New function.
	(do_test) Add cast to eliminate compiler warnings.
	(do_random_tests) Add cast to eliminate compiler warnings.
	(test_main) Add do_test_limit tests.
	* sysdeps/powerpc/powerpc32/strncmp.S: Test length before unaligned
	load.
	* sysdeps/powerpc/powerpc64/strncmp.S: Likewise.
2005-11-17 21:19:33 +00:00
Ulrich Drepper
57d44131d8 * configure.in: Remove gnu_ld definition and everything using it.
* config.h.in: Remove HAVE_GNU_LD.
	* csu/Makefile: Remove use of gnu-ld.
	* csu/munch.awk: Removed.
	* csu/munch-tmpl.c: Removed.
	* include/libc-symbols.h: Remove use of HAVE_GNU_LD.
	* posix/execl.c: Likewise.
	* posix/execv.c: Likewise.
	* stdio-common/psignal.c: Likewise.
	* stdlib/exit.c: Likewise.
	* string/strsignal.c: Likewise.
	* string/tester.c: Likewise.
	* sysdeps/generic/errlist.c: Likewise.
	* sysdeps/generic/getenv.c: Likewise.
	* sysdeps/generic/getgroups.c: Likewise.
	* sysdeps/generic/init-posix.c: Likewise.
	* sysdeps/posix/gettimeofday.c: Likewise.
	* sysdeps/posix/system.c: Likewise.
	* sysdeps/unix/bsd/init-posix.c: Likewise.
	* sysdeps/unix/bsd/ulimit.c: Likewise.
	* sysdeps/unix/bsd/sun/m68k/brk.S: Likewise.
	* sysdeps/unix/bsd/sun/m68k/sethostid.S: Likewise.
	* sysdeps/unix/bsd/sun/sparc/sethostid.S: Likewise.
	* sysdeps/unix/i386/brk.S: Likewise.
	* sysdeps/unix/sparc/brk.S: Likewise.
2005-11-06 02:06:06 +00:00