all: Rename UMODULE to MODULE in preprocessor/Makefile vars.
This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This commit is contained in:
@@ -138,7 +138,7 @@ CFLAGS += -DMICROPY_PY_THREAD=1 -DMICROPY_PY_THREAD_GIL=0
|
||||
LDFLAGS += $(LIBPTHREAD)
|
||||
endif
|
||||
|
||||
ifeq ($(MICROPY_PY_USSL),1)
|
||||
ifeq ($(MICROPY_PY_SSL),1)
|
||||
ifeq ($(MICROPY_SSL_AXTLS),1)
|
||||
|
||||
endif
|
||||
|
||||
@@ -70,5 +70,5 @@ or not). If you intend to build MicroPython with additional options
|
||||
(like cross-compiling), the same set of options should be passed to `make
|
||||
deplibs`. To actually enable/disable use of dependencies, edit the
|
||||
`ports/unix/mpconfigport.mk` file, which has inline descriptions of the
|
||||
options. For example, to build the SSL module, `MICROPY_PY_USSL` should be
|
||||
options. For example, to build the SSL module, `MICROPY_PY_SSL` should be
|
||||
set to 1.
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#define MICROPY_INCLUDED_MBEDTLS_CONFIG_H
|
||||
|
||||
// Set mbedtls configuration
|
||||
#define MBEDTLS_CIPHER_MODE_CTR // needed for MICROPY_PY_UCRYPTOLIB_CTR
|
||||
#define MBEDTLS_CIPHER_MODE_CTR // needed for MICROPY_PY_CRYPTOLIB_CTR
|
||||
|
||||
// Enable mbedtls modules
|
||||
#define MBEDTLS_HAVEGE_C
|
||||
|
||||
@@ -27,10 +27,10 @@
|
||||
|
||||
#include "py/mpconfig.h"
|
||||
|
||||
#if MICROPY_PY_USELECT_POSIX
|
||||
#if MICROPY_PY_SELECT_POSIX
|
||||
|
||||
#if MICROPY_PY_USELECT
|
||||
#error "Can't have both MICROPY_PY_USELECT and MICROPY_PY_USELECT_POSIX."
|
||||
#if MICROPY_PY_SELECT
|
||||
#error "Can't have both MICROPY_PY_SELECT and MICROPY_PY_SELECT_POSIX."
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
@@ -353,4 +353,4 @@ const mp_obj_module_t mp_module_select = {
|
||||
|
||||
MP_REGISTER_MODULE(MP_QSTR_select, mp_module_select);
|
||||
|
||||
#endif // MICROPY_PY_USELECT_POSIX
|
||||
#endif // MICROPY_PY_SELECT_POSIX
|
||||
|
||||
@@ -146,7 +146,7 @@ STATIC mp_uint_t socket_ioctl(mp_obj_t o_in, mp_uint_t request, uintptr_t arg, i
|
||||
case MP_STREAM_GET_FILENO:
|
||||
return self->fd;
|
||||
|
||||
#if MICROPY_PY_USELECT
|
||||
#if MICROPY_PY_SELECT
|
||||
case MP_STREAM_POLL: {
|
||||
mp_uint_t ret = 0;
|
||||
uint8_t pollevents = 0;
|
||||
@@ -227,7 +227,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_2(socket_bind_obj, socket_bind);
|
||||
STATIC mp_obj_t socket_listen(size_t n_args, const mp_obj_t *args) {
|
||||
mp_obj_socket_t *self = MP_OBJ_TO_PTR(args[0]);
|
||||
|
||||
int backlog = MICROPY_PY_USOCKET_LISTEN_BACKLOG_DEFAULT;
|
||||
int backlog = MICROPY_PY_SOCKET_LISTEN_BACKLOG_DEFAULT;
|
||||
if (n_args > 1) {
|
||||
backlog = (int)mp_obj_get_int(args[1]);
|
||||
backlog = (backlog < 0) ? 0 : backlog;
|
||||
|
||||
@@ -200,7 +200,7 @@ STATIC mp_obj_t mod_time_mktime(mp_obj_t tuple) {
|
||||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_1(mod_time_mktime_obj, mod_time_mktime);
|
||||
|
||||
#define MICROPY_PY_UTIME_EXTRA_GLOBALS \
|
||||
#define MICROPY_PY_TIME_EXTRA_GLOBALS \
|
||||
{ MP_ROM_QSTR(MP_QSTR_clock), MP_ROM_PTR(&mod_time_clock_obj) }, \
|
||||
{ MP_ROM_QSTR(MP_QSTR_gmtime), MP_ROM_PTR(&mod_time_gmtime_obj) }, \
|
||||
{ MP_ROM_QSTR(MP_QSTR_localtime), MP_ROM_PTR(&mod_time_localtime_obj) }, \
|
||||
|
||||
@@ -160,7 +160,7 @@ typedef long mp_off_t;
|
||||
// Enable sys.executable.
|
||||
#define MICROPY_PY_SYS_EXECUTABLE (1)
|
||||
|
||||
#define MICROPY_PY_USOCKET_LISTEN_BACKLOG_DEFAULT (SOMAXCONN < 128 ? SOMAXCONN : 128)
|
||||
#define MICROPY_PY_SOCKET_LISTEN_BACKLOG_DEFAULT (SOMAXCONN < 128 ? SOMAXCONN : 128)
|
||||
|
||||
// Bare-metal ports don't have stderr. Printing debug to stderr may give tests
|
||||
// which check stdout a chance to pass, etc.
|
||||
@@ -181,7 +181,7 @@ void mp_unix_mark_exec(void);
|
||||
#endif
|
||||
|
||||
// If enabled, configure how to seed random on init.
|
||||
#ifdef MICROPY_PY_URANDOM_SEED_INIT_FUNC
|
||||
#ifdef MICROPY_PY_RANDOM_SEED_INIT_FUNC
|
||||
#include <stddef.h>
|
||||
void mp_hal_get_random(size_t n, void *buf);
|
||||
static inline unsigned long mp_random_seed_init(void) {
|
||||
|
||||
@@ -23,8 +23,8 @@ MICROPY_PY_SOCKET = 1
|
||||
# ffi module requires libffi (libffi-dev Debian package)
|
||||
MICROPY_PY_FFI = 1
|
||||
|
||||
# ussl module requires one of the TLS libraries below
|
||||
MICROPY_PY_USSL = 1
|
||||
# ssl module requires one of the TLS libraries below
|
||||
MICROPY_PY_SSL = 1
|
||||
# axTLS has minimal size but implements only a subset of modern TLS
|
||||
# functionality, so may have problems with some servers.
|
||||
MICROPY_SSL_AXTLS = 0
|
||||
|
||||
@@ -41,4 +41,4 @@
|
||||
#define MICROPY_DEBUG_PARSE_RULE_NAME (1)
|
||||
#define MICROPY_TRACKED_ALLOC (1)
|
||||
#define MICROPY_WARNINGS_CATEGORY (1)
|
||||
#define MICROPY_PY_UCRYPTOLIB_CTR (1)
|
||||
#define MICROPY_PY_CRYPTOLIB_CTR (1)
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
|
||||
// Enable just the sys and os built-in modules.
|
||||
#define MICROPY_PY_SYS (1)
|
||||
#define MICROPY_PY_UOS (1)
|
||||
#define MICROPY_PY_OS (1)
|
||||
|
||||
// The minimum sets this to 1 to save flash.
|
||||
#define MICROPY_QSTR_BYTES_IN_HASH (2)
|
||||
|
||||
@@ -7,7 +7,7 @@ MICROPY_PY_FFI = 0
|
||||
MICROPY_PY_SOCKET = 0
|
||||
MICROPY_PY_THREAD = 0
|
||||
MICROPY_PY_TERMIOS = 0
|
||||
MICROPY_PY_USSL = 0
|
||||
MICROPY_PY_SSL = 0
|
||||
MICROPY_USE_READLINE = 0
|
||||
|
||||
MICROPY_VFS_FAT = 0
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
#endif
|
||||
|
||||
// Seed random on import.
|
||||
#define MICROPY_PY_URANDOM_SEED_INIT_FUNC (mp_random_seed_init())
|
||||
#define MICROPY_PY_RANDOM_SEED_INIT_FUNC (mp_random_seed_init())
|
||||
|
||||
// Allow exception details in low-memory conditions.
|
||||
#define MICROPY_ENABLE_EMERGENCY_EXCEPTION_BUF (1)
|
||||
@@ -87,39 +87,39 @@
|
||||
#define MICROPY_PY_SYS_EXC_INFO (1)
|
||||
|
||||
// Configure the "os" module with extra unix features.
|
||||
#define MICROPY_PY_UOS_INCLUDEFILE "ports/unix/moduos.c"
|
||||
#define MICROPY_PY_UOS_ERRNO (1)
|
||||
#define MICROPY_PY_UOS_GETENV_PUTENV_UNSETENV (1)
|
||||
#define MICROPY_PY_UOS_SEP (1)
|
||||
#define MICROPY_PY_UOS_SYSTEM (1)
|
||||
#define MICROPY_PY_UOS_URANDOM (1)
|
||||
#define MICROPY_PY_OS_INCLUDEFILE "ports/unix/moduos.c"
|
||||
#define MICROPY_PY_OS_ERRNO (1)
|
||||
#define MICROPY_PY_OS_GETENV_PUTENV_UNSETENV (1)
|
||||
#define MICROPY_PY_OS_SEP (1)
|
||||
#define MICROPY_PY_OS_SYSTEM (1)
|
||||
#define MICROPY_PY_OS_URANDOM (1)
|
||||
|
||||
// Enable the unix-specific "time" module.
|
||||
#define MICROPY_PY_UTIME (1)
|
||||
#define MICROPY_PY_UTIME_TIME_TIME_NS (1)
|
||||
#define MICROPY_PY_UTIME_CUSTOM_SLEEP (1)
|
||||
#define MICROPY_PY_UTIME_INCLUDEFILE "ports/unix/modutime.c"
|
||||
#define MICROPY_PY_TIME (1)
|
||||
#define MICROPY_PY_TIME_TIME_TIME_NS (1)
|
||||
#define MICROPY_PY_TIME_CUSTOM_SLEEP (1)
|
||||
#define MICROPY_PY_TIME_INCLUDEFILE "ports/unix/modutime.c"
|
||||
|
||||
// Enable the utimeq module used by the previous (v2) version of uasyncio.
|
||||
#define MICROPY_PY_UTIMEQ (1)
|
||||
#define MICROPY_PY_TIMEQ (1)
|
||||
|
||||
#if MICROPY_PY_USSL
|
||||
#define MICROPY_PY_UHASHLIB_MD5 (1)
|
||||
#define MICROPY_PY_UHASHLIB_SHA1 (1)
|
||||
#define MICROPY_PY_UCRYPTOLIB (1)
|
||||
#if MICROPY_PY_SSL
|
||||
#define MICROPY_PY_HASHLIB_MD5 (1)
|
||||
#define MICROPY_PY_HASHLIB_SHA1 (1)
|
||||
#define MICROPY_PY_CRYPTOLIB (1)
|
||||
#endif
|
||||
|
||||
// Use the posix implementation of the "select" module (unless the variant
|
||||
// specifically asks for the MicroPython version).
|
||||
#ifndef MICROPY_PY_USELECT
|
||||
#define MICROPY_PY_USELECT (0)
|
||||
#ifndef MICROPY_PY_SELECT
|
||||
#define MICROPY_PY_SELECT (0)
|
||||
#endif
|
||||
#ifndef MICROPY_PY_USELECT_POSIX
|
||||
#define MICROPY_PY_USELECT_POSIX (!MICROPY_PY_USELECT)
|
||||
#ifndef MICROPY_PY_SELECT_POSIX
|
||||
#define MICROPY_PY_SELECT_POSIX (!MICROPY_PY_SELECT)
|
||||
#endif
|
||||
|
||||
// Enable the "websocket" module.
|
||||
#define MICROPY_PY_UWEBSOCKET (1)
|
||||
#define MICROPY_PY_WEBSOCKET (1)
|
||||
|
||||
// Enable the "machine" module, mostly for machine.mem*.
|
||||
#define MICROPY_PY_MACHINE (1)
|
||||
|
||||
Reference in New Issue
Block a user