[rtems commit] posix/src/exec*: Remove all variants already in Newlib

Joel Sherrill joel at rtems.org
Tue Jan 19 18:33:22 UTC 2016


Module:    rtems
Branch:    master
Commit:    22bb1b61cb4efe0c0dbe41057aac83bb5cffb5d3
Changeset: http://git.rtems.org/rtems/commit/?id=22bb1b61cb4efe0c0dbe41057aac83bb5cffb5d3

Author:    Joel Sherrill <joel at rtems.org>
Date:      Tue Jan 19 12:11:47 2016 -0600

posix/src/exec*: Remove all variants already in Newlib

The RTEMS build of Newlib includes implementations of all exec*()
variants. They rely on the _execve() support method. RTEMS already
had this and it returned ENOSYS. There is no functional change.

closes #2537.

---

 cpukit/posix/Makefile.am   |  4 +---
 cpukit/posix/src/_execve.c |  8 ++++++--
 cpukit/posix/src/execl.c   | 37 -------------------------------------
 cpukit/posix/src/execle.c  | 35 -----------------------------------
 cpukit/posix/src/execlp.c  | 35 -----------------------------------
 cpukit/posix/src/execv.c   | 36 ------------------------------------
 cpukit/posix/src/execve.c  | 38 --------------------------------------
 cpukit/posix/src/execvp.c  | 34 ----------------------------------
 8 files changed, 7 insertions(+), 220 deletions(-)

diff --git a/cpukit/posix/Makefile.am b/cpukit/posix/Makefile.am
index 5a63076..ad9d29f 100644
--- a/cpukit/posix/Makefile.am
+++ b/cpukit/posix/Makefile.am
@@ -61,9 +61,7 @@ libposix_a_SOURCES += src/aio_cancel.c src/aio_error.c src/aio_fsync.c \
     src/aio_read.c src/aio_return.c src/aio_suspend.c src/aio_write.c \
     src/lio_listio.c src/aio_misc.c
 
-## ENOSYS_C_FILES
-libposix_a_SOURCES += src/_execve.c src/execl.c src/execle.c src/execlp.c \
-    src/execv.c src/execve.c src/execvp.c
+libposix_a_SOURCES += src/_execve.c
 endif
 
 libposix_a_SOURCES += src/fork.c src/vfork.c
