freebsd-ports/lang/snobol/files/patch-dynamic.c
Wes Peters 2ce916c337 Eliminate warnings from function prototype mismatches. Include
stdlib.h and strings.h where needed to get system/compiler definitions
of malloc, bcopy, and bzero instead of relying on 20-year-old wrong
definitions in the code.  The snobol interpreter itself is chock full
of pointer to int type punning and is likely to fail in hard-to-debug
ways on non-VAX-like architectures.
2006-11-28 08:36:15 +00:00

18 lines
315 B
C

--- lib/generic/dynamic.c.orig Tue Nov 28 00:09:54 2006
+++ lib/generic/dynamic.c Tue Nov 28 00:10:30 2006
@@ -2,13 +2,13 @@
/* allocate dynamic region */
-char *malloc();
+#include <stdlib.h>
char *
dynamic( size )
int size;
{
- return malloc(size);
+ return (char *) malloc(size);
}
void