gcc/libf2c/libF77/F77_aloc.c
Kaveh R. Ghazi 9321813126 F77_aloc.c, [...]: Delete checks on __cplusplus.
* libF77/F77_aloc.c, libF77/exit_.c, libF77/main.c,
	libF77/s_paus.c, libF77/s_stop.c, libF77/setarg.c,
	libF77/setsig.c, libF77/sig_die.c, libF77/signal1.h0,
	libI77/close.c, libI77/dolio.c, libI77/fio.h, libI77/fmt.h,
	libI77/lio.h: Delete checks on __cplusplus.

From-SVN: r54133
2002-06-01 01:55:57 +00:00

25 lines
422 B
C

#include "f2c.h"
#undef abs
#undef min
#undef max
#include <stdio.h>
static integer memfailure = 3;
#include <stdlib.h>
extern void G77_exit_0 (integer*);
char *
F77_aloc(integer Len, char *whence)
{
char *rv;
unsigned int uLen = (unsigned int) Len; /* for K&R C */
if (!(rv = (char*)malloc(uLen))) {
fprintf(stderr, "malloc(%u) failure in %s\n",
uLen, whence);
G77_exit_0 (&memfailure);
}
return rv;
}