added "_CRT_SECURE_NO_WARNINGS" for Windows (to avoid warnings about

several standard C functions) + small changes in '#include's
This commit is contained in:
Roberto Ierusalimschy 2014-10-15 11:53:20 -03:00
parent 745618d941
commit f8e0d33b25
1 changed files with 6 additions and 9 deletions

View File

@ -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.