[Slirp] [Git][slirp/libslirp][master] Use SSIZE_T from BaseTsd.h on windows

Samuel Thibault (@sthibaul) gitlab at gitlab.freedesktop.org
Sun Apr 23 08:53:38 UTC 2023



Samuel Thibault pushed to branch master at slirp / libslirp


Commits:
22616071 by Samuel Thibault at 2023-04-23T10:51:18+02:00
Use SSIZE_T from BaseTsd.h on windows

It is defined by BaseTsd.h as LONG_PTR, which is 32bit size on win32, and
64bit size on win64.

It seems that mingw rather uses int for the 32bit case, but better stick
to the MS definition, and int/LONG_PTR will be abi-compatible on 32bit.

Fixes #68

- - - - -


1 changed file:

- src/libslirp.h


Changes:

=====================================
src/libslirp.h
=====================================
@@ -10,7 +10,8 @@
 #include <winsock2.h>
 #include <ws2tcpip.h>
 #include <in6addr.h>
-typedef int slirp_ssize_t;
+#include <BaseTsd.h>
+typedef SSIZE_T slirp_ssize_t;
 #ifdef BUILDING_LIBSLIRP
 # define SLIRP_EXPORT __declspec(dllexport)
 #else



View it on GitLab: https://gitlab.freedesktop.org/slirp/libslirp/-/commit/226160716636962ad84a64c1a03bbc9889759331

-- 
View it on GitLab: https://gitlab.freedesktop.org/slirp/libslirp/-/commit/226160716636962ad84a64c1a03bbc9889759331
You're receiving this email because of your account on gitlab.freedesktop.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/slirp/attachments/20230423/c27b65b7/attachment.htm>


More information about the Slirp mailing list