diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-10-24 09:42:47 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-10-24 09:42:47 -0200 |
| commit | c3c78030f79fdbbb06265d50645e408d60e7798e (patch) | |
| tree | 31e83019ed922cdc9c39c53be320d70d1a0f15d8 | |
| parent | ff9ca88aa6cdc6e5409f2481f3d74a2436e81a7b (diff) | |
| download | lua-c3c78030f79fdbbb06265d50645e408d60e7798e.tar.gz lua-c3c78030f79fdbbb06265d50645e408d60e7798e.tar.bz2 lua-c3c78030f79fdbbb06265d50645e408d60e7798e.zip | |
avoid redeclaration of _CRT_SECURE_NO_WARNINGS + 'lua_numtointeger' ->
'lua_numbertointeger'
| -rw-r--r-- | luaconf.h | 8 |
1 files changed, 5 insertions, 3 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: luaconf.h,v 1.219 2014/10/20 16:32:05 roberto Exp roberto $ | 2 | ** $Id: luaconf.h,v 1.220 2014/10/21 14:38:46 roberto Exp roberto $ |
| 3 | ** Configuration file for Lua | 3 | ** Configuration file for Lua |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -70,7 +70,9 @@ | |||
| 70 | #endif | 70 | #endif |
| 71 | 71 | ||
| 72 | #if defined(LUA_WIN) | 72 | #if defined(LUA_WIN) |
| 73 | #if !defined(_CRT_SECURE_NO_WARNINGS) | ||
| 73 | #define _CRT_SECURE_NO_WARNINGS /* avoid warnings about ANSI C functions */ | 74 | #define _CRT_SECURE_NO_WARNINGS /* avoid warnings about ANSI C functions */ |
| 75 | #endif | ||
| 74 | #define LUA_DL_DLL | 76 | #define LUA_DL_DLL |
| 75 | #define LUA_USE_AFORMAT /* assume 'printf' handles 'aA' specifiers */ | 77 | #define LUA_USE_AFORMAT /* assume 'printf' handles 'aA' specifiers */ |
| 76 | #endif | 78 | #endif |
| @@ -562,14 +564,14 @@ | |||
| 562 | 564 | ||
| 563 | 565 | ||
| 564 | /* | 566 | /* |
| 565 | @@ lua_numtointeger converts a float number to an integer, or | 567 | @@ lua_numbertointeger converts a float number to an integer, or |
| 566 | ** returns 0 if float is not within the range of a lua_Integer. | 568 | ** returns 0 if float is not within the range of a lua_Integer. |
| 567 | ** (The range comparisons are tricky because of rounding. The tests | 569 | ** (The range comparisons are tricky because of rounding. The tests |
| 568 | ** here assume a two-complement representation, where MININTEGER always | 570 | ** here assume a two-complement representation, where MININTEGER always |
| 569 | ** has an exact representation as a float; MAXINTEGER may not have one, | 571 | ** has an exact representation as a float; MAXINTEGER may not have one, |
| 570 | ** and therefore its conversion to float may have an ill-defined value.) | 572 | ** and therefore its conversion to float may have an ill-defined value.) |
| 571 | */ | 573 | */ |
| 572 | #define lua_numtointeger(n,p) \ | 574 | #define lua_numbertointeger(n,p) \ |
| 573 | ((n) >= (LUA_NUMBER)(LUA_MININTEGER) && \ | 575 | ((n) >= (LUA_NUMBER)(LUA_MININTEGER) && \ |
| 574 | (n) < -(LUA_NUMBER)(LUA_MININTEGER) && \ | 576 | (n) < -(LUA_NUMBER)(LUA_MININTEGER) && \ |
| 575 | (*(p) = (LUA_INTEGER)(n), 1)) | 577 | (*(p) = (LUA_INTEGER)(n), 1)) |
