compute the value to be used for e_arglen via howmany(value, sizeof (char *)),

rather than just "value / sizeof (char *)".  While in these cases the latter
works as well, the former's a better example for other uses to copy (since
it handles the non-integral multiple case correctly).
This commit is contained in:
cgd 1999-04-30 23:07:01 +00:00
parent 1bce8c40fc
commit af8a9059d3
4 changed files with 9 additions and 9 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: freebsd_exec.h,v 1.4 1999/02/09 20:17:50 christos Exp $ */
/* $NetBSD: freebsd_exec.h,v 1.5 1999/04/30 23:07:01 cgd Exp $ */
/*-
* Copyright (c) 1992, 1993
@ -100,7 +100,7 @@ int exec_freebsd_aout_makecmds __P((struct proc *, struct exec_package *));
#endif /* EXEC_AOUT */
#ifdef EXEC_ELF32
#define FREEBSD_ELF_AUX_ARGSIZ (sizeof(AuxInfo) * 8 / sizeof(char *))
#define FREEBSD_ELF_AUX_ARGSIZ howmany(sizeof(AuxInfo) * 8, sizeof(char *))
#define FREEBSD_ELF_BRAND_STRING "FreeBSD"
#define FREEBSD_ELF_INTERP_PREFIX_STRING "/usr/libexec/ld-elf.so"

View File

@ -1,4 +1,4 @@
/* $NetBSD: ibcs2_exec.c,v 1.22 1999/02/09 20:22:37 christos Exp $ */
/* $NetBSD: ibcs2_exec.c,v 1.23 1999/04/30 23:07:01 cgd Exp $ */
/*
* Copyright (c) 1994, 1995, 1998 Scott Bartram
@ -69,7 +69,7 @@
#include <compat/ibcs2/ibcs2_syscall.h>
#define IBCS2_ELF_AUX_ARGSIZ (sizeof(AuxInfo) * 8 / sizeof(char *))
#define IBCS2_ELF_AUX_ARGSIZ howmany(sizeof(AuxInfo) * 8, sizeof(char *))
int exec_ibcs2_coff_prep_omagic __P((struct proc *, struct exec_package *,

View File

@ -1,4 +1,4 @@
/* $NetBSD: linux_exec_elf32.c,v 1.41 1999/02/09 20:37:19 christos Exp $ */
/* $NetBSD: linux_exec_elf32.c,v 1.42 1999/04/30 23:07:01 cgd Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@ -82,7 +82,7 @@ static int ELFNAME2(linux,gcc_signature) __P((struct proc *p,
struct exec_package *, Elf_Ehdr *));
#endif
#define LINUX_ELF_AUX_ARGSIZ (sizeof(AuxInfo) * 8 / sizeof(char *))
#define LINUX_ELF_AUX_ARGSIZ howmany(sizeof(AuxInfo) * 8, sizeof(char *))
extern char linux_sigcode[], linux_esigcode[];

View File

@ -1,4 +1,4 @@
/* $NetBSD: svr4_exec.h,v 1.12 1999/04/19 21:22:56 kleink Exp $ */
/* $NetBSD: svr4_exec.h,v 1.13 1999/04/30 23:07:01 cgd Exp $ */
/*-
* Copyright (c) 1994 The NetBSD Foundation, Inc.
@ -40,9 +40,9 @@
#define _SVR4_EXEC_H_
#ifdef SVR4_COMPAT_SOLARIS2
# define SVR4_AUX_ARGSIZ (sizeof(AuxInfo) * 12 / sizeof(char *))
# define SVR4_AUX_ARGSIZ howmany(sizeof(AuxInfo) * 12, sizeof(char *))
#else
# define SVR4_AUX_ARGSIZ (sizeof(AuxInfo) * 8 / sizeof(char *))
# define SVR4_AUX_ARGSIZ howmany(sizeof(AuxInfo) * 8, sizeof(char *))
#endif
/*