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) { # 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 {