<div dir="auto"><div><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Wed, May 20, 2026, 9:42 PM NIIBE Yutaka via Gcrypt-devel <<a href="mailto:gcrypt-devel@gnupg.org">gcrypt-devel@gnupg.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Werner Koch wrote:<br>
> Other opinions? <br>
<br>
I think that it's consisitent to use SSIZE_T.  It's better to change.<br>
<br>
On the other hand, we know that MSVC compiles some code differently<br>
(than developers expect).  I have experiences to examine constant-time<br>
intended code compiled by MSVC, using <a href="http://godbolt.org" rel="noreferrer noreferrer" target="_blank">godbolt.org</a>.  I wonder (and am not<br>
sure) if our libgcrypt is OK when building with MSVC.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Libgcrypt does not build with MSVC. What you can do, and Wireshark does, is build with MSYS2/MingW, which defines ssize_t as 64-bit on Win64 and 32-bit on Win32. The resultant DLL can be linked into a program when the rest of the executable and libraries are built with MSVC, and use the gcrypt.h header for necessary includes.</div><div dir="auto"><br></div><div dir="auto">However, this doesn't work without this patch on Win64, because the MSYS2 built DLL uses 64-bit ssize_t but MSVC will typedef ssize_t as a 32-bit long, so gcrypt.h is ABI incompatible with the built DLL. If the header typedef is patched like this, then it all works. That's even aside from the issue that Wireshark uses ssize_t in our own API.</div><div dir="auto"><br></div><div dir="auto">So I would say this is not an ABI break at all, but an ABI repair that makes it more consistent. I think it's still not possible to build the entire library with MSVC, but it at least makes it possible to use an unpatched gcrypt.h with a library cross compiled for Win64.</div><div dir="auto"><br></div><div dir="auto">Thanks,</div><div dir="auto">John Thacker</div><div dir="auto"></div><div dir="auto"><div class="gmail_quote gmail_quote_container"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div></div></div>