aboutsummaryrefslogtreecommitdiff
path: root/gcc/fixinc/fixlib.c
diff options
context:
space:
mode:
authorBruce Korb <bkorb@gnu.org>2000-05-14 19:29:02 +0000
committerBruce Korb <korbb@gcc.gnu.org>2000-05-14 19:29:02 +0000
commitba8fcfc31e6904af9b4e078ef6c149da2717d927 (patch)
tree231efed7f86f3c607150a79d4851d974b7ee3602 /gcc/fixinc/fixlib.c
parent3e6fa9ac7b483cd01a6d69439fce15c2fa71cc40 (diff)
downloadgcc-ba8fcfc31e6904af9b4e078ef6c149da2717d927.zip
gcc-ba8fcfc31e6904af9b4e078ef6c149da2717d927.tar.gz
gcc-ba8fcfc31e6904af9b4e078ef6c149da2717d927.tar.bz2
implement "wrap" c_fix
From-SVN: r33892
Diffstat (limited to 'gcc/fixinc/fixlib.c')
-rw-r--r--gcc/fixinc/fixlib.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/fixinc/fixlib.c b/gcc/fixinc/fixlib.c
index 133aa8e..bafe261 100644
--- a/gcc/fixinc/fixlib.c
+++ b/gcc/fixinc/fixlib.c
@@ -24,6 +24,20 @@ Boston, MA 02111-1307, USA. */
#include "fixlib.h"
+void *
+must_malloc( siz )
+ size_t siz;
+{
+ void* res = malloc( siz );
+
+ if (res == (void*)NULL) {
+ fprintf( stderr, "fixincl failed to malloc %d bytes\n", siz );
+ exit( 3 );
+ }
+
+ return res;
+}
+
/* * * * * * * * * * * * *
load_file_data loads all the contents of a file into malloc-ed memory.