diff --git a/cpukit/posix/src/_execve.c b/cpukit/posix/src/_execve.c
index 4da47cf..df3a28c 100644
--- a/cpukit/posix/src/_execve.c
+++ b/cpukit/posix/src/_execve.c
@@ -1,12 +1,16 @@
 /**
  * @file
  *
- * @brief execve()
+ * @brief _execve()
  * @ingroup POSIXAPI
+ *
+ * The Newlib C Library contains all of the exec*() variants and assumes
+ * the underlying OS support provides _execve(). This single method
+ * ensures that all exec*() variants return ENOSYS.
  */
 
 /*
- *  COPYRIGHT (c) 1989-2013.
+ *  COPYRIGHT (c) 1989-2013,2016.
  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
diff --git a/cpukit/posix/src/execl.c b/cpukit/posix/src/execl.c
deleted file mode 100644
index fd74a83..0000000
--- a/cpukit/posix/src/execl.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * @file
- *
- * @brief Process will get Executed and then Terminated by execl
- * @ingroup POSIXAPI
- */
-
-/*
- *  execl() - POSIX 1003.1b 3.1.2
- *
- *  COPYRIGHT (c) 1989-2007.
- *  On-Line Applications Research Corporation (OAR).
- *
- *  The license and distribution terms for this file may be
- *  found in the file LICENSE in this distribution or at
- *  http://www.rtems.org/license/LICENSE.
- */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#ifndef HAVE_EXECL
-
-#include <errno.h>
-#include <rtems/seterr.h>
-
-int execl(
-  const char *path,
-  const char *arg,
-  ...
-)
-{
-  rtems_set_errno_and_return_minus_one( ENOSYS );
-}
-
-#endif
diff --git a/cpukit/posix/src/execle.c b/cpukit/posix/src/execle.c
deleted file mode 100644
index ae4b13d..0000000
--- a/cpukit/posix/src/execle.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- *  @file
- *
- *  @brief Execute a File
- *  @ingroup POSIXAPI
- */
-
-/*
- *  COPYRIGHT (c) 1989-2007.
- *  On-Line Applications Research Corporation (OAR).
- *
- *  The license and distribution terms for this file may be
- *  found in the file LICENSE in this distribution or at
- *  http://www.rtems.org/license/LICENSE.
- */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#ifndef HAVE_EXECLE
-
-#include <errno.h>
-#include <rtems/seterr.h>
-
-int execle(
-  const char *path,
-  char const *arg,
-  ...
-)
-{
-  rtems_set_errno_and_return_minus_one( ENOSYS );
-}
-
-#endif
diff --git a/cpukit/posix/src/execlp.c b/cpukit/posix/src/execlp.c
deleted file mode 100644
index 3315235..0000000
--- a/cpukit/posix/src/execlp.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * @file
- *
- * @brief execlp()
- * @ingroup POSIXAPI
- */
-
-/*
- *  COPYRIGHT (c) 1989-2007.
- *  On-Line Applications Research Corporation (OAR).
- *
- *  The license and distribution terms for this file may be
- *  found in the file LICENSE in this distribution or at
- *  http://www.rtems.org/license/LICENSE.
- */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#ifndef HAVE_EXECLP
-
-#include <errno.h>
-#include <rtems/seterr.h>
-
-int execlp(
-  const char *file,
-  const char *arg,
-  ...
-)
-{
-  rtems_set_errno_and_return_minus_one( ENOSYS );
-}
-
-#endif
diff --git a/cpukit/posix/src/execv.c b/cpukit/posix/src/execv.c
deleted file mode 100644
index 5d3de7c..0000000
--- a/cpukit/posix/src/execv.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * @file
- *
- * @brief Inoperable implementation of execv for POSIX threads
- * @ingroup POSIXAPI
- */
-
-/*
- *  execv() - POSIX 1003.1b 3.1.2
- *
- *  COPYRIGHT (c) 1989-2007.
- *  On-Line Applications Research Corporation (OAR).
- *
- *  The license and distribution terms for this file may be
- *  found in the file LICENSE in this distribution or at
- *  http://www.rtems.org/license/LICENSE.
- */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#ifndef HAVE_EXECV
-
-#include <errno.h>
-#include <rtems/seterr.h>
-
-int execv(
-  const char *file,
-  char *const argv[]
-)
-{
-  rtems_set_errno_and_return_minus_one( ENOSYS );
-}
-
-#endif
diff --git a/cpukit/posix/src/execve.c b/cpukit/posix/src/execve.c
deleted file mode 100644
index 1b834a5..0000000
--- a/cpukit/posix/src/execve.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- *  @file
- *
- *  @brief Execute a Program
- *  @ingroup POSIXAPI
- */
-
-/*
- *  COPYRIGHT (c) 1989-2007.
- *  On-Line Applications Research Corporation (OAR).
- *
- *  The license and distribution terms for this file may be
- *  found in the file LICENSE in this distribution or at
- *  http://www.rtems.org/license/LICENSE.
- */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#ifndef HAVE_EXECVE
-
-#include <errno.h>
-#include <rtems/seterr.h>
-
-/**
- *  POSIX 1003.1b 3.1.2
- */
-int execve(
-  const char *path,
-  char *const argv[],
-  char *const envp[]
-)
-{
-  rtems_set_errno_and_return_minus_one( ENOSYS );
-}
-
-#endif
diff --git a/cpukit/posix/src/execvp.c b/cpukit/posix/src/execvp.c
deleted file mode 100644
index 8c84364..0000000
--- a/cpukit/posix/src/execvp.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * @file
- *
- * @brief execvp() - POSIX 1003.1b 3.1.2
- * @ingroup POSIX_KEY Key
- */
-
-/*
- *  COPYRIGHT (c) 1989-2007.
- *  On-Line Applications Research Corporation (OAR).
- *
- *  The license and distribution terms for this file may be
- *  found in the file LICENSE in this distribution or at
- *  http://www.rtems.org/license/LICENSE.
- */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#ifndef HAVE_EXECVP
-
-#include <errno.h>
-#include <rtems/seterr.h>
-
-int execvp(
-  const char *path,
-  char *const argv[]
-)
-{
-  rtems_set_errno_and_return_minus_one( ENOSYS );
-}
-
-#endif



More information about the vc mailing list