diff options
author | Andy Wingo <wingo@pobox.com> | 2017-02-14 21:57:35 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2017-02-14 22:03:21 +0100 |
commit | 69ca2bb2217303b2556b131f3995ca4f6af81234 (patch) | |
tree | a8ef7e23995f35b974db988254aabe5a37c72922 /libguile/ioext.c | |
parent | 2c02bdda191eecd998c33b00c56752b8ec7378ab (diff) | |
download | guile-69ca2bb2217303b2556b131f3995ca4f6af81234.tar.gz |
Elide syscalls in fdes->port
* libguile/fports.h (scm_t_fport): Add options field.
(SCM_FDES_RANDOM_P): Deprecate.
(scm_i_fdes_to_port): Add options argument.
* libguile/fports.c (scm_i_fdes_to_port): Add options argument. Only
verify FD if SCM_FPORT_OPTION_VERIFY is there.
(scm_fdes_to_port, scm_open_file_with_encoding): Adapt to
scm_i_fdes_to_port changes.
(fport_random_access_p): Don't try to seek if NOT_SEEKABLE option is
set.
* libguile/deprecated.h:
* libguile/deprecated.c (SCM_FDES_RANDOM_P): Deprecate.
* NEWS: Add deprecation.
* libguile/filesys.c:
* libguile/ioext.c:
* libguile/posix.c:
* libguile/read.c:
* libguile/socket.c: Adapt callers.
Diffstat (limited to 'libguile/ioext.c')
-rw-r--r-- | libguile/ioext.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libguile/ioext.c b/libguile/ioext.c index 43c915a09..4038fd54f 100644 --- a/libguile/ioext.c +++ b/libguile/ioext.c @@ -226,7 +226,8 @@ SCM_DEFINE (scm_fdopen, "fdopen", 2, 0, 0, #define FUNC_NAME s_scm_fdopen { return scm_i_fdes_to_port (scm_to_int (fdes), - scm_i_mode_bits (modes), SCM_BOOL_F); + scm_i_mode_bits (modes), SCM_BOOL_F, + SCM_FPORT_OPTION_VERIFY); } #undef FUNC_NAME |