This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/9913] libc's function strverscmp() has a bug
- From: "jakub at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 7 Apr 2009 06:08:14 -0000
- Subject: [Bug libc/9913] libc's function strverscmp() has a bug
- References: <20090227200113.9913.jyliu@fortinet.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From jakub at redhat dot com 2009-04-07 06:08 -------
Unfortunately this broke something more important:
#include <string.h>
#include <stdio.h>
int
main ()
{
int rc = strverscmp ("2.6.21", "2.6.20");
printf ("2.6.21 %s 2.6.20\n", (rc < 0 ? "<" : rc == 0 ? "=" : ">"));
rc = strverscmp ("2.6.20", "2.6.21");
printf ("2.6.20 %s 2.6.21\n", (rc < 0 ? "<" : rc == 0 ? "=" : ">"));
}
now prints:
2.6.21 < 2.6.20
2.6.20 < 2.6.21
while it used to correctly print:
2.6.21 > 2.6.20
2.6.20 < 2.6.21
Seems it wasn't the change in proposed in the original comment, but the
follow-up cleanups.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=9913
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.