casaroli opened a new pull request, #20533: URL: https://github.com/apache/nuttx/pull/20533
## Summary * `tzset()`: POSIX requires it, but NuttX declared and defined it only with `CONFIG_LIBC_LOCALTIME`, so programs that call it do not build without that option. Without `CONFIG_LIBC_LOCALTIME` there are no time zones and local time is UTC, so `tzset()` has nothing to do. New option `CONFIG_LIBC_TZSET` adds an empty `tzset()` for these builds. * `getlocalename_l()` (POSIX.1-2024) returns the name of the locale of one category of a locale object. NuttX supports only the "C" locale, so it returns `"C"` for a valid category, and `NULL` with `errno` `EINVAL` for an invalid one. It is built with `CONFIG_LIBC_LOCALE`, like the other locale functions. ## Impact `CONFIG_LIBC_TZSET` defaults to n and depends on `!LIBC_LOCALTIME`. `getlocalename_l()` is only built with `CONFIG_LIBC_LOCALE`. ## Testing A qemu-armv8a kernel build (QEMU 11) that contains this code, with a test program: ``` tzset: ok getlocalename_l(LC_CTYPE): C ``` Builds: `qemu-armv8a:knsh` with and without the options. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
