aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1996-11-01 15:54:41 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1996-11-01 15:54:41 -0200
commit389e808c60865e66061328448e26fe8bc60c4605 (patch)
tree14a0da7e01f7cf8c0edffbafb57f8022dcfafb2f
parent450465c4d4c765ef83e6b27d5e8d8591db55ef00 (diff)
downloadlua-389e808c60865e66061328448e26fe8bc60c4605.tar.gz
lua-389e808c60865e66061328448e26fe8bc60c4605.tar.bz2
lua-389e808c60865e66061328448e26fe8bc60c4605.zip
although an ANSI function, some systems do not offer "strerror"
-rw-r--r--iolib.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/iolib.c b/iolib.c
index eeeb43c4..70a4074f 100644
--- a/iolib.c
+++ b/iolib.c
@@ -28,7 +28,11 @@ static void pushresult (int i)
28 lua_pushuserdata(NULL); 28 lua_pushuserdata(NULL);
29 else { 29 else {
30 lua_pushnil(); 30 lua_pushnil();
31#ifndef NOSTRERROR
31 lua_pushstring(strerror(errno)); 32 lua_pushstring(strerror(errno));
33#else
34 lua_pushstring("system unable to define the error");
35#endif
32 } 36 }
33} 37}
34 38