diff options
author | Ludovic Courtès <ludo@gnu.org> | 2018-08-21 14:28:03 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2018-08-21 23:27:08 +0200 |
commit | a81b59b1bf99255cf78d736c3d2aa28eb1e9bbdf (patch) | |
tree | 9fa4c53fa6d60b2978e7d40d7e3d513296e4fe8e | |
parent | 6cd2c4a83cc2baa387d04979b489bee2429cc39d (diff) | |
download | guix-a81b59b1bf99255cf78d736c3d2aa28eb1e9bbdf.tar.gz guix-a81b59b1bf99255cf78d736c3d2aa28eb1e9bbdf.zip |
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.scm | 5 |
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)))) |