[PATCH] [W32] Use SSIZE_T for ssize_t on Windows instead of long
John Thacker
johnthacker at gmail.com
Wed May 20 13:12:13 CEST 2026
On Wed, May 20, 2026, 4:18 AM Werner Koch <wk at gnupg.org> wrote:
> Hi!
>
> I general we do not support building with MSVC but as one can see we
> tried to help here. Technically your patch is an ABI change when not
> using gcc or clang (which for often critized reason also defines
> __GNUC__) but assuming that building with MSVC on WIN64 anyway gives a
> lot of warning, we could claim that this ABI change is a bug fix.
>
Yes, Microsoft's vcpkg tool doesn't build libgcrypt with MSVC:
https://github.com/microsoft/vcpkg/blob/e5a4f54c0d562059e9ccc6f7e7150667da58fe41/ports/libgcrypt/vcpkg.json#L4
But does have packages from a fork made to help building with MSVC:
https://github.com/microsoft/vcpkg/blob/e5a4f54c0d562059e9ccc6f7e7150667da58fe41/ports/shiftmedia-libgcrypt/vcpkg.json
That project looks like it's on hiatus, but it made the same sort of change
to ssize_t.
https://github.com/ShiftMediaProject/libgcrypt
It looks like currently the only place ssize_t is currently used is in
jitterentropy,
in jent_read_entropy[_safe], so probably the largest impact of the define
is that it's in the gcrypt.h header and affects other projects that include
gcrypt.h and also define ssize_t for Windows for their own use, like
Wireshark.
Thanks again,
John
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gcrypt-devel/attachments/20260520/9cead170/attachment-0001.html>
More information about the Gcrypt-devel
mailing list