[S] Change in openvpn[master]: mingw: avoid C99 "hh" scanf length modifier

"d12fk \(Code Review\) via Openvpn-devel" <[email protected]>
Newsgroups gmane.network.openvpn.devel
Message-ID <92e74a94dc30056ce3b352ddc180d6efb16d3cb2-EmailReviewComments-HTML@gerrit.openvpn.net>
Attention is currently required from: plaisthos.

d12fk has posted comments on this change by d12fk. ( http://gerrit.openvpn.net/c/openvpn/+/1733?usp=email )

Change subject: mingw: avoid C99 "hh" scanf length modifier
......................................................................


Patch Set 2:

(1 comment)

File src/openvpn/crypto.c:

http://gerrit.openvpn.net/c/openvpn/+/1733/comment/a49a3e2c_5f20a54c?usp=email :
PS2, Line 1477:                         ASSERT(sscanf((const char *)hex_byte, "%" SCNx8, &u) == 1);
> I am confused about this one. […]
Certainly true for MinGW on 26.04. There is a uLibc, that supports %hhx. Unfortunately MinGW isn't linked with it, but MSVCRT, which doesn't support %hhx. That is true for Ubuntu. Debian also provides MinGW with uLibc. Ubunutu doesn't have those packages for some reason. So the situation is that the headers are shared (it seems) between both libc implementations, while the compiler is hard liked to one of them. Which one the headers do not seem to care about much.

There seems to be some compile time flag, which makes MinGW use the glibc scanf/printf format string parser, which does support C99 as well, but when you have to recompile going uLibc is the saner approach.

Even more sane is to skip on use of unsupported C99 features until this mess is resolved in all distros. uLibc seems to be the standard today already with MSVC.



-- 
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1733?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I6595695ab6401047d498d530f8739686880bea3a
Gerrit-Change-Number: 1733
Gerrit-PatchSet: 2
Gerrit-Owner: d12fk <[email protected]>
Gerrit-Reviewer: plaisthos <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]>
Gerrit-Comment-Date: Thu, 02 Jul 2026 22:09:34 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: plaisthos <[email protected]>

_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.