diff --git a/src/support/dtypes.h b/src/support/dtypes.h index 9e3e17015e135..d49ae0b22b5f9 100644 --- a/src/support/dtypes.h +++ b/src/support/dtypes.h @@ -27,6 +27,16 @@ #define WIN32_LEAN_AND_MEAN #include +#if defined(_COMPILER_MICROSOFT_) && !defined(_SSIZE_T_) && !defined(_SSIZE_T_DEFINED) + +/* See https://github.com/JuliaLang/julia/pull/44587 */ +typedef intptr_t ssize_t; +#define SSIZE_MAX INTPTR_MAX +#define _SSIZE_T_ +#define _SSIZE_T_DEFINED + +#endif /* defined(_COMPILER_MICROSOFT_) && !defined(_SSIZE_T_) && !defined(_SSIZE_T_DEFINED) */ + #if !defined(_COMPILER_GCC_) #define strtoull _strtoui64