janneke pushed a commit to branch wip-mingw in repository guile. commit 38269aeb111698f8ece72d8d9cba26f37cd1ab93 Author: Jan (janneke) Nieuwenhuizen <jann...@gnu.org> AuthorDate: Tue Apr 13 14:44:22 2021 +0200
Revert "Add 'set-binary/text-mode!' procedure for MinGW." This reverts commit f783ef60409e774ba50a53384697ac7bebb31b84. --- libguile/ports.c | 41 ----------------------------------------- libguile/ports.h | 1 - module/ice-9/ports.scm | 1 - 3 files changed, 43 deletions(-) diff --git a/libguile/ports.c b/libguile/ports.c index b534ff0..c25c207 100644 --- a/libguile/ports.c +++ b/libguile/ports.c @@ -4134,40 +4134,6 @@ SCM_DEFINE (scm_sys_make_void_port, "%make-void-port", 1, 0, 0, } #undef FUNC_NAME -SCM_DEFINE (scm_set_binary_text_mode_x, "set-binary/text-mode!", 2, 0, 0, - (SCM port, SCM mode), - "On MinGW, set the binary/text mode for @var{port}. @var{mode} can be one\n" - "of the following:\n" - "@table @code\n" - "@item O_BINARY\n" - "binary mode\n" - "@item O_TEXT\n" - "text mode\n" - "@end table\n\n" - "Only certain types of ports are supported, most importantly\n" - "file ports. On POSIX, this is a no-op.") -#define FUNC_NAME s_scm_set_binary_text_mode_x -{ - int cmode = 0; - int fd; - - SCM_VALIDATE_PORT (1, port); - if (scm_is_integer (port)) - fd = scm_to_int (port); - else - fd = SCM_FPORT_FDES (port); - - SCM_VALIDATE_NUMBER (2, mode); - cmode = scm_to_int (mode); - -#if __MINGW32__ - _setmode (fd, cmode); -#endif - - return SCM_UNSPECIFIED; -} -#undef FUNC_NAME - @@ -4207,13 +4173,6 @@ scm_init_ports (void) sym_escape = scm_from_latin1_symbol ("escape"); sym_error = scm_from_latin1_symbol ("error"); -#ifdef O_BINARY - scm_c_define ("O_BINARY", scm_from_int (O_BINARY)); -#endif -#ifdef O_TEXT - scm_c_define ("O_TEXT", scm_from_int (O_TEXT)); -#endif - trampoline_to_c_read_subr = scm_c_make_gsubr ("port-read", 4, 0, 0, (scm_t_subr) trampoline_to_c_read); diff --git a/libguile/ports.h b/libguile/ports.h index c40b18d..44ef29d 100644 --- a/libguile/ports.h +++ b/libguile/ports.h @@ -218,7 +218,6 @@ SCM_API SCM scm_drain_input (SCM port); SCM_API void scm_end_input (SCM port); SCM_API SCM scm_force_output (SCM port); SCM_API void scm_flush (SCM port); -SCM_API SCM scm_set_binary_text_mode_x (SCM port, SCM mode); SCM_INTERNAL SCM scm_port_random_access_p (SCM port); SCM_INTERNAL SCM scm_port_read_buffering (SCM port); diff --git a/module/ice-9/ports.scm b/module/ice-9/ports.scm index f6fd560..b219fee 100644 --- a/module/ice-9/ports.scm +++ b/module/ice-9/ports.scm @@ -69,7 +69,6 @@ port-for-each flush-all-ports %make-void-port - set-binary/text-mode! ;; Definitions from fports.c. open-file