From f8377f866616ff47e7b8f6b6263ebb40c2c265a4 Mon Sep 17 00:00:00 2001 From: zhangshoukui Date: Wed, 18 Dec 2024 19:32:11 +0800 Subject: [PATCH] Add LINE_MAX configuration Signed-off-by: zhangshoukui --- include/limits.h | 2 +- sched/Kconfig | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/include/limits.h b/include/limits.h index 56e2321fcd1..4d9a65d07c8 100644 --- a/include/limits.h +++ b/include/limits.h @@ -130,7 +130,7 @@ #define _POSIX_PIPE_BUF 512 #define _POSIX_STREAM_MAX 16 #define _POSIX_TZNAME_MAX 3 -#define _POSIX2_LINE_MAX 80 +#define _POSIX2_LINE_MAX CONFIG_LINE_MAX #ifdef CONFIG_SMALL_MEMORY diff --git a/sched/Kconfig b/sched/Kconfig index 74483c5bf7d..e9eaf21fc58 100644 --- a/sched/Kconfig +++ b/sched/Kconfig @@ -1412,6 +1412,16 @@ config PATH_MAX ---help--- The maximum size of path name. +config LINE_MAX + int "Maximum size of line" + default 64 if DEFAULT_SMALL + default 80 if !DEFAULT_SMALL + ---help--- + The maximum size of line. Unless otherwise noted, the maximum length, in bytes, + of a utility's input line (either standard input or another file), when the + utility is described as processing text files. The length includes room for + the trailing newline. + endmenu # Files and I/O menuconfig PRIORITY_INHERITANCE