inferior: Adjust for Guile 2.0.

Partly fixes <https://bugs.gnu.org/32326>.
Reported by Michael Bowcutt <mbowcutt@riseup.net>.

* guix/inferior.scm (open-inferior): Wrap 'setvbuf' call in 'cond-expand'.
This commit is contained in:
Ludovic Courtès 2018-08-21 14:28:03 +02:00
parent 6cd2c4a83c
commit a81b59b1bf
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 4 additions and 1 deletions

View File

@ -87,7 +87,10 @@ equivalent. Return #f if the inferior could not be launched."
(define pipe
(inferior-pipe directory command))
(setvbuf pipe _IOLBF)
(cond-expand
((and guile-2 (not guile-2.2)) #t)
(else (setvbuf pipe 'line)))
(match (read pipe)
(('repl-version 0 rest ...)
(let ((result (inferior 'pipe pipe (cons 0 rest))))