annotate tests/test-pipe2.c @ 40231:9b3c79fdfe0b

strtod: fix clash with strtold Problem reported for RHEL 5 by Jesse Caldwell (Bug#34817). * lib/strtod.c (compute_minus_zero, minus_zero): Simplify by remving the macro / external variable, and having just a function. User changed. This avoids the need for an external variable that might clash.
author Paul Eggert <eggert@cs.ucla.edu>
date Mon, 11 Mar 2019 16:40:29 -0700
parents b06060465f09
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11871
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
1 /* Test of pipe2.
40057
b06060465f09 maint: Run 'make update-copyright'
Paul Eggert <eggert@cs.ucla.edu>
parents: 19595
diff changeset
2 Copyright (C) 2009-2019 Free Software Foundation, Inc.
11871
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
3
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
4 This program is free software; you can redistribute it and/or modify
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
5 it under the terms of the GNU General Public License as published by
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
6 the Free Software Foundation; either version 3, or (at your option)
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
7 any later version.
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
8
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
9 This program is distributed in the hope that it will be useful,
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
12 GNU General Public License for more details.
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
13
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
14 You should have received a copy of the GNU General Public License
19190
9759915b2aca all: prefer https: URLs
Paul Eggert <eggert@cs.ucla.edu>
parents: 18883
diff changeset
15 along with this program; if not, see <https://www.gnu.org/licenses/>. */
11871
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
16
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
17 #include <config.h>
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
18
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
19 #include <unistd.h>
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
20
12489
33ab12a7cea2 tests: add signature checks
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
21 #include "signature.h"
33ab12a7cea2 tests: add signature checks
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
22 SIGNATURE_CHECK (pipe2, int, (int[2], int));
33ab12a7cea2 tests: add signature checks
Eric Blake <ebb9@byu.net>
parents: 12421
diff changeset
23
11871
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
24 #include <fcntl.h>
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
25 #include <stdbool.h>
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
26
19595
beb2ad957aca Simplify code. Drop support for Borland C++ on Windows.
Bruno Haible <bruno@clisp.org>
parents: 19484
diff changeset
27 #if defined _WIN32 && ! defined __CYGWIN__
16214
ec738d6aeef5 Talk about "native Windows API", not "Win32".
Bruno Haible <bruno@clisp.org>
parents: 16201
diff changeset
28 /* Get declarations of the native Windows API functions. */
11871
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
29 # define WIN32_LEAN_AND_MEAN
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
30 # include <windows.h>
15752
b86e9061a6d0 New module 'msvc-nothrow'. Makes _get_osfhandle safe on MSVC 9.
Bruno Haible <bruno@clisp.org>
parents: 14856
diff changeset
31 /* Get _get_osfhandle. */
18883
19886582ca8d Implement a way to opt out from MSVC support.
Bruno Haible <bruno@clisp.org>
parents: 18626
diff changeset
32 # if GNULIB_MSVC_NOTHROW
19886582ca8d Implement a way to opt out from MSVC support.
Bruno Haible <bruno@clisp.org>
parents: 18626
diff changeset
33 # include "msvc-nothrow.h"
19886582ca8d Implement a way to opt out from MSVC support.
Bruno Haible <bruno@clisp.org>
parents: 18626
diff changeset
34 # else
19886582ca8d Implement a way to opt out from MSVC support.
Bruno Haible <bruno@clisp.org>
parents: 18626
diff changeset
35 # include <io.h>
19886582ca8d Implement a way to opt out from MSVC support.
Bruno Haible <bruno@clisp.org>
parents: 18626
diff changeset
36 # endif
11871
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
37 #endif
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
38
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
39 #include "binary-io.h"
12496
a48d3d749ca5 Refactor common macros used in tests.
Bruno Haible <bruno@clisp.org>
parents: 12489
diff changeset
40 #include "macros.h"
14856
c593fd7d2ab9 pipe2: Remove dependency on 'nonblocking' module.
Bruno Haible <bruno@clisp.org>
parents: 14535
diff changeset
41 #if GNULIB_NONBLOCKING
c593fd7d2ab9 pipe2: Remove dependency on 'nonblocking' module.
Bruno Haible <bruno@clisp.org>
parents: 14535
diff changeset
42 # include "nonblocking.h"
c593fd7d2ab9 pipe2: Remove dependency on 'nonblocking' module.
Bruno Haible <bruno@clisp.org>
parents: 14535
diff changeset
43 #endif
11871
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
44
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
45 /* Return true if FD is open. */
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
46 static bool
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
47 is_open (int fd)
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
48 {
19595
beb2ad957aca Simplify code. Drop support for Borland C++ on Windows.
Bruno Haible <bruno@clisp.org>
parents: 19484
diff changeset
49 #if defined _WIN32 && ! defined __CYGWIN__
16214
ec738d6aeef5 Talk about "native Windows API", not "Win32".
Bruno Haible <bruno@clisp.org>
parents: 16201
diff changeset
50 /* On native Windows, the initial state of unassigned standard file
11871
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
51 descriptors is that they are open but point to an
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
52 INVALID_HANDLE_VALUE, and there is no fcntl. */
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
53 return (HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE;
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
54 #else
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
55 # ifndef F_GETFL
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
56 # error Please port fcntl to your platform
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
57 # endif
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
58 return 0 <= fcntl (fd, F_GETFL);
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
59 #endif
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
60 }
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
61
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
62 /* Return true if FD is not inherited to child processes. */
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
63 static bool
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
64 is_cloexec (int fd)
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
65 {
19595
beb2ad957aca Simplify code. Drop support for Borland C++ on Windows.
Bruno Haible <bruno@clisp.org>
parents: 19484
diff changeset
66 #if defined _WIN32 && ! defined __CYGWIN__
11871
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
67 HANDLE h = (HANDLE) _get_osfhandle (fd);
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
68 DWORD flags;
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
69 ASSERT (GetHandleInformation (h, &flags));
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
70 return (flags & HANDLE_FLAG_INHERIT) == 0;
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
71 #else
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
72 int flags;
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
73 ASSERT ((flags = fcntl (fd, F_GETFD)) >= 0);
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
74 return (flags & FD_CLOEXEC) != 0;
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
75 #endif
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
76 }
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
77
14856
c593fd7d2ab9 pipe2: Remove dependency on 'nonblocking' module.
Bruno Haible <bruno@clisp.org>
parents: 14535
diff changeset
78 #if ! GNULIB_NONBLOCKING
c593fd7d2ab9 pipe2: Remove dependency on 'nonblocking' module.
Bruno Haible <bruno@clisp.org>
parents: 14535
diff changeset
79 static int
c593fd7d2ab9 pipe2: Remove dependency on 'nonblocking' module.
Bruno Haible <bruno@clisp.org>
parents: 14535
diff changeset
80 get_nonblocking_flag (int fd)
c593fd7d2ab9 pipe2: Remove dependency on 'nonblocking' module.
Bruno Haible <bruno@clisp.org>
parents: 14535
diff changeset
81 {
19595
beb2ad957aca Simplify code. Drop support for Borland C++ on Windows.
Bruno Haible <bruno@clisp.org>
parents: 19484
diff changeset
82 # if defined _WIN32 && ! defined __CYGWIN__
14856
c593fd7d2ab9 pipe2: Remove dependency on 'nonblocking' module.
Bruno Haible <bruno@clisp.org>
parents: 14535
diff changeset
83 return 0;
c593fd7d2ab9 pipe2: Remove dependency on 'nonblocking' module.
Bruno Haible <bruno@clisp.org>
parents: 14535
diff changeset
84 # else
c593fd7d2ab9 pipe2: Remove dependency on 'nonblocking' module.
Bruno Haible <bruno@clisp.org>
parents: 14535
diff changeset
85 # ifndef F_GETFL
c593fd7d2ab9 pipe2: Remove dependency on 'nonblocking' module.
Bruno Haible <bruno@clisp.org>
parents: 14535
diff changeset
86 # error Please port fcntl to your platform
c593fd7d2ab9 pipe2: Remove dependency on 'nonblocking' module.
Bruno Haible <bruno@clisp.org>
parents: 14535
diff changeset
87 # endif
c593fd7d2ab9 pipe2: Remove dependency on 'nonblocking' module.
Bruno Haible <bruno@clisp.org>
parents: 14535
diff changeset
88 int flags;
c593fd7d2ab9 pipe2: Remove dependency on 'nonblocking' module.
Bruno Haible <bruno@clisp.org>
parents: 14535
diff changeset
89 ASSERT ((flags = fcntl (fd, F_GETFL)) >= 0);
c593fd7d2ab9 pipe2: Remove dependency on 'nonblocking' module.
Bruno Haible <bruno@clisp.org>
parents: 14535
diff changeset
90 return (flags & O_NONBLOCK) != 0;
c593fd7d2ab9 pipe2: Remove dependency on 'nonblocking' module.
Bruno Haible <bruno@clisp.org>
parents: 14535
diff changeset
91 # endif
c593fd7d2ab9 pipe2: Remove dependency on 'nonblocking' module.
Bruno Haible <bruno@clisp.org>
parents: 14535
diff changeset
92 }
c593fd7d2ab9 pipe2: Remove dependency on 'nonblocking' module.
Bruno Haible <bruno@clisp.org>
parents: 14535
diff changeset
93 #endif
c593fd7d2ab9 pipe2: Remove dependency on 'nonblocking' module.
Bruno Haible <bruno@clisp.org>
parents: 14535
diff changeset
94
11871
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
95 int
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
96 main ()
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
97 {
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
98 int use_nonblocking;
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
99 int use_cloexec;
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
100
14856
c593fd7d2ab9 pipe2: Remove dependency on 'nonblocking' module.
Bruno Haible <bruno@clisp.org>
parents: 14535
diff changeset
101 for (use_nonblocking = 0; use_nonblocking <= !!O_NONBLOCK; use_nonblocking++)
14535
7ba508565384 pipe2: fix O_NONBLOCK support on mingw
Eric Blake <eblake@redhat.com>
parents: 14079
diff changeset
102 for (use_cloexec = 0; use_cloexec <= !!O_CLOEXEC; use_cloexec++)
11871
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
103 {
12421
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
104 int o_flags;
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
105 int fd[2];
11871
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
106
12421
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
107 o_flags = 0;
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
108 if (use_nonblocking)
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
109 o_flags |= O_NONBLOCK;
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
110 if (use_cloexec)
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
111 o_flags |= O_CLOEXEC;
11871
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
112
12421
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
113 fd[0] = -1;
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
114 fd[1] = -1;
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
115 ASSERT (pipe2 (fd, o_flags) >= 0);
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
116 ASSERT (fd[0] >= 0);
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
117 ASSERT (fd[1] >= 0);
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
118 ASSERT (fd[0] != fd[1]);
13832
992d47604da1 tests: fix compiler warnings
Eric Blake <eblake@redhat.com>
parents: 13664
diff changeset
119 ASSERT (is_open (fd[0]));
992d47604da1 tests: fix compiler warnings
Eric Blake <eblake@redhat.com>
parents: 13664
diff changeset
120 ASSERT (is_open (fd[1]));
12421
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
121 if (use_cloexec)
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
122 {
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
123 ASSERT (is_cloexec (fd[0]));
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
124 ASSERT (is_cloexec (fd[1]));
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
125 }
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
126 else
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
127 {
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
128 ASSERT (!is_cloexec (fd[0]));
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
129 ASSERT (!is_cloexec (fd[1]));
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
130 }
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
131 if (use_nonblocking)
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
132 {
14535
7ba508565384 pipe2: fix O_NONBLOCK support on mingw
Eric Blake <eblake@redhat.com>
parents: 14079
diff changeset
133 ASSERT (get_nonblocking_flag (fd[0]) == 1);
7ba508565384 pipe2: fix O_NONBLOCK support on mingw
Eric Blake <eblake@redhat.com>
parents: 14079
diff changeset
134 ASSERT (get_nonblocking_flag (fd[1]) == 1);
12421
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
135 }
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
136 else
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
137 {
14535
7ba508565384 pipe2: fix O_NONBLOCK support on mingw
Eric Blake <eblake@redhat.com>
parents: 14079
diff changeset
138 ASSERT (get_nonblocking_flag (fd[0]) == 0);
7ba508565384 pipe2: fix O_NONBLOCK support on mingw
Eric Blake <eblake@redhat.com>
parents: 14079
diff changeset
139 ASSERT (get_nonblocking_flag (fd[1]) == 0);
12421
e8d2c6fc33ad Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents: 11871
diff changeset
140 }
14535
7ba508565384 pipe2: fix O_NONBLOCK support on mingw
Eric Blake <eblake@redhat.com>
parents: 14079
diff changeset
141
7ba508565384 pipe2: fix O_NONBLOCK support on mingw
Eric Blake <eblake@redhat.com>
parents: 14079
diff changeset
142 ASSERT (close (fd[0]) == 0);
7ba508565384 pipe2: fix O_NONBLOCK support on mingw
Eric Blake <eblake@redhat.com>
parents: 14079
diff changeset
143 ASSERT (close (fd[1]) == 0);
11871
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
144 }
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
145
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
146 return 0;
35ea3cd86bec Tests for module 'pipe2'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
147 }