diff options
author | Mike Pall <mike> | 2016-04-03 19:07:19 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2016-04-03 19:07:19 +0200 |
commit | 4ab6367b21527a20b76ce356153bc454e082b7d2 (patch) | |
tree | 2c2b7939f4289b32755689cfb19e4d6f62739ca5 /src/lj_clib.c | |
parent | 62af10152433c45e5d83e442538fabf1f57f189b (diff) | |
download | luajit-4ab6367b21527a20b76ce356153bc454e082b7d2.tar.gz luajit-4ab6367b21527a20b76ce356153bc454e082b7d2.tar.bz2 luajit-4ab6367b21527a20b76ce356153bc454e082b7d2.zip |
Cygwin: Allow cross-builds to non-Cygwin targets.
Diffstat (limited to 'src/lj_clib.c')
-rw-r--r-- | src/lj_clib.c | 8 |
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) | |||
56 | static const char *clib_extname(lua_State *L, const char *name) | 56 | static 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 |