summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2022-09-11 02:53:07 +0200
committerBruno Haible <bruno@clisp.org>2022-09-11 02:53:07 +0200
commit0220f372974b46fa1a2fd5e3f39f27ac18117cb6 (patch)
tree4522430ee34dd0a94357123d55aa7f0984e62678
parent60e9cc86d91d23465bb79751c772ec87d05bae13 (diff)
downloadgnulib-0220f372974b46fa1a2fd5e3f39f27ac18117cb6.tar.gz
pipe-filter-gi: Fix test failure on native Windows.
* lib/pipe-filter-aux.h (write): Redefine on native Windows.
-rw-r--r--ChangeLog5
-rw-r--r--lib/pipe-filter-aux.h11
2 files changed, 16 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 5dda053d58..38df593ab6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
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 compilation error with MSVC14 (regr. from today).
* tests/test-stdbool-c++.cc (s): Choose field names that are not type
names.
diff --git a/lib/pipe-filter-aux.h b/lib/pipe-filter-aux.h
index cda8ff7c34..df7dac6321 100644
--- a/lib/pipe-filter-aux.h
+++ b/lib/pipe-filter-aux.h
@@ -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