Skip to content

Commit

Permalink
Fix embedding with MSVC (#44976)
Browse files Browse the repository at this point in the history
(cherry picked from commit c589e0d)
  • Loading branch information
barche authored and KristofferC committed Apr 19, 2022
1 parent 81c8819 commit fe0faad
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/support/dtypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@
#define WIN32_LEAN_AND_MEAN
#include <windows.h>

#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
Expand Down

0 comments on commit fe0faad

Please sign in to comment.