Include stdlib.h for malloc and friends, fix the conditional to only

define them if we are on pre-ANSI C.
This commit is contained in:
joerg 2005-10-07 16:38:41 +00:00
parent 0e17485741
commit 6009fb0d1b
2 changed files with 23 additions and 1 deletions

View file

@ -1,7 +1,8 @@
$NetBSD: distinfo,v 1.5 2005/02/24 14:48:51 agc Exp $
$NetBSD: distinfo,v 1.6 2005/10/07 16:38:41 joerg Exp $
SHA1 (yodl-1.31.18.tar.gz) = 16f041cf8851027f96e5af82d0ac4f85a425553a
RMD160 (yodl-1.31.18.tar.gz) = 71e42d72368a5850de89353880050feb026c58e0
Size (yodl-1.31.18.tar.gz) = 320053 bytes
SHA1 (patch-aa) = ecb2e2f61d43e69b685b2821d9601e82cb0647ca
SHA1 (patch-ab) = 70ccc5bab03a079935507d59a0e2f4a93b27a4ab
SHA1 (patch-ac) = bfee8fcf774dcc4f1f16eb4e65da426a00d2c012

View file

@ -0,0 +1,21 @@
$NetBSD: patch-ac,v 1.3 2005/10/07 16:38:41 joerg Exp $
--- src/lib/lib.h.orig 1999-11-17 20:08:07.000000000 +0000
+++ src/lib/lib.h
@@ -2,6 +2,7 @@
/* Lib functions for divers programs. */
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#include "config.h"
@@ -16,7 +17,7 @@
#if HAVE_MALLOC_H
# include <malloc.h>
-#elif defined STDC_HEADERS
+#elif !defined STDC_HEADERS
extern void free PARAMS ((char *));
extern char *malloc PARAMS ((int));
extern char *realloc PARAMS ((char*, int));