This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/18206] wcsncmp implementation does not behave the same as wcscmp and wmemcmp


https://sourceware.org/bugzilla/show_bug.cgi?id=18206

--- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  920a0395ba9fa5949ec87aaf5daa0259da16749d (commit)
      from  de8aadd52c97f9a04d5e8709b16dc5baf9292a09 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=920a0395ba9fa5949ec87aaf5daa0259da16749d

commit 920a0395ba9fa5949ec87aaf5daa0259da16749d
Author: Stefan Liebler <stli@linux.vnet.ibm.com>
Date:   Mon Apr 13 21:23:10 2015 +0200

    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.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                           |   14 +++
 NEWS                                |    2 +-
 localedata/tests-mbwc/dat_wcsncmp.c |   18 ++--
 localedata/tests-mbwc/tst_wcsncmp.c |    1 +
 string/test-strncmp.c               |  178 +++++++++++++++++++++++++----------
 wcsmbs/Makefile                     |    2 +-
 wcsmbs/test-wcsncmp.c               |    2 +
 wcsmbs/wcsncmp.c                    |   36 ++++----
 8 files changed, 175 insertions(+), 78 deletions(-)
 create mode 100644 wcsmbs/test-wcsncmp.c

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]