casaroli commented on code in PR #20565:
URL: https://github.com/apache/nuttx/pull/20565#discussion_r4240435152


##########
include/stdio.h:
##########
@@ -33,8 +33,17 @@
 #include <stdarg.h>
 #include <time.h>
 
-#include <nuttx/fs/fs.h>
-#include <nuttx/lib/lib.h>
+#include <nuttx/fs/cookie.h>
+
+/* Kernel code, and every program of a flat or protected build, still sees
+ * the file system and C library internals through stdio.h.  The programs
+ * of a kernel build cannot use them, and do not see them.
+ */
+
+#if !defined(CONFIG_BUILD_KERNEL) || defined(__KERNEL__)

Review Comment:
   Correction: my first test used only 8 configurations. A wider build (98 flat 
and protected configurations, chosen to enable most libc, mm and apps options) 
breaks 27 of them, in 48 files: 8 libc files, 35 apps files, and 5 files of 
downloaded third-party code (cmocka, nxdoom, xedge), which would need patches. 
They use functions and types from stdlib.h, string.h, unistd.h, pthread.h, 
errno.h and nuttx/clock.h without including them. I propose to keep this PR for 
the kernel build, and to do the flat and protected change in a separate PR 
after the include fixes. Is that OK?



-- 
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]

Reply via email to