about summary refs log tree commit diff
path: root/string
Commit message (Collapse)AuthorAgeFilesLines
* Implement optimized strcaecmp for x86-64.Ulrich Drepper2010-07-302-1/+277
|
* Fix tolower operation in strcasestr.Ulrich Drepper2010-07-301-1/+1
|
* Add optimized x86-64 implementation of strnlen.Ulrich Drepper2010-07-264-21/+229
| | | | | While at it, beef up the test suite for strnlen and add performance tests for it, too.
* Add performance tests for strstr and strcasestr.Ulrich Drepper2010-07-235-6/+399
|
* Improve 64bit memcpy/memmove for Atom, Core 2 and Core i7H.J. Lu2010-06-301-1/+4
| | | | | | | 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.
* Fix bugs in x86-32 strcmp-sse4.S and strcmp-ssse3.SH.J. Lu2010-04-151-4/+35
|
* Test case for last x86 memcmp problemH.J. Lu2010-03-241-4/+261
|
* Relax onditions in strings.h.Ulrich Drepper2010-01-141-2/+2
|
* Cleanup strings.h.Ulrich Drepper2010-01-101-14/+19
| | | | Cleanup the strings.h header for XPG7 and update the tests.
* Add support for XPG7 testing.Ulrich Drepper2010-01-093-8/+9
| | | | | The header conformance testing code needed extending for XPG7. This exposed a few bugs in the headers. There are more changes to come.
* Avoid memset warning in one case.Caolan McNamara2009-11-101-2/+3
|
* SSE4.2 strstr/strcasestr for x86-64.H.J. Lu2009-07-202-4/+15
| | | | | This patch implements SSE4.2 strstr/strcasestr, using Knuth-Morris-Pratt string searching algorithm.
* SSSE3 strcpy/stpcpy for x86-64H.J. Lu2009-07-022-11/+13
| | | | | | 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.
* Add SSE4.2 support for strcmp and strncmp on x86-64.H.J. Lu2009-06-221-5/+7
|
* Fix x86-64 memchr for large lengths.Jakub Jelinek2009-06-161-2/+7
|
* Remove redundant .gitignore files.Andreas Schwab2009-05-161-6/+0
|
* rename each .cvsignore file to .gitignoreJim Meyering2009-05-151-0/+0
|
* * string/stratcliff.c (do_test): Test for zero lengthUlrich Drepper2009-05-091-9/+27
| | | | | STRNLEN, MEMCHR, STRNCPY, STPNCPY, MEMCPY, MEMPCPY and memccpy at the end of the page.
* * string/stratcliff.c (do_test): Add memchr tests..Ulrich Drepper2009-04-071-1/+33
| | | | | * sysdeps/x86_64/memchr.S: Fix handling of end of buffer after first read quad word.
* * string/strverscmp.c (__strverscmp): Fix last cleanups. cvs/fedora-glibc-20090407T0657Ulrich Drepper2009-04-074-4/+8
| | | | | | * string/tst-svc.input: Add new test case. * string/tst-svc.expect: Adjust. * string/Makefile: Don't ignore tst-svc error.
* [BZ #5807]Ulrich Drepper2009-03-151-49/+3
| | | | | | | 2009-03-15 Ulrich Drepper <drepper@redhat.com> [BZ #5807] * string/strlen.c (strlen): Fix omission in the expression to test for NUL bytes.
* [BZ #9893]Ulrich Drepper2009-03-141-0/+62
| | | | | | * 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>.
* [BZ #9913]Ulrich Drepper2009-03-142-34/+31
| | | | | | | | | | * 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.
* * wctype/wctype.h: The *_l functions are in POSIX 2008.Ulrich Drepper2009-02-262-9/+28
| | | | | | | | | | | | | | | | | | | | * 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.
* * string/string.h (memchr, strchr, strrchr, strpbrk, strstr, index,Ulrich Drepper2009-01-302-18/+192
| | | | | | rindex): For C++ add inlines so that they can be recognized as builtins. * string/strings.h: Define correct C++ prototypes for gcc 4.4.
* Jakub Jelinek <jakub@redhat.com>Ulrich Drepper2009-01-291-1/+92
| | | | | | | * string.h: Define correct C++ prototypes for gcc 4.4. * wchar.h: Likewise. 2009-01-29 Ulrich Drepper <drepper@redhat.com>
* * string/Makefile (strop-tests): Add memmem.Ulrich Drepper2008-05-253-5/+194
| | | | | | | | | | * 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.
* * string/endian.h: Define new fixed-size hto* and *toh macros onlyUlrich Drepper2008-05-211-32/+34
| | | | is __USE_BSD.
* * string/strcasestr.c (CMP_FUNC): Use __strncasecmp, not strncasecmp. cvs/fedora-glibc-20080516T2152Ulrich Drepper2008-05-161-1/+1
|
* * string/Makefile (distribute): Add str-two-way.h. cvs/fedora-glibc-20080515T0735Ulrich Drepper2008-05-155-206/+579
| | | | | | | | | | | | | 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
* [BZ #6442]Ulrich Drepper2008-05-153-3/+151
| | | | | | | | | | | * 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.
* * string/tester.c (test_memcmp): Add a few more tests.Ulrich Drepper2008-05-111-8/+26
| | | | Patch by Mats Erik Andersson <ynglingatal@comhem.se>.
* [BZ #6007]Ulrich Drepper2008-03-311-12/+12
| | | | | | 2008-03-31 Ulrich Drepper <drepper@redhat.com> [BZ #6007] * string/strfry.c: Handle empty strings again.
* [BZ #5614]Ulrich Drepper2008-01-152-8/+11
| | | | | | | | | 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.
* [BZ #5113]Ulrich Drepper2007-10-051-2/+2
| | | | | | | * 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>.
* * string/bits/string3.h (memcpy, memmove, mempcpy, memset, bcopy, cvs/fedora-glibc-20071003T1908Ulrich Drepper2007-10-031-127/+3
| | | | | bzero, strcpy, stpcpy, strncpy, strcat, strncat): Use __extern_always_inline functions unconditionally, drop macros.
* * de_DE.in: Adjust for correct handling of backward direction sorting.Ulrich Drepper2007-10-021-6/+18
|
* [BZ #4963]Ulrich Drepper2007-09-231-129/+193
| | | | | | | * 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.
* * misc/sys/cdefs.h (__va_arg_pack): Define for GCC 4.3+.Ulrich Drepper2007-09-152-33/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* * nis/nis_table.c (nis_list): Don't fail if __follow_path returnedUlrich Drepper2007-08-221-1/+1
| | | | NIS_NOTFOUND.
* [BZ #4582]Ulrich Drepper2007-08-221-2/+3
| | | | * debug/segfault.c: Fix typos in comments.
* (strfry): Make result more random.Ulrich Drepper2007-05-081-6/+4
|
* * elf/dl-open.c (dl_open_worker): Declare l in 2 different cvs/fedora-glibc-20070317T2130Ulrich Drepper2007-03-171-0/+1
| | | | | | | | | | | | | | | | | 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.
* * configure.in (libc_cv_gnu89_inline): Test for -fgnu89-inline.Ulrich Drepper2007-03-173-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* * sysdeps/unix/sysv/linux/i386/sysdep.h (PTR_MANGLE): Roll value before cvs/fedora-glibc-20070202T0923Ulrich Drepper2007-02-014-2/+82
| | | | | | | | | | | | | | 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.
* * posix/execvp.c: Include alloca.h.Ulrich Drepper2007-01-031-1/+2
| | | | | | | | | | | | | | (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.
* * string/strxfrm_l.c (STRXFRM): Fix trailing \1 optimizationUlrich Drepper2006-11-102-6/+46
| | | | | | | | 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.
* * string/Makefile (tests): Add tst-strxfrm2.Ulrich Drepper2006-11-093-5/+51
| | | | | | | * string/tst-strxfrm2.c: New file. * string/strxfrm_l.c (STRXFRM): Do the trailing \1 removal optimization even if needed > n.
* [BZ #2751] cvs/fedora-glibc-20060822T0706Ulrich Drepper2006-08-221-3/+4
| | | | | | 2006-05-15 Mike Frysinger <vapier@gentoo.org> [BZ #2751] * string/strchr.c: Add cast to avoid warning.
* * intl/dcigettext.c (DCIGETTEXT): If _nl_find_msg returns -1 don'tUlrich Drepper2006-06-221-3/+4
| | | | | | | | | | | 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.