summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2005-11-25 11:29:11 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2005-11-25 11:29:11 -0200
commit1702953293ebdd770963b6fc0499d87d08f05a82 (patch)
treebb30f2cff7dfd4eaddda323e28bad9f935e45e36
parent33b4dec1cb44cff41db626960facfe10fa8d4c66 (diff)
downloadlua-1702953293ebdd770963b6fc0499d87d08f05a82.tar.gz
lua-1702953293ebdd770963b6fc0499d87d08f05a82.tar.bz2
lua-1702953293ebdd770963b6fc0499d87d08f05a82.zip
new macro LUA_WIN + new macro luai_numisnan
-rw-r--r--luaconf.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/luaconf.h b/luaconf.h
index 0e0b8f5d..3370b9df 100644
--- a/luaconf.h
+++ b/luaconf.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: luaconf.h,v 1.73 2005/11/16 11:56:28 roberto Exp $ 2** $Id: luaconf.h,v 1.74 2005/11/16 16:24:28 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*/
@@ -28,6 +28,11 @@
28#define LUA_ANSI 28#define LUA_ANSI
29#endif 29#endif
30 30
31
32#if !defined(LUA_ANSI) && defined(_WIN32)
33#define LUA_WIN
34#endif
35
31#if defined(LUA_USE_LINUX) 36#if defined(LUA_USE_LINUX)
32#define LUA_USE_POSIX 37#define LUA_USE_POSIX
33#define LUA_USE_DLOPEN /* needs an extra library: -ldl */ 38#define LUA_USE_DLOPEN /* needs an extra library: -ldl */
@@ -217,7 +222,7 @@
217#if defined(LUA_USE_ISATTY) 222#if defined(LUA_USE_ISATTY)
218#include <unistd.h> 223#include <unistd.h>
219#define lua_stdin_is_tty() isatty(0) 224#define lua_stdin_is_tty() isatty(0)
220#elif !defined(LUA_ANSI) && defined(_WIN32) 225#elif defined(LUA_WIN)
221#include <io.h> 226#include <io.h>
222#include <stdio.h> 227#include <stdio.h>
223#define lua_stdin_is_tty() _isatty(_fileno(stdin)) 228#define lua_stdin_is_tty() _isatty(_fileno(stdin))
@@ -529,6 +534,7 @@
529#define luai_numeq(a,b) ((a)==(b)) 534#define luai_numeq(a,b) ((a)==(b))
530#define luai_numlt(a,b) ((a)<(b)) 535#define luai_numlt(a,b) ((a)<(b))
531#define luai_numle(a,b) ((a)<=(b)) 536#define luai_numle(a,b) ((a)<=(b))
537#define luai_numisnan(a) (!luai_numeq((a), (a)))
532#endif 538#endif
533 539
534 540
@@ -644,7 +650,7 @@ union luai_Cast { double l_d; long l_l; };
644#define lua_popen(L,c,m) ((void)L, popen(c,m)) 650#define lua_popen(L,c,m) ((void)L, popen(c,m))
645#define lua_pclose(L,file) ((void)L, (pclose(file) != -1)) 651#define lua_pclose(L,file) ((void)L, (pclose(file) != -1))
646 652
647#elif !defined(LUA_ANSI) && defined(_WIN32) 653#elif defined(LUA_WIN)
648 654
649#define lua_popen(L,c,m) ((void)L, _popen(c,m)) 655#define lua_popen(L,c,m) ((void)L, _popen(c,m))
650#define lua_pclose(L,file) ((void)L, (_pclose(file) != -1)) 656#define lua_pclose(L,file) ((void)L, (_pclose(file) != -1))
@@ -675,7 +681,7 @@ union luai_Cast { double l_d; long l_l; };
675#define LUA_DL_DLOPEN 681#define LUA_DL_DLOPEN
676#endif 682#endif
677 683
678#if !defined(LUA_ANSI) && defined(_WIN32) 684#if defined(LUA_WIN)
679#define LUA_DL_DLL 685#define LUA_DL_DLL
680#endif 686#endif
681 687