summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel@rtems.org>2016-01-19 12:11:47 -0600
committerJoel Sherrill <joel@rtems.org>2016-01-19 12:11:47 -0600
commit22bb1b61cb4efe0c0dbe41057aac83bb5cffb5d3 (patch)
treeeb390a0a512494bc180d633fa5784dee84a38c5a
parentpsxtests: Fix link-time errors (diff)
downloadrtems-22bb1b61cb4efe0c0dbe41057aac83bb5cffb5d3.tar.bz2
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.
-rw-r--r--cpukit/posix/Makefile.am4
-rw-r--r--cpukit/posix/src/_execve.c8
-rw-r--r--cpukit/posix/src/execl.c37
-rw-r--r--cpukit/posix/src/execle.c35
-rw-r--r--cpukit/posix/src/execlp.c35
-rw-r--r--cpukit/posix/src/execv.c36
-rw-r--r--cpukit/posix/src/execve.c38
-rw-r--r--cpukit/posix/src/execvp.c34
8 files changed, 7 insertions, 220 deletions
diff --git a/cpukit/posix/Makefile.am b/cpukit/posix/Makefile.am
index 5a63076cc7..ad9d29f998 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 4da47cfe3c..df3a28c3e0 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 fd74a83a7b..0000000000
--- 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 ae4b13deb7..0000000000
--- 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 331523504d..0000000000
--- 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 5d3de7c358..0000000000
--- 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 1b834a56f1..0000000000
--- 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 8c84364a5a..0000000000
--- 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