From 3926c72dd2c6c9bfc4840f914be5a55258d3a248 Mon Sep 17 00:00:00 2001 From: Damien George Date: Sun, 11 Jan 2015 17:28:27 +0000 Subject: unix: Add target to build "minimal" uPy interpreter. --- unix/file.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'unix/file.c') diff --git a/unix/file.c b/unix/file.c index 7f1b285a5d..a2706a96c5 100644 --- a/unix/file.c +++ b/unix/file.c @@ -36,6 +36,8 @@ #include "py/stream.h" #include "py/builtin.h" +#if MICROPY_PY_IO + #ifdef _WIN32 #define fsync _commit #endif @@ -264,3 +266,5 @@ MP_DEFINE_CONST_FUN_OBJ_KW(mp_builtin_open_obj, 1, mp_builtin_open); const mp_obj_fdfile_t mp_sys_stdin_obj = { .base = {&mp_type_textio}, .fd = STDIN_FILENO }; const mp_obj_fdfile_t mp_sys_stdout_obj = { .base = {&mp_type_textio}, .fd = STDOUT_FILENO }; const mp_obj_fdfile_t mp_sys_stderr_obj = { .base = {&mp_type_textio}, .fd = STDERR_FILENO }; + +#endif // MICROPY_PY_IO -- cgit v1.2.3