minor patches
This commit is contained in:
parent
978e8e9788
commit
3789f69cf1
@ -323,11 +323,11 @@ X_API Int YAP_IntOfTerm(Term t) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
X_API Term YAP_MkBigNumTerm(void *big) {
|
X_API Term YAP_MkBigNumTerm(void*big) {
|
||||||
#if USE_GMP
|
#if USE_GMP
|
||||||
Term I;
|
Term I;
|
||||||
BACKUP_H();
|
BACKUP_H();
|
||||||
I = Yap_MkBigIntTerm((MP_INT *) big);
|
I = Yap_MkBigIntTerm(big);
|
||||||
RECOVER_H();
|
RECOVER_H();
|
||||||
return I;
|
return I;
|
||||||
#else
|
#else
|
||||||
@ -2433,7 +2433,7 @@ static void do_bootfile(const char *bootfilename USES_REGS) {
|
|||||||
#endif /* YAPOR_COPY || YAPOR_COW || YAPOR_SBA */
|
#endif /* YAPOR_COPY || YAPOR_COW || YAPOR_SBA */
|
||||||
if (!yap_init->Embedded) {
|
if (!yap_init->Embedded) {
|
||||||
GLOBAL_PrologShouldHandleInterrupts =
|
GLOBAL_PrologShouldHandleInterrupts =
|
||||||
~yap_init->PrologCannotHandleInterrupts;
|
!yap_init->PrologCannotHandleInterrupts;
|
||||||
Yap_InitSysbits(0); /* init signal handling and time, required by later
|
Yap_InitSysbits(0); /* init signal handling and time, required by later
|
||||||
functions */
|
functions */
|
||||||
GLOBAL_argv = yap_init->Argv;
|
GLOBAL_argv = yap_init->Argv;
|
||||||
|
@ -205,7 +205,7 @@ static Int LoadForeign(StringList ofiles, StringList libs, char *proc_name,
|
|||||||
}
|
}
|
||||||
#ifdef __osf__
|
#ifdef __osf__
|
||||||
if ((handle = dlopen(LOCAL_FileNameBuf, RTLD_LAZY)) == 0)
|
if ((handle = dlopen(LOCAL_FileNameBuf, RTLD_LAZY)) == 0)
|
||||||
#else
|
#elseö
|
||||||
if ((handle = dlopen(LOCAL_FileNameBuf, RTLD_LAZY | RTLD_GLOBAL)) == 0)
|
if ((handle = dlopen(LOCAL_FileNameBuf, RTLD_LAZY | RTLD_GLOBAL)) == 0)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
@ -224,8 +224,8 @@ static Int LoadForeign(StringList ofiles, StringList libs, char *proc_name,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!*init_proc && LOCAL_ErrorMessage == NULL) {
|
if (!*init_proc && LOCAL_ErrorMessage == NULL) {
|
||||||
LOCAL_ErrorMessage = malloc(MAX_ERROR_MSG_SIZE);
|
char *buf = malloc(1058);
|
||||||
snprintf(LOCAL_ErrorMessage,MAX_ERROR_MSG_SIZE-1,
|
snprintf(buf,1058-1,
|
||||||
"Could not locate routine %s in %s: %s\n",
|
"Could not locate routine %s in %s: %s\n",
|
||||||
proc_name, LOCAL_FileNameBuf, dlerror());
|
proc_name, LOCAL_FileNameBuf, dlerror());
|
||||||
return LOAD_FAILLED;
|
return LOAD_FAILLED;
|
||||||
|
10
C/save.c
10
C/save.c
@ -164,19 +164,19 @@ static Int
|
|||||||
do_SYSTEM_ERROR_INTERNAL(yap_error_number etype, const char *msg)
|
do_SYSTEM_ERROR_INTERNAL(yap_error_number etype, const char *msg)
|
||||||
{
|
{
|
||||||
CACHE_REGS
|
CACHE_REGS
|
||||||
LOCAL_ErrorMessage = malloc(MAX_ERROR_MSG_SIZE+1);
|
char *buf = malloc(1043);
|
||||||
#if HAVE_SNPRINTF
|
#if HAVE_SNPRINTF
|
||||||
#if HAVE_STRERROR
|
#if HAVE_STRERROR
|
||||||
snprintf(LOCAL_ErrorMessage,MAX_ERROR_MSG_SIZE,"%s (%s when reading %s)", msg,
|
snprintf(buf,1043-1,"%s (%s when reading %s)", msg,
|
||||||
strerror(errno), LOCAL_FileNameBuf);
|
strerror(errno), LOCAL_FileNameBuf);
|
||||||
#else
|
#else
|
||||||
snprintf(LOCAL_ErrorSay,MAX_ERROR_MSG_SIZE,"%s, (system error %d when reading %s)",msg,errno,LOCAL_FileNameBuf);
|
snprintf(buf,1024-1,"%s, (system error %d when reading %s)",msg,errno,LOCAL_FileNameBuf);
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#if HAVE_STRERROR
|
#if HAVE_STRERROR
|
||||||
sprintf(LOCAL_ErrorSay,"%s, (%s when reading %s)",msg,strerror(errno),LOCAL_FileNameBuf);
|
snprintf(buf,1024-1,"%s, (%s when reading %s)",msg,strerror(errno),LOCAL_FileNameBuf);
|
||||||
#else
|
#else
|
||||||
sprintf(LOCAL_ErrorSay,"%s, (system error %d when reading %s)",msg,errno,LOCAL_FileNameBuf);
|
snprintf(buf,1024-1,"%s, (system error %d when reading %s)",msg,errno,LOCAL_FileNameBuf);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
LOCAL_Error_TYPE = etype;
|
LOCAL_Error_TYPE = etype;
|
||||||
|
@ -521,7 +521,6 @@ set_property(DIRECTORY PROPERTY CXX_STANDARD 11)
|
|||||||
|
|
||||||
# rpath stuff, hopefully it works
|
# rpath stuff, hopefully it works
|
||||||
# use, i.e. don't skip the full RPATH for the build tree
|
# use, i.e. don't skip the full RPATH for the build tree
|
||||||
# use, i.e. don't skip the full RPATH for the build tree
|
|
||||||
SET(CMAKE_SKIP_BUILD_RPATH FALSE)
|
SET(CMAKE_SKIP_BUILD_RPATH FALSE)
|
||||||
|
|
||||||
# when building, don't use the install RPATH already
|
# when building, don't use the install RPATH already
|
||||||
@ -596,6 +595,8 @@ set_target_properties(libYap
|
|||||||
PROPERTIES OUTPUT_NAME Yap
|
PROPERTIES OUTPUT_NAME Yap
|
||||||
)
|
)
|
||||||
|
|
||||||
|
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/packages/python/swig/yap4py)
|
||||||
|
|
||||||
if (PYTHONLIBS_FOUND AND SWIG_FOUND)
|
if (PYTHONLIBS_FOUND AND SWIG_FOUND)
|
||||||
add_subdirectory(packages/python/swig)
|
add_subdirectory(packages/python/swig)
|
||||||
|
|
||||||
@ -640,7 +641,7 @@ OPTION (WITH_CPLINT " Enable the cplint probabilistic language" ON)
|
|||||||
|
|
||||||
OPTION (WITH_HORUS " Enable the CLPBN and PFL probabilistic languages" ON)
|
OPTION (WITH_HORUS " Enable the CLPBN and PFL probabilistic languages" ON)
|
||||||
|
|
||||||
OPTION (WITH_HORUS " Enable documentation, requires doxygen-yap" ON)
|
OPTION (WITH_DOCS " Enable documentation, requires doxygen-yap" ON)
|
||||||
|
|
||||||
IF (WITH_CLPBN)
|
IF (WITH_CLPBN)
|
||||||
add_subDIRECTORY (packages/CLPBN)
|
add_subDIRECTORY (packages/CLPBN)
|
||||||
|
@ -8,9 +8,9 @@
|
|||||||
switch (op) {
|
switch (op) {
|
||||||
#ifdef YAP_JIT
|
#ifdef YAP_JIT
|
||||||
case _jit_handler:
|
case _jit_handler:
|
||||||
#endif
|
|
||||||
cl = NEXTOP(cl,J);
|
cl = NEXTOP(cl,J);
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
case _ensure_space:
|
case _ensure_space:
|
||||||
cl = NEXTOP(cl,Osbpa);
|
cl = NEXTOP(cl,Osbpa);
|
||||||
break;
|
break;
|
||||||
|
@ -1,6 +1,12 @@
|
|||||||
|
|
||||||
# This is a CMake example for Python
|
# This is a CMake example for Python
|
||||||
|
|
||||||
|
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/yap4py)
|
||||||
|
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/yap4py/include)
|
||||||
|
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/yap4py/prolog)
|
||||||
|
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/yap4py/prolog/os)
|
||||||
|
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/yap4py/prolog/pl)
|
||||||
|
|
||||||
INCLUDE(UseSWIG)
|
INCLUDE(UseSWIG)
|
||||||
|
|
||||||
include(FindPythonModule)
|
include(FindPythonModule)
|
||||||
@ -57,11 +63,6 @@ else()
|
|||||||
# )
|
# )
|
||||||
|
|
||||||
|
|
||||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/yap4py)
|
|
||||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/yap4py/include)
|
|
||||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/yap4py/prolog)
|
|
||||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/yap4py/prolog/os)
|
|
||||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/yap4py/prolog/pl)
|
|
||||||
|
|
||||||
add_custom_command( OUTPUT yap.i
|
add_custom_command( OUTPUT yap.i
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/packages/swig/yap.i .
|
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/packages/swig/yap.i .
|
||||||
|
Reference in New Issue
Block a user