Added Python (Thanks to Beholder) - it fails to build properly using my build system,
so there's a precompiled binary included, with a hack in Android.mk to make it work on NDK r4b
This commit is contained in:
42
project/jni/python/src/PC/os2emx/dllentry.c
Normal file
42
project/jni/python/src/PC/os2emx/dllentry.c
Normal file
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* This is the entry point for the Python 2.3 core DLL.
|
||||
*/
|
||||
|
||||
#define NULL 0
|
||||
|
||||
#define REF(s) extern void s(); void *____ref_##s = &s;
|
||||
|
||||
/* Make references to imported symbols to pull them from static library */
|
||||
REF(Py_Main);
|
||||
|
||||
#include <signal.h>
|
||||
|
||||
extern int _CRT_init(void);
|
||||
extern void _CRT_term(void);
|
||||
extern void __ctordtorInit(void);
|
||||
extern void __ctordtorTerm(void);
|
||||
|
||||
unsigned long _DLL_InitTerm(unsigned long mod_handle, unsigned long flag)
|
||||
{
|
||||
switch (flag)
|
||||
{
|
||||
case 0:
|
||||
if (_CRT_init())
|
||||
return 0;
|
||||
__ctordtorInit();
|
||||
|
||||
/* Ignore fatal signals */
|
||||
signal(SIGSEGV, SIG_IGN);
|
||||
signal(SIGFPE, SIG_IGN);
|
||||
|
||||
return 1;
|
||||
|
||||
case 1:
|
||||
__ctordtorTerm();
|
||||
_CRT_term();
|
||||
return 1;
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user