diff options
author | Stefan Liebler <stli@linux.vnet.ibm.com> | 2015-04-13 21:23:10 +0200 |
---|---|---|
committer | Andreas Krebbel <krebbel@linux.vnet.ibm.com> | 2015-04-13 21:25:04 +0200 |
commit | 920a0395ba9fa5949ec87aaf5daa0259da16749d (patch) | |
tree | f590d2c50132feb89be712a38754faaf3c7f45c6 /wcsmbs/Makefile | |
parent | de8aadd52c97f9a04d5e8709b16dc5baf9292a09 (diff) | |
download | glibc-920a0395ba9fa5949ec87aaf5daa0259da16749d.tar.gz glibc-920a0395ba9fa5949ec87aaf5daa0259da16749d.tar.xz glibc-920a0395ba9fa5949ec87aaf5daa0259da16749d.zip |
Use correct signedness in wcsncmp
[BZ #18206] * wcsmbs/wcsncmp.c (wcsncmp): Compare as wchar_t, not wint_t. Use signed comparision instead of substraction to avoid overflow bug. * localedata/tests-mbwc/tst_wcsncmp.c (tst_wcsncmp): Take the sign of ret. * localedata/tests-mbwc/dat_wcsncmp.c (tst_wcsncmp_loc): Do not expect precise return values. Only the sign matters. * wcsmbs/Makefile (strop-tests): Add wcsncmp. * wcsmbs/test-wcsncmp.c: New File. * string/test-strncmp.c: Add wcsncmp support.
Diffstat (limited to 'wcsmbs/Makefile')
-rw-r--r-- | wcsmbs/Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/wcsmbs/Makefile b/wcsmbs/Makefile index 69f78922a2..44a4494403 100644 --- a/wcsmbs/Makefile +++ b/wcsmbs/Makefile @@ -42,7 +42,7 @@ routines := wcscat wcschr wcscmp wcscpy wcscspn wcsdup wcslen wcsncat \ isoc99_swscanf isoc99_vswscanf \ mbrtoc16 c16rtomb -strop-tests := wcscmp wmemcmp wcslen wcschr wcsrchr wcscpy +strop-tests := wcscmp wcsncmp wmemcmp wcslen wcschr wcsrchr wcscpy tests := tst-wcstof wcsmbs-tst1 tst-wcsnlen tst-btowc tst-mbrtowc \ tst-wcrtomb tst-wcpncpy tst-mbsrtowcs tst-wchar-h tst-mbrtowc2 \ tst-c16c32-1 wcsatcliff $(addprefix test-,$(strop-tests)) |