~ chicken-core (master) f6896cce8130bb758213c4b8483089c79fb029ca


commit f6896cce8130bb758213c4b8483089c79fb029ca
Author:     felix <felix@call-with-current-continuation.org>
AuthorDate: Sun Aug 9 22:40:45 2026 +0200
Commit:     felix <felix@call-with-current-continuation.org>
CommitDate: Sun Aug 9 22:40:45 2026 +0200

    drop dependency on chicken.errno, avoids loading posix unit
    (this caused very weird behaviour with weak refs, reported by kon lovett, still needs to be investigated...)

diff --git a/file.scm b/file.scm
index 1eae1b7b..fc793101 100644
--- a/file.scm
+++ b/file.scm
@@ -134,7 +134,6 @@ EOF
 (import scheme
 	chicken.base
 	chicken.condition
-	chicken.errno
 	chicken.fixnum
 	chicken.foreign
 	chicken.io
@@ -275,7 +274,7 @@ EOF
 
 (define (delete-file* file)
   (handle-exceptions exn
-    (if (eq? errno/noent (get-condition-property exn 'exn 'errno #f))
+    (if (eq? (foreign-value "ENOENT" int) (get-condition-property exn 'exn 'errno #f))
         #f
         (signal exn))
     (delete-file file)))
Trap