win64 fixes
This commit is contained in:
parent
272ddc0228
commit
6ec69aa3c8
2
C/text.c
2
C/text.c
@ -936,7 +936,7 @@ static unsigned char *concat(int n, void *sv[] USES_REGS) {
|
|||||||
buf0 = buf;
|
buf0 = buf;
|
||||||
for (i = 0; i < n; i++) {
|
for (i = 0; i < n; i++) {
|
||||||
#if _WIN32 || defined(__ANDROID__)
|
#if _WIN32 || defined(__ANDROID__)
|
||||||
strcpy(buf, sv[lvl]);
|
strcpy(buf, sv[i]);
|
||||||
buf = (char *)buf + strlen(buf);
|
buf = (char *)buf + strlen(buf);
|
||||||
#else
|
#else
|
||||||
buf = stpcpy(buf, sv[i]);
|
buf = stpcpy(buf, sv[i]);
|
||||||
|
@ -495,6 +495,8 @@ bool YAPEngine::mgoal(Term t, Term tmod)
|
|||||||
bool result;
|
bool result;
|
||||||
sigjmp_buf q_env;
|
sigjmp_buf q_env;
|
||||||
|
|
||||||
|
|
||||||
|
if (arity) {
|
||||||
if (IsApplTerm(t))
|
if (IsApplTerm(t))
|
||||||
{
|
{
|
||||||
ts = RepAppl(t) + 1;
|
ts = RepAppl(t) + 1;
|
||||||
@ -505,6 +507,9 @@ bool YAPEngine::mgoal(Term t, Term tmod)
|
|||||||
}
|
}
|
||||||
for (arity_t i = 0; i < arity; i++)
|
for (arity_t i = 0; i < arity; i++)
|
||||||
XREGS[i + 1] = ts[i];
|
XREGS[i + 1] = ts[i];
|
||||||
|
} else if ( IsAtomTerm(t)) {
|
||||||
|
ts = nullptr;
|
||||||
|
}
|
||||||
q.CurSlot = Yap_StartSlots();
|
q.CurSlot = Yap_StartSlots();
|
||||||
q.p = P;
|
q.p = P;
|
||||||
q.cp = CP;
|
q.cp = CP;
|
||||||
@ -729,7 +734,7 @@ bool YAPQuery::next()
|
|||||||
{
|
{
|
||||||
q_open = false;
|
q_open = false;
|
||||||
Yap_PopTermFromDB(LOCAL_ActiveError->errorTerm);
|
Yap_PopTermFromDB(LOCAL_ActiveError->errorTerm);
|
||||||
bzero(LOCAL_ActiveError, sizeof(*LOCAL_ActiveError));
|
memset(LOCAL_ActiveError, 0, sizeof(*LOCAL_ActiveError));
|
||||||
YAP_LeaveGoal(false, &q_h);
|
YAP_LeaveGoal(false, &q_h);
|
||||||
Yap_CloseHandles(q_handles);
|
Yap_CloseHandles(q_handles);
|
||||||
q_open = false;
|
q_open = false;
|
||||||
|
@ -37,11 +37,10 @@ get_filename_component ( ABS_PYTHON_INCLUDE_PATH ${_ABS_PYTHON_INCLUDE_PATH} ABS
|
|||||||
OUTPUT_VARIABLE _ABS_PYTHON_SYSLIB_PATH
|
OUTPUT_VARIABLE _ABS_PYTHON_SYSLIB_PATH
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE )
|
OUTPUT_STRIP_TRAILING_WHITESPACE )
|
||||||
|
|
||||||
set( _ABS_PYTHON_SYSLIB_PATH
|
find_library(ABS_PYTHON_SYSLIB_PATH
|
||||||
${_ABS_PYTHON_SYSLIB_PATH}/../${CMAKE_SHARED_LIBRARY_PREFIX}python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}m${CMAKE_SHARED_LIBRARY_SUFFIX} )
|
NAMES python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}m
|
||||||
message("${_ABS_PYTHON_SYSLIB_PATH}")
|
PATHS _ABS_PYTHON_SYSLIB_PATH
|
||||||
get_filename_component ( ABS_PYTHON_SYSLIB_PATH ${_ABS_PYTHON_SYSLIB_PATH} ABSOLUTE )
|
)
|
||||||
|
|
||||||
|
|
||||||
set ( PYTHON_LIBRARY
|
set ( PYTHON_LIBRARY
|
||||||
${ABS_PYTHON_SYSLIB_PATH}
|
${ABS_PYTHON_SYSLIB_PATH}
|
||||||
@ -51,21 +50,22 @@ get_filename_component ( ABS_PYTHON_INCLUDE_PATH ${_ABS_PYTHON_INCLUDE_PATH} ABS
|
|||||||
${PYTHON_LIBRARY}
|
${PYTHON_LIBRARY}
|
||||||
CACHE "FILEPATH" "Python Library (Deprecated)"
|
CACHE "FILEPATH" "Python Library (Deprecated)"
|
||||||
)
|
)
|
||||||
if ( (EXISTS PYTHON_LIBRARY) AND ( EXISTS ${PYTHON_INCLUDE_DIR}) )
|
if ( (EXISTS ${PYTHON_LIBRARY}) AND ( EXISTS ${PYTHON_INCLUDE_DIR}) )
|
||||||
set ( PYTHONLIBS_FOUND ON)
|
set ( PYTHONLIBS_FOUND ON )
|
||||||
else()
|
# else()
|
||||||
find_package(PythonLibs)
|
|
||||||
|
#find_package(PythonLibs)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
macro_log_feature (PYTHONLIBS_FOUND "Python"
|
macro_log_feature (PYTHONLIBS_FOUND "Python"
|
||||||
"Use Python System"
|
"Use Python System"
|
||||||
"http://www.python.org" FALSE)
|
"http://www.python.org" FALSE )
|
||||||
|
|
||||||
|
|
||||||
include_directories( BEFORE ${PYTHON_INCLUDE_DIR} )
|
include_directories( BEFORE ${PYTHON_INCLUDE_DIR} )
|
||||||
|
|
||||||
LIST( APPEND
|
LIST( APPEND
|
||||||
CMAKE_REQUIRED_INCLUDES ${PYTHON_INCLUDE_DIR} ${CMAKE_REQUIRED_INCLUDES} )
|
CMAKE_REQUIRED_INCLUDES ${PYTHON_INCLUDE_DIR} ${CMAKE_REQUIRED_INCLUDES})
|
||||||
|
|
||||||
check_include_file(Python.h HAVE_PYTHON_H)
|
check_include_file(Python.h HAVE_PYTHON_H)
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ set (CMAKE_POSITION_INDEPENDENT_CODE TRUE)
|
|||||||
|
|
||||||
add_library (YAPPython SHARED ${PYTHON_SOURCES})
|
add_library (YAPPython SHARED ${PYTHON_SOURCES})
|
||||||
|
|
||||||
target_link_libraries(YAPPython libYap ${PYTHON_LIBRARIES}
|
target_link_libraries(YAPPython libYap ${PYTHON_LIBRARY}
|
||||||
${WINDLLS}
|
${WINDLLS}
|
||||||
${GMP_LIBRARIES})
|
${GMP_LIBRARIES})
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user