lua

A copy of the Lua development repository
Log | Files | Refs | README

commit 52062684e11beffafbbbff0a8c7aa2642e40e47e
parent 83e3ec0117c9b8da4ec4f2e5451044b843e2fd3c
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Tue, 20 Jun 2000 14:12:59 -0300

better control over use of `errno'

Diffstat:
Mliolib.c | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/liolib.c b/liolib.c @@ -1,12 +1,11 @@ /* -** $Id: liolib.c,v 1.66 2000/05/30 18:55:16 roberto Exp roberto $ +** $Id: liolib.c,v 1.67 2000/06/12 13:52:05 roberto Exp roberto $ ** Standard I/O (and system) library ** See Copyright Notice in lua.h */ #include <ctype.h> -#include <errno.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -22,6 +21,7 @@ #ifndef OLD_ANSI +#include <errno.h> #include <locale.h> #else /* no support for locale and for strerror: fake them */ @@ -32,7 +32,8 @@ #define LC_MONETARY 0 #define LC_NUMERIC 0 #define LC_TIME 0 -#define strerror(e) "(no error message provided by operating system)" +#define strerror(e) "generic I/O error" +#define errno (-1) #endif