summaryrefslogtreecommitdiff
path: root/libs/luajit-cmake/luauser.h
diff options
context:
space:
mode:
authorsanine <sanine.not@pm.me>2023-03-11 15:58:20 -0600
committersanine <sanine.not@pm.me>2023-03-11 15:58:20 -0600
commitebc50b387ab209c9f9a0d92e340ac293d5697274 (patch)
treeea8c8b3677a18c994d2b9d33dbef3461dcf18113 /libs/luajit-cmake/luauser.h
parentc2329b4c8258baa9429c77566c9def97d00e96d7 (diff)
build & link with luajit instead of lua5.1
Diffstat (limited to 'libs/luajit-cmake/luauser.h')
-rw-r--r--libs/luajit-cmake/luauser.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/libs/luajit-cmake/luauser.h b/libs/luajit-cmake/luauser.h
new file mode 100644
index 0000000..20ef762
--- /dev/null
+++ b/libs/luajit-cmake/luauser.h
@@ -0,0 +1,26 @@
+#ifndef LUA_LJDIR
+#if defined(__ANDROID__)
+ #if __ANDROID_API__==19
+ #if defined(lua_getlocaledecpoint)
+ #undef lua_getlocaledecpoint
+ #endif
+
+ #define lua_getlocaledecpoint() ('.')
+ #endif
+ #if __ANDROID_API__ < 25
+ #define fseeko fseek
+ #define ftello ftell
+ #endif
+#endif
+#if defined(__APPLE__) && defined(__MACH__)
+ /* Apple OSX and iOS (Darwin). ------------------------------ */
+ #include <TargetConditionals.h>
+ #if (TARGET_IPHONE_SIMULATOR == 1 || TARGET_OS_IPHONE == 1)
+ /* iOS in Xcode simulator */ /* iOS on iPhone, iPad, etc. */
+ #define system(X) 0
+ #endif
+#endif
+#else
+#pragma clang diagnostic ignored "-Wunused-function"
+#endif
+