compat: document redefining ssize_t when using MSVC
See: https://docs.microsoft.com/en-us/windows/win32/winprog/windows-data-types#ssize_t https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_types.h.html
This commit is contained in:
1 file changed
+3
-7
+3
-7
@@ -77,14 +77,10 @@ typedef unsigned int SOCKET;
|
|||||||
#define MAX_PATH 1024
|
#define MAX_PATH 1024
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// ssize_t is POSIX, and not present when using MSVC.
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#if !defined(ssize_t)
|
#include <BaseTsd.h>
|
||||||
#ifdef _WIN64
|
typedef SSIZE_T ssize_t;
|
||||||
typedef int64_t ssize_t;
|
|
||||||
#else
|
|
||||||
typedef int32_t ssize_t;
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// The type of the option value passed to getsockopt & setsockopt
|
// The type of the option value passed to getsockopt & setsockopt
|
||||||
|
|||||||
Reference in new issue
Block a user