mirror of
https://github.com/micropython/micropython.git
synced 2025-08-22 02:20:39 +02:00
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.
This commit is contained in:
@@ -511,6 +511,7 @@ STATIC mp_obj_t stream_ioctl(size_t n_args, const mp_obj_t *args) {
|
||||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mp_stream_ioctl_obj, 2, 3, stream_ioctl);
|
||||
|
||||
#if MICROPY_STREAMS_POSIX_API
|
||||
/*
|
||||
* POSIX-like functions
|
||||
*
|
||||
@@ -519,7 +520,6 @@ MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mp_stream_ioctl_obj, 2, 3, stream_ioctl);
|
||||
* POSIX-compatible software to work with MicroPython streams.
|
||||
*/
|
||||
|
||||
|
||||
// errno-like variable. If any of the functions below returned with error
|
||||
// status, this variable will contain error no.
|
||||
int mp_stream_errno;
|
||||
@@ -568,3 +568,5 @@ int mp_stream_posix_fsync(mp_obj_t stream) {
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user