]> Savannah Git Hosting - gnulib.git/commitdiff
execute tests: Fix compilation error on mingw (regression 2023-01-17).
authorBruno Haible <bruno@clisp.org>
Thu, 20 Apr 2023 11:23:52 +0000 (13:23 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 21 Apr 2023 15:29:30 +0000 (17:29 +0200)
* tests/test-execute-main.c (main): Don't use SIGPIPE if it's not
defined.

ChangeLog
tests/test-execute-main.c

index 134199a79fa7ff6384ed4511a703cfc5300adf38..7e088d0c4537f84521e12898ab577faedefa8467 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-04-20  Bruno Haible  <bruno@clisp.org>
+
+       execute tests: Fix compilation error on mingw (regression 2023-01-17).
+       * tests/test-execute-main.c (main): Don't use SIGPIPE if it's not
+       defined.
+
 2023-04-20  Bruno Haible  <bruno@clisp.org>
 
        assert-h, verify: Fix compilation error in C++ mode with MSVC 14.30.
index d8815f9f7ad85e28440f15ec62e36dbcd0369586..446c56bbc2177df81ba3ad81c6af778eccea793e 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of execute.
-   Copyright (C) 2020-2022 Free Software Foundation, Inc.
+   Copyright (C) 2020-2023 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -68,7 +68,9 @@ main (int argc, char *argv[])
      GNU make 4.4: <https://savannah.gnu.org/bugs/index.php?63307>.
      It causes the tests 3 and 4 to fail.  Work around it by resetting
      the signal handler for SIGPIPE to the default.  */
+  #ifdef SIGPIPE
   signal (SIGPIPE, SIG_DFL);
+  #endif
 
   switch (test)
     {