summaryrefslogtreecommitdiff
path: root/module
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2018-08-02 10:05:17 -0400
committerMark H Weaver <mhw@netris.org>2018-08-02 10:14:03 -0400
commit4c91de3e45e7c98d5b7c484509fe5c59bd70f9fd (patch)
tree1395c451f442a69012af3b96d5d99aa8fdbb04f4 /module
parent71f536c3d8fa0097d52228387d96abbc8b968d02 (diff)
Fix R6RS call-with-{input,output}-file to open textual ports.
Fixes <https://bugs.gnu.org/32329>. Reported and diagnosed by Göran Weinholt <goran@weinholt.se>. * module/rnrs/io/simple.scm (call-with-input-file) (call-with-output-file): Use 'open-{input,output}-file' to open the port in textual mode. Previously 'open-file-{input,output}-port' was used, which opened the port in binary mode.
Diffstat (limited to 'module')
-rw-r--r--module/rnrs/io/simple.scm6
1 files changed, 3 insertions, 3 deletions
diff --git a/module/rnrs/io/simple.scm b/module/rnrs/io/simple.scm
index 5eb396f0e..0d778a9f9 100644
--- a/module/rnrs/io/simple.scm
+++ b/module/rnrs/io/simple.scm
@@ -1,6 +1,6 @@
;;; simple.scm --- The R6RS simple I/O library
-;; Copyright (C) 2010, 2011, 2014 Free Software Foundation, Inc.
+;; Copyright (C) 2010, 2011, 2014, 2018 Free Software Foundation, Inc.
;;
;; This library is free software; you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public
@@ -118,10 +118,10 @@
(define display (@@ (rnrs io ports) display))
(define (call-with-input-file filename proc)
- (call-with-port (open-file-input-port filename) proc))
+ (call-with-port (open-input-file filename) proc))
(define (call-with-output-file filename proc)
- (call-with-port (open-file-output-port filename) proc))
+ (call-with-port (open-output-file filename) proc))
(define (with-input-from-file filename thunk)
(call-with-input-file filename