From 5d13a0b54434876d833a21a7d196f80e0bf7febc Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Tue, 5 Apr 2022 19:49:51 +0200 Subject: [PATCH] console: argtable3: use newlib getopt, disable logs Opted for changing the source code to avoid adding one extra flag to component public CPPFLAGS. --- components/console/argtable3/argtable3.h | 2 +- components/console/argtable3/argtable3_private.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/console/argtable3/argtable3.h b/components/console/argtable3/argtable3.h index f16fcd04e1..896f99a1c3 100644 --- a/components/console/argtable3/argtable3.h +++ b/components/console/argtable3/argtable3.h @@ -51,7 +51,7 @@ extern "C" { #define ARG_CMD_DESCRIPTION_LEN 256 #ifndef ARG_REPLACE_GETOPT -#define ARG_REPLACE_GETOPT 1 /* use the embedded getopt as the system getopt(3) */ +#define ARG_REPLACE_GETOPT 0 /* ESP-IDF-specific: use newlib-provided getopt instead of the embedded one */ #endif /* ARG_REPLACE_GETOPT */ /* bit masks for arg_hdr.flag */ diff --git a/components/console/argtable3/argtable3_private.h b/components/console/argtable3/argtable3_private.h index 86fad6f1a8..5589fc7ffa 100644 --- a/components/console/argtable3/argtable3_private.h +++ b/components/console/argtable3/argtable3_private.h @@ -41,7 +41,7 @@ #include #define ARG_ENABLE_TRACE 0 -#define ARG_ENABLE_LOG 1 +#define ARG_ENABLE_LOG 0 #ifdef __cplusplus extern "C" {