~ chicken-core (master) b3dae2f822da3bbe6419bcf9792048f9e3072dee


commit b3dae2f822da3bbe6419bcf9792048f9e3072dee
Author:     Peter Bex <peter@more-magic.net>
AuthorDate: Sun Oct 4 10:07:52 2026 +0200
Commit:     felix <felix@call-with-current-continuation.org>
CommitDate: Sun Oct 4 11:02:52 2026 +0200

    Return void instead of errno in close-*port
    
    Reported by "ayushnix" on IRC
    
    Signed-off-by: felix <felix@call-with-current-continuation.org>

diff --git a/library.scm b/library.scm
index 3d8af3eb..ce761505 100644
--- a/library.scm
+++ b/library.scm
@@ -4544,7 +4544,8 @@ EOF
     (let ((direction (if inp 1 2)))
       (when (##core#inline "C_port_openp" port direction)
 	(##sys#setislot port 8 (fxand (##sys#slot port 8) (fxnot direction)))
-	((##sys#slot (##sys#slot port 2) 4) port direction))))
+	((##sys#slot (##sys#slot port 2) 4) port direction)
+        (##sys#void))))
 
   (set! scheme#open-input-file (lambda (name . mode) (open name #t mode 'open-input-file)))
   (set! scheme#open-output-file (lambda (name . mode) (open name #f mode 'open-output-file)))
@@ -8216,7 +8217,8 @@ static C_word C_curdir(C_word buf, C_word size) {
     ((##sys#slot (##sys#slot port 2) 4) port 1))
   (when (##core#inline "C_port_openp" port 2)
     ((##sys#slot (##sys#slot port 2) 4) port 2))
-  (##sys#setislot port 8 0)))
+  (##sys#setislot port 8 0)
+  (##sys#void)))
 
 (set! scheme#call-with-port
  (lambda (port proc)
Trap