Skip to content

Commit 5be60d6

Browse files
stinospfalcon
authored andcommitted
windows: Define ssize_t and use renamed mphal header
This fixes the build after changes in [66fd3e4] and [3a6b3d2]
1 parent 863d4cd commit 5be60d6

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

windows/mpconfigport.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,13 @@ extern const struct _mp_obj_module_t mp_module_time;
196196
#define PATH_MAX MICROPY_ALLOC_PATH_MAX
197197
#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
198198
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
199+
#ifdef _WIN64
200+
#define SSIZE_MAX _I64_MAX
201+
typedef __int64 ssize_t;
202+
#else
203+
#define SSIZE_MAX _I32_MAX
204+
typedef int ssize_t;
205+
#endif
199206

200207

201208
// Put static/global variables in sections with a known name

windows/windows_mphal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
*/
2626

2727
#include "sleep.h"
28-
#include "unix/unix_mphal.h"
28+
#include "unix/mphalport.h"
2929

3030
#define MICROPY_HAL_HAS_VT100 (0)
3131

0 commit comments

Comments
 (0)