unix: file: No fsync() on Windows.

This commit is contained in:
Paul Sokolovsky 2014-07-13 23:24:08 +03:00
parent ac736f15c9
commit dce8876dbe

View File

@ -83,8 +83,12 @@ STATIC mp_int_t fdfile_write(mp_obj_t o_in, const void *buf, mp_uint_t size, int
} }
STATIC mp_obj_t fdfile_flush(mp_obj_t self_in) { STATIC mp_obj_t fdfile_flush(mp_obj_t self_in) {
#ifndef _WIN32
mp_obj_fdfile_t *self = self_in; mp_obj_fdfile_t *self = self_in;
fsync(self->fd); fsync(self->fd);
#else
//TODO
#endif
return mp_const_none; return mp_const_none;
} }
STATIC MP_DEFINE_CONST_FUN_OBJ_1(fdfile_flush_obj, fdfile_flush); STATIC MP_DEFINE_CONST_FUN_OBJ_1(fdfile_flush_obj, fdfile_flush);