Skip to content

Commit adf3a58

Browse files
barcheKristofferC
authored andcommitted
Fix embedding with MSVC (#44976)
(cherry picked from commit c589e0d)
1 parent 8e2b69d commit adf3a58

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/support/dtypes.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,16 @@
2929
#include <stdlib.h>
3030
#include <sys/stat.h>
3131

32+
#if defined(_COMPILER_MICROSOFT_) && !defined(_SSIZE_T_) && !defined(_SSIZE_T_DEFINED)
33+
34+
/* See https://github.com/JuliaLang/julia/pull/44587 */
35+
typedef intptr_t ssize_t;
36+
#define SSIZE_MAX INTPTR_MAX
37+
#define _SSIZE_T_
38+
#define _SSIZE_T_DEFINED
39+
40+
#endif /* defined(_COMPILER_MICROSOFT_) && !defined(_SSIZE_T_) && !defined(_SSIZE_T_DEFINED) */
41+
3242
#if !defined(_COMPILER_GCC_)
3343

3444
#define strtoull _strtoui64

0 commit comments

Comments
 (0)