although an ANSI function, some systems do not offer "strerror"

This commit is contained in:
Roberto Ierusalimschy
1996-11-01 15:54:41 -02:00
parent 450465c4d4
commit 389e808c60

View File

@@ -28,7 +28,11 @@ static void pushresult (int i)
lua_pushuserdata(NULL);
else {
lua_pushnil();
#ifndef NOSTRERROR
lua_pushstring(strerror(errno));
#else
lua_pushstring("system unable to define the error");
#endif
}
}