]> Savannah Git Hosting - gnulib.git/commitdiff
pipe-filter-gi: Fix test failure on native Windows.
authorBruno Haible <bruno@clisp.org>
Sun, 11 Sep 2022 00:53:07 +0000 (02:53 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 11 Sep 2022 00:59:05 +0000 (02:59 +0200)
* lib/pipe-filter-aux.h (write): Redefine on native Windows.

ChangeLog
lib/pipe-filter-aux.h

index 8f5fdf8c8e01e1c8ac95388ae5fdf94a06a85ae8..bc3c9fb4de00d0f0d162037fde96216ae2145891 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2022-09-10  Bruno Haible  <bruno@clisp.org>
+
+       pipe-filter-gi: Fix test failure on native Windows.
+       * lib/pipe-filter-aux.h (write): Redefine on native Windows.
+
 2022-09-10  Bruno Haible  <bruno@clisp.org>
 
        stdbool C++ tests: Fix for C++20.
index a6864c66c55b2c897044383df563b9767a02e812..ed6da51f3c6b62f64f188680f7265d9066bc5f71 100644 (file)
@@ -23,6 +23,17 @@ _GL_INLINE_HEADER_BEGIN
 # define PIPE_FILTER_AUX_INLINE _GL_INLINE
 #endif
 
+#if defined _WIN32 && ! defined __CYGWIN__
+/* In the pipe-filter-* modules we want to use the write() function that is
+   not overridden to emulate SIGPIPE behaviour, because we don't want force
+   the caller to do
+     signal (SIGPIPE, SIG_DFL);
+   To reproduce the problem, use a gnulib testdir for the modules
+   'pipe-filter-gi', 'write', 'sigpipe'.  */
+# undef write
+# define write _write
+#endif
+
 #ifndef SSIZE_MAX
 # define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2))
 #endif