diff options
author | Lua Team <team@lua.org> | 2014-12-11 12:00:00 +0000 |
---|---|---|
committer | repogen <> | 2014-12-11 12:00:00 +0000 |
commit | fd9a52f7ff522a363ff2495d33b331c221981d60 (patch) | |
tree | a3fca3cc276f2a2ee44a498984497a9b82e685ee /src/loslib.c | |
parent | 92fdb95364ed274752b8634c8ba3dca1f1dc5fb3 (diff) | |
download | lua-github-5.3.0-rc0.tar.gz |
Lua 5.3.0-rc05.3.0-rc0
Diffstat (limited to 'src/loslib.c')
-rw-r--r-- | src/loslib.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/loslib.c b/src/loslib.c index c721e711..b72ce961 100644 --- a/src/loslib.c +++ b/src/loslib.c @@ -1,9 +1,14 @@ /* -** $Id: loslib.c,v 1.49 2014/10/17 16:28:21 roberto Exp $ +** $Id: loslib.c,v 1.53 2014/12/10 15:42:42 roberto Exp $ ** Standard Operating System library ** See Copyright Notice in lua.h */ +#define loslib_c +#define LUA_LIB + +#include "lprefix.h" + #include <errno.h> #include <locale.h> @@ -11,9 +16,6 @@ #include <string.h> #include <time.h> -#define loslib_c -#define LUA_LIB - #include "lua.h" #include "lauxlib.h" @@ -25,9 +27,9 @@ ** list of valid conversion specifiers for the 'strftime' function */ -#if !defined(LUA_USE_POSIX) +#if defined(LUA_USE_C89) #define LUA_STRFTIMEOPTIONS { "aAbBcdHIjmMpSUwWxXyYz%", "" } -#else +#else /* C99 specification */ #define LUA_STRFTIMEOPTIONS \ { "aAbBcCdDeFgGhHIjmMnprRStTuUVwWxXyYzZ%", "", \ "E", "cCxXyY", \ @@ -74,7 +76,7 @@ #else /* }{ */ -/* ANSI definitions */ +/* ISO C definitions */ #define LUA_TMPNAMBUFSIZE L_tmpnam #define lua_tmpnam(b,e) { e = (tmpnam(b) == NULL); } @@ -97,7 +99,7 @@ #else /* }{ */ -/* ANSI definitions */ +/* ISO C definitions */ #define l_gmtime(t,r) ((void)r, gmtime(t)) #define l_localtime(t,r) ((void)r, localtime(t)) @@ -227,7 +229,7 @@ static int os_date (lua_State *L) { struct tm tmr, *stm; if (*s == '!') { /* UTC? */ stm = l_gmtime(&t, &tmr); - s++; /* skip `!' */ + s++; /* skip '!' */ } else stm = l_localtime(&t, &tmr); |