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