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 Dec 21, 2022
1 parent 5ef0035 commit e3f1d77
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 @@ -29,6 +29,16 @@
#include <stdlib.h>
#include <sys/stat.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 e3f1d77

Please sign in to comment.