Skip to content

Commit

Permalink
windows: Propagate MICROPY_PY_OS_DUPTERM handling from unix port.
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Sokolovsky committed Dec 27, 2015
1 parent 2c1620c commit 1e06e81
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions windows/mpconfigport.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,14 @@ typedef long mp_off_t;
typedef void *machine_ptr_t; // must be of pointer size
typedef const void *machine_const_ptr_t; // must be of pointer size

#if MICROPY_PY_OS_DUPTERM
#define MP_PLAT_PRINT_STRN(str, len) mp_hal_stdout_tx_strn_cooked(str, len)
void mp_hal_dupterm_tx_strn(const char *str, size_t len);
#else
#include <unistd.h>
#define MP_PLAT_PRINT_STRN(str, len) do { int ret = write(1, str, len); (void)ret; } while (0)
#define mp_hal_dupterm_tx_strn(s, l)
#endif

extern const struct _mp_obj_fun_builtin_t mp_builtin_input_obj;
extern const struct _mp_obj_fun_builtin_t mp_builtin_open_obj;
Expand Down

0 comments on commit 1e06e81

Please sign in to comment.