Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/sys.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClement Farabet <clement.farabet@gmail.com>2013-10-09 17:41:56 +0400
committerClement Farabet <clement.farabet@gmail.com>2013-10-09 17:41:56 +0400
commitfcb30c25960c841d2a729bed8e14b93d0642dcfd (patch)
tree371c8d8d5f58400593c74714fff164cba9a20046
parent9dc4d13686ff76d3c2981fb9d69b90d32e7b10ec (diff)
Windows build.
-rw-r--r--sys.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/sys.c b/sys.c
index fac3d03..4930d1b 100644
--- a/sys.c
+++ b/sys.c
@@ -2,6 +2,20 @@
#include <lua.h>
#include <lauxlib.h>
+#ifdef LUA_WIN
+
+static int l_clock(lua_State *L) {
+ printf("warning: sys.clock not implemented on Windows\n");
+ return 0;
+}
+
+static int l_usleep(lua_State *L) {
+ printf("warning: sys.usleep not implemented on Windows\n");
+ return 0;
+}
+
+#else
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -29,6 +43,8 @@ static int l_usleep(lua_State *L) {
return 1;
}
+#endif
+
static const struct luaL_reg routines [] = {
{"clock", l_clock},
{"usleep", l_usleep},