Mercurial > ecos
changeset 895:4747af8ef0ef
Leave out unused static buffers if not supporting program args.
| author | gthomas |
|---|---|
| date | Wed, 02 Apr 2003 19:48:28 +0000 |
| parents | d813fa01433e |
| children | 598fbd635caf |
| files | packages/hal/common/current/ChangeLog packages/hal/common/current/include/generic-stub.h packages/hal/common/current/src/generic-stub.c |
| diffstat | 3 files changed, 14 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/hal/common/current/ChangeLog +++ b/packages/hal/common/current/ChangeLog @@ -1,3 +1,9 @@ +2003-04-02 Gary Thomas <gary@mlbassoc.com> + + * src/generic-stub.c: + * include/generic-stub.h: Cleanup when program args are not + supported (remove some unused static storage). + 2003-03-03 Knud Woehler <knud.woehler@microplex.de> * src/hal_if.c:
--- a/packages/hal/common/current/include/generic-stub.h +++ b/packages/hal/common/current/include/generic-stub.h @@ -9,6 +9,7 @@ // ------------------------------------------- // This file is part of eCos, the Embedded Configurable Operating System. // Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. +// Copyright (C) 2003 Gary Thomas // // eCos is free software; you can redistribute it and/or modify it under // the terms of the GNU General Public License as published by the Free @@ -290,6 +291,7 @@ extern char *__mem2hex (char *mem, char Otherwise, the value returned is one byte past the last byte written. */ extern char *__hex2mem (char *buf, char *mem, int count, int may_fault); +#ifdef CYGSEM_ECOS_SUPPORTS_PROGRAM_ARGS /* Set the program arguments passed into the user program's main */ extern void __set_program_args (int argc, char **argv); @@ -297,6 +299,7 @@ extern void __set_program_args (int argc packet). argcPtr is a pointer into the user program, which will hold the number of arguments; the strings are returned. */ extern char **__get_program_args (target_register_t argcPtr); +#endif /* Encode PACKET as a remote protocol packet and send it to GDB; this takes care of sending the initial '$' character, as well as the trailing '#'
--- a/packages/hal/common/current/src/generic-stub.c +++ b/packages/hal/common/current/src/generic-stub.c @@ -160,7 +160,10 @@ static int process_exception (int sigval static void do_nothing (void); /* and do it gracefully */ static int syscall_do_nothing (int); +#ifdef CYGSEM_ECOS_SUPPORTS_PROGRAM_ARGS void __free_program_args (void); +static char *__add_program_arg (int argnum, uint32 arglen); +#endif volatile __PFI __process_exception_vec = process_exception; volatile __PFV __process_exit_vec = do_nothing; @@ -169,8 +172,6 @@ volatile __PFI __process_signal_vec = NU volatile __PFV __init_vec = NULL; volatile __PFV __cleanup_vec = NULL; -static char *__add_program_arg (int argnum, uint32 arglen); - static const char hexchars[] = "0123456789abcdef"; static void process_query (char *pkt); @@ -1786,6 +1787,7 @@ void __putpacket (__remcomOutBuffer); } +#ifdef CYGSEM_ECOS_SUPPORTS_PROGRAM_ARGS #define MAX_ARG_COUNT 20 #define MAX_ARGDATA 128 @@ -1869,6 +1871,7 @@ char ** __write_mem_safe ((char *) &program_argc, (void *)argcPtr, sizeof (program_argc)); return program_argv; } +#endif /* Table used by the crc32 function to calcuate the checksum. */ static uint32 crc32_table[256];
