Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Ruby compiler update + minor android fixes

  • Loading branch information...
commit 0f96c73be447cfaa224f764082075206a296d5c9 1 parent 2e7bd78
@lexis-t lexis-t authored
View
2  platform/android/Rhodes/jni/include/rhodes/JNIRhodes.h
@@ -59,7 +59,7 @@ enum rho_java_class_t {
extern const char *rho_java_class[];
-jclass getJNIClass(int n);
+jclass& getJNIClass(int n);
jclass getJNIObjectClass(JNIEnv *env, jobject obj);
jfieldID getJNIClassField(JNIEnv *env, jclass cls, const char *name, const char *signature);
jfieldID getJNIClassStaticField(JNIEnv *env, jclass cls, const char *name, const char *signature);
View
10 platform/android/Rhodes/jni/src/rhodes.cpp
@@ -86,12 +86,13 @@ JNIEnv *jnienv()
std::vector<jclass> g_classes;
-jclass getJNIClass(int n)
+jclass& getJNIClass(int n)
{
+ static jclass jcNull = 0;
if (n < 0 || (size_t)n >= g_classes.size())
{
RAWLOG_ERROR1("Illegal index when call getJNIClass: %d", n);
- return NULL;
+ return jcNull;
}
return g_classes[n];
}
@@ -153,8 +154,11 @@ jint JNI_OnLoad(JavaVM* vm, void* /*reserved*/)
jclass cls = env->FindClass(className);
if (!cls)
return -1;
- g_classes.push_back((jclass)env->NewGlobalRef(cls));
+ jclass globalCls = static_cast<jclass>(env->NewGlobalRef(cls));
+ if (!globalCls)
+ return -1;
env->DeleteLocalRef(cls);
+ g_classes.push_back(globalCls);
}
return jversion;
View
4 platform/linux/files.txt
@@ -1,6 +1,5 @@
ruby/array
ruby/bignum
-ruby/blockinlining
ruby/class
ruby/compar
ruby/compile
@@ -9,6 +8,7 @@ ruby/cont
ruby/debug
ruby/dir
ruby/dln
+ruby/dln_find
ruby/dmyencoding
ruby/dmyext
ruby/enc/ascii
@@ -22,7 +22,6 @@ ruby/eval
ruby/ext/rho/rhoruby
ruby/ext/rho/rhosupport
ruby/ext/strscan/strscan
-ruby/ext/system/system_properties
ruby/file
ruby/gc
ruby/generated/parse
@@ -46,6 +45,7 @@ ruby/missing/strlcat
ruby/missing/strlcpy
ruby/missing/tgamma
ruby/newline
+ruby/node
ruby/numeric
ruby/object
ruby/pack
View
BIN  platform/linux/target/compiler/rubylinux
Binary file not shown
View
195 platform/shared/ruby/linux/ruby/config.h
@@ -1,15 +1,9 @@
-#define PACKAGE_NAME ""
-#define PACKAGE_TARNAME ""
-#define PACKAGE_VERSION ""
-#define PACKAGE_STRING ""
-#define PACKAGE_BUGREPORT ""
-#define USE_BUILTIN_FRAME_ADDRESS 1
-#define _GNU_SOURCE 1
+/* confdefs.h */
+#define CANONICALIZATION_FOR_MATHN 1
#define STDC_HEADERS 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_STDLIB_H 1
-#define HAVE_STDIO_H 1
#define HAVE_STRING_H 1
#define HAVE_MEMORY_H 1
#define HAVE_STRINGS_H 1
@@ -17,6 +11,8 @@
#define HAVE_STDINT_H 1
#define HAVE_UNISTD_H 1
#define __EXTENSIONS__ 1
+#define _ALL_SOURCE 1
+#define _GNU_SOURCE 1
#define _POSIX_PTHREAD_SEMANTICS 1
#define _TANDEM_SOURCE 1
#define _FILE_OFFSET_BITS 64
@@ -33,14 +29,25 @@
#define SIZEOF_DOUBLE 8
#define SIZEOF_TIME_T 4
#define rb_pid_t pid_t
-#define PIDT2NUM(v) LONG2NUM(v)
-#define NUM2PIDT(v) NUM2LONG(v)
+#define PIDT2NUM(v) INT2NUM(v)
+#define NUM2PIDT(v) NUM2INT(v)
+#define PRI_PIDT_PREFIX ""
#define rb_uid_t uid_t
-#define UIDT2NUM(v) ULONG2NUM(v)
-#define NUM2UIDT(v) NUM2ULONG(v)
+#define UIDT2NUM(v) UINT2NUM(v)
+#define NUM2UIDT(v) NUM2UINT(v)
+#define PRI_UIDT_PREFIX ""
#define rb_gid_t gid_t
-#define GIDT2NUM(v) ULONG2NUM(v)
-#define NUM2GIDT(v) NUM2ULONG(v)
+#define GIDT2NUM(v) UINT2NUM(v)
+#define NUM2GIDT(v) NUM2UINT(v)
+#define PRI_GIDT_PREFIX ""
+#define rb_time_t time_t
+#define TIMET2NUM(v) LONG2NUM(v)
+#define NUM2TIMET(v) NUM2LONG(v)
+#define PRI_TIMET_PREFIX "l"
+#define rb_dev_t dev_t
+#define DEVT2NUM(v) ULL2NUM(v)
+#define NUM2DEVT(v) NUM2ULL(v)
+#define PRI_DEVT_PREFIX "ll"
#define HAVE_PROTOTYPES 1
#define TOKEN_PASTE(x,y) x##y
#define STRINGIZE(expr) STRINGIZE0(expr)
@@ -52,17 +59,16 @@
#define FUNC_STDCALL(x) __attribute__ ((stdcall)) x
#define FUNC_CDECL(x) __attribute__ ((cdecl)) x
#define FUNC_FASTCALL(x) __attribute__ ((fastcall)) x
-#define RUBY_ALIAS_FUNCTION(old_prot, new_name, args) VALUE old_prot __attribute__((alias(#new_name)));
+#define RUBY_ALIAS_FUNCTION_TYPE(type, prot, name, args) type prot __attribute__((alias(#name)));
+#define RUBY_ALIAS_FUNCTION_VOID(prot, name, args) RUBY_ALIAS_FUNCTION_TYPE(void, prot, name, args)
#define HAVE_DECL_SYS_NERR 1
#define HAVE_LIBCRYPT 1
#define HAVE_LIBDL 1
#define HAVE_LIBRT 1
#define HAVE_DIRENT_H 1
-#define STDC_HEADERS 1
+#define HAVE__BOOL 1
+#define HAVE_STDBOOL_H 1
#define HAVE_SYS_WAIT_H 1
-#define HAVE_STDLIB_H 1
-#define HAVE_STRING_H 1
-#define HAVE_UNISTD_H 1
#define HAVE_LIMITS_H 1
#define HAVE_SYS_FILE_H 1
#define HAVE_SYS_IOCTL_H 1
@@ -73,16 +79,16 @@
#define HAVE_SYS_TIME_H 1
#define HAVE_SYS_TIMES_H 1
#define HAVE_SYS_PARAM_H 1
+#define HAVE_SYSCALL_H 1
#define HAVE_PWD_H 1
#define HAVE_GRP_H 1
#define HAVE_A_OUT_H 1
#define HAVE_UTIME_H 1
-#define HAVE_MEMORY_H 1
#define HAVE_SYS_RESOURCE_H 1
#define HAVE_NETINET_IN_SYSTM_H 1
#define HAVE_FLOAT_H 1
-#define HAVE_PTHREAD_H 1
#define HAVE_UCONTEXT_H 1
+#define HAVE_LANGINFO_H 1
#define HAVE_LOCALE_H 1
#define HAVE_SYS_SENDFILE_H 1
#define HAVE_TIME_H 1
@@ -96,19 +102,37 @@
#define HAVE_ST_BLOCKS 1
#define HAVE_STRUCT_STAT_ST_RDEV 1
#define HAVE_ST_RDEV 1
+#define SIZEOF_STRUCT_STAT_ST_SIZE SIZEOF_LONG_LONG
+#define SIZEOF_STRUCT_STAT_ST_BLOCKS SIZEOF_LONG_LONG
+#define HAVE_STRUCT_STAT_ST_ATIM 1
+#define HAVE_STRUCT_STAT_ST_MTIM 1
+#define HAVE_STRUCT_STAT_ST_CTIM 1
#define HAVE_STRUCT_TIMESPEC 1
+#define HAVE_STRUCT_TIMEZONE 1
#define HAVE_RB_FD_INIT 1
#define HAVE_INT8_T 1
+#define SIZEOF_INT8_T 1
#define HAVE_UINT8_T 1
+#define SIZEOF_UINT8_T 1
#define HAVE_INT16_T 1
+#define SIZEOF_INT16_T 2
#define HAVE_UINT16_T 1
+#define SIZEOF_UINT16_T 2
#define HAVE_INT32_T 1
+#define SIZEOF_INT32_T 4
#define HAVE_UINT32_T 1
+#define SIZEOF_UINT32_T 4
#define HAVE_INT64_T 1
+#define SIZEOF_INT64_T 8
#define HAVE_UINT64_T 1
+#define SIZEOF_UINT64_T 8
#define HAVE_INTPTR_T 1
+#define SIZEOF_INTPTR_T 4
#define HAVE_UINTPTR_T 1
+#define SIZEOF_UINTPTR_T 4
#define HAVE_SSIZE_T 1
+#define SIZEOF_SSIZE_T 4
+#define STACK_END_ADDRESS __libc_stack_end
#define GETGROUPS_T gid_t
#define RETSIGTYPE void
#define HAVE_ALLOCA_H 1
@@ -120,9 +144,10 @@
#define HAVE_STRSTR 1
#define HAVE_CRYPT 1
#define HAVE_FLOCK 1
-#define HAVE_VSNPRINTF 1
#define HAVE_ISNAN 1
-#define HAVE_FINITE 1
+//RHO
+//#define HAVE_FINITE 1
+//RHO
#define HAVE_ISINF 1
#define HAVE_HYPOT 1
#define HAVE_ACOSH 1
@@ -130,6 +155,7 @@
#define HAVE_TGAMMA 1
#define HAVE_LGAMMA_R 1
#define HAVE_CBRT 1
+#define HAVE_SIGNBIT 1
#define HAVE_FMOD 1
#define HAVE_KILLPG 1
#define HAVE_WAIT4 1
@@ -137,18 +163,29 @@
#define HAVE_FORK 1
#define HAVE_SYSCALL 1
#define HAVE_CHROOT 1
-#define HAVE_FSYNC 1
#define HAVE_GETCWD 1
+#define HAVE_EACCESS 1
#define HAVE_TRUNCATE 1
#define HAVE_FTRUNCATE 1
+#define HAVE_FTELLO 1
#define HAVE_TIMES 1
#define HAVE_UTIMES 1
+#define HAVE_UTIMENSAT 1
#define HAVE_FCNTL 1
#define HAVE_LOCKF 1
#define HAVE_LSTAT 1
+#define HAVE_TRUNCATE64 1
+#define HAVE_FTRUNCATE64 1
+#define HAVE_FTELLO64 1
+#define HAVE_FSEEKO 1
+#define HAVE_FSEEKO64 1
#define HAVE_LINK 1
#define HAVE_SYMLINK 1
#define HAVE_READLINK 1
+#define HAVE_READDIR_R 1
+#define HAVE_FSYNC 1
+#define HAVE_FDATASYNC 1
+#define HAVE_FCHOWN 1
#define HAVE_SETITIMER 1
#define HAVE_SETEUID 1
#define HAVE_SETREUID 1
@@ -170,42 +207,53 @@
#define HAVE_GETRLIMIT 1
#define HAVE_SETRLIMIT 1
#define HAVE_SYSCONF 1
+#define HAVE_CLOSE 1
#define HAVE_DLOPEN 1
#define HAVE_SIGPROCMASK 1
#define HAVE_SIGACTION 1
#define HAVE__SETJMP 1
#define HAVE__LONGJMP 1
-#define HAVE_VSNPRINTF 1
-#define HAVE_SNPRINTF 1
#define HAVE_SETSID 1
+#define HAVE_TELLDIR 1
+#define HAVE_SEEKDIR 1
#define HAVE_FCHMOD 1
#define HAVE_COSH 1
#define HAVE_SINH 1
#define HAVE_TANH 1
+#define HAVE_LOG2 1
#define HAVE_ROUND 1
#define HAVE_SETUID 1
#define HAVE_SETGID 1
-#define HAVE_DAEMON 1
#define HAVE_SETENV 1
#define HAVE_UNSETENV 1
#define HAVE_MKTIME 1
+#define HAVE_TIMEGM 1
#define HAVE_GMTIME_R 1
#define HAVE_CLOCK_GETTIME 1
#define HAVE_GETTIMEOFDAY 1
#define HAVE_PREAD 1
#define HAVE_SENDFILE 1
#define HAVE_SHUTDOWN 1
+#define HAVE_SIGALTSTACK 1
#define RUBY_SETJMP(env) _setjmp(env)
#define RUBY_LONGJMP(env,val) _longjmp(env,val)
#define RUBY_JMP_BUF jmp_buf
+#define HAVE_STRUCT_TM_TM_ZONE 1
+#define HAVE_TM_ZONE 1
+#define HAVE_STRUCT_TM_TM_GMTOFF 1
+#define HAVE_DAYLIGHT 1
+#define HAVE_VAR_TIMEZONE 1
+#define TYPEOF_VAR_TIMEZONE long
+#define HAVE_TIMEZONE 1
+#define TIMEZONE_VOID 1
#define NEGATIVE_TIME_T 1
#define POSIX_SIGNAL 1
#define GETPGRP_VOID 1
#define SETPGRP_VOID 1
-#define RSHIFT(x,y) ((x)>>(int)y)
+#define RSHIFT(x,y) ((x)>>(int)(y))
#define FILE_READPTR _IO_read_ptr
#define FILE_READEND _IO_read_end
-#define HUGE_ST_INO 1
+#define SIZEOF_STRUCT_STAT_ST_INO SIZEOF_LONG_LONG
#define HAVE__SC_CLK_TCK 1
#define STACK_GROW_DIRECTION -1
#define _REENTRANT 1
@@ -213,81 +261,28 @@
#define HAVE_LIBPTHREAD 1
#define HAVE_NANOSLEEP 1
#define HAVE_SCHED_YIELD 1
+#define HAVE_PTHREAD_ATTR_SETINHERITSCHED 1
+#define HAVE_PTHREAD_GETATTR_NP 1
+#define HAVE_PTHREAD_ATTR_GETSTACK 1
#define HAVE_GETCONTEXT 1
#define HAVE_SETCONTEXT 1
+#define HAVE_BACKTRACE 1
#define USE_ELF 1
#define DLEXT_MAXLEN 3
#define DLEXT ".so"
-#define HAVE_SOCKADDR_STORAGE 1
-#define HAVE_GAI_STRERROR 1
-
-#ifndef RUBYLINUX
- #define LOAD_RELATIVE 1
-#else
- #define LOAD_RELATIVE 0
-#endif
-
-#define RUBY_LIB "/lib"
-#define RUBY_SITE_LIB "/apps"
-#define RUBY_SITE_LIB2 "/apps/app"
-#define RUBY_VENDOR_LIB "/lib"
-#define RUBY_VENDOR_LIB2 "/lib"
-#ifndef OS_ANDROID
+#define HAVE_PTHREAD_H 1
+#define RUBY_LIB_VERSION_STYLE 3 /* full */
+#define RUBY_EXEC_PREFIX "/usr/local"
+//RHO
+#define RUBY_LIB_PREFIX "" //RUBY_EXEC_PREFIX"/lib/ruby"
+//RHO
+#define RUBY_SITE_LIB RUBY_LIB_PREFIX"/site_ruby"
+#define RUBY_VENDOR_LIB RUBY_LIB_PREFIX"/vendor_ruby"
#define RUBY_PLATFORM "i686-linux"
-#else
-#define RUBY_PLATFORM "arm-android"
-#endif
-#define RUBY_ARCHLIB "/lib"
-#define RUBY_SITE_ARCHLIB "/lib"
-#define RUBY_VENDOR_ARCHLIB "/lib"
-
-#define HAVE_INET_PTON 1
-#define HAVE_INET_ATON 1
-#define HAVE_GETADDRINFO 1
-#define HAVE_GETNAMEINFO 1
-#define HAVE_GETHOSTNAME 1
-#define HAVE_UNAME 1
-
-#define HAVE_TELLDIR 1
-#define HAVE_SEEKDIR 1
-
-#if defined(OS_ANDROID)
-# define HAVE_SYS_SYSCALL_H 1
-# define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
-
-# include <sys/select.h>
-# include <asm/page.h>
-
-typedef long int fd_mask;
-#ifndef HAVE_RLIM_T
-typedef unsigned long rlim_t;
-#endif
-
-# ifndef howmany
-# define howmany(x, y) (((x) + ((y) - 1)) / (y))
-# endif
-
-#else // OS_ANDROID
-# define HAVE_SYSCALL_H 1
-# define HAVE_LANGINFO_H 1
-# define HAVE_STRUCT_STAT_ST_ATIM 1
-# define HAVE_STRUCT_STAT_ST_MTIM 1
-# define HAVE_STRUCT_STAT_ST_CTIM 1
-# define STACK_END_ADDRESS __libc_stack_end
-# define HAVE_EACCESS 1
-# define HAVE_UTIMENSAT 1
-# define HAVE_GROUP_MEMBER 1
-# define HAVE_TIMEGM 1
-# define HAVE_PTHREAD_ATTR_SETINHERITSCHED 1
-# define HAVE_BACKTRACE 1
-# define HAVE_LOG2 1
-# define HAVE_STRUCT_TM_TM_GMTOFF 1
-# define HAVE_STRUCT_TM_TM_ZONE 1
-# define HAVE_TM_ZONE 1
-# define HAVE_DAYLIGHT 1
-# define HAVE_VAR_TIMEZONE 1
-# define TYPEOF_VAR_TIMEZONE long
-# define HAVE_TIMEZONE 1
-# define TIMEZONE_VOID 1
-#endif // OS_ANDROID
+//RHO
+#define RUBY_EXPORT 1
+#define HAVE_GETADDRINFO 1
+#define HAVE_SOCKADDR_STORAGE 1
+#define LOAD_RELATIVE 1
+//RHO
View
22 platform/shared/ruby/main.c
@@ -226,6 +226,26 @@ void Init_System()
{
}
+void Init_AsyncHttp()
+{
+}
+
+void Init_SignatureTool()
+{
+}
+
+void Init_RhoBluetooth()
+{
+}
+
+void Init_RhodesNativeViewManager()
+{
+}
+
+void Init_NavBar()
+{
+}
+
VALUE has_network(){
return Qfalse;
}
@@ -339,4 +359,4 @@ void rho_bluetooth_session_write_data(const char* connected_device_name, VALUE d
VALUE rho_asynchttp_request(const char* command, rho_param *p){return 0;}
-void rho_asynchttp_cancel(const char* cancel_callback){}
+void rho_asynchttp_cancel(const char* cancel_callback){}
View
BIN  res/build-tools/rubylinux
Binary file not shown
Please sign in to comment.
Something went wrong with that request. Please try again.