[Bug manual/20524] strverscmp is inconsistent

fweimer at redhat dot com sourceware-bugzilla@sourceware.org
Mon Aug 29 10:08:00 GMT 2016


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

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2016-08-29
                 CC|                            |fweimer at redhat dot com,
                   |                            |mtk.manpages at gmail dot com,
                   |                            |roland at gnu dot org
          Component|string                      |manual
     Ever confirmed|0                           |1
              Flags|                            |security-

--- Comment #2 from Florian Weimer <fweimer at redhat dot com> ---
This looks to me like a documentation problem.  The libc manual says “If the
common prefix contains only leading zeroes, the longest part is less than the
other one”.  What apparently is meant here is “If the common prefix contains
only leading zeroes, the part with the larger number of leading zeros is less
than the other one”:

https://www.gnu.org/software/libc/manual/html_node/String_002fArray-Comparison.html#index-strverscmp

I believe the current behavior is consistent with this interpretation of the
manual.

Whether this behavior makes sense or not, it is what it is, and at this point,
we can just improve the documentation.

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


More information about the Glibc-bugs mailing list