Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/gen Drop special cases for i386 and m68k. It is not...
details: https://anonhg.NetBSD.org/src/rev/1a80873a0061
branches: trunk
changeset: 766699:1a80873a0061
user: joerg <joerg%NetBSD.org@localhost>
date: Thu Jun 30 19:46:07 2011 +0000
description:
Drop special cases for i386 and m68k. It is not a validate assumption
that the address of an argument is at the same stack slot the caller
placed in it. It is perfectely valid to copy it into the local frame
first.
diffstat:
lib/libc/gen/execl.c | 9 ++-------
lib/libc/gen/execle.c | 17 ++---------------
lib/libc/gen/execlp.c | 8 ++------
3 files changed, 6 insertions(+), 28 deletions(-)
diffs (112 lines):
diff -r aa8ecefaf51b -r 1a80873a0061 lib/libc/gen/execl.c
--- a/lib/libc/gen/execl.c Thu Jun 30 18:20:24 2011 +0000
+++ b/lib/libc/gen/execl.c Thu Jun 30 19:46:07 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: execl.c,v 1.16 2008/01/09 11:26:03 simonb Exp $ */
+/* $NetBSD: execl.c,v 1.17 2011/06/30 19:46:07 joerg Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)exec.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: execl.c,v 1.16 2008/01/09 11:26:03 simonb Exp $");
+__RCSID("$NetBSD: execl.c,v 1.17 2011/06/30 19:46:07 joerg Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -56,10 +56,6 @@
execl(const char *name, const char *arg, ...)
{
int r;
-#if defined(__i386__) || defined(__m68k__)
- r = execve(name, __UNCONST(&arg), environ);
- return r;
-#else
va_list ap;
char **argv;
int i;
@@ -82,5 +78,4 @@
r = execve(name, argv, environ);
return r;
-#endif
}
diff -r aa8ecefaf51b -r 1a80873a0061 lib/libc/gen/execle.c
--- a/lib/libc/gen/execle.c Thu Jun 30 18:20:24 2011 +0000
+++ b/lib/libc/gen/execle.c Thu Jun 30 19:46:07 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: execle.c,v 1.11 2008/01/09 11:26:03 simonb Exp $ */
+/* $NetBSD: execle.c,v 1.12 2011/06/30 19:46:07 joerg Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)exec.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: execle.c,v 1.11 2008/01/09 11:26:03 simonb Exp $");
+__RCSID("$NetBSD: execle.c,v 1.12 2011/06/30 19:46:07 joerg Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -50,18 +50,6 @@
int
execle(const char *name, const char *arg, ...)
{
-#if defined(__i386__) || defined(__m68k__)
- va_list ap;
- char **envp;
-
- va_start(ap, arg);
- while ((va_arg(ap, char *)) != NULL)
- continue;
- envp = va_arg(ap, char **);
- va_end(ap);
-
- return execve(name, __UNCONST(&arg), envp);
-#else
va_list ap;
char **argv, **envp;
int i;
@@ -81,5 +69,4 @@
va_end(ap);
return execve(name, argv, envp);
-#endif
}
diff -r aa8ecefaf51b -r 1a80873a0061 lib/libc/gen/execlp.c
--- a/lib/libc/gen/execlp.c Thu Jun 30 18:20:24 2011 +0000
+++ b/lib/libc/gen/execlp.c Thu Jun 30 19:46:07 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: execlp.c,v 1.11 2008/01/09 11:26:03 simonb Exp $ */
+/* $NetBSD: execlp.c,v 1.12 2011/06/30 19:46:07 joerg Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)exec.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: execlp.c,v 1.11 2008/01/09 11:26:03 simonb Exp $");
+__RCSID("$NetBSD: execlp.c,v 1.12 2011/06/30 19:46:07 joerg Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -50,9 +50,6 @@
int
execlp(const char *name, const char *arg, ...)
{
-#if defined(__i386__) || defined(__m68k__)
- return execvp(name, __UNCONST(&arg));
-#else
va_list ap;
char **argv;
int i;
@@ -71,5 +68,4 @@
va_end(ap);
return execvp(name, argv);
-#endif
}
Home |
Main Index |
Thread Index |
Old Index