JPL support patches.

This commit is contained in:
Vítor Santos Costa 2012-02-12 12:28:37 +00:00
parent 3648c562fa
commit ea18699602
4 changed files with 473 additions and 470 deletions

903
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -984,27 +984,27 @@ elif test -e "$srcdir"/packages/jpl/Makefile.in; then
case "$target_os" in
*cygwin*|*mingw*)
if test $threads = yes; then
JAVALIBPATH="\"$JAVA_HOME\"/lib/jvm.lib -lpthread"
JAVALIBS="\"$JAVA_HOME\"/lib/jvm.lib -lpthread"
else
JAVALIBPATH="\"$JAVA_HOME\"/lib/jvm.lib"
JAVALIBS="\"$JAVA_HOME\"/lib/jvm.lib"
fi
JAVAINCPATH="-I\"$JAVA_HOME\"/include -I\"$JAVA_HOME\"/include/win32"
JAVACFLAGS="-I\"$JAVA_HOME\"/include -I\"$JAVA_HOME\"/include/win32"
;;
*darwin*)
LIBS="$LIBS -framework JavaVM"
JAVALIBPATH="-L/System/Library/Frameworks/JavaVM.framework/Libraries -Wl,-framework,JavaVM"
JAVAINCPATH="-I/System/Library/Frameworks/JavaVM.framework/Headers"
JAVALIBS="-L/System/Library/Frameworks/JavaVM.framework/Libraries -Wl,-framework,JavaVM"
JAVACFLAGS="-I/System/Library/Frameworks/JavaVM.framework/Headers"
;;
*)
case "$target_os" in
*linux*)
JAVAINCPATH="-I\"$JAVA_HOME\"/include -I\"$JAVA_HOME\"/include/linux"
JAVACFLAGS="-I\"$JAVA_HOME\"/include -I\"$JAVA_HOME\"/include/linux"
;;
*solaris*)
JAVAINCPATH="-I\"$JAVA_HOME\"/include -I\"$JAVA_HOME\"/include/solaris"
JAVACFLAGS="-I\"$JAVA_HOME\"/include -I\"$JAVA_HOME\"/include/solaris"
;;
esac
JAVALIBPATH="-L$JAVA_HOME/jre/lib/$YAP_TARGET -L$JAVA_HOME/jre/lib/$YAP_TARGET/client -L$JAVA_HOME/jre/lib/$YAP_TARGET/server -Wl,-R,$JAVA_HOME/jre/lib/$YAP_TARGET -ljava -lverify -ljvm "
JAVALIBS="-L$JAVA_HOME/jre/lib/$YAP_TARGET -L$JAVA_HOME/jre/lib/$YAP_TARGET/client -L$JAVA_HOME/jre/lib/$YAP_TARGET/server -Wl,-R,$JAVA_HOME/jre/lib/$YAP_TARGET -ljava -lverify -ljvm "
;;
esac
if test "$yap_cv_java" = ""; then
@ -1757,8 +1757,8 @@ AC_SUBST(MPI_OBJS)
AC_SUBST(MPI_LIBS)
AC_SUBST(INSTALL_COMMAND)
AC_SUBST(INSTALLCLP)
AC_SUBST(JAVALIBPATH)
AC_SUBST(JAVAINCPATH)
AC_SUBST(JAVALIBS)
AC_SUBST(JAVACFLAGS)
AC_SUBST(LAMOBJS)
AC_SUBST(MAX_WORKERS)
AC_SUBST(STATIC_MODE)
@ -2261,6 +2261,8 @@ mkdir -p packages/cplint/approx
mkdir -p packages/cplint/approx/simplecuddLPADs
mkdir -p packages/http
mkdir -p packages/jpl
mkdir -p packages/jpl/src
mkdir -p packages/jpl/src/c
mkdir -p packages/jpl/src/java
mkdir -p packages/jpl/src/java/jpl
mkdir -p packages/jpl/src/java/jpl/fli

View File

@ -207,16 +207,16 @@ X_API int _PL_get_arg(int index, term_t ts, term_t a)
if ( !YAP_IsApplTerm(t) ) {
if (YAP_IsPairTerm(t)) {
if (index == 1){
Yap_PutInSlot(a,YAP_HeadOfTerm(t) PASS_REGS);
Yap_PutInSlot(a,HeadOfTerm(t) PASS_REGS);
return 1;
} else if (index == 2) {
Yap_PutInSlot(a,YAP_TailOfTerm(t) PASS_REGS);
Yap_PutInSlot(a,TailOfTerm(t) PASS_REGS);
return 1;
}
}
return 0;
}
Yap_PutInSlot(a,YAP_ArgOfTerm(index, t) PASS_REGS);
Yap_PutInSlot(a,ArgOfTerm(index, t) PASS_REGS);
return 1;
}
@ -585,9 +585,9 @@ X_API int PL_get_pointer(term_t ts, void **i)
{
CACHE_REGS
YAP_Term t = Yap_GetFromSlot(ts PASS_REGS);
if (!YAP_IsIntTerm(t) )
if (IsVarTerm(t) || !IsIntegerTerm(t) )
return 0;
*i = (void *)YAP_IntOfTerm(t);
*i = (void *)IntegerOfTerm(t);
return 1;
}

@ -1 +1 @@
Subproject commit 4742393c919d372b28df044754d6034d653967e1
Subproject commit e43a92765e7382f870868fb6c306625c0f9bb939