* printcmd.c (printf_command): Instead of using makeva* and

calling vprintf, just make the appropriate calls to printf.
	* printcmd.c, config/pa/xm-pa.h, config/mips/xm-makeva.h,
	config/alpha/xm-alpha.h, config/m88k/xm-m88k.h: Remove all
	traces of makeva*.  My apologies to everyone (including me!)
	who spent so much time getting it to work on various machines,
	but look at the bright side, at least you won't have to do it
	again in the future.

	* printcmd.c (printf_command): Make a cleanup for val_args (fixes
	a memory leak).
This commit is contained in:
Jim Kingdon 1993-10-13 18:17:49 +00:00
parent b7cbb59ff6
commit 9309b4d929
5 changed files with 20 additions and 104 deletions

View File

@ -1,3 +1,17 @@
Wed Oct 13 11:47:23 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
* printcmd.c (printf_command): Instead of using makeva* and
calling vprintf, just make the appropriate calls to printf.
* printcmd.c, config/pa/xm-pa.h, config/mips/xm-makeva.h,
config/alpha/xm-alpha.h, config/m88k/xm-m88k.h: Remove all
traces of makeva*. My apologies to everyone (including me!)
who spent so much time getting it to work on various machines,
but look at the bright side, at least you won't have to do it
again in the future.
* printcmd.c (printf_command): Make a cleanup for val_args (fixes
a memory leak).
Tue Oct 12 22:54:41 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
* config/mips/xm-mips.h: Remove comment about HAVE_SGTTY vs. usleep.

View File

@ -27,40 +27,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
/* The alpha has no siginterrupt routine. */
#define NO_SIGINTERRUPT
/* The alpha stores the first six float parameters below the va_list.
We make no distinction and store the first six parameters below
and above the va_list. */
#define VA_FLOAT_ARGS_SIZE (6*8)
#define MAKEVA_SIZE(nargs, max_arg_size) \
return sizeof (makeva_list) + nargs * max_arg_size + VA_FLOAT_ARGS_SIZE;
#define MAKEVA_START(list) \
list->argindex = VA_FLOAT_ARGS_SIZE;
#define MAKEVA_ARG(list, argaddr, argsize) \
{ \
memcpy (&list->aligner.arg_bytes[list->argindex], argaddr, argsize); \
if ((list->argindex - VA_FLOAT_ARGS_SIZE) < VA_FLOAT_ARGS_SIZE) \
memcpy (&list->aligner.arg_bytes[list->argindex - VA_FLOAT_ARGS_SIZE],\
argaddr, argsize); \
list->argindex += argsize; \
}
#ifdef __GNUC__
#define MAKEVA_END(list) \
{ \
va_list ret; \
ret.__base = &(list)->aligner.arg_bytes[VA_FLOAT_ARGS_SIZE]; \
ret.__offset = 0; \
return ret; \
}
#else
#define MAKEVA_END(list) \
{ \
va_list ret; \
ret.a0 = &(list)->aligner.arg_bytes[VA_FLOAT_ARGS_SIZE]; \
ret.offset = 0; \
return ret; \
}
#endif
/* HAVE_SGTTY also works, but we have termios, so use it. */
#define HAVE_TERMIOS

View File

@ -18,31 +18,3 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#define HOST_BYTE_ORDER BIG_ENDIAN
#define MAKEVA_END(list) \
va_list retval; \
retval.__va_arg = 0; \
retval.__va_stk = (int *) (list)->aligner.arg_bytes; \
retval.__va_reg = (int *) (list)->aligner.arg_bytes; \
return retval;
/* I don't know whether rounding the arguments to 4 or 8 bytes is correct
for the 88k, or whether it is just code borrowed from the pa. The issue
is moot for now, since printf_command only uses argsize of sizeof (int),
sizeof (double), or sizeof (long long). */
#define MAKEVA_ARG(list, argaddr, argsize) \
{ \
int rounded_argsize; \
if (argsize > 8) \
/* Currently this never happens; printf_command only uses argsize */ \
/* of sizeof (int), sizeof (double), or sizeof (long long). */ \
error ("MAKEVA_ARG not fully written for m88k"); \
if (argsize <= 4) \
rounded_argsize = 4; \
else if (argsize <= 8) \
rounded_argsize = 8; \
while ((int)(&list->aligner.arg_bytes[list->argindex]) % rounded_argsize) \
list->argindex++; \
memcpy (&list->aligner.arg_bytes[list->argindex], argaddr, argsize); \
list->argindex += rounded_argsize; \
}

View File

@ -16,20 +16,6 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
/* Mips hosts need aligned va_list arguments. */
#define MAKEVA_ARG(list, argaddr, argsize) \
{ \
int rounded_argsize; \
if (argsize > 8) \
/* Currently this never happens; printf_command only uses argsize */ \
/* of sizeof (int), sizeof (double), or sizeof (long long). */ \
error ("MAKEVA_ARG not fully written for mips"); \
if (argsize <= 4) \
rounded_argsize = 4; \
else if (argsize <= 8) \
rounded_argsize = 8; \
list->argindex = (list->argindex + rounded_argsize - 1) & -rounded_argsize; \
memcpy (&list->aligner.arg_bytes[list->argindex], argaddr, argsize); \
list->argindex += argsize; \
}
/* "makeva" is obsolete. This file can probably go away (unless someone
can think of some other host thing which is common to various mips
machines). */

View File

@ -1,27 +1,5 @@
/* Definitions for all PA machines. */
#define MAKEVA_START(list) \
list->argindex = list->nargs * list->max_arg_size;
#define MAKEVA_ARG(list, argaddr, argsize) \
{ \
int rounded_argsize; \
if (argsize > 8) \
/* Currently this never happens; printf_command only uses argsize */ \
/* of sizeof (int), sizeof (double), or sizeof (long long). */ \
error ("MAKEVA_ARG not fully written for hp-pa"); \
if (argsize <= 4) \
rounded_argsize = 4; \
else if (argsize <= 8) \
rounded_argsize = 8; \
list->argindex -= rounded_argsize; \
while ((int)(&list->aligner.arg_bytes[list->argindex]) % rounded_argsize) \
list->argindex--; \
memcpy (&list->aligner.arg_bytes[list->argindex], argaddr, argsize); \
}
/* The address of the arglist is the address right after the args
(which is what you'd expect). */
#define MAKEVA_END(list) \
return (va_list) (list->aligner.arg_bytes \
+ list->nargs * list->max_arg_size)
/* This was created for "makeva", which is obsolete. This file can
probably go away (unless someone can think of some other host thing
which is common to various pa machines). */