aboutsummaryrefslogtreecommitdiff
path: root/src/lj_clib.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_clib.c')
-rw-r--r--src/lj_clib.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lj_clib.c b/src/lj_clib.c
index 8389ee78..4f17d578 100644
--- a/src/lj_clib.c
+++ b/src/lj_clib.c
@@ -39,7 +39,7 @@ LJ_NORET LJ_NOINLINE static void clib_error_(lua_State *L)
39 39
40#define clib_error(L, fmt, name) clib_error_(L) 40#define clib_error(L, fmt, name) clib_error_(L)
41 41
42#if defined(__CYGWIN__) 42#if LJ_TARGET_CYGWIN
43#define CLIB_SOPREFIX "cyg" 43#define CLIB_SOPREFIX "cyg"
44#else 44#else
45#define CLIB_SOPREFIX "lib" 45#define CLIB_SOPREFIX "lib"
@@ -47,7 +47,7 @@ LJ_NORET LJ_NOINLINE static void clib_error_(lua_State *L)
47 47
48#if LJ_TARGET_OSX 48#if LJ_TARGET_OSX
49#define CLIB_SOEXT "%s.dylib" 49#define CLIB_SOEXT "%s.dylib"
50#elif defined(__CYGWIN__) 50#elif LJ_TARGET_CYGWIN
51#define CLIB_SOEXT "%s.dll" 51#define CLIB_SOEXT "%s.dll"
52#else 52#else
53#define CLIB_SOEXT "%s.so" 53#define CLIB_SOEXT "%s.so"
@@ -56,14 +56,14 @@ LJ_NORET LJ_NOINLINE static void clib_error_(lua_State *L)
56static const char *clib_extname(lua_State *L, const char *name) 56static const char *clib_extname(lua_State *L, const char *name)
57{ 57{
58 if (!strchr(name, '/') 58 if (!strchr(name, '/')
59#ifdef __CYGWIN__ 59#if LJ_TARGET_CYGWIN
60 && !strchr(name, '\\') 60 && !strchr(name, '\\')
61#endif 61#endif
62 ) { 62 ) {
63 if (!strchr(name, '.')) { 63 if (!strchr(name, '.')) {
64 name = lj_str_pushf(L, CLIB_SOEXT, name); 64 name = lj_str_pushf(L, CLIB_SOEXT, name);
65 L->top--; 65 L->top--;
66#ifdef __CYGWIN__ 66#if LJ_TARGET_CYGWIN
67 } else { 67 } else {
68 return name; 68 return name;
69#endif 69#endif