~ chicken-core (chicken-5) a25d2006bdbcd794a5ce3002c04b618f35667f7c


commit a25d2006bdbcd794a5ce3002c04b618f35667f7c
Author:     Peter Bex <peter.bex@xs4all.nl>
AuthorDate: Thu Jun 19 20:06:19 2014 +0200
Commit:     Christian Kellermann <ckeen@pestilenz.org>
CommitDate: Thu Jun 19 21:05:42 2014 +0200

    Fix #1133 by adding ports (and dropping extras) in unit tcp's "uses" declaration
    
    This problem got caused by 4eafceedddf34dff83c05eb6001214461949e7ce
    (the fix for #999), because tcp uses make-input-port.  This is
    provided by ports, which got pulled in through extras which tcp
    does depend upon.
    
    Unit TCP doesn't really use anything from extras, so we now declare it
    to depend on ports instead.  Ports pulls in extras, so there's no way
    to easily verify that TCP isn't using anything from extras except by
    grepping the sources for procedures.  We should really try to switch
    to modules in core, that would've easily caught this!
    
    Reported by Kristian Lein-Mathisen
    
    Signed-off-by: Christian Kellermann <ckeen@pestilenz.org>

diff --git a/NEWS b/NEWS
index 74f06980..a9ded9e5 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,9 @@
 - Core libraries
   - alist-ref from unit data-structures now gives an error when passed
     a non-list, for consistency with assv/assq/assoc.
+  - Unit tcp now implicitly depends on ports instead of extras.
+     This may break programs which don't use modules and forgot to
+     require extras but use procedures from it.
 
 - Unit lolevel:
   - Restore long-lost but still documented "vector-like?" procedure (#983)
diff --git a/tcp.scm b/tcp.scm
index d0ac20e9..cf81792f 100644
--- a/tcp.scm
+++ b/tcp.scm
@@ -27,7 +27,7 @@
 
 (declare
   (unit tcp)
-  (uses extras scheduler)
+  (uses ports scheduler)
   (disable-interrupts) ; Avoid race conditions around errno/WSAGetLastError
   (export tcp-close tcp-listen tcp-connect tcp-accept tcp-accept-ready? ##sys#tcp-port->fileno tcp-listener? tcp-addresses
 	  tcp-abandon-port tcp-listener-port tcp-listener-fileno tcp-port-numbers tcp-buffer-size
Trap