summaryrefslogtreecommitdiff
path: root/unix
AgeCommit message (Collapse)Author
2014-06-08Provide definition of alloca() in mpconfigport.h.Damien George
2014-06-08Merge branch 'alloca' of github.com:marcusva/micropython into marcusva-allocaDamien George
2014-06-07modsys: Add optional support for sys.platform.Paul Sokolovsky
Ports which wants to have it, should define MICROPY_PY_SYS_PLATFORM to a string value they need.
2014-06-07Merge pull request #672 from marcusva/makefileDamien George
toolchain fixes to enable cross compatibility
2014-06-07- Cast the struct stat sb.st_ino field to machine_int_t explicitly to avoid aMarcus von Appen
cast error in MP_OBJ_NEW_SMALL_INT(). This is necessary for FreeBSD, where st_ino is of different size - If MP_CLOCKS_PER_SEC is defined on the target host, simply define CLOCK_DIV as a fraction, regardless of the value of MP_CLOCKS_PER_SEC. FreeBSD uses a non-POSIX compliant value of 128 for CLOCKS_PER_SEC
2014-06-07- FreeBSD provides alloca() via stdlib.h, in contrast to Linux and WindowsMarcus von Appen
- Move the includes for alloca() intp mpconfigport.h
2014-06-07- Let the build environment decide about the toolchain to be used, in caseMarcus von Appen
there are special tweaks and paths to be considered. Just provide some defaults, in case the values are undefined. - py-version.sh does not need any bash specific features. - Use libdl only on Linux for now. FreeBSD provides dl*() calls from libc.
2014-06-07Merge pull request #662 from stinos/windows-pathsepDamien George
unix: Fix path seperator used depending on OS
2014-06-05modgc: Implement return value for gc.collect(), enable on Unix.Paul Sokolovsky
2014-06-05unix: Fix path seperator used depending on OSstijn
';' is the standard seperator used for paths in environment variables on Windows
2014-06-05unix: Add setjmp-based GC register helper implementation.Paul Sokolovsky
As I suspected for a long time, for x86, register helper doesn't really make any difference - there's simply not enough register to keep anything in them for any prolonged time. Anything gets pushed on stack anyway. So, on x86, uPy passed all tests even with empty reg helper. So, this setjmp implementation goes as "untested".
2014-06-03py: Instead of having "debug on" var, have "optimization level" var.Paul Sokolovsky
This allows to have multiple "optimization" levels (CPython has two (-OO removes docstrings), we can have more).
2014-06-03unix: Properly print script filename in case of error.Paul Sokolovsky
2014-06-01Rename bultins config variables to MICROPY_PY_BUILTINS_*.Damien George
This renames: MICROPY_PY_FROZENSET -> MICROPY_PY_BUILTINS_FROZENSET MICROPY_PY_PROPERTY -> MICROPY_PY_BUILTINS_PROPERTY MICROPY_PY_SLICE -> MICROPY_PY_BUILTINS_SLICE MICROPY_ENABLE_FLOAT -> MICROPY_PY_BUILTINS_FLOAT See issue #35 for discussion.
2014-05-31unix: 64-bit cleanness.Paul Sokolovsky
2014-05-31unix: Add poorman's stack usage info to mem_info() dump.Paul Sokolovsky
2014-05-31modsocket: Add some comments on intended usage/API design of module.Paul Sokolovsky
2014-05-31modsocket: Remove stale ifdef.Paul Sokolovsky
2014-05-28unix/gccollect.c: Make Clang workaround apply only to it. Unbreaks gcc builds.Paul Sokolovsky
2014-05-28Revert "Fix DEBUG=1 builds"Paul Sokolovsky
This reverts commit 6e76f7bc90fcd130db888f8804b8555dc8f3a484. This patch tries to workaround a previous clang workaround. Instead of going into workaround of workaround spiral, the original workaround should be tamed.
2014-05-26Fix DEBUG=1 buildsDave Hylands
Without this fix, I get the following error: CC gccollect.c gccollect.c: In function ‘gc_helper_get_regs’: gccollect.c:63:1: error: bp cannot be used in asm here
2014-05-26modos: stat(): Accept bytes argument.Paul Sokolovsky
2014-05-25Change const byte* to const char* where sensible.Damien George
This removes need for some casts (at least, more than it adds need for new casts!).
2014-05-24Add SystemExit exception and use it in unix/ and stmhal/ ports.Damien George
Addresses issue #598.
2014-05-24Rename configuration variables controling Python features.Damien George
Now of the form MICROPY_PY_*. See issue #35.
2014-05-24modsocket: 64-bit cleanness.Paul Sokolovsky
2014-05-24unix modsocket: Make .makefile() method more compliant.Paul Sokolovsky
.makefile() should allow to specify which stream time to create - byte or text.
2014-05-21unix: Fix casting issue, int to small int object.Damien George
2014-05-21Tidy up some configuration options.Damien George
MP_ALLOC_* -> MICROPY_ALLOC_* MICROPY_PATH_MAX -> MICROPY_ALLOC_PATH_MAX MICROPY_ENABLE_REPL_HELPERS -> MICROPY_HELPER_REPL MICROPY_ENABLE_LEXER_UNIX -> MICROPY_HELPER_LEXER_UNIX MICROPY_EXTRA_* -> MICROPY_PORT_* See issue #35.
2014-05-21unix, Mac support: Generate order.def via Makefile.Damien George
2014-05-21Merge pull request #607 from Anton-2/osx-clangDamien George
Allow compilation of unix port under clang on OS X
2014-05-19py: Implement proper separation between io.FileIO and io.TextIOWrapper.Paul Sokolovsky
io.FileIO is binary I/O, ans actually optional. Default file type is io.TextIOWrapper, which provides str results. CPython3 explicitly describes io.TextIOWrapper as buffered I/O, but we don't have buffering support yet anyway.
2014-05-15modos: Clean 64-bit issues.Paul Sokolovsky
2014-05-14unix: Add "_os" module with stat().Paul Sokolovsky
stat() is bad function to use using FFI, because its ABI is largely private. To start with, Glibc .so doesn't even have "stat" symbol. Then, layout of struct stat is too implementation-dependent. So, introduce _os to deal with stat() and other similar cases.
2014-05-13Merge pull request #600 from stinos/unix-exitcodeDamien George
unix: Use standard return codes for main
2014-05-13py, unix: Add copyright for modules I worked closely on.Paul Sokolovsky
2014-05-12unix: Implement -O option to turn off __debug__ flag.Damien George
2014-05-12py: Rename BYTE_CODE to BYTECODE (this was missed in previous rename).Damien George
2014-05-13unix: Fix linker errors when time/ffi modules are disabledstijn
When disabling these via mpconfigport.mk or on the commandline, the correspoding build options are not set and the sources are not built so the modules should not be added to the MICROPY_EXTRA_BUILTIN_MODULES list since they are undefined.
2014-05-12Fix some unused variables, and silence a clang warning about initialization ↵Antonin ENFRUN
override in vmentrytable.h
2014-05-12unix: Add asm statements needed to read registers with clang. Code generated ↵Antonin ENFRUN
by gcc 4.9.0 is unchanged (same statements, different order). Both are inefficient, saving unmodified registers on the stack.
2014-05-12unix: Create __bss_start and _end symbols for Mach-O targets.Antonin ENFRUN
It's a hack, but can't find a cleaner way to do it.
2014-05-11unix: Use standard return codes for mainstijn
As in the CPython manual: "Unix programs generally use 2 for command line syntax errors and 1 for all other kind of errors"
2014-05-11py: Rename MICROPY_SYS_EXIT to MICROPY_MOD_SYS_EXIT.Damien George
For consistency with MICROPY_MOD_SYS_STDFILES, etc.
2014-05-11Merge pull request #597 from stinos/mingw-compilationDamien George
mingw: Fix compilation issues
2014-05-10modsys: Enable sys.exit() per port after all.Paul Sokolovsky
2014-05-10modsys, unix: Add sys.exit(), should be implemented by a port.Paul Sokolovsky
2014-05-10py: Disable frozenset by default, enable on unix.Paul Sokolovsky
Takes 416 text bytes on x86.
2014-05-10mingw: Fix compilation issuesstijn
- use lowercase windows.h - fix for mingw32 using preprocessor-unfriendly definition of CLOCKS_PER_SEC
2014-05-09windows: Add modtime implementationstijn