commit 1702953293ebdd770963b6fc0499d87d08f05a82
parent 33b4dec1cb44cff41db626960facfe10fa8d4c66
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Fri, 25 Nov 2005 11:28:49 -0200
new macro LUA_WIN + new macro luai_numisnan
Diffstat:
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/luaconf.h b/luaconf.h
@@ -1,5 +1,5 @@
/*
-** $Id: luaconf.h,v 1.73 2005/11/16 11:56:28 roberto Exp $
+** $Id: luaconf.h,v 1.74 2005/11/16 16:24:28 roberto Exp roberto $
** Configuration file for Lua
** See Copyright Notice in lua.h
*/
@@ -28,6 +28,11 @@
#define LUA_ANSI
#endif
+
+#if !defined(LUA_ANSI) && defined(_WIN32)
+#define LUA_WIN
+#endif
+
#if defined(LUA_USE_LINUX)
#define LUA_USE_POSIX
#define LUA_USE_DLOPEN /* needs an extra library: -ldl */
@@ -217,7 +222,7 @@
#if defined(LUA_USE_ISATTY)
#include <unistd.h>
#define lua_stdin_is_tty() isatty(0)
-#elif !defined(LUA_ANSI) && defined(_WIN32)
+#elif defined(LUA_WIN)
#include <io.h>
#include <stdio.h>
#define lua_stdin_is_tty() _isatty(_fileno(stdin))
@@ -529,6 +534,7 @@
#define luai_numeq(a,b) ((a)==(b))
#define luai_numlt(a,b) ((a)<(b))
#define luai_numle(a,b) ((a)<=(b))
+#define luai_numisnan(a) (!luai_numeq((a), (a)))
#endif
@@ -644,7 +650,7 @@ union luai_Cast { double l_d; long l_l; };
#define lua_popen(L,c,m) ((void)L, popen(c,m))
#define lua_pclose(L,file) ((void)L, (pclose(file) != -1))
-#elif !defined(LUA_ANSI) && defined(_WIN32)
+#elif defined(LUA_WIN)
#define lua_popen(L,c,m) ((void)L, _popen(c,m))
#define lua_pclose(L,file) ((void)L, (_pclose(file) != -1))
@@ -675,7 +681,7 @@ union luai_Cast { double l_d; long l_l; };
#define LUA_DL_DLOPEN
#endif
-#if !defined(LUA_ANSI) && defined(_WIN32)
+#if defined(LUA_WIN)
#define LUA_DL_DLL
#endif