From f2f15ecaacb37a2fed805c7e279cd57ee438ff5f Mon Sep 17 00:00:00 2001 From: TheBrokenRail <17478432+TheBrokenRail@users.noreply.github.com> Date: Thu, 14 Mar 2019 17:44:59 -0400 Subject: [PATCH 1/3] Create platform_android.h.in --- config/platforms/platform_android.h.in | 33 ++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 config/platforms/platform_android.h.in diff --git a/config/platforms/platform_android.h.in b/config/platforms/platform_android.h.in new file mode 100644 index 00000000..dc12cc8e --- /dev/null +++ b/config/platforms/platform_android.h.in @@ -0,0 +1,33 @@ +#if defined(DUK_COMPILING_DUKTAPE) +#if !defined(_POSIX_C_SOURCE) +#define _POSIX_C_SOURCE 200809L +#endif +#if !defined(_GNU_SOURCE) +#define _GNU_SOURCE /* e.g. getdate_r */ +#endif +#if !defined(_XOPEN_SOURCE) +#define _XOPEN_SOURCE /* e.g. strptime */ +#endif +#endif /* DUK_COMPILING_DUKTAPE */ + +#include +#if defined(DUK_F_BCC) +/* no endian.h or stdint.h */ +#else +#include +#include +#endif /* DUK_F_BCC */ +#include +#include +#include + +#define DUK_USE_DATE_NOW_GETTIMEOFDAY +#define DUK_USE_DATE_TZO_GMTIME_R +#define DUK_USE_DATE_PRS_STRPTIME +#define DUK_USE_DATE_FMT_STRFTIME + +#if 0 /* XXX: safe condition? */ +#define DUK_USE_GET_MONOTONIC_TIME_CLOCK_GETTIME +#endif + +#define DUK_USE_OS_STRING "android" From 4a8c23dd5d4b6141ed2408994fa9d077a6cfc318 Mon Sep 17 00:00:00 2001 From: TheBrokenRail <17478432+TheBrokenRail@users.noreply.github.com> Date: Thu, 14 Mar 2019 17:46:04 -0400 Subject: [PATCH 2/3] Update platforms.yaml --- config/platforms.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/platforms.yaml b/config/platforms.yaml index 00bed2e9..10283748 100644 --- a/config/platforms.yaml +++ b/config/platforms.yaml @@ -51,6 +51,10 @@ autodetect: name: Emscripten check: DUK_F_EMSCRIPTEN include: platform_emscripten.h.in + - + name: Android + check: DUK_F_ANDROID + include: platform_android.h.in - name: Linux check: DUK_F_LINUX From 6c2f3073f4c439f7f3323aff5fc0d3908c088299 Mon Sep 17 00:00:00 2001 From: TheBrokenRail <17478432+TheBrokenRail@users.noreply.github.com> Date: Thu, 14 Mar 2019 19:10:53 -0400 Subject: [PATCH 3/3] Update AUTHORS.rst --- AUTHORS.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS.rst b/AUTHORS.rst index a78511b5..97d28be4 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -57,6 +57,7 @@ and agreed to irrevocably license their contributions under the Duktape * Edward Betts (https://github.com/edwardbetts) * Ozhan Duz (https://github.com/webfolderio) * Akos Kiss (https://github.com/akosthekiss) +* TheBrokenRail (https://github.com/TheBrokenRail) Other contributions ===================