Subject: patch to old gcc's cplus-dem.c (was: scan.h)
To: None <tech-toolchain@netbsd.org>
From: Aymeric Vincent <xmimic@free.fr>
List: tech-toolchain
Date: 11/03/2001 00:23:52
Sorry, it's cplus-dem.c that has to change, and I hadn't updated my
subject line.
The contents of the mail are hopefully ok.
Aymeric
Aymeric Vincent <xmimic@free.fr> writes:
> Unless someone objects violently, I intend to commit the following
> patch to gnusrc/gnu/dist/gcc/cplus-dem.c in a couple of days.
>
> This makes the prototypes for xmalloc() and xrealloc() match exactly
> their previous definitions in scan.h (which are what they are for
> portability reasons).
>
> Please note that this applies to the "old" gcc.
>
> Aymeric
>
> Index: cplus-dem.c
> ===================================================================
> RCS file: /usr/local/cvsroot/gnusrc/gnu/dist/gcc/cplus-dem.c,v
> retrieving revision 1.3
> diff -u -r1.3 cplus-dem.c
> --- cplus-dem.c 1999/02/03 18:07:45 1.3
> +++ cplus-dem.c 2001/11/02 23:14:28
> @@ -4396,22 +4396,22 @@
> exit (1);
> }
>
> -PTR
> +char *
> xmalloc (size)
> - size_t size;
> + unsigned size;
> {
> - register PTR value = (PTR) malloc (size);
> + register char *value = (char *) malloc (size);
> if (value == 0)
> fatal ("virtual memory exhausted");
> return value;
> }
>
> -PTR
> +char *
> xrealloc (ptr, size)
> - PTR ptr;
> - size_t size;
> + char *ptr;
> + unsigned size;
> {
> - register PTR value = (PTR) realloc (ptr, size);
> + register char *value = (char *) realloc (ptr, size);
> if (value == 0)
> fatal ("virtual memory exhausted");
> return value;