projects
/
kopensolaris-gnu
/
glibc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Initial revision
[kopensolaris-gnu/glibc.git]
/
posix
/
execl.c
diff --git
a/posix/execl.c
b/posix/execl.c
index
65f9049
..
9aa13b9
100644
(file)
--- a/
posix/execl.c
+++ b/
posix/execl.c
@@
-1,4
+1,4
@@
-/* Copyright (C) 1991 Free Software Foundation, Inc.
+/* Copyright (C) 1991
, 1992, 1994
Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@
-21,24
+21,28
@@
Cambridge, MA 02139, USA. */
#include <stdarg.h>
#include <stddef.h>
#include <stdarg.h>
#include <stddef.h>
+#ifndef HAVE_GNU_LD
+#define __environ environ
+#endif
+
/* Execute PATH with all arguments after PATH until
a NULL pointer and environment from `environ'. */
int
/* Execute PATH with all arguments after PATH until
a NULL pointer and environment from `environ'. */
int
-DEFUN(execl, (path), CONST char *path AND CONST char *arg DOTS)
+DEFUN(execl, (path
, arg
), CONST char *path AND CONST char *arg DOTS)
{
CONST char *argv[1024];
register unsigned int i;
va_list args;
{
CONST char *argv[1024];
register unsigned int i;
va_list args;
- va_start(args, path);
argv[0] = arg;
argv[0] = arg;
+
+ va_start (args, arg);
i = 1;
do
{
i = 1;
do
{
- argv[i] = va_arg(args, CONST char *);
+ argv[i] = va_arg
(args, CONST char *);
} while (argv[i++] != NULL);
} while (argv[i++] != NULL);
+ va_end (args);
- va_end(args);
-
- return __execve(path, (char *CONST *) argv, __environ);
+ return __execve (path, (char *CONST *) argv, __environ);
}
}