Explorar o código

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

Roberto Ierusalimschy %!s(int64=29) %!d(string=hai) anos
pai
achega
389e808c60
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      iolib.c

+ 4 - 0
iolib.c

@@ -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
   }
 }