commit f8e0d33b25bcff35a40b1f7493fc660b435119d9
parent 745618d941d30ad6a1a3dddd6127df1e9d6280a0
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Wed, 15 Oct 2014 11:52:55 -0300
added "_CRT_SECURE_NO_WARNINGS" for Windows (to avoid warnings about
several standard C functions) + small changes in '#include's
Diffstat:
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/luaconf.h b/luaconf.h
@@ -1,5 +1,5 @@
/*
-** $Id: luaconf.h,v 1.216 2014/10/08 20:24:43 roberto Exp $
+** $Id: luaconf.h,v 1.216 2014/10/08 20:32:50 roberto Exp roberto $
** Configuration file for Lua
** See Copyright Notice in lua.h
*/
@@ -8,9 +8,6 @@
#ifndef lconfig_h
#define lconfig_h
-#include <limits.h>
-#include <stddef.h>
-
/*
** ==================================================================
@@ -73,6 +70,7 @@
#endif
#if defined(LUA_WIN)
+#define _CRT_SECURE_NO_WARNINGS /* avoid warnings about ANSI C functions */
#define LUA_DL_DLL
#define LUA_USE_AFORMAT /* assume 'printf' handles 'aA' specifiers */
#endif
@@ -113,6 +111,9 @@
+#include <limits.h>
+#include <stddef.h>
+
/*
@@ LUA_PATH_DEFAULT is the default path that Lua uses to look for
@@ Lua libraries.
@@ -258,14 +259,10 @@
/*
@@ luai_writestring/luai_writeline define how 'print' prints its results.
-** They are only used in libraries and the stand-alone program. (The #if
-** avoids including 'stdio.h' everywhere.)
+** They are only used in libraries and the stand-alone program.
*/
-#if defined(LUA_LIB) || defined(lua_c)
-#include <stdio.h>
#define luai_writestring(s,l) fwrite((s), sizeof(char), (l), stdout)
#define luai_writeline() (luai_writestring("\n", 1), fflush(stdout))
-#endif
/*
@@ luai_writestringerror defines how to print error messages.