OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(fixup_var_refs_1, case ZERO_EXTRACT): Don't call fixup_memory_subreg
[pf3gnuchains/gcc-fork.git]
/
gcc
/
cppalloc.c
diff --git
a/gcc/cppalloc.c
b/gcc/cppalloc.c
index
f7b6019
..
79d4c9b
100644
(file)
--- a/
gcc/cppalloc.c
+++ b/
gcc/cppalloc.c
@@
-23,11
+23,14
@@
Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
what you give them. Help stamp out software-hoarding! */
#include "config.h"
what you give them. Help stamp out software-hoarding! */
#include "config.h"
+#include <stdio.h>
+#include "cpplib.h"
static void
memory_full ()
{
static void
memory_full ()
{
- fatal ("Memory exhausted.");
+ fprintf (stderr, "%s: Memory exhausted.\n", progname);
+ exit (FATAL_EXIT_CODE);
}
char *
}
char *
@@
-35,10
+38,9
@@
xmalloc (size)
unsigned size;
{
register char *ptr = (char *) malloc (size);
unsigned size;
{
register char *ptr = (char *) malloc (size);
- if (ptr != 0) return (ptr);
- memory_full ();
- /*NOTREACHED*/
- return 0;
+ if (ptr == 0)
+ memory_full ();
+ return ptr;
}
char *
}
char *
@@
-51,14
+53,3
@@
xrealloc (old, size)
memory_full ();
return ptr;
}
memory_full ();
return ptr;
}
-
-char *
-xcalloc (number, size)
- unsigned number, size;
-{
- register unsigned total = number * size;
- register char *ptr = (char *) calloc (number, size);
- if (ptr == 0)
- memory_full ();
- return ptr;
-}