aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2024-02-23 21:01:25 -0300
committerGitHub <noreply@github.com>2024-02-24 00:01:25 +0000
commit88d3c4d4dfc2a76af5b78299ee49a45801b55707 (patch)
tree7e2dbe3299ab1f5d7fd99b2bd5380cee9781cfe8
parent737264a3495298e69dcc37582052e767e9121954 (diff)
downloadlua-compat-5.3-88d3c4d4dfc2a76af5b78299ee49a45801b55707.tar.gz
lua-compat-5.3-88d3c4d4dfc2a76af5b78299ee49a45801b55707.tar.bz2
lua-compat-5.3-88d3c4d4dfc2a76af5b78299ee49a45801b55707.zip
fix detection of LUA_USE_WINDOWS define (#64)
-rw-r--r--lprefix.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/lprefix.h b/lprefix.h
index 41939d7..f401c9c 100644
--- a/lprefix.h
+++ b/lprefix.h
@@ -195,12 +195,11 @@ LUAMOD_API int luaopen_compat53_string (lua_State *L) {
195# endif 195# endif
196 196
197/* choose which popen implementation to pick */ 197/* choose which popen implementation to pick */
198# if (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L) || \ 198# if (!defined(LUA_USE_WINDOWS) && !defined(LUA_USE_POSIX)) && \
199 (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE >= 600) || \ 199 ((defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L) || \
200 defined(__APPLE__) 200 (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE >= 600) || \
201 defined(__APPLE__))
201# define LUA_USE_POSIX 1 202# define LUA_USE_POSIX 1
202# elif (defined(_MSC_VER))
203# define LUA_USE_WINDOWS 0
204# endif 203# endif
205 204
206typedef struct COMPAT53_luaL_Stream { 205typedef struct COMPAT53_luaL_Stream {