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/9913] libc's function strverscmp() has a bug


------- 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.


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