casaroli opened a new pull request, #20531: URL: https://github.com/apache/nuttx/pull/20531
## Summary Interfaces that NuttX did not have, or had in a form that programs cannot use. Each one is a separate commit. * `include/ar.h`: the archive (`.a`) file header: `struct ar_hdr`, `ARMAG`, `SARMAG`, `ARFMAG`. * `getlogin()` and `getlogin_r()` (POSIX). NuttX has no login sessions, so they return the name of the real user ID in the user database: `root` when there is no passwd file. New option `CONFIG_LIBC_GETLOGIN`. * `getdtablesize()` and `getpagesize()` as functions. They are macros with a dummy parameter, so a program that declares them does not compile. New option `CONFIG_LIBC_GETPAGESIZE_FUNCTIONS`; without it the macros stay. * `getgrent()`, `setgrent()` and `endgrent()` (POSIX), from the group file with `CONFIG_LIBC_GROUP_FILE`, or the root group without it. New option `CONFIG_LIBC_GETGRENT`. A style-only commit before it fixes three nxstyle errors in `lib_find_grpfile.c`. * `issetugid()`: libc builds it, but no header declared it. Now `unistd.h` does. ## Impact All new options default to n. With them off, only `include/ar.h` and the `issetugid()` declaration are new. ## Testing A qemu-armv8a kernel build (QEMU 11) that contains this code, with a test program built outside the tree: ``` getlogin: root getlogin_r: 0 root getpagesize: 4096, getdtablesize: 256 getgrent: root gid 0 ``` Builds: `qemu-armv8a:knsh` with the options; `qemu-armv8a:nsh` with the options and `LIBC_GROUP_FILE`/`LIBC_PASSWD_FILE`; `qemu-armv8a:knsh` without them. -- 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]
