Skip to content

Commit 5ebac73

Browse files
committed
LUA_BUILD_AS_DLL -> _WIN32
LUA_WIN -> _WIN32
1 parent 876f2c6 commit 5ebac73

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

paths.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ static int
112112
filep(lua_State *L, int i)
113113
{
114114
const char *s = luaL_checkstring(L, i);
115-
#ifdef LUA_WIN
115+
#ifdef _WIN32
116116
struct _stat buf;
117117
if (_stat(s,&buf) < 0)
118118
return 0;
@@ -133,7 +133,7 @@ static int
133133
dirp(lua_State *L, int i)
134134
{
135135
const char *s = luaL_checkstring(L, i);
136-
#ifdef LUA_WIN
136+
#ifdef _WIN32
137137
char buffer[8];
138138
struct _stat buf;
139139
const char *last;
@@ -177,7 +177,7 @@ lua_basename(lua_State *L)
177177
const char *fname = luaL_checkstring(L, 1);
178178
const char *suffix = luaL_optstring(L, 2, 0);
179179

180-
#ifdef LUA_WIN
180+
#ifdef _WIN32
181181

182182
int sl;
183183
const char *p, *s;
@@ -261,7 +261,7 @@ lua_dirname(lua_State *L)
261261
{
262262
const char *fname = luaL_checkstring(L, 1);
263263

264-
#ifdef LUA_WIN
264+
#ifdef _WIN32
265265

266266
const char *s;
267267
const char *p;
@@ -347,7 +347,7 @@ lua_dirname(lua_State *L)
347347
static int
348348
lua_cwd(lua_State *L)
349349
{
350-
#ifdef LUA_WIN
350+
#ifdef _WIN32
351351

352352
char drv[2];
353353
int l;
@@ -402,7 +402,7 @@ concat_fname(lua_State *L, const char *fname)
402402
{
403403
const char *from = lua_tostring(L, -1);
404404

405-
#ifdef LUA_WIN
405+
#ifdef _WIN32
406406

407407
const char *s;
408408
SB sb;
@@ -581,7 +581,7 @@ lua_dir(lua_State *L)
581581
int k = 0;
582582
const char *s = luaL_checkstring(L, 1);
583583

584-
#ifdef LUA_WIN
584+
#ifdef _WIN32
585585

586586
SB sb;
587587
struct _finddata_t info;
@@ -724,7 +724,7 @@ add_tmpname(lua_State *L, const char *tmp)
724724
static int
725725
lua_tmpname(lua_State *L)
726726
{
727-
#ifdef LUA_WIN
727+
#ifdef _WIN32
728728
char *tmp = _tempnam("c:/temp", "luatmp");
729729
#else
730730
char *tmp = tempnam(NULL, "luatmp");
@@ -774,7 +774,7 @@ lua_mkdir(lua_State *L)
774774
lua_call(L, 1, 1);
775775
if (! dirp(L, -1))
776776
lua_call(L, 1, 3);
777-
#ifdef LUA_WIN
777+
#ifdef _WIN32
778778
status = _mkdir(s);
779779
#else
780780
status = mkdir(s, 0777);
@@ -786,7 +786,7 @@ static int
786786
lua_rmdir(lua_State *L)
787787
{
788788
const char *s = luaL_checkstring(L, 1);
789-
#ifdef LUA_WIN
789+
#ifdef _WIN32
790790
int status = _rmdir(s);
791791
#else
792792
int status = rmdir(s);
@@ -802,7 +802,7 @@ lua_rmdir(lua_State *L)
802802
static int
803803
lua_uname(lua_State *L)
804804
{
805-
#if defined(LUA_WIN)
805+
#if defined(_WIN32)
806806
const char *name;
807807
SYSTEM_INFO info;
808808
lua_pushliteral(L, "Windows");
@@ -840,7 +840,7 @@ lua_uname(lua_State *L)
840840
static int
841841
lua_getregistryvalue(lua_State *L)
842842
{
843-
#ifdef LUA_WIN
843+
#ifdef _WIN32
844844
static char *keynames[] = {
845845
"HKEY_CLASSES_ROOT",
846846
"HKEY_CURRENT_CONFIG",
@@ -966,7 +966,7 @@ lua_getregistryvalue(lua_State *L)
966966
# define LL_SYM(h,sym) dlsym(h, sym)
967967
#endif
968968

969-
#ifdef LUA_WIN
969+
#ifdef _WIN32
970970
# define NEED_PATH_REQUIRE 1
971971
# include <windows.h>
972972
# define LL_LOAD(h,fname) h=(void*)LoadLibraryA(fname)

paths.h.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include <string.h>
99
#include <ctype.h>
1010

11-
#ifdef LUA_BUILD_AS_DLL
11+
#ifdef _WIN32
1212
# ifdef paths_EXPORTS
1313
# define PATHS_API __declspec(dllexport)
1414
# else

0 commit comments

Comments
 (0)