From c3c78030f79fdbbb06265d50645e408d60e7798e Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 24 Oct 2014 09:42:47 -0200 Subject: avoid redeclaration of _CRT_SECURE_NO_WARNINGS + 'lua_numtointeger' -> 'lua_numbertointeger' --- luaconf.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/luaconf.h b/luaconf.h index 9c2e3a34..13f74c3e 100644 --- a/luaconf.h +++ b/luaconf.h @@ -1,5 +1,5 @@ /* -** $Id: luaconf.h,v 1.219 2014/10/20 16:32:05 roberto Exp roberto $ +** $Id: luaconf.h,v 1.220 2014/10/21 14:38:46 roberto Exp roberto $ ** Configuration file for Lua ** See Copyright Notice in lua.h */ @@ -70,7 +70,9 @@ #endif #if defined(LUA_WIN) +#if !defined(_CRT_SECURE_NO_WARNINGS) #define _CRT_SECURE_NO_WARNINGS /* avoid warnings about ANSI C functions */ +#endif #define LUA_DL_DLL #define LUA_USE_AFORMAT /* assume 'printf' handles 'aA' specifiers */ #endif @@ -562,14 +564,14 @@ /* -@@ lua_numtointeger converts a float number to an integer, or +@@ lua_numbertointeger converts a float number to an integer, or ** returns 0 if float is not within the range of a lua_Integer. ** (The range comparisons are tricky because of rounding. The tests ** here assume a two-complement representation, where MININTEGER always ** has an exact representation as a float; MAXINTEGER may not have one, ** and therefore its conversion to float may have an ill-defined value.) */ -#define lua_numtointeger(n,p) \ +#define lua_numbertointeger(n,p) \ ((n) >= (LUA_NUMBER)(LUA_MININTEGER) && \ (n) < -(LUA_NUMBER)(LUA_MININTEGER) && \ (*(p) = (LUA_INTEGER)(n), 1)) -- cgit v1.2.3-55-g6feb