diff --git a/C/scanner.c b/C/scanner.c index 353044052..e5a786240 100755 --- a/C/scanner.c +++ b/C/scanner.c @@ -1119,7 +1119,11 @@ Term Yap_scan_num(StreamDesc *inp) { LOCAL_Error_TYPE = RESOURCE_ERROR_TRAIL; return 0; } +#if HAVE_ISWBLANK while (iswblank( ch = getchr(inp) )); +#else + while (isspace( ch = getchr(inp) )); +#endif TokEntry *tokptr = (TokEntry *)AllocScannerMemory(sizeof(TokEntry)); tokptr->TokPos = GetCurInpPos(inp); if (ch == '-') { diff --git a/C/text.c b/C/text.c index da87c8382..a71d46679 100644 --- a/C/text.c +++ b/C/text.c @@ -888,7 +888,8 @@ static unsigned char *concat(int n, unsigned char *sv[] USES_REGS) { buf = Malloc(room + 1); buf0 = (unsigned char *) buf; for (i = 0; i < n; i++) { - buf = stpcpy(buf, (char *) sv[i]); + buf = strcpy(buf, (char *) sv[i]); + buf += strlen( sv[i] ); } return buf0; } diff --git a/CMakeLists.txt b/CMakeLists.txt index de661f970..c026ff75e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -106,8 +106,6 @@ add_library( # Sets the name of the library. include(libYap NO_POLICY_SCOPE) -target_link_libraries(libYap m pthread) - if (USE_READLINE) target_link_libraries(libYap ${READLINE_LIBRARIES}) endif (USE_READLINE) diff --git a/cmake/Config.cmake b/cmake/Config.cmake index d89c33f9a..b2f59a456 100644 --- a/cmake/Config.cmake +++ b/cmake/Config.cmake @@ -254,6 +254,7 @@ check_symbol_exists(ffsll HAVE_FFSLL) check_function_exists(__builtin_ffsll HAVE___BUILTIN_FFSLL) check_function_exists(fgetpos HAVE_FGETPOS) check_function_exists(finite HAVE_FINITE) +check_function_exists(iswblank HAVE_ISWBLANK) check_symbol_exists(flsl HAVE_FLSL) check_symbol_exists(flsll HAVE_FLSLL) check_function_exists(fmemopen HAVE_FMEMOPEN) diff --git a/config.h.cmake b/config.h.cmake index bda81dcbb..02f74bf2b 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -581,6 +581,11 @@ function. */ #cmakedefine HAVE_ISNAN ${HAVE_ISNAN} #endif +/* Define to 1 if you have the `isnan' function. */ +#ifndef HAVE_ISWBLANK +#cmakedefine HAVE_ISWBLANK ${HAVE_ISWBLANK} +#endif + /* Define to 1 if you have the header file. */ #ifndef HAVE_JUDY_H #cmakedefine HAVE_JUDY_H ${HAVE_JUDY_H} diff --git a/packages/python/examples/plot.yap b/packages/python/examples/plot.yap index a7e5f8475..7abc709e0 100644 --- a/packages/python/examples/plot.yap +++ b/packages/python/examples/plot.yap @@ -9,4 +9,3 @@ main :- Plt.ylabel(`some numbers`), Plt.show() ). -