summaryrefslogtreecommitdiff
path: root/py/mpconfig.h
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-07-30 20:05:56 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-07-30 20:05:56 +0300
commit61e77a4e88c4b6971fd997191de01e5ab08e46c5 (patch)
treefff2891aa94810f76849050fe02504c8599a0ab4 /py/mpconfig.h
parent58d9d85a564bbae5fa7eaa1f0baa62be56024366 (diff)
py/mpconfig.h: Add MICROPY_STREAMS_POSIX_API setting.
To filter out even prototypes of mp_stream_posix_*() functions, which require POSIX types like ssize_t & off_t, which may be not available in some ports.
Diffstat (limited to 'py/mpconfig.h')
-rw-r--r--py/mpconfig.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/py/mpconfig.h b/py/mpconfig.h
index edf6e71d0..890e072ab 100644
--- a/py/mpconfig.h
+++ b/py/mpconfig.h
@@ -522,6 +522,12 @@ typedef double mp_float_t;
#define MICROPY_STREAMS_NON_BLOCK (0)
#endif
+// Whether to provide stream functions with POSIX-like signatures
+// (useful for porting existing libraries to MicroPython).
+#ifndef MICROPY_STREAMS_POSIX_API
+#define MICROPY_STREAMS_POSIX_API (0)
+#endif
+
// Whether to call __init__ when importing builtin modules for the first time
#ifndef MICROPY_MODULE_BUILTIN_INIT
#define MICROPY_MODULE_BUILTIN_INIT (0)