Commit 93447205 by Dave Brolley

[multiple changes]

Mon Dec  7 15:38:25 1998  Dave Brolley  <brolley@cygnus.com>
	* gcc.c (default_compilers): Fix typo in USE_CPPLIB spec for cc1.
Mon Dec  7 15:38:25 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
        * c-aux-info.c (concat): Wrap function definition in !USE_CPPLIB.
        * cppalloc.c: Move function `xcalloc' from cpplib.c to here.
        * cpplib.c: Move function `xcalloc' from here to cppalloc.c.

From-SVN: r24152
parent f070035e
Mon Dec 7 15:38:25 1998 Dave Brolley <brolley@cygnus.com>
* gcc.c (default_compilers): Fix typo in USE_CPPLIB spec for cc1.
Mon Dec 7 15:38:25 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* c-aux-info.c (concat): Wrap function definition in !USE_CPPLIB.
* cppalloc.c: Move function `xcalloc' from cpplib.c to here.
* cpplib.c: Move function `xcalloc' from here to cppalloc.c.
Mon Dec 7 11:30:49 1998 Nick Clifton <nickc@cygnus.com> Mon Dec 7 11:30:49 1998 Nick Clifton <nickc@cygnus.com>
* final.c (output_asm_name): Use tabs to seperate comments from * final.c (output_asm_name): Use tabs to seperate comments from
......
...@@ -48,6 +48,10 @@ static char *gen_decl PROTO((tree, int, formals_style)); ...@@ -48,6 +48,10 @@ static char *gen_decl PROTO((tree, int, formals_style));
This function is based on the one in libiberty. */ This function is based on the one in libiberty. */
/* This definition will conflict with the one from prefix.c in
libcpp.a when linking cc1 and cc1obj. So only provide it if we are
not using libcpp.a */
#ifndef USE_CPPLIB
char * char *
concat VPROTO((const char *first, ...)) concat VPROTO((const char *first, ...))
{ {
...@@ -99,6 +103,7 @@ concat VPROTO((const char *first, ...)) ...@@ -99,6 +103,7 @@ concat VPROTO((const char *first, ...))
return (newstr); return (newstr);
} }
#endif /* ! USE_CPPLIB */
/* Given a string representing an entire type or an entire declaration /* Given a string representing an entire type or an entire declaration
which only lacks the actual "data-type" specifier (at its left end), which only lacks the actual "data-type" specifier (at its left end),
......
...@@ -46,6 +46,16 @@ xmalloc (size) ...@@ -46,6 +46,16 @@ xmalloc (size)
} }
PTR PTR
xcalloc (number, size)
size_t number, size;
{
register PTR ptr = (PTR) calloc (number, size);
if (ptr == 0)
memory_full ();
return ptr;
}
PTR
xrealloc (old, size) xrealloc (old, size)
PTR old; PTR old;
size_t size; size_t size;
......
...@@ -6429,20 +6429,10 @@ free_token_list (tokens) ...@@ -6429,20 +6429,10 @@ free_token_list (tokens)
} }
} }
/* FIXME: savestring() should be renamed strdup() and both should /* FIXME: savestring() should be renamed strdup() and should
be moved into cppalloc.c. We can't do that right now because be moved into cppalloc.c. We can't do that right now because
then we'd get multiple-symbol clashes with toplev.c and several then we'd get multiple-symbol clashes with toplev.c and several
other people. */ other people. */
PTR
xcalloc (number, size)
size_t number, size;
{
register unsigned total = number * size;
register PTR ptr = (PTR) xmalloc (total);
bzero (ptr, total);
return ptr;
}
char * char *
savestring (input) savestring (input)
char *input; char *input;
......
...@@ -581,7 +581,7 @@ static struct compiler default_compilers[] = ...@@ -581,7 +581,7 @@ static struct compiler default_compilers[] =
{"@c", {"@c",
{ {
#if USE_CPPLIB #if USE_CPPLIB
"%{E|M|MM:cpp -lang-c %(ansi:-std=c89} %{std*} %{nostdinc*}\ "%{E|M|MM:cpp -lang-c %{ansi:-std=c89} %{std*} %{nostdinc*}\
%{C} %{v} %{A*} %{I*} %{P} %I\ %{C} %{v} %{A*} %{I*} %{P} %I\
%{C:%{!E:%eGNU C does not support -C without using -E}}\ %{C:%{!E:%eGNU C does not support -C without using -E}}\
%{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\ %{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment