This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 08f78b1ae01d32436e9a855e20b3d4441c74f7a5
Author: Marco Casaroli <[email protected]>
AuthorDate: Mon Oct 19 15:54:56 2026 +0200

    libs/libc: Build popen() without the check for the apps copy.
    
    libc did not build popen(), pclose(), dpopen() and dpclose() when
    CONFIG_SYSTEM_POPEN selected the copy in apps/system/popen.  That copy
    and its option are removed from apps, so remove the check.
    
    Assisted-by: Claude Code:claude-opus-5-5
    Signed-off-by: Marco Casaroli <[email protected]>
---
 libs/libc/stdio/CMakeLists.txt  | 6 ++----
 libs/libc/stdio/Make.defs       | 5 +----
 libs/libc/unistd/CMakeLists.txt | 6 ++----
 libs/libc/unistd/Make.defs      | 5 +----
 4 files changed, 6 insertions(+), 16 deletions(-)

diff --git a/libs/libc/stdio/CMakeLists.txt b/libs/libc/stdio/CMakeLists.txt
index e6236ee83eb..baa1740b397 100644
--- a/libs/libc/stdio/CMakeLists.txt
+++ b/libs/libc/stdio/CMakeLists.txt
@@ -110,13 +110,11 @@ if(CONFIG_FILE_STREAM)
     lib_ungetwc.c
     lib_stdio_ext.c)
 
-  # popen() needs dpopen().  CONFIG_SYSTEM_POPEN selects the copy in
-  # apps/system/popen instead.
+  # popen() needs dpopen()
 
   if(CONFIG_PIPES
      AND CONFIG_LIBC_EXECFUNCS
-     AND CONFIG_SCHED_WAITPID
-     AND NOT CONFIG_SYSTEM_POPEN)
+     AND CONFIG_SCHED_WAITPID)
     list(APPEND SRCS lib_popen.c)
   endif()
 endif()
diff --git a/libs/libc/stdio/Make.defs b/libs/libc/stdio/Make.defs
index 183b5852720..1f6c20693b8 100644
--- a/libs/libc/stdio/Make.defs
+++ b/libs/libc/stdio/Make.defs
@@ -48,15 +48,12 @@ CSRCS += lib_setbuffer.c lib_fputwc.c lib_putwc.c 
lib_fputws.c
 CSRCS += lib_fopencookie.c lib_fmemopen.c lib_open_memstream.c lib_fgetwc.c
 CSRCS += lib_getwc.c lib_ungetwc.c lib_stdio_ext.c
 
-# popen() needs dpopen().  CONFIG_SYSTEM_POPEN selects the copy in
-# apps/system/popen instead.
+# popen() needs dpopen()
 
 ifeq ($(CONFIG_PIPES)$(CONFIG_LIBC_EXECFUNCS)$(CONFIG_SCHED_WAITPID),yyy)
-ifneq ($(CONFIG_SYSTEM_POPEN),y)
 CSRCS += lib_popen.c
 endif
 endif
-endif
 
 # Add the stdio directory to the build
 
diff --git a/libs/libc/unistd/CMakeLists.txt b/libs/libc/unistd/CMakeLists.txt
index f2bce74698f..cabaeb34f32 100644
--- a/libs/libc/unistd/CMakeLists.txt
+++ b/libs/libc/unistd/CMakeLists.txt
@@ -127,13 +127,11 @@ if(CONFIG_PIPES)
   list(APPEND SRCS lib_pipe.c)
 endif()
 
-# dpopen() needs pipes, posix_spawn() and waitpid().  CONFIG_SYSTEM_POPEN
-# selects the copy in apps/system/popen instead.
+# dpopen() needs pipes, posix_spawn() and waitpid()
 
 if(CONFIG_PIPES
    AND CONFIG_LIBC_EXECFUNCS
-   AND CONFIG_SCHED_WAITPID
-   AND NOT CONFIG_SYSTEM_POPEN)
+   AND CONFIG_SCHED_WAITPID)
   list(APPEND SRCS lib_dpopen.c)
 endif()
 
diff --git a/libs/libc/unistd/Make.defs b/libs/libc/unistd/Make.defs
index 2d9110ad4b0..42d839ff6ce 100644
--- a/libs/libc/unistd/Make.defs
+++ b/libs/libc/unistd/Make.defs
@@ -77,14 +77,11 @@ ifeq ($(CONFIG_PIPES),y)
 CSRCS += lib_pipe.c
 endif
 
-# dpopen() needs pipes, posix_spawn() and waitpid().  CONFIG_SYSTEM_POPEN
-# selects the copy in apps/system/popen instead.
+# dpopen() needs pipes, posix_spawn() and waitpid()
 
 ifeq ($(CONFIG_PIPES)$(CONFIG_LIBC_EXECFUNCS)$(CONFIG_SCHED_WAITPID),yyy)
-ifneq ($(CONFIG_SYSTEM_POPEN),y)
 CSRCS += lib_dpopen.c
 endif
-endif
 
 # Add the unistd directory to the build
 

Reply via email to