mailing list of musl libc
 help / color / mirror / code / Atom feed
* [musl] Behaviour of strverscmp(3)
@ 2022-11-06 23:18 Dmitry Bogatov
  2022-11-06 23:39 ` Rich Felker
       [not found] ` <20221106233904.GE29905__8136.83224130131$1667785799$gmane$org@brightrain.aerifal.cx>
  0 siblings, 2 replies; 5+ messages in thread
From: Dmitry Bogatov @ 2022-11-06 23:18 UTC (permalink / raw)
  To: bug-gsasl, musl

Hello.

While trying to building gsasl statically with musl library as part of
Nixpkgs distribution, I noticed that test built from tests/version.c
fails when built with musl library. After a bit of troubleshooting, I
can pinpoint the reason -- different behaviour of "strverscmp" from
glibc and musl.

Example code:

#include <string.h>
#include <stdio.h>

int main()
{
	int value = strverscmp("UNKNOWN", "2.2.0");
	printf("%d\n", value);
	return 0;
}

Under glibc value "35" is printed (positive), under musl value "-1" is
printed (negative). Not sure what is the correct solution for the
issue, so I cross-post into two lists.

For now I plan to patch-out this particular test. Thank you.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-11-08  3:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-06 23:18 [musl] Behaviour of strverscmp(3) Dmitry Bogatov
2022-11-06 23:39 ` Rich Felker
2022-11-08  3:08   ` Rich Felker
2022-11-08  3:25     ` Rich Felker
     [not found] ` <20221106233904.GE29905__8136.83224130131$1667785799$gmane$org@brightrain.aerifal.cx>
2022-11-07  8:51   ` Simon Josefsson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).