Mercurial > hg > octave-kai > gnulib-hg
annotate lib/spawn.in.h @ 17463:203c036eb0c6
bootstrap: support checksum utils without a --status option
* build-aux/bootstrap: Only look for sha1sum if updating po files.
Add sha1 to the list of supported checksum utils since it's now
supported through adjustments below.
(update_po_files): Remove the use of --status
in a way that will suppress all error messages, but since this is
only used to minimize updates, it shouldn't cause an issue.
Exit early if there is a problem updating the po file checksums.
(find_tool): Remove the check for --version support as this
is optional as per commit 86186b17. Don't even check for the
presence of the command as if that is needed, it's supported
through configuring prerequisites in bootstrap.conf.
Prompt that when a tool isn't found, one can define an environment
variable to add to the hardcoded search list.
author | Pádraig Brady <P@draigBrady.com> |
---|---|
date | Thu, 08 Aug 2013 11:08:49 +0100 |
parents | e542fd46ad6f |
children |
rev | line source |
---|---|
10504 | 1 /* Definitions for POSIX spawn interface. |
17249
e542fd46ad6f
maint: update all copyright year number ranges
Eric Blake <eblake@redhat.com>
parents:
16257
diff
changeset
|
2 Copyright (C) 2000, 2003-2004, 2008-2013 Free Software Foundation, Inc. |
10504 | 3 This file is part of the GNU C Library. |
4 | |
5 This program is free software: you can redistribute it and/or modify | |
6 it under the terms of the GNU General Public License as published by | |
7 the Free Software Foundation; either version 3 of the License, or | |
8 (at your option) any later version. | |
9 | |
10 This program is distributed in the hope that it will be useful, | |
11 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 GNU General Public License for more details. | |
14 | |
15 You should have received a copy of the GNU General Public License | |
16 along with this program. If not, see <http://www.gnu.org/licenses/>. */ | |
17 | |
14840
5f709022a256
Allow multiple gnulib generated include files to be combined.
Bruno Haible <bruno@clisp.org>
parents:
14274
diff
changeset
|
18 #ifndef _@GUARD_PREFIX@_SPAWN_H |
13094
2ed0fc659db8
Emit #pragma system_header after the inclusion guard, not before.
Bruno Haible <bruno@clisp.org>
parents:
13055
diff
changeset
|
19 |
10655
8668b19a7032
Avoid gcc warnings because of #pragma GCC system_header on older gcc.
Bruno Haible <bruno@clisp.org>
parents:
10579
diff
changeset
|
20 #if __GNUC__ >= 3 |
10504 | 21 @PRAGMA_SYSTEM_HEADER@ |
10655
8668b19a7032
Avoid gcc warnings because of #pragma GCC system_header on older gcc.
Bruno Haible <bruno@clisp.org>
parents:
10579
diff
changeset
|
22 #endif |
13761
a19ace3ba849
Avoid line length limitation from HP NonStop system header files.
Bruno Haible <bruno@clisp.org>
parents:
13758
diff
changeset
|
23 @PRAGMA_COLUMNS@ |
10504 | 24 |
25 /* The include_next requires a split double-inclusion guard. */ | |
26 #if @HAVE_SPAWN_H@ | |
27 # @INCLUDE_NEXT@ @NEXT_SPAWN_H@ | |
28 #endif | |
29 | |
14840
5f709022a256
Allow multiple gnulib generated include files to be combined.
Bruno Haible <bruno@clisp.org>
parents:
14274
diff
changeset
|
30 #ifndef _@GUARD_PREFIX@_SPAWN_H |
5f709022a256
Allow multiple gnulib generated include files to be combined.
Bruno Haible <bruno@clisp.org>
parents:
14274
diff
changeset
|
31 #define _@GUARD_PREFIX@_SPAWN_H |
10504 | 32 |
12548
efe1df275da6
Avoid namespace pollution on glibc systems.
Bruno Haible <bruno@clisp.org>
parents:
12544
diff
changeset
|
33 /* Get definitions of 'struct sched_param' and 'sigset_t'. |
efe1df275da6
Avoid namespace pollution on glibc systems.
Bruno Haible <bruno@clisp.org>
parents:
12544
diff
changeset
|
34 But avoid namespace pollution on glibc systems. */ |
13885 | 35 #if !(defined __GLIBC__ && !defined __UCLIBC__) |
12548
efe1df275da6
Avoid namespace pollution on glibc systems.
Bruno Haible <bruno@clisp.org>
parents:
12544
diff
changeset
|
36 # include <sched.h> |
efe1df275da6
Avoid namespace pollution on glibc systems.
Bruno Haible <bruno@clisp.org>
parents:
12544
diff
changeset
|
37 # include <signal.h> |
efe1df275da6
Avoid namespace pollution on glibc systems.
Bruno Haible <bruno@clisp.org>
parents:
12544
diff
changeset
|
38 #endif |
efe1df275da6
Avoid namespace pollution on glibc systems.
Bruno Haible <bruno@clisp.org>
parents:
12544
diff
changeset
|
39 |
10504 | 40 #include <sys/types.h> |
41 | |
42 #ifndef __THROW | |
43 # define __THROW | |
44 #endif | |
45 | |
46 /* GCC 2.95 and later have "__restrict"; C99 compilers have | |
47 "restrict", and "configure" may have defined "restrict". | |
48 Other compilers use __restrict, __restrict__, and _Restrict, and | |
49 'configure' might #define 'restrict' to those words, so pick a | |
50 different name. */ | |
51 #ifndef _Restrict_ | |
52 # if 199901L <= __STDC_VERSION__ | |
53 # define _Restrict_ restrict | |
54 # elif 2 < __GNUC__ || (2 == __GNUC__ && 95 <= __GNUC_MINOR__) | |
55 # define _Restrict_ __restrict | |
56 # else | |
57 # define _Restrict_ | |
58 # endif | |
59 #endif | |
60 /* gcc 3.1 and up support the [restrict] syntax. Don't trust | |
61 sys/cdefs.h's definition of __restrict_arr, though, as it | |
62 mishandles gcc -ansi -pedantic. */ | |
63 #ifndef _Restrict_arr_ | |
12421
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
10655
diff
changeset
|
64 # if ((199901L <= __STDC_VERSION__ \ |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
10655
diff
changeset
|
65 || ((3 < __GNUC__ || (3 == __GNUC__ && 1 <= __GNUC_MINOR__)) \ |
15962
cfa1d5dbe78c
Support for old NeXTstep 3.3 gcc.
Daniel Richard G <skunk@iskunk.org>
parents:
14840
diff
changeset
|
66 && !defined __STRICT_ANSI__)) \ |
10504 | 67 && !defined __GNUG__) |
68 # define _Restrict_arr_ _Restrict_ | |
69 # else | |
70 # define _Restrict_arr_ | |
71 # endif | |
72 #endif | |
73 | |
12939
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
74 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
75 |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
76 /* The definition of _GL_ARG_NONNULL is copied here. */ |
10504 | 77 |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
78 /* The definition of _GL_WARN_ON_USE is copied here. */ |
12422
f7842310a565
New module 'arg-nonnull'. Declare which arguments expect non-NULL values.
Bruno Haible <bruno@clisp.org>
parents:
12421
diff
changeset
|
79 |
10504 | 80 |
81 /* Data structure to contain attributes for thread creation. */ | |
82 #if @REPLACE_POSIX_SPAWN@ | |
83 # define posix_spawnattr_t rpl_posix_spawnattr_t | |
84 #endif | |
12534 | 85 #if @REPLACE_POSIX_SPAWN@ || !@HAVE_POSIX_SPAWNATTR_T@ |
14274
da5595160b9f
Allow multiple gnulib generated replacements to coexist.
Bruno Haible <bruno@clisp.org>
parents:
14079
diff
changeset
|
86 # if !GNULIB_defined_posix_spawnattr_t |
10504 | 87 typedef struct |
88 { | |
89 short int _flags; | |
90 pid_t _pgrp; | |
91 sigset_t _sd; | |
92 sigset_t _ss; | |
93 struct sched_param _sp; | |
94 int _policy; | |
95 int __pad[16]; | |
96 } posix_spawnattr_t; | |
14274
da5595160b9f
Allow multiple gnulib generated replacements to coexist.
Bruno Haible <bruno@clisp.org>
parents:
14079
diff
changeset
|
97 # define GNULIB_defined_posix_spawnattr_t 1 |
da5595160b9f
Allow multiple gnulib generated replacements to coexist.
Bruno Haible <bruno@clisp.org>
parents:
14079
diff
changeset
|
98 # endif |
12534 | 99 #endif |
10504 | 100 |
101 | |
102 /* Data structure to contain information about the actions to be | |
103 performed in the new process with respect to file descriptors. */ | |
104 #if @REPLACE_POSIX_SPAWN@ | |
105 # define posix_spawn_file_actions_t rpl_posix_spawn_file_actions_t | |
106 #endif | |
12534 | 107 #if @REPLACE_POSIX_SPAWN@ || !@HAVE_POSIX_SPAWN_FILE_ACTIONS_T@ |
14274
da5595160b9f
Allow multiple gnulib generated replacements to coexist.
Bruno Haible <bruno@clisp.org>
parents:
14079
diff
changeset
|
108 # if !GNULIB_defined_posix_spawn_file_actions_t |
10504 | 109 typedef struct |
110 { | |
111 int _allocated; | |
112 int _used; | |
113 struct __spawn_action *_actions; | |
114 int __pad[16]; | |
115 } posix_spawn_file_actions_t; | |
14274
da5595160b9f
Allow multiple gnulib generated replacements to coexist.
Bruno Haible <bruno@clisp.org>
parents:
14079
diff
changeset
|
116 # define GNULIB_defined_posix_spawn_file_actions_t 1 |
da5595160b9f
Allow multiple gnulib generated replacements to coexist.
Bruno Haible <bruno@clisp.org>
parents:
14079
diff
changeset
|
117 # endif |
12534 | 118 #endif |
10504 | 119 |
120 | |
16235
18a38c9615f0
In commentary, do not use ` to quote.
Paul Eggert <eggert@cs.ucla.edu>
parents:
16201
diff
changeset
|
121 /* Flags to be set in the 'posix_spawnattr_t'. */ |
12918
1aed01763cec
Ensure posix_spawnattr_{get,set}sched{policy,param} are defined.
Bruno Haible <bruno@clisp.org>
parents:
12905
diff
changeset
|
122 #if @HAVE_POSIX_SPAWN@ |
1aed01763cec
Ensure posix_spawnattr_{get,set}sched{policy,param} are defined.
Bruno Haible <bruno@clisp.org>
parents:
12905
diff
changeset
|
123 /* Use the values from the system, but provide the missing ones. */ |
1aed01763cec
Ensure posix_spawnattr_{get,set}sched{policy,param} are defined.
Bruno Haible <bruno@clisp.org>
parents:
12905
diff
changeset
|
124 # ifndef POSIX_SPAWN_SETSCHEDPARAM |
1aed01763cec
Ensure posix_spawnattr_{get,set}sched{policy,param} are defined.
Bruno Haible <bruno@clisp.org>
parents:
12905
diff
changeset
|
125 # define POSIX_SPAWN_SETSCHEDPARAM 0 |
1aed01763cec
Ensure posix_spawnattr_{get,set}sched{policy,param} are defined.
Bruno Haible <bruno@clisp.org>
parents:
12905
diff
changeset
|
126 # endif |
1aed01763cec
Ensure posix_spawnattr_{get,set}sched{policy,param} are defined.
Bruno Haible <bruno@clisp.org>
parents:
12905
diff
changeset
|
127 # ifndef POSIX_SPAWN_SETSCHEDULER |
1aed01763cec
Ensure posix_spawnattr_{get,set}sched{policy,param} are defined.
Bruno Haible <bruno@clisp.org>
parents:
12905
diff
changeset
|
128 # define POSIX_SPAWN_SETSCHEDULER 0 |
1aed01763cec
Ensure posix_spawnattr_{get,set}sched{policy,param} are defined.
Bruno Haible <bruno@clisp.org>
parents:
12905
diff
changeset
|
129 # endif |
1aed01763cec
Ensure posix_spawnattr_{get,set}sched{policy,param} are defined.
Bruno Haible <bruno@clisp.org>
parents:
12905
diff
changeset
|
130 #else |
12905
8d1732828ada
spawn: Don't override the system defined values on FreeBSD 8.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
131 # if @REPLACE_POSIX_SPAWN@ |
10579
f2b0bd3d9c8b
Use the system's values, rather than overriding them by ours.
Bruno Haible <bruno@clisp.org>
parents:
10575
diff
changeset
|
132 /* Use the values from the system, for better compatibility. */ |
f2b0bd3d9c8b
Use the system's values, rather than overriding them by ours.
Bruno Haible <bruno@clisp.org>
parents:
10575
diff
changeset
|
133 /* But this implementation does not support AIX extensions. */ |
12905
8d1732828ada
spawn: Don't override the system defined values on FreeBSD 8.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
134 # undef POSIX_SPAWN_FORK_HANDLERS |
8d1732828ada
spawn: Don't override the system defined values on FreeBSD 8.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
135 # else |
8d1732828ada
spawn: Don't override the system defined values on FreeBSD 8.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
136 # define POSIX_SPAWN_RESETIDS 0x01 |
8d1732828ada
spawn: Don't override the system defined values on FreeBSD 8.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
137 # define POSIX_SPAWN_SETPGROUP 0x02 |
8d1732828ada
spawn: Don't override the system defined values on FreeBSD 8.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
138 # define POSIX_SPAWN_SETSIGDEF 0x04 |
8d1732828ada
spawn: Don't override the system defined values on FreeBSD 8.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
139 # define POSIX_SPAWN_SETSIGMASK 0x08 |
8d1732828ada
spawn: Don't override the system defined values on FreeBSD 8.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
140 # define POSIX_SPAWN_SETSCHEDPARAM 0x10 |
8d1732828ada
spawn: Don't override the system defined values on FreeBSD 8.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
141 # define POSIX_SPAWN_SETSCHEDULER 0x20 |
8d1732828ada
spawn: Don't override the system defined values on FreeBSD 8.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
142 # endif |
10579
f2b0bd3d9c8b
Use the system's values, rather than overriding them by ours.
Bruno Haible <bruno@clisp.org>
parents:
10575
diff
changeset
|
143 #endif |
f2b0bd3d9c8b
Use the system's values, rather than overriding them by ours.
Bruno Haible <bruno@clisp.org>
parents:
10575
diff
changeset
|
144 /* A GNU extension. Use the next free bit position. */ |
f2b0bd3d9c8b
Use the system's values, rather than overriding them by ours.
Bruno Haible <bruno@clisp.org>
parents:
10575
diff
changeset
|
145 #define POSIX_SPAWN_USEVFORK \ |
12918
1aed01763cec
Ensure posix_spawnattr_{get,set}sched{policy,param} are defined.
Bruno Haible <bruno@clisp.org>
parents:
12905
diff
changeset
|
146 ((POSIX_SPAWN_RESETIDS | (POSIX_SPAWN_RESETIDS - 1) \ |
1aed01763cec
Ensure posix_spawnattr_{get,set}sched{policy,param} are defined.
Bruno Haible <bruno@clisp.org>
parents:
12905
diff
changeset
|
147 | POSIX_SPAWN_SETPGROUP | (POSIX_SPAWN_SETPGROUP - 1) \ |
1aed01763cec
Ensure posix_spawnattr_{get,set}sched{policy,param} are defined.
Bruno Haible <bruno@clisp.org>
parents:
12905
diff
changeset
|
148 | POSIX_SPAWN_SETSIGDEF | (POSIX_SPAWN_SETSIGDEF - 1) \ |
1aed01763cec
Ensure posix_spawnattr_{get,set}sched{policy,param} are defined.
Bruno Haible <bruno@clisp.org>
parents:
12905
diff
changeset
|
149 | POSIX_SPAWN_SETSIGMASK | (POSIX_SPAWN_SETSIGMASK - 1) \ |
1aed01763cec
Ensure posix_spawnattr_{get,set}sched{policy,param} are defined.
Bruno Haible <bruno@clisp.org>
parents:
12905
diff
changeset
|
150 | POSIX_SPAWN_SETSCHEDPARAM \ |
1aed01763cec
Ensure posix_spawnattr_{get,set}sched{policy,param} are defined.
Bruno Haible <bruno@clisp.org>
parents:
12905
diff
changeset
|
151 | (POSIX_SPAWN_SETSCHEDPARAM > 0 ? POSIX_SPAWN_SETSCHEDPARAM - 1 : 0) \ |
1aed01763cec
Ensure posix_spawnattr_{get,set}sched{policy,param} are defined.
Bruno Haible <bruno@clisp.org>
parents:
12905
diff
changeset
|
152 | POSIX_SPAWN_SETSCHEDULER \ |
1aed01763cec
Ensure posix_spawnattr_{get,set}sched{policy,param} are defined.
Bruno Haible <bruno@clisp.org>
parents:
12905
diff
changeset
|
153 | (POSIX_SPAWN_SETSCHEDULER > 0 ? POSIX_SPAWN_SETSCHEDULER - 1 : 0)) \ |
10579
f2b0bd3d9c8b
Use the system's values, rather than overriding them by ours.
Bruno Haible <bruno@clisp.org>
parents:
10575
diff
changeset
|
154 + 1) |
14274
da5595160b9f
Allow multiple gnulib generated replacements to coexist.
Bruno Haible <bruno@clisp.org>
parents:
14079
diff
changeset
|
155 #if !GNULIB_defined_verify_POSIX_SPAWN_USEVFORK_no_overlap |
10579
f2b0bd3d9c8b
Use the system's values, rather than overriding them by ours.
Bruno Haible <bruno@clisp.org>
parents:
10575
diff
changeset
|
156 typedef int verify_POSIX_SPAWN_USEVFORK_no_overlap |
13791 | 157 [(((POSIX_SPAWN_RESETIDS | POSIX_SPAWN_SETPGROUP |
158 | POSIX_SPAWN_SETSIGDEF | POSIX_SPAWN_SETSIGMASK | |
159 | POSIX_SPAWN_SETSCHEDPARAM | POSIX_SPAWN_SETSCHEDULER) | |
13793 | 160 & POSIX_SPAWN_USEVFORK) |
161 == 0) | |
13791 | 162 ? 1 : -1]; |
14274
da5595160b9f
Allow multiple gnulib generated replacements to coexist.
Bruno Haible <bruno@clisp.org>
parents:
14079
diff
changeset
|
163 # define GNULIB_defined_verify_POSIX_SPAWN_USEVFORK_no_overlap 1 |
da5595160b9f
Allow multiple gnulib generated replacements to coexist.
Bruno Haible <bruno@clisp.org>
parents:
14079
diff
changeset
|
164 #endif |
10504 | 165 |
166 | |
167 #if @GNULIB_POSIX_SPAWN@ | |
168 /* Spawn a new process executing PATH with the attributes describes in *ATTRP. | |
169 Before running the process perform the actions described in FILE-ACTIONS. | |
170 | |
171 This function is a possible cancellation points and therefore not | |
172 marked with __THROW. */ | |
173 # if @REPLACE_POSIX_SPAWN@ | |
12939
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
174 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
175 # define posix_spawn rpl_posix_spawn |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
176 # endif |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
177 _GL_FUNCDECL_RPL (posix_spawn, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
178 (pid_t *_Restrict_ __pid, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
179 const char *_Restrict_ __path, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
180 const posix_spawn_file_actions_t *_Restrict_ __file_actions, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
181 const posix_spawnattr_t *_Restrict_ __attrp, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
182 char *const argv[_Restrict_arr_], |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
183 char *const envp[_Restrict_arr_]) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
184 _GL_ARG_NONNULL ((2, 5, 6))); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
185 _GL_CXXALIAS_RPL (posix_spawn, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
186 (pid_t *_Restrict_ __pid, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
187 const char *_Restrict_ __path, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
188 const posix_spawn_file_actions_t *_Restrict_ __file_actions, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
189 const posix_spawnattr_t *_Restrict_ __attrp, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
190 char *const argv[_Restrict_arr_], |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
191 char *const envp[_Restrict_arr_])); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
192 # else |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
193 # if !@HAVE_POSIX_SPAWN@ |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
194 _GL_FUNCDECL_SYS (posix_spawn, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
195 (pid_t *_Restrict_ __pid, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
196 const char *_Restrict_ __path, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
197 const posix_spawn_file_actions_t *_Restrict_ __file_actions, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
198 const posix_spawnattr_t *_Restrict_ __attrp, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
199 char *const argv[_Restrict_arr_], |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
200 char *const envp[_Restrict_arr_]) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
201 _GL_ARG_NONNULL ((2, 5, 6))); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
202 # endif |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
203 _GL_CXXALIAS_SYS (posix_spawn, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
204 (pid_t *_Restrict_ __pid, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
205 const char *_Restrict_ __path, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
206 const posix_spawn_file_actions_t *_Restrict_ __file_actions, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
207 const posix_spawnattr_t *_Restrict_ __attrp, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
208 char *const argv[_Restrict_arr_], |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
209 char *const envp[_Restrict_arr_])); |
10504 | 210 # endif |
12939
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
211 _GL_CXXALIASWARN (posix_spawn); |
12535
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
212 #elif defined GNULIB_POSIXCHECK |
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
213 # undef posix_spawn |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
214 # if HAVE_RAW_DECL_POSIX_SPAWN |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
215 _GL_WARN_ON_USE (posix_spawn, "posix_spawn is unportable - " |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
216 "use gnulib module posix_spawn for portability"); |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
217 # endif |
10504 | 218 #endif |
219 | |
220 #if @GNULIB_POSIX_SPAWNP@ | |
16235
18a38c9615f0
In commentary, do not use ` to quote.
Paul Eggert <eggert@cs.ucla.edu>
parents:
16201
diff
changeset
|
221 /* Similar to 'posix_spawn' but search for FILE in the PATH. |
10504 | 222 |
223 This function is a possible cancellation points and therefore not | |
224 marked with __THROW. */ | |
225 # if @REPLACE_POSIX_SPAWN@ | |
12939
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
226 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
227 # define posix_spawnp rpl_posix_spawnp |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
228 # endif |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
229 _GL_FUNCDECL_RPL (posix_spawnp, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
230 (pid_t *__pid, const char *__file, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
231 const posix_spawn_file_actions_t *__file_actions, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
232 const posix_spawnattr_t *__attrp, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
233 char *const argv[], char *const envp[]) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
234 _GL_ARG_NONNULL ((2, 5, 6))); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
235 _GL_CXXALIAS_RPL (posix_spawnp, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
236 (pid_t *__pid, const char *__file, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
237 const posix_spawn_file_actions_t *__file_actions, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
238 const posix_spawnattr_t *__attrp, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
239 char *const argv[], char *const envp[])); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
240 # else |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
241 # if !@HAVE_POSIX_SPAWN@ |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
242 _GL_FUNCDECL_SYS (posix_spawnp, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
243 (pid_t *__pid, const char *__file, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
244 const posix_spawn_file_actions_t *__file_actions, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
245 const posix_spawnattr_t *__attrp, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
246 char *const argv[], char *const envp[]) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
247 _GL_ARG_NONNULL ((2, 5, 6))); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
248 # endif |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
249 _GL_CXXALIAS_SYS (posix_spawnp, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
250 (pid_t *__pid, const char *__file, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
251 const posix_spawn_file_actions_t *__file_actions, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
252 const posix_spawnattr_t *__attrp, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
253 char *const argv[], char *const envp[])); |
10504 | 254 # endif |
12939
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
255 _GL_CXXALIASWARN (posix_spawnp); |
12535
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
256 #elif defined GNULIB_POSIXCHECK |
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
257 # undef posix_spawnp |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
258 # if HAVE_RAW_DECL_POSIX_SPAWNP |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
259 _GL_WARN_ON_USE (posix_spawnp, "posix_spawnp is unportable - " |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
260 "use gnulib module posix_spawnp for portability"); |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
261 # endif |
10504 | 262 #endif |
263 | |
264 | |
265 #if @GNULIB_POSIX_SPAWNATTR_INIT@ | |
16235
18a38c9615f0
In commentary, do not use ` to quote.
Paul Eggert <eggert@cs.ucla.edu>
parents:
16201
diff
changeset
|
266 /* Initialize data structure with attributes for 'spawn' to default values. */ |
10504 | 267 # if @REPLACE_POSIX_SPAWN@ |
12939
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
268 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
269 # define posix_spawnattr_init rpl_posix_spawnattr_init |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
270 # endif |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
271 _GL_FUNCDECL_RPL (posix_spawnattr_init, int, (posix_spawnattr_t *__attr) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
272 __THROW _GL_ARG_NONNULL ((1))); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
273 _GL_CXXALIAS_RPL (posix_spawnattr_init, int, (posix_spawnattr_t *__attr)); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
274 # else |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
275 # if !@HAVE_POSIX_SPAWN@ |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
276 _GL_FUNCDECL_SYS (posix_spawnattr_init, int, (posix_spawnattr_t *__attr) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
277 __THROW _GL_ARG_NONNULL ((1))); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
278 # endif |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
279 _GL_CXXALIAS_SYS (posix_spawnattr_init, int, (posix_spawnattr_t *__attr)); |
10504 | 280 # endif |
12939
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
281 _GL_CXXALIASWARN (posix_spawnattr_init); |
12535
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
282 #elif defined GNULIB_POSIXCHECK |
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
283 # undef posix_spawnattr_init |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
284 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_INIT |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
285 _GL_WARN_ON_USE (posix_spawnattr_init, "posix_spawnattr_init is unportable - " |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
286 "use gnulib module posix_spawnattr_init for portability"); |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
287 # endif |
10504 | 288 #endif |
289 | |
290 #if @GNULIB_POSIX_SPAWNATTR_DESTROY@ | |
291 /* Free resources associated with ATTR. */ | |
292 # if @REPLACE_POSIX_SPAWN@ | |
12939
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
293 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
294 # define posix_spawnattr_destroy rpl_posix_spawnattr_destroy |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
295 # endif |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
296 _GL_FUNCDECL_RPL (posix_spawnattr_destroy, int, (posix_spawnattr_t *__attr) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
297 __THROW _GL_ARG_NONNULL ((1))); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
298 _GL_CXXALIAS_RPL (posix_spawnattr_destroy, int, (posix_spawnattr_t *__attr)); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
299 # else |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
300 # if !@HAVE_POSIX_SPAWN@ |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
301 _GL_FUNCDECL_SYS (posix_spawnattr_destroy, int, (posix_spawnattr_t *__attr) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
302 __THROW _GL_ARG_NONNULL ((1))); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
303 # endif |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
304 _GL_CXXALIAS_SYS (posix_spawnattr_destroy, int, (posix_spawnattr_t *__attr)); |
10504 | 305 # endif |
12939
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
306 _GL_CXXALIASWARN (posix_spawnattr_destroy); |
12535
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
307 #elif defined GNULIB_POSIXCHECK |
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
308 # undef posix_spawnattr_destroy |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
309 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_DESTROY |
13758
e50f7d9e3040
Avoid some lines longer than 80 characters.
Paul Eggert <eggert@cs.ucla.edu>
parents:
13094
diff
changeset
|
310 _GL_WARN_ON_USE (posix_spawnattr_destroy, |
e50f7d9e3040
Avoid some lines longer than 80 characters.
Paul Eggert <eggert@cs.ucla.edu>
parents:
13094
diff
changeset
|
311 "posix_spawnattr_destroy is unportable - " |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
312 "use gnulib module posix_spawnattr_destroy for portability"); |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
313 # endif |
10504 | 314 #endif |
315 | |
316 #if @GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT@ | |
317 /* Store signal mask for signals with default handling from ATTR in | |
318 SIGDEFAULT. */ | |
319 # if @REPLACE_POSIX_SPAWN@ | |
12939
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
320 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
321 # define posix_spawnattr_getsigdefault rpl_posix_spawnattr_getsigdefault |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
322 # endif |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
323 _GL_FUNCDECL_RPL (posix_spawnattr_getsigdefault, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
324 (const posix_spawnattr_t *_Restrict_ __attr, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
325 sigset_t *_Restrict_ __sigdefault) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
326 __THROW _GL_ARG_NONNULL ((1, 2))); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
327 _GL_CXXALIAS_RPL (posix_spawnattr_getsigdefault, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
328 (const posix_spawnattr_t *_Restrict_ __attr, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
329 sigset_t *_Restrict_ __sigdefault)); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
330 # else |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
331 # if !@HAVE_POSIX_SPAWN@ |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
332 _GL_FUNCDECL_SYS (posix_spawnattr_getsigdefault, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
333 (const posix_spawnattr_t *_Restrict_ __attr, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
334 sigset_t *_Restrict_ __sigdefault) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
335 __THROW _GL_ARG_NONNULL ((1, 2))); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
336 # endif |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
337 _GL_CXXALIAS_SYS (posix_spawnattr_getsigdefault, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
338 (const posix_spawnattr_t *_Restrict_ __attr, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
339 sigset_t *_Restrict_ __sigdefault)); |
10504 | 340 # endif |
12939
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
341 _GL_CXXALIASWARN (posix_spawnattr_getsigdefault); |
12535
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
342 #elif defined GNULIB_POSIXCHECK |
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
343 # undef posix_spawnattr_getsigdefault |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
344 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_GETSIGDEFAULT |
13758
e50f7d9e3040
Avoid some lines longer than 80 characters.
Paul Eggert <eggert@cs.ucla.edu>
parents:
13094
diff
changeset
|
345 _GL_WARN_ON_USE (posix_spawnattr_getsigdefault, |
e50f7d9e3040
Avoid some lines longer than 80 characters.
Paul Eggert <eggert@cs.ucla.edu>
parents:
13094
diff
changeset
|
346 "posix_spawnattr_getsigdefault is unportable - " |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
347 "use gnulib module posix_spawnattr_getsigdefault for portability"); |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
348 # endif |
10504 | 349 #endif |
350 | |
351 #if @GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT@ | |
352 /* Set signal mask for signals with default handling in ATTR to SIGDEFAULT. */ | |
353 # if @REPLACE_POSIX_SPAWN@ | |
12939
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
354 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
355 # define posix_spawnattr_setsigdefault rpl_posix_spawnattr_setsigdefault |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
356 # endif |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
357 _GL_FUNCDECL_RPL (posix_spawnattr_setsigdefault, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
358 (posix_spawnattr_t *_Restrict_ __attr, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
359 const sigset_t *_Restrict_ __sigdefault) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
360 __THROW _GL_ARG_NONNULL ((1, 2))); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
361 _GL_CXXALIAS_RPL (posix_spawnattr_setsigdefault, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
362 (posix_spawnattr_t *_Restrict_ __attr, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
363 const sigset_t *_Restrict_ __sigdefault)); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
364 # else |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
365 # if !@HAVE_POSIX_SPAWN@ |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
366 _GL_FUNCDECL_SYS (posix_spawnattr_setsigdefault, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
367 (posix_spawnattr_t *_Restrict_ __attr, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
368 const sigset_t *_Restrict_ __sigdefault) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
369 __THROW _GL_ARG_NONNULL ((1, 2))); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
370 # endif |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
371 _GL_CXXALIAS_SYS (posix_spawnattr_setsigdefault, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
372 (posix_spawnattr_t *_Restrict_ __attr, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
373 const sigset_t *_Restrict_ __sigdefault)); |
10504 | 374 # endif |
12939
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
375 _GL_CXXALIASWARN (posix_spawnattr_setsigdefault); |
12535
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
376 #elif defined GNULIB_POSIXCHECK |
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
377 # undef posix_spawnattr_setsigdefault |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
378 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_SETSIGDEFAULT |
13758
e50f7d9e3040
Avoid some lines longer than 80 characters.
Paul Eggert <eggert@cs.ucla.edu>
parents:
13094
diff
changeset
|
379 _GL_WARN_ON_USE (posix_spawnattr_setsigdefault, |
e50f7d9e3040
Avoid some lines longer than 80 characters.
Paul Eggert <eggert@cs.ucla.edu>
parents:
13094
diff
changeset
|
380 "posix_spawnattr_setsigdefault is unportable - " |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
381 "use gnulib module posix_spawnattr_setsigdefault for portability"); |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
382 # endif |
10504 | 383 #endif |
384 | |
385 #if @GNULIB_POSIX_SPAWNATTR_GETSIGMASK@ | |
386 /* Store signal mask for the new process from ATTR in SIGMASK. */ | |
387 # if @REPLACE_POSIX_SPAWN@ | |
12939
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
388 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
389 # define posix_spawnattr_getsigmask rpl_posix_spawnattr_getsigmask |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
390 # endif |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
391 _GL_FUNCDECL_RPL (posix_spawnattr_getsigmask, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
392 (const posix_spawnattr_t *_Restrict_ __attr, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
393 sigset_t *_Restrict_ __sigmask) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
394 __THROW _GL_ARG_NONNULL ((1, 2))); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
395 _GL_CXXALIAS_RPL (posix_spawnattr_getsigmask, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
396 (const posix_spawnattr_t *_Restrict_ __attr, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
397 sigset_t *_Restrict_ __sigmask)); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
398 # else |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
399 # if !@HAVE_POSIX_SPAWN@ |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
400 _GL_FUNCDECL_SYS (posix_spawnattr_getsigmask, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
401 (const posix_spawnattr_t *_Restrict_ __attr, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
402 sigset_t *_Restrict_ __sigmask) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
403 __THROW _GL_ARG_NONNULL ((1, 2))); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
404 # endif |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
405 _GL_CXXALIAS_SYS (posix_spawnattr_getsigmask, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
406 (const posix_spawnattr_t *_Restrict_ __attr, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
407 sigset_t *_Restrict_ __sigmask)); |
10504 | 408 # endif |
12939
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
409 _GL_CXXALIASWARN (posix_spawnattr_getsigmask); |
12535
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
410 #elif defined GNULIB_POSIXCHECK |
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
411 # undef posix_spawnattr_getsigmask |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
412 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_GETSIGMASK |
13758
e50f7d9e3040
Avoid some lines longer than 80 characters.
Paul Eggert <eggert@cs.ucla.edu>
parents:
13094
diff
changeset
|
413 _GL_WARN_ON_USE (posix_spawnattr_getsigmask, |
e50f7d9e3040
Avoid some lines longer than 80 characters.
Paul Eggert <eggert@cs.ucla.edu>
parents:
13094
diff
changeset
|
414 "posix_spawnattr_getsigmask is unportable - " |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
415 "use gnulib module posix_spawnattr_getsigmask for portability"); |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
416 # endif |
10504 | 417 #endif |
418 | |
419 #if @GNULIB_POSIX_SPAWNATTR_SETSIGMASK@ | |
420 /* Set signal mask for the new process in ATTR to SIGMASK. */ | |
421 # if @REPLACE_POSIX_SPAWN@ | |
12939
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
422 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
423 # define posix_spawnattr_setsigmask rpl_posix_spawnattr_setsigmask |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
424 # endif |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
425 _GL_FUNCDECL_RPL (posix_spawnattr_setsigmask, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
426 (posix_spawnattr_t *_Restrict_ __attr, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
427 const sigset_t *_Restrict_ __sigmask) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
428 __THROW _GL_ARG_NONNULL ((1, 2))); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
429 _GL_CXXALIAS_RPL (posix_spawnattr_setsigmask, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
430 (posix_spawnattr_t *_Restrict_ __attr, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
431 const sigset_t *_Restrict_ __sigmask)); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
432 # else |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
433 # if !@HAVE_POSIX_SPAWN@ |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
434 _GL_FUNCDECL_SYS (posix_spawnattr_setsigmask, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
435 (posix_spawnattr_t *_Restrict_ __attr, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
436 const sigset_t *_Restrict_ __sigmask) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
437 __THROW _GL_ARG_NONNULL ((1, 2))); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
438 # endif |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
439 _GL_CXXALIAS_SYS (posix_spawnattr_setsigmask, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
440 (posix_spawnattr_t *_Restrict_ __attr, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
441 const sigset_t *_Restrict_ __sigmask)); |
10504 | 442 # endif |
12939
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
443 _GL_CXXALIASWARN (posix_spawnattr_setsigmask); |
12535
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
444 #elif defined GNULIB_POSIXCHECK |
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
445 # undef posix_spawnattr_setsigmask |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
446 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_SETSIGMASK |
13758
e50f7d9e3040
Avoid some lines longer than 80 characters.
Paul Eggert <eggert@cs.ucla.edu>
parents:
13094
diff
changeset
|
447 _GL_WARN_ON_USE (posix_spawnattr_setsigmask, |
e50f7d9e3040
Avoid some lines longer than 80 characters.
Paul Eggert <eggert@cs.ucla.edu>
parents:
13094
diff
changeset
|
448 "posix_spawnattr_setsigmask is unportable - " |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
449 "use gnulib module posix_spawnattr_setsigmask for portability"); |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
450 # endif |
10504 | 451 #endif |
452 | |
453 #if @GNULIB_POSIX_SPAWNATTR_GETFLAGS@ | |
454 /* Get flag word from the attribute structure. */ | |
455 # if @REPLACE_POSIX_SPAWN@ | |
12939
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
456 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
457 # define posix_spawnattr_getflags rpl_posix_spawnattr_getflags |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
458 # endif |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
459 _GL_FUNCDECL_RPL (posix_spawnattr_getflags, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
460 (const posix_spawnattr_t *_Restrict_ __attr, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
461 short int *_Restrict_ __flags) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
462 __THROW _GL_ARG_NONNULL ((1, 2))); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
463 _GL_CXXALIAS_RPL (posix_spawnattr_getflags, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
464 (const posix_spawnattr_t *_Restrict_ __attr, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
465 short int *_Restrict_ __flags)); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
466 # else |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
467 # if !@HAVE_POSIX_SPAWN@ |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
468 _GL_FUNCDECL_SYS (posix_spawnattr_getflags, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
469 (const posix_spawnattr_t *_Restrict_ __attr, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
470 short int *_Restrict_ __flags) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
471 __THROW _GL_ARG_NONNULL ((1, 2))); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
472 # endif |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
473 _GL_CXXALIAS_SYS (posix_spawnattr_getflags, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
474 (const posix_spawnattr_t *_Restrict_ __attr, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
475 short int *_Restrict_ __flags)); |
10504 | 476 # endif |
12939
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
477 _GL_CXXALIASWARN (posix_spawnattr_getflags); |
12535
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
478 #elif defined GNULIB_POSIXCHECK |
12544
3e1610fee875
spawn: Fix misapplied patch.
Bruno Haible <bruno@clisp.org>
parents:
12535
diff
changeset
|
479 # undef posix_spawnattr_getflags |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
480 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_GETFLAGS |
13758
e50f7d9e3040
Avoid some lines longer than 80 characters.
Paul Eggert <eggert@cs.ucla.edu>
parents:
13094
diff
changeset
|
481 _GL_WARN_ON_USE (posix_spawnattr_getflags, |
e50f7d9e3040
Avoid some lines longer than 80 characters.
Paul Eggert <eggert@cs.ucla.edu>
parents:
13094
diff
changeset
|
482 "posix_spawnattr_getflags is unportable - " |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
483 "use gnulib module posix_spawnattr_getflags for portability"); |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
484 # endif |
10504 | 485 #endif |
486 | |
487 #if @GNULIB_POSIX_SPAWNATTR_SETFLAGS@ | |
488 /* Store flags in the attribute structure. */ | |
489 # if @REPLACE_POSIX_SPAWN@ | |
12939
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
490 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
491 # define posix_spawnattr_setflags rpl_posix_spawnattr_setflags |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
492 # endif |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
493 _GL_FUNCDECL_RPL (posix_spawnattr_setflags, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
494 (posix_spawnattr_t *__attr, short int __flags) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
495 __THROW _GL_ARG_NONNULL ((1))); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
496 _GL_CXXALIAS_RPL (posix_spawnattr_setflags, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
497 (posix_spawnattr_t *__attr, short int __flags)); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
498 # else |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
499 # if !@HAVE_POSIX_SPAWN@ |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
500 _GL_FUNCDECL_SYS (posix_spawnattr_setflags, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
501 (posix_spawnattr_t *__attr, short int __flags) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
502 __THROW _GL_ARG_NONNULL ((1))); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
503 # endif |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
504 _GL_CXXALIAS_SYS (posix_spawnattr_setflags, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
505 (posix_spawnattr_t *__attr, short int __flags)); |
10504 | 506 # endif |
12939
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
507 _GL_CXXALIASWARN (posix_spawnattr_setflags); |
12535
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
508 #elif defined GNULIB_POSIXCHECK |
12544
3e1610fee875
spawn: Fix misapplied patch.
Bruno Haible <bruno@clisp.org>
parents:
12535
diff
changeset
|
509 # undef posix_spawnattr_setflags |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
510 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_SETFLAGS |
13758
e50f7d9e3040
Avoid some lines longer than 80 characters.
Paul Eggert <eggert@cs.ucla.edu>
parents:
13094
diff
changeset
|
511 _GL_WARN_ON_USE (posix_spawnattr_setflags, |
e50f7d9e3040
Avoid some lines longer than 80 characters.
Paul Eggert <eggert@cs.ucla.edu>
parents:
13094
diff
changeset
|
512 "posix_spawnattr_setflags is unportable - " |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
513 "use gnulib module posix_spawnattr_setflags for portability"); |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
514 # endif |
10504 | 515 #endif |
516 | |
517 #if @GNULIB_POSIX_SPAWNATTR_GETPGROUP@ | |
518 /* Get process group ID from the attribute structure. */ | |
519 # if @REPLACE_POSIX_SPAWN@ | |
12939
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
520 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
521 # define posix_spawnattr_getpgroup rpl_posix_spawnattr_getpgroup |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
522 # endif |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
523 _GL_FUNCDECL_RPL (posix_spawnattr_getpgroup, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
524 (const posix_spawnattr_t *_Restrict_ __attr, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
525 pid_t *_Restrict_ __pgroup) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
526 __THROW _GL_ARG_NONNULL ((1, 2))); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
527 _GL_CXXALIAS_RPL (posix_spawnattr_getpgroup, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
528 (const posix_spawnattr_t *_Restrict_ __attr, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
529 pid_t *_Restrict_ __pgroup)); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
530 # else |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
531 # if !@HAVE_POSIX_SPAWN@ |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
532 _GL_FUNCDECL_SYS (posix_spawnattr_getpgroup, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
533 (const posix_spawnattr_t *_Restrict_ __attr, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
534 pid_t *_Restrict_ __pgroup) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
535 __THROW _GL_ARG_NONNULL ((1, 2))); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
536 # endif |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
537 _GL_CXXALIAS_SYS (posix_spawnattr_getpgroup, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
538 (const posix_spawnattr_t *_Restrict_ __attr, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
539 pid_t *_Restrict_ __pgroup)); |
10504 | 540 # endif |
12939
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
541 _GL_CXXALIASWARN (posix_spawnattr_getpgroup); |
12535
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
542 #elif defined GNULIB_POSIXCHECK |
12544
3e1610fee875
spawn: Fix misapplied patch.
Bruno Haible <bruno@clisp.org>
parents:
12535
diff
changeset
|
543 # undef posix_spawnattr_getpgroup |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
544 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_GETPGROUP |
13758
e50f7d9e3040
Avoid some lines longer than 80 characters.
Paul Eggert <eggert@cs.ucla.edu>
parents:
13094
diff
changeset
|
545 _GL_WARN_ON_USE (posix_spawnattr_getpgroup, |
e50f7d9e3040
Avoid some lines longer than 80 characters.
Paul Eggert <eggert@cs.ucla.edu>
parents:
13094
diff
changeset
|
546 "posix_spawnattr_getpgroup is unportable - " |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
547 "use gnulib module posix_spawnattr_getpgroup for portability"); |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
548 # endif |
10504 | 549 #endif |
550 | |
551 #if @GNULIB_POSIX_SPAWNATTR_SETPGROUP@ | |
552 /* Store process group ID in the attribute structure. */ | |
553 # if @REPLACE_POSIX_SPAWN@ | |
12939
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
554 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
555 # define posix_spawnattr_setpgroup rpl_posix_spawnattr_setpgroup |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
556 # endif |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
557 _GL_FUNCDECL_RPL (posix_spawnattr_setpgroup, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
558 (posix_spawnattr_t *__attr, pid_t __pgroup) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
559 __THROW _GL_ARG_NONNULL ((1))); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
560 _GL_CXXALIAS_RPL (posix_spawnattr_setpgroup, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
561 (posix_spawnattr_t *__attr, pid_t __pgroup)); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
562 # else |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
563 # if !@HAVE_POSIX_SPAWN@ |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
564 _GL_FUNCDECL_SYS (posix_spawnattr_setpgroup, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
565 (posix_spawnattr_t *__attr, pid_t __pgroup) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
566 __THROW _GL_ARG_NONNULL ((1))); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
567 # endif |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
568 _GL_CXXALIAS_SYS (posix_spawnattr_setpgroup, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
569 (posix_spawnattr_t *__attr, pid_t __pgroup)); |
10504 | 570 # endif |
12939
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
571 _GL_CXXALIASWARN (posix_spawnattr_setpgroup); |
12544
3e1610fee875
spawn: Fix misapplied patch.
Bruno Haible <bruno@clisp.org>
parents:
12535
diff
changeset
|
572 #elif defined GNULIB_POSIXCHECK |
3e1610fee875
spawn: Fix misapplied patch.
Bruno Haible <bruno@clisp.org>
parents:
12535
diff
changeset
|
573 # undef posix_spawnattr_setpgroup |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
574 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_SETPGROUP |
13758
e50f7d9e3040
Avoid some lines longer than 80 characters.
Paul Eggert <eggert@cs.ucla.edu>
parents:
13094
diff
changeset
|
575 _GL_WARN_ON_USE (posix_spawnattr_setpgroup, |
e50f7d9e3040
Avoid some lines longer than 80 characters.
Paul Eggert <eggert@cs.ucla.edu>
parents:
13094
diff
changeset
|
576 "posix_spawnattr_setpgroup is unportable - " |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
577 "use gnulib module posix_spawnattr_setpgroup for portability"); |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
578 # endif |
10504 | 579 #endif |
580 | |
581 #if @GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY@ | |
582 /* Get scheduling policy from the attribute structure. */ | |
583 # if @REPLACE_POSIX_SPAWN@ | |
12939
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
584 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
585 # define posix_spawnattr_getschedpolicy rpl_posix_spawnattr_getschedpolicy |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
586 # endif |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
587 _GL_FUNCDECL_RPL (posix_spawnattr_getschedpolicy, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
588 (const posix_spawnattr_t *_Restrict_ __attr, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
589 int *_Restrict_ __schedpolicy) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
590 __THROW _GL_ARG_NONNULL ((1, 2))); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
591 _GL_CXXALIAS_RPL (posix_spawnattr_getschedpolicy, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
592 (const posix_spawnattr_t *_Restrict_ __attr, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
593 int *_Restrict_ __schedpolicy)); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
594 # else |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
595 # if !@HAVE_POSIX_SPAWN@ || POSIX_SPAWN_SETSCHEDULER == 0 |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
596 _GL_FUNCDECL_SYS (posix_spawnattr_getschedpolicy, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
597 (const posix_spawnattr_t *_Restrict_ __attr, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
598 int *_Restrict_ __schedpolicy) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
599 __THROW _GL_ARG_NONNULL ((1, 2))); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
600 # endif |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
601 _GL_CXXALIAS_SYS (posix_spawnattr_getschedpolicy, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
602 (const posix_spawnattr_t *_Restrict_ __attr, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
603 int *_Restrict_ __schedpolicy)); |
10504 | 604 # endif |
12939
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
605 _GL_CXXALIASWARN (posix_spawnattr_getschedpolicy); |
12535
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
606 #elif defined GNULIB_POSIXCHECK |
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
607 # undef posix_spawnattr_getschedpolicy |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
608 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_GETSCHEDPOLICY |
13758
e50f7d9e3040
Avoid some lines longer than 80 characters.
Paul Eggert <eggert@cs.ucla.edu>
parents:
13094
diff
changeset
|
609 _GL_WARN_ON_USE (posix_spawnattr_getschedpolicy, |
e50f7d9e3040
Avoid some lines longer than 80 characters.
Paul Eggert <eggert@cs.ucla.edu>
parents:
13094
diff
changeset
|
610 "posix_spawnattr_getschedpolicy is unportable - " |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
611 "use gnulib module posix_spawnattr_getschedpolicy for portability"); |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
612 # endif |
10504 | 613 #endif |
614 | |
615 #if @GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY@ | |
616 /* Store scheduling policy in the attribute structure. */ | |
617 # if @REPLACE_POSIX_SPAWN@ | |
12939
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
618 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
619 # define posix_spawnattr_setschedpolicy rpl_posix_spawnattr_setschedpolicy |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
620 # endif |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
621 _GL_FUNCDECL_RPL (posix_spawnattr_setschedpolicy, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
622 (posix_spawnattr_t *__attr, int __schedpolicy) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
623 __THROW _GL_ARG_NONNULL ((1))); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
624 _GL_CXXALIAS_RPL (posix_spawnattr_setschedpolicy, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
625 (posix_spawnattr_t *__attr, int __schedpolicy)); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
626 # else |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
627 # if !@HAVE_POSIX_SPAWN@ || POSIX_SPAWN_SETSCHEDULER == 0 |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
628 _GL_FUNCDECL_SYS (posix_spawnattr_setschedpolicy, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
629 (posix_spawnattr_t *__attr, int __schedpolicy) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
630 __THROW _GL_ARG_NONNULL ((1))); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
631 # endif |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
632 _GL_CXXALIAS_SYS (posix_spawnattr_setschedpolicy, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
633 (posix_spawnattr_t *__attr, int __schedpolicy)); |
10504 | 634 # endif |
12939
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
635 _GL_CXXALIASWARN (posix_spawnattr_setschedpolicy); |
12535
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
636 #elif defined GNULIB_POSIXCHECK |
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
637 # undef posix_spawnattr_setschedpolicy |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
638 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_SETSCHEDPOLICY |
13758
e50f7d9e3040
Avoid some lines longer than 80 characters.
Paul Eggert <eggert@cs.ucla.edu>
parents:
13094
diff
changeset
|
639 _GL_WARN_ON_USE (posix_spawnattr_setschedpolicy, |
e50f7d9e3040
Avoid some lines longer than 80 characters.
Paul Eggert <eggert@cs.ucla.edu>
parents:
13094
diff
changeset
|
640 "posix_spawnattr_setschedpolicy is unportable - " |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
641 "use gnulib module posix_spawnattr_setschedpolicy for portability"); |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
642 # endif |
10504 | 643 #endif |
644 | |
645 #if @GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM@ | |
646 /* Get scheduling parameters from the attribute structure. */ | |
647 # if @REPLACE_POSIX_SPAWN@ | |
12939
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
648 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
649 # define posix_spawnattr_getschedparam rpl_posix_spawnattr_getschedparam |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
650 # endif |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
651 _GL_FUNCDECL_RPL (posix_spawnattr_getschedparam, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
652 (const posix_spawnattr_t *_Restrict_ __attr, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
653 struct sched_param *_Restrict_ __schedparam) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
654 __THROW _GL_ARG_NONNULL ((1, 2))); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
655 _GL_CXXALIAS_RPL (posix_spawnattr_getschedparam, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
656 (const posix_spawnattr_t *_Restrict_ __attr, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
657 struct sched_param *_Restrict_ __schedparam)); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
658 # else |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
659 # if !@HAVE_POSIX_SPAWN@ || POSIX_SPAWN_SETSCHEDPARAM == 0 |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
660 _GL_FUNCDECL_SYS (posix_spawnattr_getschedparam, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
661 (const posix_spawnattr_t *_Restrict_ __attr, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
662 struct sched_param *_Restrict_ __schedparam) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
663 __THROW _GL_ARG_NONNULL ((1, 2))); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
664 # endif |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
665 _GL_CXXALIAS_SYS (posix_spawnattr_getschedparam, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
666 (const posix_spawnattr_t *_Restrict_ __attr, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
667 struct sched_param *_Restrict_ __schedparam)); |
10504 | 668 # endif |
12939
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
669 _GL_CXXALIASWARN (posix_spawnattr_getschedparam); |
12535
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
670 #elif defined GNULIB_POSIXCHECK |
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
671 # undef posix_spawnattr_getschedparam |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
672 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_GETSCHEDPARAM |
13758
e50f7d9e3040
Avoid some lines longer than 80 characters.
Paul Eggert <eggert@cs.ucla.edu>
parents:
13094
diff
changeset
|
673 _GL_WARN_ON_USE (posix_spawnattr_getschedparam, |
e50f7d9e3040
Avoid some lines longer than 80 characters.
Paul Eggert <eggert@cs.ucla.edu>
parents:
13094
diff
changeset
|
674 "posix_spawnattr_getschedparam is unportable - " |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
675 "use gnulib module posix_spawnattr_getschedparam for portability"); |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
676 # endif |
10504 | 677 #endif |
678 | |
679 #if @GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM@ | |
680 /* Store scheduling parameters in the attribute structure. */ | |
681 # if @REPLACE_POSIX_SPAWN@ | |
12939
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
682 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
683 # define posix_spawnattr_setschedparam rpl_posix_spawnattr_setschedparam |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
684 # endif |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
685 _GL_FUNCDECL_RPL (posix_spawnattr_setschedparam, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
686 (posix_spawnattr_t *_Restrict_ __attr, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
687 const struct sched_param *_Restrict_ __schedparam) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
688 __THROW _GL_ARG_NONNULL ((1, 2))); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
689 _GL_CXXALIAS_RPL (posix_spawnattr_setschedparam, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
690 (posix_spawnattr_t *_Restrict_ __attr, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
691 const struct sched_param *_Restrict_ __schedparam)); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
692 # else |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
693 # if !@HAVE_POSIX_SPAWN@ || POSIX_SPAWN_SETSCHEDPARAM == 0 |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
694 _GL_FUNCDECL_SYS (posix_spawnattr_setschedparam, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
695 (posix_spawnattr_t *_Restrict_ __attr, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
696 const struct sched_param *_Restrict_ __schedparam) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
697 __THROW _GL_ARG_NONNULL ((1, 2))); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
698 # endif |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
699 _GL_CXXALIAS_SYS (posix_spawnattr_setschedparam, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
700 (posix_spawnattr_t *_Restrict_ __attr, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
701 const struct sched_param *_Restrict_ __schedparam)); |
10504 | 702 # endif |
12939
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
703 _GL_CXXALIASWARN (posix_spawnattr_setschedparam); |
12535
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
704 #elif defined GNULIB_POSIXCHECK |
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
705 # undef posix_spawnattr_setschedparam |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
706 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_SETSCHEDPARAM |
13758
e50f7d9e3040
Avoid some lines longer than 80 characters.
Paul Eggert <eggert@cs.ucla.edu>
parents:
13094
diff
changeset
|
707 _GL_WARN_ON_USE (posix_spawnattr_setschedparam, |
e50f7d9e3040
Avoid some lines longer than 80 characters.
Paul Eggert <eggert@cs.ucla.edu>
parents:
13094
diff
changeset
|
708 "posix_spawnattr_setschedparam is unportable - " |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
709 "use gnulib module posix_spawnattr_setschedparam for portability"); |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
710 # endif |
10504 | 711 #endif |
712 | |
713 | |
714 #if @GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT@ | |
16235
18a38c9615f0
In commentary, do not use ` to quote.
Paul Eggert <eggert@cs.ucla.edu>
parents:
16201
diff
changeset
|
715 /* Initialize data structure for file attribute for 'spawn' call. */ |
10504 | 716 # if @REPLACE_POSIX_SPAWN@ |
12939
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
717 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
718 # define posix_spawn_file_actions_init rpl_posix_spawn_file_actions_init |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
719 # endif |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
720 _GL_FUNCDECL_RPL (posix_spawn_file_actions_init, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
721 (posix_spawn_file_actions_t *__file_actions) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
722 __THROW _GL_ARG_NONNULL ((1))); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
723 _GL_CXXALIAS_RPL (posix_spawn_file_actions_init, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
724 (posix_spawn_file_actions_t *__file_actions)); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
725 # else |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
726 # if !@HAVE_POSIX_SPAWN@ |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
727 _GL_FUNCDECL_SYS (posix_spawn_file_actions_init, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
728 (posix_spawn_file_actions_t *__file_actions) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
729 __THROW _GL_ARG_NONNULL ((1))); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
730 # endif |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
731 _GL_CXXALIAS_SYS (posix_spawn_file_actions_init, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
732 (posix_spawn_file_actions_t *__file_actions)); |
10504 | 733 # endif |
12939
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
734 _GL_CXXALIASWARN (posix_spawn_file_actions_init); |
12535
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
735 #elif defined GNULIB_POSIXCHECK |
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
736 # undef posix_spawn_file_actions_init |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
737 # if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_INIT |
13758
e50f7d9e3040
Avoid some lines longer than 80 characters.
Paul Eggert <eggert@cs.ucla.edu>
parents:
13094
diff
changeset
|
738 _GL_WARN_ON_USE (posix_spawn_file_actions_init, |
e50f7d9e3040
Avoid some lines longer than 80 characters.
Paul Eggert <eggert@cs.ucla.edu>
parents:
13094
diff
changeset
|
739 "posix_spawn_file_actions_init is unportable - " |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
740 "use gnulib module posix_spawn_file_actions_init for portability"); |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
741 # endif |
10504 | 742 #endif |
743 | |
744 #if @GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY@ | |
745 /* Free resources associated with FILE-ACTIONS. */ | |
746 # if @REPLACE_POSIX_SPAWN@ | |
12939
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
747 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
748 # define posix_spawn_file_actions_destroy rpl_posix_spawn_file_actions_destroy |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
749 # endif |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
750 _GL_FUNCDECL_RPL (posix_spawn_file_actions_destroy, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
751 (posix_spawn_file_actions_t *__file_actions) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
752 __THROW _GL_ARG_NONNULL ((1))); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
753 _GL_CXXALIAS_RPL (posix_spawn_file_actions_destroy, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
754 (posix_spawn_file_actions_t *__file_actions)); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
755 # else |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
756 # if !@HAVE_POSIX_SPAWN@ |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
757 _GL_FUNCDECL_SYS (posix_spawn_file_actions_destroy, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
758 (posix_spawn_file_actions_t *__file_actions) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
759 __THROW _GL_ARG_NONNULL ((1))); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
760 # endif |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
761 _GL_CXXALIAS_SYS (posix_spawn_file_actions_destroy, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
762 (posix_spawn_file_actions_t *__file_actions)); |
10504 | 763 # endif |
12939
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
764 _GL_CXXALIASWARN (posix_spawn_file_actions_destroy); |
12535
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
765 #elif defined GNULIB_POSIXCHECK |
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
766 # undef posix_spawn_file_actions_destroy |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
767 # if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_DESTROY |
13758
e50f7d9e3040
Avoid some lines longer than 80 characters.
Paul Eggert <eggert@cs.ucla.edu>
parents:
13094
diff
changeset
|
768 _GL_WARN_ON_USE (posix_spawn_file_actions_destroy, |
e50f7d9e3040
Avoid some lines longer than 80 characters.
Paul Eggert <eggert@cs.ucla.edu>
parents:
13094
diff
changeset
|
769 "posix_spawn_file_actions_destroy is unportable - " |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
770 "use gnulib module posix_spawn_file_actions_destroy for portability"); |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
771 # endif |
10504 | 772 #endif |
773 | |
774 #if @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN@ | |
775 /* Add an action to FILE-ACTIONS which tells the implementation to call | |
16235
18a38c9615f0
In commentary, do not use ` to quote.
Paul Eggert <eggert@cs.ucla.edu>
parents:
16201
diff
changeset
|
776 'open' for the given file during the 'spawn' call. */ |
16257
a5001764146b
posix_spawn_file_actions_addopen: Work around Solaris 11 2011-11 bug.
Bruno Haible <bruno@clisp.org>
parents:
16256
diff
changeset
|
777 # if @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN@ |
12939
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
778 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
779 # define posix_spawn_file_actions_addopen rpl_posix_spawn_file_actions_addopen |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
780 # endif |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
781 _GL_FUNCDECL_RPL (posix_spawn_file_actions_addopen, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
782 (posix_spawn_file_actions_t *_Restrict_ __file_actions, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
783 int __fd, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
784 const char *_Restrict_ __path, int __oflag, mode_t __mode) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
785 __THROW _GL_ARG_NONNULL ((1, 3))); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
786 _GL_CXXALIAS_RPL (posix_spawn_file_actions_addopen, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
787 (posix_spawn_file_actions_t *_Restrict_ __file_actions, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
788 int __fd, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
789 const char *_Restrict_ __path, int __oflag, mode_t __mode)); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
790 # else |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
791 # if !@HAVE_POSIX_SPAWN@ |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
792 _GL_FUNCDECL_SYS (posix_spawn_file_actions_addopen, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
793 (posix_spawn_file_actions_t *_Restrict_ __file_actions, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
794 int __fd, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
795 const char *_Restrict_ __path, int __oflag, mode_t __mode) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
796 __THROW _GL_ARG_NONNULL ((1, 3))); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
797 # endif |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
798 _GL_CXXALIAS_SYS (posix_spawn_file_actions_addopen, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
799 (posix_spawn_file_actions_t *_Restrict_ __file_actions, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
800 int __fd, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
801 const char *_Restrict_ __path, int __oflag, mode_t __mode)); |
10504 | 802 # endif |
12939
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
803 _GL_CXXALIASWARN (posix_spawn_file_actions_addopen); |
12535
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
804 #elif defined GNULIB_POSIXCHECK |
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
805 # undef posix_spawn_file_actions_addopen |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
806 # if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN |
13758
e50f7d9e3040
Avoid some lines longer than 80 characters.
Paul Eggert <eggert@cs.ucla.edu>
parents:
13094
diff
changeset
|
807 _GL_WARN_ON_USE (posix_spawn_file_actions_addopen, |
e50f7d9e3040
Avoid some lines longer than 80 characters.
Paul Eggert <eggert@cs.ucla.edu>
parents:
13094
diff
changeset
|
808 "posix_spawn_file_actions_addopen is unportable - " |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
809 "use gnulib module posix_spawn_file_actions_addopen for portability"); |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
810 # endif |
10504 | 811 #endif |
812 | |
813 #if @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE@ | |
814 /* Add an action to FILE-ACTIONS which tells the implementation to call | |
16235
18a38c9615f0
In commentary, do not use ` to quote.
Paul Eggert <eggert@cs.ucla.edu>
parents:
16201
diff
changeset
|
815 'close' for the given file descriptor during the 'spawn' call. */ |
16255
e5b440980b6c
posix_spawn_file_actions_addclose: Work around Solaris 11 2011-11 bug.
Bruno Haible <bruno@clisp.org>
parents:
16235
diff
changeset
|
816 # if @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE@ |
12939
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
817 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
818 # define posix_spawn_file_actions_addclose rpl_posix_spawn_file_actions_addclose |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
819 # endif |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
820 _GL_FUNCDECL_RPL (posix_spawn_file_actions_addclose, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
821 (posix_spawn_file_actions_t *__file_actions, int __fd) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
822 __THROW _GL_ARG_NONNULL ((1))); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
823 _GL_CXXALIAS_RPL (posix_spawn_file_actions_addclose, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
824 (posix_spawn_file_actions_t *__file_actions, int __fd)); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
825 # else |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
826 # if !@HAVE_POSIX_SPAWN@ |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
827 _GL_FUNCDECL_SYS (posix_spawn_file_actions_addclose, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
828 (posix_spawn_file_actions_t *__file_actions, int __fd) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
829 __THROW _GL_ARG_NONNULL ((1))); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
830 # endif |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
831 _GL_CXXALIAS_SYS (posix_spawn_file_actions_addclose, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
832 (posix_spawn_file_actions_t *__file_actions, int __fd)); |
10504 | 833 # endif |
12939
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
834 _GL_CXXALIASWARN (posix_spawn_file_actions_addclose); |
12535
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
835 #elif defined GNULIB_POSIXCHECK |
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
836 # undef posix_spawn_file_actions_addclose |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
837 # if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE |
13758
e50f7d9e3040
Avoid some lines longer than 80 characters.
Paul Eggert <eggert@cs.ucla.edu>
parents:
13094
diff
changeset
|
838 _GL_WARN_ON_USE (posix_spawn_file_actions_addclose, |
e50f7d9e3040
Avoid some lines longer than 80 characters.
Paul Eggert <eggert@cs.ucla.edu>
parents:
13094
diff
changeset
|
839 "posix_spawn_file_actions_addclose is unportable - " |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
840 "use gnulib module posix_spawn_file_actions_addclose for portability"); |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
841 # endif |
10504 | 842 #endif |
843 | |
844 #if @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2@ | |
845 /* Add an action to FILE-ACTIONS which tells the implementation to call | |
16235
18a38c9615f0
In commentary, do not use ` to quote.
Paul Eggert <eggert@cs.ucla.edu>
parents:
16201
diff
changeset
|
846 'dup2' for the given file descriptors during the 'spawn' call. */ |
16256
e32fc9c363fe
posix_spawn_file_actions_adddup2: Work around Solaris 11 2011-11 bug.
Bruno Haible <bruno@clisp.org>
parents:
16255
diff
changeset
|
847 # if @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2@ |
12939
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
848 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
849 # define posix_spawn_file_actions_adddup2 rpl_posix_spawn_file_actions_adddup2 |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
850 # endif |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
851 _GL_FUNCDECL_RPL (posix_spawn_file_actions_adddup2, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
852 (posix_spawn_file_actions_t *__file_actions, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
853 int __fd, int __newfd) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
854 __THROW _GL_ARG_NONNULL ((1))); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
855 _GL_CXXALIAS_RPL (posix_spawn_file_actions_adddup2, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
856 (posix_spawn_file_actions_t *__file_actions, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
857 int __fd, int __newfd)); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
858 # else |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
859 # if !@HAVE_POSIX_SPAWN@ |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
860 _GL_FUNCDECL_SYS (posix_spawn_file_actions_adddup2, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
861 (posix_spawn_file_actions_t *__file_actions, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
862 int __fd, int __newfd) |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
863 __THROW _GL_ARG_NONNULL ((1))); |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
864 # endif |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
865 _GL_CXXALIAS_SYS (posix_spawn_file_actions_adddup2, int, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
866 (posix_spawn_file_actions_t *__file_actions, |
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
867 int __fd, int __newfd)); |
10504 | 868 # endif |
12939
cfcc4a6e1c21
spawn: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12918
diff
changeset
|
869 _GL_CXXALIASWARN (posix_spawn_file_actions_adddup2); |
12535
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
870 #elif defined GNULIB_POSIXCHECK |
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
871 # undef posix_spawn_file_actions_adddup2 |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
872 # if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 |
13758
e50f7d9e3040
Avoid some lines longer than 80 characters.
Paul Eggert <eggert@cs.ucla.edu>
parents:
13094
diff
changeset
|
873 _GL_WARN_ON_USE (posix_spawn_file_actions_adddup2, |
e50f7d9e3040
Avoid some lines longer than 80 characters.
Paul Eggert <eggert@cs.ucla.edu>
parents:
13094
diff
changeset
|
874 "posix_spawn_file_actions_adddup2 is unportable - " |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
875 "use gnulib module posix_spawn_file_actions_adddup2 for portability"); |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
876 # endif |
10504 | 877 #endif |
878 | |
879 | |
14840
5f709022a256
Allow multiple gnulib generated include files to be combined.
Bruno Haible <bruno@clisp.org>
parents:
14274
diff
changeset
|
880 #endif /* _@GUARD_PREFIX@_SPAWN_H */ |
5f709022a256
Allow multiple gnulib generated include files to be combined.
Bruno Haible <bruno@clisp.org>
parents:
14274
diff
changeset
|
881 #endif /* _@GUARD_PREFIX@_SPAWN_H */ |