summaryrefslogtreecommitdiff
path: root/am
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2016-04-14 15:44:34 +0200
committerAndy Wingo <wingo@pobox.com>2016-04-15 14:07:02 +0200
commit44b3342c4d5ebd4bbf21c7c7608a5f1a53ba0eb4 (patch)
treea396d32e4088e9dab6588621143456356254ba34 /am
parent5e470ea48f054aebad0e1000453a6c84e59cf460 (diff)
Load port bindings in separate (ice-9 ports) module
* module/ice-9/ports.scm: New file. * am/bootstrap.am (SOURCES): Add ice-9/ports.scm. * libguile/fports.c (scm_init_ice_9_fports): New function. (scm_init_fports): Arrange for scm_init_ice_9_fports to be called via load-extension, and load snarfed things there. Move open-file definition early, to allow ports to bootstrap. * libguile/ioext.c (scm_init_ice_9_ioext): New function. (scm_init_ioext): Similarly, register scm_init_ice_9_ioext as an extension. * libguile/ports.c (scm_set_current_input_port) (scm_set_current_output_port, scm_set_current_error_port): Don't define Scheme bindings; do that in Scheme. * libguile/ports.c (scm_i_set_default_port_encoding): (scm_i_default_port_encoding, scm_i_default_port_conversion_handler): (scm_i_set_default_port_conversion_handler): Since we now init encoding early, remove the "init" flags on these encoding/strategy vars. (scm_init_ice_9_ports): New function. (scm_init_ports): Register scm_init_ice_9_ports extension, and define some bindings needed by the bootstrap. * module/Makefile.am (SOURCES): Add ice-9/ports.scm. * module/ice-9/boot-9.scm: Remove code that's not on the boot path, moving it to ice-9/ports.scm. At the end, load (ice-9 ports). * module/ice-9/psyntax.scm (include): Use close-port instead of close-input-port. * module/ice-9/psyntax-pp.scm (include): Regenerate.
Diffstat (limited to 'am')
-rw-r--r--am/bootstrap.am1
1 files changed, 1 insertions, 0 deletions
diff --git a/am/bootstrap.am b/am/bootstrap.am
index d613d7f02..0eaa87b06 100644
--- a/am/bootstrap.am
+++ b/am/bootstrap.am
@@ -123,6 +123,7 @@ SOURCES = \
system/base/ck.scm \
\
ice-9/boot-9.scm \
+ ice-9/ports.scm \
ice-9/r5rs.scm \
ice-9/deprecated.scm \
ice-9/binary-ports.scm \