aboutsummaryrefslogtreecommitdiffstats
path: root/src/android.h
diff options
context:
space:
mode:
authorPo Lu2023-02-25 21:52:11 +0800
committerPo Lu2023-02-25 21:52:11 +0800
commit8fa86cc7cd708fae8657b4e977711132999054bc (patch)
tree5b4b5984bb8ed5914fb7e34aba124e01852b7e56 /src/android.h
parent80f26cc3988bf06e876ee9ed4b05a4400bf626b7 (diff)
downloademacs-8fa86cc7cd708fae8657b4e977711132999054bc.tar.gz
emacs-8fa86cc7cd708fae8657b4e977711132999054bc.zip
Update Android port
* java/debug.sh (is_root): Fix tee detection again for old systems which don't return exit codes from adb shell. * src/android.c (android_run_select_thread, NATIVE_NAME, JNICALL): * src/android.h (NATIVE_NAME): * src/androidterm.c (JNICALL, NATIVE_NAME): Apply stack alignment to all JNICALL functions.
Diffstat (limited to 'src/android.h')
-rw-r--r--src/android.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/android.h b/src/android.h
index 01076c36b70..65389f84e6a 100644
--- a/src/android.h
+++ b/src/android.h
@@ -166,5 +166,21 @@ extern JNIEnv *android_java_env;
166 166
167#define NATIVE_NAME(name) Java_org_gnu_emacs_EmacsNative_##name 167#define NATIVE_NAME(name) Java_org_gnu_emacs_EmacsNative_##name
168 168
169/* Prologue which must be inserted before each JNI function.
170 See initEmacs for why. */
171
172#if defined __i386__
173extern void *unused_pointer;
174
175#define JNI_STACK_ALIGNMENT_PROLOGUE \
176 __attribute__ ((aligned (32))) char stack_align_buffer[32]; \
177 \
178 /* Trick GCC into not optimizing this variable away. */ \
179 unused_pointer = stack_align_buffer;
180
181#else /* !__i386__ */
182#define JNI_STACK_ALIGNMENT_PROLOGUE ((void) 0)
183#endif /* __i386__ */
184
169#endif 185#endif
170#endif /* _ANDROID_H_ */ 186#endif /* _ANDROID_H_ */