about summary refs log tree commit diff
path: root/posix
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1996-10-10 01:07:18 +0000
committerUlrich Drepper <drepper@redhat.com>1996-10-10 01:07:18 +0000
commitb33f91e91da81059b388c8f8ee0d0024212eb180 (patch)
treea9b0a80b8567c0d4e24a74f0c45e52a4a3a8962a /posix
parent11336c165c25e5a467335ca742674b1d5ad6d982 (diff)
downloadglibc-b33f91e91da81059b388c8f8ee0d0024212eb180.tar.gz
glibc-b33f91e91da81059b388c8f8ee0d0024212eb180.tar.xz
glibc-b33f91e91da81059b388c8f8ee0d0024212eb180.zip
update from main archive 961009 cvs/libc-961011 cvs/libc-961010
Wed Oct  9 00:24:52 1996  Jim Meyering  <meyering@asic.sc.ti.com>

	* time/strftime.c: Allow old K&R compilers compile this file.

Wed Oct  9 12:03:56 1996  Ulrich Drepper  <drepper@cygnus.com>

	* posix/execlp.c: Add first argument parameter to be compliant
	with POSIX.  Rearrange body to start vararg counter after
	this new argument.

Wed Oct  9 04:34:50 1996  Ulrich Drepper  <drepper@cygnus.com>

	* sysdeps/unix/sysv/linux/sys/procfs.h: Rewrite.  We cannot use
	simply a wrapper around the <linux.elfcore.h> file since the
	kernel header is not clean enough.  We provide the definitions
	in this file instead.

Wed Oct  9 01:43:18 1996  Ulrich Drepper  <drepper@cygnus.com>

	* sysdeps/unix/sysv/linux/gethostid.c (sethostid): Avoid
	get?id calls by using __libc_enable_secure.
Diffstat (limited to 'posix')
-rw-r--r--posix/execlp.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/posix/execlp.c b/posix/execlp.c
index af09dacafd..f442c05d94 100644
--- a/posix/execlp.c
+++ b/posix/execlp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1993, 1996 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
@@ -16,7 +16,6 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <ansidecl.h>
 #include <unistd.h>
 #include <stdarg.h>
 #include <stddef.h>
@@ -25,20 +24,19 @@ Cambridge, MA 02139, USA.  */
    it contains no slashes, with all arguments after FILE until a
    NULL pointer and environment from `environ'.  */
 int
-DEFUN(execlp, (file), CONST char *file DOTS)
+execlp (const char *file, const char *arg, ...)
 {
-  CONST char *argv[1024];
-  register unsigned int i;
+  const char *argv[1024];
+  unsigned int i;
   va_list args;
 
-  va_start (args, file);
+  va_start (args, arg);
 
-  i = 0;
-  do
-    argv[i] = va_arg (args, CONST char *);
-  while (argv[i++] != NULL);
+  argv[i = 0] = arg;
+  while (argv[i++] != NULL)
+    argv[i] = va_arg (args, const char *);
 
   va_end (args);
 
-  return execvp (file, (char *CONST *) argv);
+  return execvp (file, (char *const *) argv);
 }