Skip to content

Commit 1e06e81

Browse files
committed
windows: Propagate MICROPY_PY_OS_DUPTERM handling from unix port.
1 parent 2c1620c commit 1e06e81

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

windows/mpconfigport.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,14 @@ typedef long mp_off_t;
139139
typedef void *machine_ptr_t; // must be of pointer size
140140
typedef const void *machine_const_ptr_t; // must be of pointer size
141141

142+
#if MICROPY_PY_OS_DUPTERM
143+
#define MP_PLAT_PRINT_STRN(str, len) mp_hal_stdout_tx_strn_cooked(str, len)
144+
void mp_hal_dupterm_tx_strn(const char *str, size_t len);
145+
#else
142146
#include <unistd.h>
143147
#define MP_PLAT_PRINT_STRN(str, len) do { int ret = write(1, str, len); (void)ret; } while (0)
148+
#define mp_hal_dupterm_tx_strn(s, l)
149+
#endif
144150

145151
extern const struct _mp_obj_fun_builtin_t mp_builtin_input_obj;
146152
extern const struct _mp_obj_fun_builtin_t mp_builtin_open_obj;

0 commit comments

Comments
 (0)