# Ann: SWI-Prolog 8.5.6

**URL:** https://swi-prolog.discourse.group/t/ann-swi-prolog-8-5-6/4934
**Category:** Releases
**Created:** [January 23, 2022, 8:05pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-8-5-6/4934 "2022-01-23T20:05:26Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)
#### Post date: [January 23, 2022, 8:05pm UTC](https://swi-prolog.discourse.group/t/ann-swi-prolog-8-5-6/4934/1 "2022-01-23T20:05:26Z")

</div>

Dear SWI-Prolog user,

SWI-Prolog 8.5.6 is ready for download. Most of the updates concern  
portability issues. Notably Matt Lilley updated the SSL interface to  
compile cleanly using OpenSSL 3.x. Thanks! Most patches only affect a  
small minority of the users. Please examine the detailed log below.

```
Enjoy --- Jan

```

# SWI-Prolog Changelog since version 8.5.5

- FIXED: call\_residue\_vars/2: if GC performs early reset on an attvar  
it is incorrectly considered residual.

- DOC: Fixed PL\_get\_dict\_key() docs. Matthijs van Otterdijk.

- ENHANCED: Use mallinfo2 when available. By @mgodan1.

- CLEANUP: Remove code from DCG translation that moves unifications  
immediately following the neck of the clause into the head.  
Since this optimization is done by the compiler anyway this is no  
longer needed. This allows for creating SSU DCG rules on top of the  
existing compilation.

- ADDED: valid\_term\_position/2 to help debug term\_expansion/4

- DOC: Fixed error in CMake build script for the manual.

- DOC: Fixed LaTeX errors.

- FIXED: Another postfix operator issue as a regression to recent fixes  
on postfix operator handling. Affects the R interface (reported  
by Nicos Angelopoulos for real, but probably rserve\_client is also  
victim).

- DOC: clarify module issues wrt. macro expansion and explain what is  
affected by import modules.

- DOC: read\_term/2: quasi quotation layout

- TEST: read\_term/2 subterm\_position option. Contributed by Peter  
Ludemann.

- PORT: Added missing include for \<errno.h\>

- FIXED: Possible crash in copy\_term/4 and copy\_term\_nat/4.

- ADDED: mapsubterms\_var/3 as an alternative to mapsubterms/3 that also  
maps variables.

- ENHANCED: If a package is available both globally and locally (per  
user), ignore the global one silently rather than with a warning.

- ADDED: pack\_install/2: option global(Boolean) to explicitly install  
a package for the user or globally.

- BUILD: Include debug info with PGO build.

- CMAKE: let Threads use -pthread instead of -lpthread This can link  
other needed libraries, and fix building on riscv64.

- FIXED: Avoid warnings about uncaught exceptions from write\_length/3  
in print\_term/2.

- ENHANCED: Edits commit 18690d80fbdc842a5bad3da1fb81a083e55b1b24.  
Forgotten amend and already pushed to origin.

- FIXED: qsave\_program/2: add missing load\_module for shlib The  
predicate current\_foreign\_library is used which is from the module  
shlib. Unfortunately it is not imported though, which makes it  
impossible to use qsave without autoloading enabled.

## Package bench

- BUILD: Fixed running the benchmarks if GMP is not provided (perfect.pl  
causes an integer overflow).

## Package clib

- ENHANCED: Use mallinfo2() when available. By @mgodan1.

- FIXED: #pragma inside an if () else goes wrong on gcc.

- PORT: Silence deprecated vfork() message.

## Package jpl

- CLEANUP: Type correctness in debug messages.

## Package ssl

- PORT: Make the package use the OpenSSL 3.0 API rather than  
the deprecated 1.1 API when compiled against OpenSSL 3. Patches  
521519daa44b48efa0292cf0d29d741347b8c1bf..ac018967bfdeb4d534a247f879909c6d4a4e3199  
Contributed by Matt Lilley.

- PORT: Silence SecKeyChainOPen deprecation for MacOS.

## Package xpce

- CLEANUP: workaround to suppress a false positive warning from gcc-11  
and avoid a pragma at the same time

- FIXED: Transfer selection from xpce as UTF-8 when requested using a  
media type (`text/plain;charset=utf-8`).

- FIXED: Handle new message elements for generating feedback in PceEmacs.

- FIXED: pceemacs\_client.pl for MacOS
