diff options
author | Marcin Bukat <marcin.bukat@gmail.com> | 2014-04-02 20:46:06 +0200 |
---|---|---|
committer | Marcin Bukat <marcin.bukat@gmail.com> | 2014-04-02 20:46:06 +0200 |
commit | bfd0179042b0b02fb88748d54e56e7e208bb117f (patch) | |
tree | 42d5fd51574054caaf673420fca1ec962d62d2f2 /apps/plugins/lua/rockconf.h | |
parent | 36378988ad4059982742f05f5eb50580b456840a (diff) | |
download | rockbox-bfd0179042b0b02fb88748d54e56e7e208bb117f.tar.gz rockbox-bfd0179042b0b02fb88748d54e56e7e208bb117f.zip |
Revert "Update lua plugin to 5.2.3"
FILE typedef to *void needs more work to not break sim and
application builds. I checked only a few random native builds
unfortunately. Sorry for inconvenience.
Diffstat (limited to 'apps/plugins/lua/rockconf.h')
-rw-r--r-- | apps/plugins/lua/rockconf.h | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/apps/plugins/lua/rockconf.h b/apps/plugins/lua/rockconf.h index eda1e05084..a13146d7e9 100644 --- a/apps/plugins/lua/rockconf.h +++ b/apps/plugins/lua/rockconf.h | |||
@@ -25,6 +25,10 @@ | |||
25 | #include "plugin.h" | 25 | #include "plugin.h" |
26 | #include <tlsf.h> | 26 | #include <tlsf.h> |
27 | 27 | ||
28 | #undef LUAI_THROW | ||
29 | #undef LUAI_TRY | ||
30 | #undef luai_jmpbuf | ||
31 | |||
28 | #undef LUA_PATH_DEFAULT | 32 | #undef LUA_PATH_DEFAULT |
29 | #define LUA_PATH_DEFAULT "$/?.lua;" "$/?/init.lua;" VIEWERS_DIR"/lua/?.lua;" VIEWERS_DIR"/lua/?/init.lua;" | 33 | #define LUA_PATH_DEFAULT "$/?.lua;" "$/?/init.lua;" VIEWERS_DIR"/lua/?.lua;" VIEWERS_DIR"/lua/?/init.lua;" |
30 | 34 | ||
@@ -32,11 +36,20 @@ | |||
32 | 36 | ||
33 | #include "lib/pluginlib_exit.h" | 37 | #include "lib/pluginlib_exit.h" |
34 | 38 | ||
39 | #define LUAI_THROW(L,c) longjmp((c)->b, 1) | ||
40 | #define LUAI_TRY(L,c,a) if (setjmp((c)->b) == 0) { a } | ||
41 | #define luai_jmpbuf jmp_buf | ||
42 | |||
35 | extern char curpath[MAX_PATH]; | 43 | extern char curpath[MAX_PATH]; |
36 | struct tm *gmtime(const time_t *timep); | 44 | struct tm *gmtime(const time_t *timep); |
37 | long strtol(const char *nptr, char **endptr, int base); | 45 | long strtol(const char *nptr, char **endptr, int base); |
38 | unsigned long strtoul(const char *str, char **endptr, int base); | 46 | unsigned long strtoul(const char *str, char **endptr, int base); |
39 | size_t strftime(char* dst, size_t max, const char* format, const struct tm* tm); | 47 | size_t strftime(char* dst, size_t max, const char* format, const struct tm* tm); |
48 | long lfloor(long x); | ||
49 | long lpow(long x, long y); | ||
50 | |||
51 | #define floor lfloor | ||
52 | #define pow lpow | ||
40 | 53 | ||
41 | /* Simple substitutions */ | 54 | /* Simple substitutions */ |
42 | #define malloc tlsf_malloc | 55 | #define malloc tlsf_malloc |
@@ -50,17 +63,5 @@ size_t strftime(char* dst, size_t max, const char* format, const struct tm* tm); | |||
50 | #define strcpy rb->strcpy | 63 | #define strcpy rb->strcpy |
51 | #define strlen rb->strlen | 64 | #define strlen rb->strlen |
52 | 65 | ||
53 | #define getlocaledecpoint() '.' | ||
54 | #define abort() exit(EXIT_FAILURE) | ||
55 | #define difftime(t1,t0) ((t1) - (t0)) | ||
56 | #define localtime gmtime | ||
57 | #if CONFIG_RTC | ||
58 | #define time(x) mktime(rb->get_time()) | ||
59 | #define mktime rb->mktime | ||
60 | #else | ||
61 | #define time(x) (0) | ||
62 | #define mktime(x) (0) | ||
63 | #endif | ||
64 | |||
65 | #endif /* _ROCKCONF_H_ */ | 66 | #endif /* _ROCKCONF_H_ */ |
66 | 67 | ||