diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Kconfig | 8 | ||||
-rw-r--r-- | lib/Makefile | 2 | ||||
-rw-r--r-- | lib/strto.c | 8 |
3 files changed, 17 insertions, 1 deletions
diff --git a/lib/Kconfig b/lib/Kconfig index ad4d75e0a4..fdcf7ea405 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -40,6 +40,14 @@ config CC_OPTIMIZE_LIBS_FOR_SPEED If unsure, say N. +config CHARSET + bool + default y if UT_UNICODE || EFI_LOADER || UFS + help + Enables support for various conversions between different + character sets, such as between unicode representations and + different 'code pages'. + config DYNAMIC_CRC_TABLE bool "Enable Dynamic tables for CRC" help diff --git a/lib/Makefile b/lib/Makefile index 5cd0c9c638..07c2ccd7cf 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -25,7 +25,7 @@ obj-$(CONFIG_AES) += aes/ obj-$(CONFIG_$(SPL_TPL_)BINMAN_FDT) += binman.o ifndef API_BUILD -ifneq ($(CONFIG_UT_UNICODE)$(CONFIG_EFI_LOADER),) +ifneq ($(CONFIG_CHARSET),) obj-y += charset.o endif endif diff --git a/lib/strto.c b/lib/strto.c index c00bb5895d..f8b53d846b 100644 --- a/lib/strto.c +++ b/lib/strto.c @@ -143,6 +143,14 @@ unsigned long long simple_strtoull(const char *cp, char **endp, return result; } +long long simple_strtoll(const char *cp, char **endp, unsigned int base) +{ + if (*cp == '-') + return -simple_strtoull(cp + 1, endp, base); + + return simple_strtoull(cp, endp, base); +} + long trailing_strtoln(const char *str, const char *end) { const char *p; |