diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1996-11-01 15:54:41 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1996-11-01 15:54:41 -0200 |
commit | 389e808c60865e66061328448e26fe8bc60c4605 (patch) | |
tree | 14a0da7e01f7cf8c0edffbafb57f8022dcfafb2f | |
parent | 450465c4d4c765ef83e6b27d5e8d8591db55ef00 (diff) | |
download | lua-389e808c60865e66061328448e26fe8bc60c4605.tar.gz lua-389e808c60865e66061328448e26fe8bc60c4605.tar.bz2 lua-389e808c60865e66061328448e26fe8bc60c4605.zip |
although an ANSI function, some systems do not offer "strerror"
-rw-r--r-- | iolib.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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 | ||