summaryrefslogtreecommitdiff
path: root/unix
AgeCommit message (Collapse)Author
2016-04-03unix: djgpp errno.h have no ENOTSUP, so define it to Linux value.pohmelie
2016-04-02unix/file: "encoding" arg to open() isn't kw-only.Paul Sokolovsky
And with "buffering" arg introduced, it's non possible to make it non-kwonly.
2016-04-02unix/file: Parse "buffering" argument of open() builtin.Paul Sokolovsky
It's ignored (unbuffered, raw I/O is used), but least makes it compatible with CPython.
2016-04-01unix: implement -i option (inspect - start REPL after script is finished)Pavol Rusnak
2016-03-27unix/unix_mphal: Hack to make uos.dupterm() actually work.Paul Sokolovsky
See https://github.com/micropython/micropython/issues/1736 for the list of complications. This workaround instead of duplicating REPL to another stream, switches to it, because read(STDIN) we use otherwise is blocking call, so it and custom REPL stream can't be used together.
2016-03-02unix/modsocket: Add comment regarding close() error checking (which is none).Paul Sokolovsky
2016-02-25unix: Enabled importing of persistent bytecode (.mpy files).Damien George
2016-02-15extmod/vfs_fat_ffconf: Reusable FatFs module, move from stmhal/ffconf.Paul Sokolovsky
TODO: Probably merge into vfs_fat_diskio.
2016-02-15extmod/vfs_fat_file: Reusable FatFs module, move from stmhal/file.Paul Sokolovsky
2016-02-15extmod/vfs_fat_diskio: Reusable FatFs module, move from stmhal/diskio.Paul Sokolovsky
2016-02-15py/mpstate.h: fs_user_mount is now standard, reusable uPy functionality.Paul Sokolovsky
2016-02-14unix: Enable VfsFat support.Paul Sokolovsky
2016-02-06unix/file: Stop assuming that O_RDWR == O_RDONLY | O_WRONLY.Paul Sokolovsky
That's not true e.g. on Linux.
2016-02-01py/mpprint: Fix sign extension when printf'ing %u, %x and %X.Damien George
2016-01-29py/runtime: mp_stack_ctrl_init() should be called immediately on startup.Paul Sokolovsky
Calling it from mp_init() is too late for some ports (like Unix), and leads to incomplete stack frame being captured, with following GC issues. So, now each port should call mp_stack_ctrl_init() on its own, ASAP after startup, and taking special precautions so it really was called before stack variables get allocated (because if such variable with a pointer is missed, it may lead to over-collecting (typical symptom is segfaulting)).
2016-01-29unix/main: Remove debug code left from MP_OBJ_TO_PTR refactor.Paul Sokolovsky
2016-01-28lib/utils/printf: Fix printf on release buildsDave Hylands
When using newer glibc's the compiler automatically sets _FORTIFY_SOURCE when building with -O1 and this causes a special inlined version of printf to be declared which then bypasses our version of printf.
2016-01-27unix/modsocket: sockaddr(): Handle AF_INET6 addresses.Paul Sokolovsky
2016-01-26extmod/modurandom: Add some extra random functions.Damien George
Functions added are: - randint - randrange - choice - random - uniform They are enabled with configuration variable MICROPY_PY_URANDOM_EXTRA_FUNCS, which is disabled by default. It is enabled for unix coverage build and stmhal.
2016-01-21unix/modsocket: accept(): Make IPv6-clean.Paul Sokolovsky
By reserving enough space for peer address.
2016-01-17extmod/modurandom: Add "urandom" module.Paul Sokolovsky
Seedable and reproducible pseudo-random number generator. Implemented functions are getrandbits(n) (n <= 32) and seed(). The algorithm used is Yasmarang by Ilya Levin: http://www.literatecode.com/yasmarang
2016-01-15unix/modffi: Allow to compile modffi in OBJ_REPR_D mode.Damien George
2016-01-15unix/.gitignore: Add nanbox build output to ignore list.Damien George
2016-01-15unix: Add option to build 64-bit NaN-boxing interpreter.Damien George
Build using: make nanbox
2016-01-11unix: Allow to build coverage build with OBJ_REPR_D.Damien George
2016-01-11unix: Add socket.inet_ntop functionDave Hylands
2016-01-11py: Change first arg of type.make_new from mp_obj_t to mp_obj_type_t*.Damien George
The first argument to the type.make_new method is naturally a uPy type, and all uses of this argument cast it directly to a pointer to a type structure. So it makes sense to just have it a pointer to a type from the very beginning (and a const pointer at that). This patch makes such a change, and removes all unnecessary casting to/from mp_obj_t.
2016-01-11py: Change type signature of builtin funs that take variable or kw args.Damien George
With this patch the n_args parameter is changed type from mp_uint_t to size_t.
2016-01-11py: Change type of .make_new and .call args: mp_uint_t becomes size_t.Damien George
This patch changes the type signature of .make_new and .call object method slots to use size_t for n_args and n_kw (was mp_uint_t. Makes code more efficient when mp_uint_t is larger than a machine word. Doesn't affect ports when size_t and mp_uint_t have the same size.
2016-01-10unix/modtime: strftime(): Support 2nd argument, but as time_t value.Paul Sokolovsky
Instead of struct tm like structure, as required by CPython.
2016-01-03py: Change struct and macro for builtin fun so they can be type checked.Damien George
2016-01-02unix/Makefile: Move include of mpconfigport.mk to before mkenv.mk.Damien George
So that if MICROPY_FORCE_32BIT is set mpconfigport.mk it influences mkenv.mk.
2016-01-02unix/.gitignore: Ignore gcov files.Paul Sokolovsky
2016-01-01unix/unix_mphal: Be sure to wrap dupterm code with MICROPY_PY_OS_DUPTERM.Paul Sokolovsky
2016-01-01unix/unix_mphal: Handle exceptions in call to dupterm's .read().Paul Sokolovsky
2016-01-01extmod/moduos_dupterm: Make mp_uos_dupterm_tx_strn() function reusable.Paul Sokolovsky
Function to actually spool output terminal data to dupterm object.
2016-01-01py: Clean up instantiation of dupterm object.Paul Sokolovsky
To comply with already established scheme for extmod's.
2016-01-01py/mpconfig: Make configuration of dupterm object reusable.Paul Sokolovsky
2016-01-01extmod/moduos_dupterm: Make uos.dupterm() implementation reusable.Paul Sokolovsky
That's just function which sets/gets dup terminal object, and can be easily reused across ports.
2015-12-28unix: Implement uos.dupterm(). Conditional on MICROPY_PY_OS_DUPTERM.Paul Sokolovsky
2015-12-23unix/unix_mphal: Raise KeyboardInterrupt straight from signal handler.Paul Sokolovsky
POSIX doesn't guarantee something like that to work, but it works on any system with careful signal implementation. Roughly, the requirement is that signal handler is executed in the context of the process, its main thread, etc. This is true for Linux. Also tested to work without issues on MacOSX.
2015-12-22unix: Properly cancel REPL input when Ctrl-C is pressed.Damien George
2015-12-18unix: machine_mem improvementsDave Hylands
This basically introduces the MICROPY_MACHINE_MEM_GET_READ_ADDR and MICROPY_MACHINE_MEM_GET_WRITE_ADDR macros. If one of them is not defined, then a default identity function is provided.
2015-12-18ports: Rename "machine" module to "umachine".Paul Sokolovsky
To let unix port implement "machine" functionality on Python level, and keep consistent naming in other ports (baremetal ports will use magic module "symlinking" to still load it on "import machine"). Fixes #1701.
2015-12-18windows: Make keyboard_interrupt_obj available, it's standard feature.Paul Sokolovsky
2015-12-18unix/unix_mphal: Just consistently set sigaction.sa_flags to 0.Paul Sokolovsky
2015-12-17unix/unix_mphal: Properly initialize struct sigaction.Paul Sokolovsky
This solves long-standing non-deterministic bug, which manifested itself on x86 32-bit (at least of reported cases) - segfault on Ctrl+C (i.e. SIGINT).
2015-12-16unix: Change define logic of _DIRENT_HAVE_D_INO to match other macros.Damien George
2015-12-16unix: Add FreeDos targetpohmelie
2015-12-16unix/modos: Fix silly bugs in ilistdir tuple creation.Damien George