kopia lustrzana https://github.com/micropython/micropython-lib
os: Work if "ffi" module is not available (provide wrappers for "uos").
rodzic
d7bdde8820
commit
217bb5fd33
|
@ -31,29 +31,30 @@ environ = {"WARNING": "NOT_IMPLEMENTED"}
|
|||
|
||||
libc = ffilib.libc()
|
||||
|
||||
chdir_ = libc.func("i", "chdir", "s")
|
||||
mkdir_ = libc.func("i", "mkdir", "si")
|
||||
rename_ = libc.func("i", "rename", "ss")
|
||||
unlink_ = libc.func("i", "unlink", "s")
|
||||
rmdir_ = libc.func("i", "rmdir", "s")
|
||||
getcwd_ = libc.func("s", "getcwd", "si")
|
||||
opendir_ = libc.func("P", "opendir", "s")
|
||||
readdir_ = libc.func("P", "readdir", "P")
|
||||
open_ = libc.func("i", "open", "sii")
|
||||
read_ = libc.func("i", "read", "ipi")
|
||||
write_ = libc.func("i", "write", "iPi")
|
||||
close_ = libc.func("i", "close", "i")
|
||||
dup_ = libc.func("i", "dup", "i")
|
||||
access_ = libc.func("i", "access", "si")
|
||||
fork_ = libc.func("i", "fork", "")
|
||||
pipe_ = libc.func("i", "pipe", "p")
|
||||
_exit_ = libc.func("v", "_exit", "i")
|
||||
getpid_ = libc.func("i", "getpid", "")
|
||||
waitpid_ = libc.func("i", "waitpid", "ipi")
|
||||
system_ = libc.func("i", "system", "s")
|
||||
execvp_ = libc.func("i", "execvp", "PP")
|
||||
kill_ = libc.func("i", "kill", "ii")
|
||||
getenv_ = libc.func("s", "getenv", "P")
|
||||
if libc:
|
||||
chdir_ = libc.func("i", "chdir", "s")
|
||||
mkdir_ = libc.func("i", "mkdir", "si")
|
||||
rename_ = libc.func("i", "rename", "ss")
|
||||
unlink_ = libc.func("i", "unlink", "s")
|
||||
rmdir_ = libc.func("i", "rmdir", "s")
|
||||
getcwd_ = libc.func("s", "getcwd", "si")
|
||||
opendir_ = libc.func("P", "opendir", "s")
|
||||
readdir_ = libc.func("P", "readdir", "P")
|
||||
open_ = libc.func("i", "open", "sii")
|
||||
read_ = libc.func("i", "read", "ipi")
|
||||
write_ = libc.func("i", "write", "iPi")
|
||||
close_ = libc.func("i", "close", "i")
|
||||
dup_ = libc.func("i", "dup", "i")
|
||||
access_ = libc.func("i", "access", "si")
|
||||
fork_ = libc.func("i", "fork", "")
|
||||
pipe_ = libc.func("i", "pipe", "p")
|
||||
_exit_ = libc.func("v", "_exit", "i")
|
||||
getpid_ = libc.func("i", "getpid", "")
|
||||
waitpid_ = libc.func("i", "waitpid", "ipi")
|
||||
system_ = libc.func("i", "system", "s")
|
||||
execvp_ = libc.func("i", "execvp", "PP")
|
||||
kill_ = libc.func("i", "kill", "ii")
|
||||
getenv_ = libc.func("s", "getenv", "P")
|
||||
|
||||
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue