diff options
author | Clement Farabet <clement.farabet@gmail.com> | 2013-10-09 17:41:56 +0400 |
---|---|---|
committer | Clement Farabet <clement.farabet@gmail.com> | 2013-10-09 17:41:56 +0400 |
commit | fcb30c25960c841d2a729bed8e14b93d0642dcfd (patch) | |
tree | 371c8d8d5f58400593c74714fff164cba9a20046 | |
parent | 9dc4d13686ff76d3c2981fb9d69b90d32e7b10ec (diff) |
Windows build.
-rw-r--r-- | sys.c | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -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}, |