瀏覽代碼

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

Roberto Ierusalimschy 29 年之前
父節點
當前提交
389e808c60
共有 1 個文件被更改,包括 4 次插入0 次删除
  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
   }
 }