aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-08-21 14:28:03 +0200
committerLudovic Courtès <ludo@gnu.org>2018-08-21 23:27:08 +0200
commita81b59b1bf99255cf78d736c3d2aa28eb1e9bbdf (patch)
tree9fa4c53fa6d60b2978e7d40d7e3d513296e4fe8e
parent6cd2c4a83cc2baa387d04979b489bee2429cc39d (diff)
downloadguix-a81b59b1bf99255cf78d736c3d2aa28eb1e9bbdf.tar
guix-a81b59b1bf99255cf78d736c3d2aa28eb1e9bbdf.tar.gz
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'.
-rw-r--r--guix/inferior.scm5
1 files changed, 4 insertions, 1 deletions
diff --git a/guix/inferior.scm b/guix/inferior.scm
index 629c2c4313..05c8d65deb 100644
--- a/guix/inferior.scm
+++ b/guix/inferior.scm
@@ -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))))