From c1ee5b68738304906f2071fcbed40cca9c6447c4 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Tue, 21 Jun 2022 08:06:30 -0700 Subject: streams: remove old code for popen on MingGW. This is vestigial code from a time when TXR supported being compiled with MinGW. Except in the case of the functions run and sh, which are implementable without fork on Cygwin using the spawn family of functions, there won't be any fallback; if HAVE_FORK_STUFF is zero or missing, then certain functions will be absent. * stream.c (struct stdio_handle): Do not define a pid member if we don't HAVE_FORK_STUFF. (se_pclose): Function removed; we won't be using any non-POSIX platforms popen/pclose. (pipe_close): Don't call the removed se_pclose. (make_pipe_stream): Function removed. (fds_subst, fds_swizzle): Don't define these if HAVE_FORK_STUFF is absent, and so is HAVE_WSPAWN and HAVE_SPAWN. They are now only needed by the version of the run function that uses spawn or wspawn. (open_command, open_process): Remove the versions of these function based on popen. (string_extend_count, win_escape_cmd, win_escape_arg, win_make_cmdline): Remove these functions used by the above open_process; we have no need for encoding arguments into a Windows command line string, since the Cygwin/Cygnal libraries do that for us in their spawn and exec functions. * stream.h (make_pipe_stream): Function removed. * utf8.[ch] (w_popen): Function removed. --- utf8.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'utf8.h') diff --git a/utf8.h b/utf8.h index ce8b7916..692cb330 100644 --- a/utf8.h +++ b/utf8.h @@ -52,9 +52,6 @@ void utf8_decoder_init(utf8_decoder_t *); wint_t utf8_decode(utf8_decoder_t *,int (*get)(mem_t *ctx), mem_t *ctx); FILE *w_fopen(const wchar_t *, const wchar_t *); -#if !HAVE_FORK_STUFF -FILE *w_popen(const wchar_t *, const wchar_t *); -#endif FILE *w_freopen(const wchar_t *, const wchar_t *, FILE *); FILE *w_fdopen(int, const wchar_t *); int w_remove(const wchar_t *); -- cgit v1.2.3