From f3222ea04f865bef853c83d4cc52f104bf3a802e Mon Sep 17 00:00:00 2001 From: Peter Bex Date: Fri, 18 Jan 2019 19:03:43 +0100 Subject: [PATCH] Do not use ###text and ###append as if they were keywords After the change to drop qualified symbols, ###text no longer reads the same as #:text. So the default modes for call-with-{input,output}-pipe and the comparison in open-{input,output}-file* for #:append no longer work. Reported by Mario Domenech Goulart --- posix-common.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/posix-common.scm b/posix-common.scm index 0b675cea..bfd77941 100644 --- a/posix-common.scm +++ b/posix-common.scm @@ -448,11 +448,11 @@ EOF (let () (define (mode inp m loc) (##sys#make-c-string - (cond [(pair? m) + (cond ((pair? m) (let ([m (car m)]) (case m - [(###append) (if (not inp) "a" (##sys#error "invalid mode for input file" m))] - [else (##sys#error "invalid mode argument" m)] ) ) ] + ((#:append) (if (not inp) "a" (##sys#error "invalid mode for input file" m))) + (else (##sys#error "invalid mode argument" m)) ) ) ) [inp "r"] [else "w"] ) loc) ) @@ -707,7 +707,7 @@ EOF (set! chicken.process#pipe/buf _pipe_buf) (let () - (define (mode arg) (if (pair? arg) (##sys#slot arg 0) '###text)) + (define (mode arg) (if (pair? arg) (##sys#slot arg 0) #:text)) (define (badmode m) (##sys#error "illegal input/output mode specifier" m)) (define (check loc cmd inp r) (if (##sys#null-pointer? r) -- 2.11.0