summaryrefslogtreecommitdiff
path: root/unix/mpconfigport.h
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-05-14 22:08:45 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-05-14 22:08:45 +0300
commit0c124c3123a6c7607375e2df0c49edef577a8b8d (patch)
tree4efbe5c0fbf88515d4473547e0448eb60b77f066 /unix/mpconfigport.h
parent2a2736585437e32309d31b88814ef7e14db7a87c (diff)
unix: Add "_os" module with stat().
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.
Diffstat (limited to 'unix/mpconfigport.h')
-rw-r--r--unix/mpconfigport.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/unix/mpconfigport.h b/unix/mpconfigport.h
index a0a627d57..a78caf050 100644
--- a/unix/mpconfigport.h
+++ b/unix/mpconfigport.h
@@ -49,6 +49,7 @@
// names in exception messages (may require more RAM).
#define MICROPY_ERROR_REPORTING (MICROPY_ERROR_REPORTING_DETAILED)
+extern const struct _mp_obj_module_t mp_module_os;
extern const struct _mp_obj_module_t mp_module_time;
extern const struct _mp_obj_module_t mp_module_socket;
extern const struct _mp_obj_module_t mp_module_ffi;
@@ -68,6 +69,7 @@ extern const struct _mp_obj_module_t mp_module_ffi;
MICROPY_MOD_FFI_DEF \
MICROPY_MOD_TIME_DEF \
{ MP_OBJ_NEW_QSTR(MP_QSTR_microsocket), (mp_obj_t)&mp_module_socket }, \
+ { MP_OBJ_NEW_QSTR(MP_QSTR__os), (mp_obj_t)&mp_module_os }, \
// type definitions for the specific machine