aboutsummaryrefslogtreecommitdiff
path: root/src/lj_clib.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-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 922dbfae..8398e803 100644
--- a/src/lj_clib.c
+++ b/src/lj_clib.c
@@ -40,7 +40,7 @@ LJ_NORET LJ_NOINLINE static void clib_error_(lua_State *L)
40 40
41#define clib_error(L, fmt, name) clib_error_(L) 41#define clib_error(L, fmt, name) clib_error_(L)
42 42
43#if defined(__CYGWIN__) 43#if LJ_TARGET_CYGWIN
44#define CLIB_SOPREFIX "cyg" 44#define CLIB_SOPREFIX "cyg"
45#else 45#else
46#define CLIB_SOPREFIX "lib" 46#define CLIB_SOPREFIX "lib"
@@ -48,7 +48,7 @@ LJ_NORET LJ_NOINLINE static void clib_error_(lua_State *L)
48 48
49#if LJ_TARGET_OSX 49#if LJ_TARGET_OSX
50#define CLIB_SOEXT "%s.dylib" 50#define CLIB_SOEXT "%s.dylib"
51#elif defined(__CYGWIN__) 51#elif LJ_TARGET_CYGWIN
52#define CLIB_SOEXT "%s.dll" 52#define CLIB_SOEXT "%s.dll"
53#else 53#else
54#define CLIB_SOEXT "%s.so" 54#define CLIB_SOEXT "%s.so"
@@ -57,14 +57,14 @@ LJ_NORET LJ_NOINLINE static void clib_error_(lua_State *L)
57static const char *clib_extname(lua_State *L, const char *name) 57static const char *clib_extname(lua_State *L, const char *name)
58{ 58{
59 if (!strchr(name, '/') 59 if (!strchr(name, '/')
60#ifdef __CYGWIN__ 60#if LJ_TARGET_CYGWIN
61 && !strchr(name, '\\') 61 && !strchr(name, '\\')
62#endif 62#endif
63 ) { 63 ) {
64 if (!strchr(name, '.')) { 64 if (!strchr(name, '.')) {
65 name = lj_strfmt_pushf(L, CLIB_SOEXT, name); 65 name = lj_strfmt_pushf(L, CLIB_SOEXT, name);
66 L->top--; 66 L->top--;
67#ifdef __CYGWIN__ 67#if LJ_TARGET_CYGWIN
68 } else { 68 } else {
69 return name; 69 return name;
70#endif 70#endif