diff options
Diffstat (limited to 'liolib.c')
-rw-r--r-- | liolib.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: liolib.c,v 1.81 2000/09/12 13:58:37 roberto Exp roberto $ | 2 | ** $Id: liolib.c,v 1.82 2000/09/12 18:41:55 roberto Exp roberto $ |
3 | ** Standard I/O (and system) library | 3 | ** Standard I/O (and system) library |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -21,6 +21,8 @@ | |||
21 | #ifndef OLD_ANSI | 21 | #ifndef OLD_ANSI |
22 | #include <errno.h> | 22 | #include <errno.h> |
23 | #include <locale.h> | 23 | #include <locale.h> |
24 | #define realloc(b,s) ((b) == NULL ? malloc(s) : (realloc)(b, s)) | ||
25 | #define free(b) if (b) (free)(b) | ||
24 | #else | 26 | #else |
25 | /* no support for locale and for strerror: fake them */ | 27 | /* no support for locale and for strerror: fake them */ |
26 | #define setlocale(a,b) ((void)a, strcmp((b),"C")==0?"C":NULL) | 28 | #define setlocale(a,b) ((void)a, strcmp((b),"C")==0?"C":NULL) |