You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not on all compilers, no, not in all compile modes either, and ISO standard doesn't prescribe it. You got no guarantee that happen. Tha's more typical for embedded or microcontroller stuff. Nether x86-64 gcc nor MSVC does that (the latter is where I spotted the problem). The headers Winsock.h and Winsock2.h (POSIX-esque and async API) are ones where that type is defined , same headers are used both for x32 and x64:
So on Windows you're safe to use uintptr_t to cast a SOCKET to, I suppose, but some guaranteed size type is better. Random tests may show that everything is ok because descripor pointer value often stays low. Infamous Windows's HANDLE is also a pointer to void now. it used to be int, just as SOCKET in times of of Win98\Win2000, so you can find a legacy code that relies on it.
modbus-private.h:100 int s;
SOCKET on Windows is not int, it's a larger type - int64_t*.
The text was updated successfully, but these errors were encountered: