From 4343f3926355f55fc023203c992527fc34bf609e Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Sat, 31 Dec 2022 10:46:37 +0000 Subject: win32: revised implementation of setlinebuf(3) Microsoft Windows' setvbuf() doesn't support line buffering and doesn't accept 0 as a valid value for the buffer size argument. Replace the old macro definition with an implementation that doesn't do anything. It's only used if debug is enabled in ash so there's no effect on the default build. --- include/mingw.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/mingw.h b/include/mingw.h index d274b7e1c..4c3354864 100644 --- a/include/mingw.h +++ b/include/mingw.h @@ -142,7 +142,7 @@ pid_t mingw_fork_compressor(int fd, const char *compressor, const char *mode); #define popen mingw_popen #define pclose mingw_pclose -#define setlinebuf(fd) setvbuf(fd, (char *) NULL, _IOLBF, 0) +IMPL(setlinebuf, void, ,FILE * UNUSED_PARAM) /* * ANSI emulation wrappers -- cgit v1.2.3-55-g6feb