Update.
* string/tester.c: Add tests for strcasecmp and strncasecmp. * Versions.def (libc): Add GCC_3.0. __deregister_frame_info_bases, _Unwind_Find_FDE): Add for GCC_3.0.
This commit is contained in:
parent
f5e6e2ee30
commit
1e06620a7b
@ -3,6 +3,7 @@
|
|||||||
* sysdeps/generic/strcasecmp.c (__strcasecmp): Little performance
|
* sysdeps/generic/strcasecmp.c (__strcasecmp): Little performance
|
||||||
patch.
|
patch.
|
||||||
* sysdeps/generic/strncase.c: Likewise.
|
* sysdeps/generic/strncase.c: Likewise.
|
||||||
|
* string/tester.c: Add tests for strcasecmp and strncasecmp.
|
||||||
|
|
||||||
2001-12-05 Geoff Keating <geoffk@redhat.com>
|
2001-12-05 Geoff Keating <geoffk@redhat.com>
|
||||||
|
|
||||||
@ -373,6 +374,7 @@
|
|||||||
2001-10-02 Jakub Jelinek <jakub@redhat.com>
|
2001-10-02 Jakub Jelinek <jakub@redhat.com>
|
||||||
H.J. Lu <hjl@gnu.org>
|
H.J. Lu <hjl@gnu.org>
|
||||||
|
|
||||||
|
* Versions.def (libc): Add GCC_3.0.
|
||||||
* configure.in (libc_cv_gcc_static_libgcc): Set to -static-libgcc
|
* configure.in (libc_cv_gcc_static_libgcc): Set to -static-libgcc
|
||||||
if gcc supports this flag.
|
if gcc supports this flag.
|
||||||
(EXPORT_UNWIND_FIND_FDE): Define unless target configure disables it.
|
(EXPORT_UNWIND_FIND_FDE): Define unless target configure disables it.
|
||||||
@ -388,7 +390,7 @@
|
|||||||
* elf/Versions (__register_frame_info, __deregister_frame_info): Add
|
* elf/Versions (__register_frame_info, __deregister_frame_info): Add
|
||||||
for GLIBC_2.0.
|
for GLIBC_2.0.
|
||||||
(__register_frame_info_bases, __register_frame_info_table_bases,
|
(__register_frame_info_bases, __register_frame_info_table_bases,
|
||||||
__deregister_frame_info_bases, _Unwind_Find_FDE): Add for GLIBC_2.2.5.
|
__deregister_frame_info_bases, _Unwind_Find_FDE): Add for GCC_3.0.
|
||||||
* elf/Makefile (routines): Add unwind-dw2-fde.
|
* elf/Makefile (routines): Add unwind-dw2-fde.
|
||||||
(shared-only-routines): Add unwind-dw2-fde.
|
(shared-only-routines): Add unwind-dw2-fde.
|
||||||
* sysdeps/alpha/gccframe.h: New file.
|
* sysdeps/alpha/gccframe.h: New file.
|
||||||
|
@ -17,6 +17,9 @@ libc {
|
|||||||
%ifdef USE_IN_LIBIO
|
%ifdef USE_IN_LIBIO
|
||||||
HURD_CTHREADS_0.3
|
HURD_CTHREADS_0.3
|
||||||
%endif
|
%endif
|
||||||
|
%ifdef EXPORT_UNWIND_FIND_FDE
|
||||||
|
GCC_3.0
|
||||||
|
%endif
|
||||||
}
|
}
|
||||||
libcrypt {
|
libcrypt {
|
||||||
GLIBC_2.0
|
GLIBC_2.0
|
||||||
|
@ -21,7 +21,7 @@ libc {
|
|||||||
dl_iterate_phdr;
|
dl_iterate_phdr;
|
||||||
}
|
}
|
||||||
%ifdef EXPORT_UNWIND_FIND_FDE
|
%ifdef EXPORT_UNWIND_FIND_FDE
|
||||||
GLIBC_2.2.5 {
|
GCC_3.0 {
|
||||||
__register_frame_info_bases; __deregister_frame_info_bases;
|
__register_frame_info_bases; __deregister_frame_info_bases;
|
||||||
__register_frame_info_table_bases; _Unwind_Find_FDE;
|
__register_frame_info_table_bases; _Unwind_Find_FDE;
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,10 @@ BEGIN {
|
|||||||
# current library. This is the only place where we print something to
|
# current library. This is the only place where we print something to
|
||||||
# the intermediate file.
|
# the intermediate file.
|
||||||
/^ / {
|
/^ / {
|
||||||
printf("%s %s %s\n", actlib, actver, $0) | sort;
|
sortver=actver
|
||||||
|
# Ensure GLIBC_ versions come always first
|
||||||
|
sub(/^GLIBC_/," GLIBC_",sortver)
|
||||||
|
printf("%s %s %s\n", actlib, sortver, $0) | sort;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1302,6 +1302,52 @@ test_strerror (void)
|
|||||||
check(strerror(ENOENT) != 0, 3);
|
check(strerror(ENOENT) != 0, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
test_strcasecmp (void)
|
||||||
|
{
|
||||||
|
it = "strcasecmp";
|
||||||
|
/* Note that the locale is "C". */
|
||||||
|
check(strcasecmp("a", "a") == 0, 1);
|
||||||
|
check(strcasecmp("a", "A") == 0, 2);
|
||||||
|
check(strcasecmp("A", "a") == 0, 3);
|
||||||
|
check(strcasecmp("a", "b") < 0, 4);
|
||||||
|
check(strcasecmp("c", "b") > 0, 5);
|
||||||
|
check(strcasecmp("abc", "AbC") == 0, 6);
|
||||||
|
check(strcasecmp("0123456789", "0123456789") == 0, 7);
|
||||||
|
check(strcasecmp("", "0123456789") < 0, 8);
|
||||||
|
check(strcasecmp("AbC", "") > 0, 9);
|
||||||
|
check(strcasecmp("AbC", "A") > 0, 10);
|
||||||
|
check(strcasecmp("AbC", "Ab") > 0, 11);
|
||||||
|
check(strcasecmp("AbC", "ab") > 0, 12);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
test_strncasecmp (void)
|
||||||
|
{
|
||||||
|
it = "strncasecmp";
|
||||||
|
/* Note that the locale is "C". */
|
||||||
|
check(strncasecmp("a", "a", 5) == 0, 1);
|
||||||
|
check(strncasecmp("a", "A", 5) == 0, 2);
|
||||||
|
check(strncasecmp("A", "a", 5) == 0, 3);
|
||||||
|
check(strncasecmp("a", "b", 5) < 0, 4);
|
||||||
|
check(strncasecmp("c", "b", 5) > 0, 5);
|
||||||
|
check(strncasecmp("abc", "AbC", 5) == 0, 6);
|
||||||
|
check(strncasecmp("0123456789", "0123456789", 10) == 0, 7);
|
||||||
|
check(strncasecmp("", "0123456789", 10) < 0, 8);
|
||||||
|
check(strncasecmp("AbC", "", 5) > 0, 9);
|
||||||
|
check(strncasecmp("AbC", "A", 5) > 0, 10);
|
||||||
|
check(strncasecmp("AbC", "Ab", 5) > 0, 11);
|
||||||
|
check(strncasecmp("AbC", "ab", 5) > 0, 12);
|
||||||
|
check(strncasecmp("0123456789", "AbC", 0) == 0, 13);
|
||||||
|
check(strncasecmp("AbC", "abc", 1) == 0, 14);
|
||||||
|
check(strncasecmp("AbC", "abc", 2) == 0, 15);
|
||||||
|
check(strncasecmp("AbC", "abc", 3) == 0, 16);
|
||||||
|
check(strncasecmp("AbC", "abcd", 3) == 0, 17);
|
||||||
|
check(strncasecmp("AbC", "abcd", 4) < 0, 18);
|
||||||
|
check(strncasecmp("ADC", "abcd", 1) == 0, 19);
|
||||||
|
check(strncasecmp("ADC", "abcd", 2) > 0, 20);
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
main (void)
|
main (void)
|
||||||
{
|
{
|
||||||
@ -1412,6 +1458,11 @@ main (void)
|
|||||||
/* strerror - VERY system-dependent. */
|
/* strerror - VERY system-dependent. */
|
||||||
test_strerror ();
|
test_strerror ();
|
||||||
|
|
||||||
|
/* strcasecmp. Without locale dependencies. */
|
||||||
|
test_strcasecmp ();
|
||||||
|
|
||||||
|
/* strncasecmp. Without locale dependencies. */
|
||||||
|
test_strncasecmp ();
|
||||||
|
|
||||||
if (errors == 0)
|
if (errors == 0)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user