summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bushnell <thomas@gnu.org>1997-04-10 17:16:36 +0000
committerThomas Bushnell <thomas@gnu.org>1997-04-10 17:16:36 +0000
commit0cdbf8e72b6bd6abd3de96c1617f599b1fdbfba9 (patch)
treebde8c35b1f27aaa4514904558888715158a0f298
parent59b8291f90b7832a4393f0a7a5d06c6384bbf97f (diff)
Thu Apr 10 11:53:57 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
* boot.c: Don't include varargs.h. (set_mach_stack_args): Use stdarg instead of vararg.
-rw-r--r--boot/ChangeLog5
-rw-r--r--boot/boot.c18
2 files changed, 11 insertions, 12 deletions
diff --git a/boot/ChangeLog b/boot/ChangeLog
index 20c42894..4b9c6dcd 100644
--- a/boot/ChangeLog
+++ b/boot/ChangeLog
@@ -1,3 +1,8 @@
+Thu Apr 10 11:53:57 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
+
+ * boot.c: Don't include varargs.h.
+ (set_mach_stack_args): Use stdarg instead of vararg.
+
Thu Sep 12 16:28:47 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
* Makefile (HURDLIBS): New variable.
diff --git a/boot/boot.c b/boot/boot.c
index dcf3bccc..f52cf1b1 100644
--- a/boot/boot.c
+++ b/boot/boot.c
@@ -30,7 +30,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include <string.h>
#include <stdio.h>
#include <cthreads.h>
-#include <varargs.h>
#include <fcntlbits.h>
#include <elf.h>
#include <mach/mig_support.h>
@@ -121,7 +120,7 @@ char *fsname;
char *bootstrap_args;
char *bootdevice = "sd0a";
-void set_mach_stack_args ();
+void set_mach_stack_args (task_t, thread_t, char *, ...);
void safe_gets (char *buf, int buf_len)
{
@@ -580,14 +579,9 @@ main (int argc, char **argv, char **envp)
/* Set up stack args the Mach way */
void
-set_mach_stack_args (user_task,
- user_thread,
- startpc,
- va_alist)
- task_t user_task;
- thread_t user_thread;
- char *startpc;
- va_dcl
+set_mach_stack_args (task_t user_task,
+ thread_t user_thread,
+ char *startpc, ...)
{
/* This code is lifted from .../mk/bootstrap/load.c. */
va_list argv_ptr;
@@ -601,7 +595,7 @@ set_mach_stack_args (user_task,
/*
* Calculate the size of the argument list.
*/
- va_start(argv_ptr);
+ va_start(argv_ptr, startpc);
arg_len = 0;
arg_count = 0;
for (;;) {
@@ -732,7 +726,7 @@ set_mach_stack_args (user_task,
/*
* Then the strings and string pointers for each argument
*/
- va_start(argv_ptr);
+ va_start(argv_ptr, startpc);
for (i = 0; i < arg_count; i++) {
arg_ptr = va_arg(argv_ptr, char *);
arg_item_len = strlen(arg_ptr) + 1; /* include trailing 0 */