xiaoxiang781216 commented on code in PR #20747: URL: https://github.com/apache/nuttx/pull/20747#discussion_r4306028981
########## include/errno.h: ########## @@ -45,6 +45,10 @@ */ #define errno *__errno() + +/* Not with NUTTX_NO_EXTENSIONS, see nuttx/compiler.h */ + +#ifndef NUTTX_NO_EXTENSIONS #if defined(CONFIG_BUILD_FLAT) || defined(__KERNEL__) #define set_errno(e) \ Review Comment: ditto ########## include/errno.h: ########## @@ -64,6 +68,7 @@ while (0) #endif #define get_errno() errno Review Comment: indent ########## Documentation/os/libs/libc/index.rst: ########## @@ -70,6 +70,26 @@ directory:: misc - Nonstandard "glue" logic, nuttx/debug.h, crc32.h, dirent.h +Non-standard Names in the Headers +================================= + +Some headers define names for the OS that C and POSIX do not reserve. +A portable program that uses such a name for its own purpose can define +one of these macros before its first ``#include``: + +``NUTTX_NO_GETOPT_MACROS`` Review Comment: could we unify NUTTX_NO_GETOPT_MACROS and NUTTX_NO_EXTENSIONS into one macro? -- 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]
