Skip to content

Commit

Permalink
fix detection of LUA_USE_WINDOWS define (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
hishamhm authored Feb 24, 2024
1 parent 737264a commit 88d3c4d
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lprefix.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,11 @@ LUAMOD_API int luaopen_compat53_string (lua_State *L) {
# endif

/* choose which popen implementation to pick */
# if (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L) || \
(defined(_XOPEN_SOURCE) && _XOPEN_SOURCE >= 600) || \
defined(__APPLE__)
# if (!defined(LUA_USE_WINDOWS) && !defined(LUA_USE_POSIX)) && \
((defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L) || \
(defined(_XOPEN_SOURCE) && _XOPEN_SOURCE >= 600) || \
defined(__APPLE__))
# define LUA_USE_POSIX 1
# elif (defined(_MSC_VER))
# define LUA_USE_WINDOWS 0
# endif

typedef struct COMPAT53_luaL_Stream {
Expand Down

0 comments on commit 88d3c4d

Please sign in to comment.