From f45cba42b5c32758337f62c56e98fdb85a9f4af2 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 13 Sep 2000 17:12:14 -0300 Subject: [PATCH] details for OLD_ANSI --- liolib.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/liolib.c b/liolib.c index f5e108da..4dc8ef80 100644 --- a/liolib.c +++ b/liolib.c @@ -1,5 +1,5 @@ /* -** $Id: liolib.c,v 1.81 2000/09/12 13:58:37 roberto Exp roberto $ +** $Id: liolib.c,v 1.82 2000/09/12 18:41:55 roberto Exp roberto $ ** Standard I/O (and system) library ** See Copyright Notice in lua.h */ @@ -21,6 +21,8 @@ #ifndef OLD_ANSI #include #include +#define realloc(b,s) ((b) == NULL ? malloc(s) : (realloc)(b, s)) +#define free(b) if (b) (free)(b) #else /* no support for locale and for strerror: fake them */ #define setlocale(a,b) ((void)a, strcmp((b),"C")==0?"C":NULL)