12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- Only in src-amzn\: LICENSE
- diff -ru src\/loadlib.c src-amzn\/loadlib.c
- --- src\/loadlib.c 2017-04-19 10:20:42.000000000 -0700
- +++ src-amzn\/loadlib.c 2021-04-16 14:18:21.187929700 -0700
- @@ -184,12 +184,14 @@
-
- static void pusherror (lua_State *L) {
- int error = GetLastError();
- +#if LUMBERYARD_DISABLED
- char buffer[128];
- if (FormatMessageA(FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_FROM_SYSTEM,
- NULL, error, 0, buffer, sizeof(buffer)/sizeof(char), NULL))
- lua_pushstring(L, buffer);
- else
- - lua_pushfstring(L, "system error %d\n", error);
- +#endif
- + lua_pushfstring(L, "system error %d\n", error);
- }
-
- static void lsys_unloadlib (void *lib) {
- diff -ru src\/loslib.c src-amzn\/loslib.c
- --- src\/loslib.c 2017-04-19 10:29:57.000000000 -0700
- +++ src-amzn\/loslib.c 2021-04-16 15:43:26.939098900 -0700
- @@ -21,6 +21,10 @@
- #include "lauxlib.h"
- #include "lualib.h"
-
- +#if defined(__APPLE__)
- +#include <TargetConditionals.h>
- +#endif
- +
-
- /*
- ** {==================================================================
- @@ -139,8 +143,13 @@
-
-
- static int os_execute (lua_State *L) {
- +#if defined(TARGET_OS_IPHONE)
- + const char* cmd = NULL;
- + int stat = -1;
- +#else
- const char *cmd = luaL_optstring(L, 1, NULL);
- int stat = system(cmd);
- +#endif
- if (cmd != NULL)
- return luaL_execresult(L, stat);
- else {
- @@ -157,20 +166,29 @@
-
-
- static int os_rename (lua_State *L) {
- +#if !defined(APPLE) && !defined(ANDROID)
- const char *fromname = luaL_checkstring(L, 1);
- const char *toname = luaL_checkstring(L, 2);
- return luaL_fileresult(L, rename(fromname, toname) == 0, NULL);
- +#else
- + luaL_error(L, "os_rename not implemented on this platform");
- + return 1;
- +#endif
- }
-
-
- static int os_tmpname (lua_State *L) {
- +#if !defined(APPLE) && !defined(ANDROID)
- char buff[LUA_TMPNAMBUFSIZE];
- int err;
- lua_tmpnam(buff, err);
- if (err)
- +#endif
- return luaL_error(L, "unable to generate a unique filename");
- +#if !defined(APPLE) && !defined(ANDROID)
- lua_pushstring(L, buff);
- return 1;
- +#endif
- }
-
-
- Only in src\: Makefile
|