aboutsummaryrefslogtreecommitdiff
path: root/newlib/libc/stdlib/system.c
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/stdlib/system.c')
-rw-r--r--newlib/libc/stdlib/system.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/newlib/libc/stdlib/system.c b/newlib/libc/stdlib/system.c
index 0b5d9a1..135a9d0 100644
--- a/newlib/libc/stdlib/system.c
+++ b/newlib/libc/stdlib/system.c
@@ -53,6 +53,7 @@ Supporting OS subroutines required: <<_exit>>, <<_execve>>, <<_fork_r>>,
<<_wait_r>>.
*/
+#include <_ansi.h>
#include <errno.h>
#include <stddef.h>
#include <stdlib.h>
@@ -61,13 +62,13 @@ Supporting OS subroutines required: <<_exit>>, <<_execve>>, <<_fork_r>>,
#include <reent.h>
#if defined (unix) || defined (__CYGWIN__)
-static int do_system ();
+static int _EXFUN(do_system, (struct _reent *ptr _AND _CONST char *s));
#endif
int
-_system_r (ptr, s)
- struct _reent *ptr;
- _CONST char *s;
+_DEFUN(_system_r, (ptr, s),
+ struct _reent *ptr _AND
+ _CONST char *s)
{
#if defined(HAVE_SYSTEM)
return _system (s);
@@ -101,8 +102,8 @@ _system_r (ptr, s)
#ifndef _REENT_ONLY
int
-system (s)
- _CONST char *s;
+_DEFUN(system, (s),
+ _CONST char *s)
{
return _system_r (_REENT, s);
}
@@ -118,9 +119,9 @@ extern char **environ;
static char ***p_environ = &environ;
static int
-do_system (ptr, s)
- struct _reent *ptr;
- _CONST char *s;
+_DEFUN(do_system, (ptr, s),
+ struct _reent *ptr _AND
+ _CONST char *s)
{
char *argv[4];
int pid, status;
@@ -150,9 +151,9 @@ do_system (ptr, s)
#if defined (__CYGWIN__)
static int
-do_system (ptr, s)
- struct _reent *ptr;
- _CONST char *s;
+_DEFUN(do_system, (ptr, s),
+ struct _reent *ptr _AND
+ _CONST char *s)
{
char *argv[4];
int pid, status;