소스 검색

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