Review only the last 2 commits here and ignore the first batch of commits they are from #886.
Enables testing of sqlite, jvm and all Java FFI tests on Turing.
Pull-Request: #897
Reviewed-by: Jean Privat <jean@pryen.org>
#
# See: http://docs.oracle.com/javase/1.5.0/docs/guide/jni/spec/jniTOC.html
module jvm is
- c_compiler_option("-I $(JAVA_HOME)/include/")
- c_linker_option("-L $(JNI_LIB_PATH) -ljvm")
+ c_compiler_option "-I $(JAVA_HOME)/include/ -I $(JAVA_HOME)/include/linux/"
+ c_linker_option "-L $(JNI_LIB_PATH) -ljvm"
end
in "C Header" `{
fun destroy do close
# Close this connection
- fun close `{ sqlite3_close_v2(recv); `}
+ fun close `{
+#if SQLITE_VERSION_NUMBER >= 3007014
+ sqlite3_close_v2(recv);
+#else
+ // A program using the older version should not rely on the garbage-collector
+ // to close its connections. They must be closed manually after the associated
+ // prepare statements have been finalized.
+ sqlite3_close(recv);
+#endif
+ `}
# Execute a SQL statement
fun exec(sql: String): Sqlite3Code import String.to_cstring `{