Files
nuttx/libs/libc/stdlib/Kconfig
T
Peter van der Perk 0fed06190b libc: Add Kconfig option to disable hex-string to float parsing
Introduce CONFIG_LIBC_DISABLE_HEXSTR_TO_FLOAT to remove support for
parsing hexadecimal floating-point constants (C99 %a) in strtod(),
strtof(), strtold(), and sscanf("%a"). This feature is rarely used in
embedded systems and its removal saves significant flash space. Decimal
float parsing remains unaffected.

Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
2026-01-08 02:37:21 +08:00

60 lines
1.9 KiB
Plaintext

#
# For a description of the syntax of this configuration file,
# see the file kconfig-language.txt in the NuttX tools repository.
#
menu "stdlib Options"
config LIBC_RAND_ORDER
int "Order of the random number generate"
default 1
range 0 3
---help---
The order of the random number generator. 0=fast but very bad random
numbers, 3=slow but very good random numbers.
0 just use integer generation, 1-3 use floating point generation
config LIBC_HOMEDIR
string "Home directory"
default "/"
---help---
The home directory to use with operations like such as 'cd ~'
config LIBC_TMPDIR
string "Temporary file directory"
default "/tmp"
---help---
If a write-able file system is selected, this string will be
provided to specify the full path to a directory where temporary
files can be created. This would be a good application of RAM disk:
To provide temporary storage for application data.
config LIBC_MAX_TMPFILE
int "Maximum size of a temporary file path"
default 32
---help---
If a write-able file system is selected, then temporary file may be
supported at the path provided by LIBC_TMPDIR. The tmpnam() interface
keeps a static copy of this last filename produced; this value is the
maximum size of that last filename. This size is the size of the full
file path.
config LIBC_MAX_EXITFUNS
int "Maximum amount of exit functions"
default 0
---help---
Configure the amount of exit functions for atexit/on_exit. The ANSI
default is 32, but most likely we don't need as many.
config LIBC_DISABLE_HEXSTR_TO_FLOAT
bool "Disable hex-string to float/double conversions"
default DEFAULT_SMALL
---help---
Disables parsing of hexadecimal floating-point constants (C99 %a),
e.g., "0x1.fp3", in strtod(), strtof(), strtold(), and sscanf("%a").
This saves flash space since hex-float parsing adds significant code
and is rarely needed in embedded systems. Decimal float parsing remains
available.
endmenu # stdlib Options