1 /* Definitions for POSIX spawn interface.
2 Copyright (C) 2000, 2003-2004, 2008-2020 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
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.
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.
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <https://www.gnu.org/licenses/>. */
18 #ifndef _@GUARD_PREFIX@_SPAWN_H
21 @PRAGMA_SYSTEM_HEADER@
25 /* The include_next requires a split double-inclusion guard. */
27 # @INCLUDE_NEXT@ @NEXT_SPAWN_H@
30 #ifndef _@GUARD_PREFIX@_SPAWN_H
31 #define _@GUARD_PREFIX@_SPAWN_H
33 /* Get definitions of 'struct sched_param' and 'sigset_t'.
34 But avoid namespace pollution on glibc systems. */
35 #if !(defined __GLIBC__ && !defined __UCLIBC__)
40 #include <sys/types.h>
46 /* For plain 'restrict', use glibc's __restrict if defined.
47 Otherwise, GCC 2.95 and later have "__restrict"; C99 compilers have
48 "restrict", and "configure" may have defined "restrict".
49 Other compilers use __restrict, __restrict__, and _Restrict, and
50 'configure' might #define 'restrict' to those words, so pick a
53 # if defined __restrict \
54 || 2 < __GNUC__ + (95 <= __GNUC_MINOR__) \
55 || __clang_major__ >= 3
56 # define _Restrict_ __restrict
57 # elif 199901L <= __STDC_VERSION__ || defined restrict
58 # define _Restrict_ restrict
63 /* For the ISO C99 syntax
65 use glibc's __restrict_arr if available.
66 Otherwise, GCC 3.1 and clang support this syntax (but not in C++ mode).
67 Other ISO C99 compilers support it as well. */
68 #ifndef _Restrict_arr_
69 # ifdef __restrict_arr
70 # define _Restrict_arr_ __restrict_arr
71 # elif ((199901L <= __STDC_VERSION__ \
72 || 3 < __GNUC__ + (1 <= __GNUC_MINOR__) \
73 || __clang_major__ >= 3) \
74 && !defined __cplusplus)
75 # define _Restrict_arr_ _Restrict_
77 # define _Restrict_arr_
81 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
83 /* The definition of _GL_ARG_NONNULL is copied here. */
85 /* The definition of _GL_WARN_ON_USE is copied here. */
88 /* Data structure to contain attributes for thread creation. */
89 #if @REPLACE_POSIX_SPAWN@ || (@HAVE_POSIX_SPAWNATTR_T@ && !@HAVE_POSIX_SPAWN@)
90 # define posix_spawnattr_t rpl_posix_spawnattr_t
92 #if @REPLACE_POSIX_SPAWN@ || !@HAVE_POSIX_SPAWNATTR_T@ || !@HAVE_POSIX_SPAWN@
93 # if !GNULIB_defined_posix_spawnattr_t
100 struct sched_param _sp
;
104 # define GNULIB_defined_posix_spawnattr_t 1
109 /* Data structure to contain information about the actions to be
110 performed in the new process with respect to file descriptors. */
111 #if @REPLACE_POSIX_SPAWN@ || (@HAVE_POSIX_SPAWN_FILE_ACTIONS_T@ && !@HAVE_POSIX_SPAWN@)
112 # define posix_spawn_file_actions_t rpl_posix_spawn_file_actions_t
114 #if @REPLACE_POSIX_SPAWN@ || !@HAVE_POSIX_SPAWN_FILE_ACTIONS_T@ || !@HAVE_POSIX_SPAWN@
115 # if !GNULIB_defined_posix_spawn_file_actions_t
120 struct __spawn_action
*_actions
;
122 } posix_spawn_file_actions_t
;
123 # define GNULIB_defined_posix_spawn_file_actions_t 1
128 /* Flags to be set in the 'posix_spawnattr_t'. */
129 #if @HAVE_POSIX_SPAWN@
130 /* Use the values from the system, but provide the missing ones. */
131 # ifndef POSIX_SPAWN_SETSCHEDPARAM
132 # define POSIX_SPAWN_SETSCHEDPARAM 0
134 # ifndef POSIX_SPAWN_SETSCHEDULER
135 # define POSIX_SPAWN_SETSCHEDULER 0
138 # if @REPLACE_POSIX_SPAWN@
139 /* Use the values from the system, for better compatibility. */
140 /* But this implementation does not support AIX extensions. */
141 # undef POSIX_SPAWN_FORK_HANDLERS
143 # define POSIX_SPAWN_RESETIDS 0x01
144 # define POSIX_SPAWN_SETPGROUP 0x02
145 # define POSIX_SPAWN_SETSIGDEF 0x04
146 # define POSIX_SPAWN_SETSIGMASK 0x08
147 # define POSIX_SPAWN_SETSCHEDPARAM 0x10
148 # define POSIX_SPAWN_SETSCHEDULER 0x20
151 /* A GNU extension. Use the next free bit position. */
152 #ifndef POSIX_SPAWN_USEVFORK
153 # define POSIX_SPAWN_USEVFORK \
154 ((POSIX_SPAWN_RESETIDS | (POSIX_SPAWN_RESETIDS - 1) \
155 | POSIX_SPAWN_SETPGROUP | (POSIX_SPAWN_SETPGROUP - 1) \
156 | POSIX_SPAWN_SETSIGDEF | (POSIX_SPAWN_SETSIGDEF - 1) \
157 | POSIX_SPAWN_SETSIGMASK | (POSIX_SPAWN_SETSIGMASK - 1) \
158 | POSIX_SPAWN_SETSCHEDPARAM \
159 | (POSIX_SPAWN_SETSCHEDPARAM > 0 ? POSIX_SPAWN_SETSCHEDPARAM - 1 : 0) \
160 | POSIX_SPAWN_SETSCHEDULER \
161 | (POSIX_SPAWN_SETSCHEDULER > 0 ? POSIX_SPAWN_SETSCHEDULER - 1 : 0)) \
164 #if !GNULIB_defined_verify_POSIX_SPAWN_USEVFORK_no_overlap
165 typedef int verify_POSIX_SPAWN_USEVFORK_no_overlap
166 [(((POSIX_SPAWN_RESETIDS
| POSIX_SPAWN_SETPGROUP
167 | POSIX_SPAWN_SETSIGDEF
| POSIX_SPAWN_SETSIGMASK
168 | POSIX_SPAWN_SETSCHEDPARAM
| POSIX_SPAWN_SETSCHEDULER
)
169 & POSIX_SPAWN_USEVFORK
)
172 # define GNULIB_defined_verify_POSIX_SPAWN_USEVFORK_no_overlap 1
176 #if @GNULIB_POSIX_SPAWN@
177 /* Spawn a new process executing PATH with the attributes describes in *ATTRP.
178 Before running the process perform the actions described in FILE-ACTIONS.
180 This function is a possible cancellation points and therefore not
181 marked with __THROW. */
182 # if @REPLACE_POSIX_SPAWN@
183 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
184 # define posix_spawn rpl_posix_spawn
186 _GL_FUNCDECL_RPL (posix_spawn
, int,
187 (pid_t
*_Restrict_ __pid
,
188 const char *_Restrict_ __path
,
189 const posix_spawn_file_actions_t
*_Restrict_ __file_actions
,
190 const posix_spawnattr_t
*_Restrict_ __attrp
,
191 char *const argv
[_Restrict_arr_
],
192 char *const envp
[_Restrict_arr_
])
193 _GL_ARG_NONNULL ((2, 5, 6)));
194 _GL_CXXALIAS_RPL (posix_spawn
, int,
195 (pid_t
*_Restrict_ __pid
,
196 const char *_Restrict_ __path
,
197 const posix_spawn_file_actions_t
*_Restrict_ __file_actions
,
198 const posix_spawnattr_t
*_Restrict_ __attrp
,
199 char *const argv
[_Restrict_arr_
],
200 char *const envp
[_Restrict_arr_
]));
202 # if !@HAVE_POSIX_SPAWN@
203 _GL_FUNCDECL_SYS (posix_spawn
, int,
204 (pid_t
*_Restrict_ __pid
,
205 const char *_Restrict_ __path
,
206 const posix_spawn_file_actions_t
*_Restrict_ __file_actions
,
207 const posix_spawnattr_t
*_Restrict_ __attrp
,
208 char *const argv
[_Restrict_arr_
],
209 char *const envp
[_Restrict_arr_
])
210 _GL_ARG_NONNULL ((2, 5, 6)));
212 _GL_CXXALIAS_SYS (posix_spawn
, int,
213 (pid_t
*_Restrict_ __pid
,
214 const char *_Restrict_ __path
,
215 const posix_spawn_file_actions_t
*_Restrict_ __file_actions
,
216 const posix_spawnattr_t
*_Restrict_ __attrp
,
217 char *const argv
[_Restrict_arr_
],
218 char *const envp
[_Restrict_arr_
]));
220 _GL_CXXALIASWARN (posix_spawn
);
221 #elif defined GNULIB_POSIXCHECK
223 # if HAVE_RAW_DECL_POSIX_SPAWN
224 _GL_WARN_ON_USE (posix_spawn
, "posix_spawn is unportable - "
225 "use gnulib module posix_spawn for portability");
229 #if @GNULIB_POSIX_SPAWNP@
230 /* Similar to 'posix_spawn' but search for FILE in the PATH.
232 This function is a possible cancellation points and therefore not
233 marked with __THROW. */
234 # if @REPLACE_POSIX_SPAWN@
235 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
236 # define posix_spawnp rpl_posix_spawnp
238 _GL_FUNCDECL_RPL (posix_spawnp
, int,
239 (pid_t
*__pid
, const char *__file
,
240 const posix_spawn_file_actions_t
*__file_actions
,
241 const posix_spawnattr_t
*__attrp
,
242 char *const argv
[], char *const envp
[])
243 _GL_ARG_NONNULL ((2, 5, 6)));
244 _GL_CXXALIAS_RPL (posix_spawnp
, int,
245 (pid_t
*__pid
, const char *__file
,
246 const posix_spawn_file_actions_t
*__file_actions
,
247 const posix_spawnattr_t
*__attrp
,
248 char *const argv
[], char *const envp
[]));
250 # if !@HAVE_POSIX_SPAWN@
251 _GL_FUNCDECL_SYS (posix_spawnp
, int,
252 (pid_t
*__pid
, const char *__file
,
253 const posix_spawn_file_actions_t
*__file_actions
,
254 const posix_spawnattr_t
*__attrp
,
255 char *const argv
[], char *const envp
[])
256 _GL_ARG_NONNULL ((2, 5, 6)));
258 _GL_CXXALIAS_SYS (posix_spawnp
, int,
259 (pid_t
*__pid
, const char *__file
,
260 const posix_spawn_file_actions_t
*__file_actions
,
261 const posix_spawnattr_t
*__attrp
,
262 char *const argv
[], char *const envp
[]));
264 _GL_CXXALIASWARN (posix_spawnp
);
265 #elif defined GNULIB_POSIXCHECK
267 # if HAVE_RAW_DECL_POSIX_SPAWNP
268 _GL_WARN_ON_USE (posix_spawnp
, "posix_spawnp is unportable - "
269 "use gnulib module posix_spawnp for portability");
274 #if @GNULIB_POSIX_SPAWNATTR_INIT@
275 /* Initialize data structure with attributes for 'spawn' to default values. */
276 # if @REPLACE_POSIX_SPAWN@
277 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
278 # define posix_spawnattr_init rpl_posix_spawnattr_init
280 _GL_FUNCDECL_RPL (posix_spawnattr_init
, int, (posix_spawnattr_t
*__attr
)
281 __THROW
_GL_ARG_NONNULL ((1)));
282 _GL_CXXALIAS_RPL (posix_spawnattr_init
, int, (posix_spawnattr_t
*__attr
));
284 # if !@HAVE_POSIX_SPAWN@
285 _GL_FUNCDECL_SYS (posix_spawnattr_init
, int, (posix_spawnattr_t
*__attr
)
286 __THROW
_GL_ARG_NONNULL ((1)));
288 _GL_CXXALIAS_SYS (posix_spawnattr_init
, int, (posix_spawnattr_t
*__attr
));
290 _GL_CXXALIASWARN (posix_spawnattr_init
);
291 #elif defined GNULIB_POSIXCHECK
292 # undef posix_spawnattr_init
293 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_INIT
294 _GL_WARN_ON_USE (posix_spawnattr_init
, "posix_spawnattr_init is unportable - "
295 "use gnulib module posix_spawnattr_init for portability");
299 #if @GNULIB_POSIX_SPAWNATTR_DESTROY@
300 /* Free resources associated with ATTR. */
301 # if @REPLACE_POSIX_SPAWN@
302 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
303 # define posix_spawnattr_destroy rpl_posix_spawnattr_destroy
305 _GL_FUNCDECL_RPL (posix_spawnattr_destroy
, int, (posix_spawnattr_t
*__attr
)
306 __THROW
_GL_ARG_NONNULL ((1)));
307 _GL_CXXALIAS_RPL (posix_spawnattr_destroy
, int, (posix_spawnattr_t
*__attr
));
309 # if !@HAVE_POSIX_SPAWN@
310 _GL_FUNCDECL_SYS (posix_spawnattr_destroy
, int, (posix_spawnattr_t
*__attr
)
311 __THROW
_GL_ARG_NONNULL ((1)));
313 _GL_CXXALIAS_SYS (posix_spawnattr_destroy
, int, (posix_spawnattr_t
*__attr
));
315 _GL_CXXALIASWARN (posix_spawnattr_destroy
);
316 #elif defined GNULIB_POSIXCHECK
317 # undef posix_spawnattr_destroy
318 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_DESTROY
319 _GL_WARN_ON_USE (posix_spawnattr_destroy
,
320 "posix_spawnattr_destroy is unportable - "
321 "use gnulib module posix_spawnattr_destroy for portability");
325 #if @GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT@
326 /* Store signal mask for signals with default handling from ATTR in
328 # if @REPLACE_POSIX_SPAWN@
329 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
330 # define posix_spawnattr_getsigdefault rpl_posix_spawnattr_getsigdefault
332 _GL_FUNCDECL_RPL (posix_spawnattr_getsigdefault
, int,
333 (const posix_spawnattr_t
*_Restrict_ __attr
,
334 sigset_t
*_Restrict_ __sigdefault
)
335 __THROW
_GL_ARG_NONNULL ((1, 2)));
336 _GL_CXXALIAS_RPL (posix_spawnattr_getsigdefault
, int,
337 (const posix_spawnattr_t
*_Restrict_ __attr
,
338 sigset_t
*_Restrict_ __sigdefault
));
340 # if !@HAVE_POSIX_SPAWN@
341 _GL_FUNCDECL_SYS (posix_spawnattr_getsigdefault
, int,
342 (const posix_spawnattr_t
*_Restrict_ __attr
,
343 sigset_t
*_Restrict_ __sigdefault
)
344 __THROW
_GL_ARG_NONNULL ((1, 2)));
346 _GL_CXXALIAS_SYS (posix_spawnattr_getsigdefault
, int,
347 (const posix_spawnattr_t
*_Restrict_ __attr
,
348 sigset_t
*_Restrict_ __sigdefault
));
350 _GL_CXXALIASWARN (posix_spawnattr_getsigdefault
);
351 #elif defined GNULIB_POSIXCHECK
352 # undef posix_spawnattr_getsigdefault
353 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_GETSIGDEFAULT
354 _GL_WARN_ON_USE (posix_spawnattr_getsigdefault
,
355 "posix_spawnattr_getsigdefault is unportable - "
356 "use gnulib module posix_spawnattr_getsigdefault for portability");
360 #if @GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT@
361 /* Set signal mask for signals with default handling in ATTR to SIGDEFAULT. */
362 # if @REPLACE_POSIX_SPAWN@
363 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
364 # define posix_spawnattr_setsigdefault rpl_posix_spawnattr_setsigdefault
366 _GL_FUNCDECL_RPL (posix_spawnattr_setsigdefault
, int,
367 (posix_spawnattr_t
*_Restrict_ __attr
,
368 const sigset_t
*_Restrict_ __sigdefault
)
369 __THROW
_GL_ARG_NONNULL ((1, 2)));
370 _GL_CXXALIAS_RPL (posix_spawnattr_setsigdefault
, int,
371 (posix_spawnattr_t
*_Restrict_ __attr
,
372 const sigset_t
*_Restrict_ __sigdefault
));
374 # if !@HAVE_POSIX_SPAWN@
375 _GL_FUNCDECL_SYS (posix_spawnattr_setsigdefault
, int,
376 (posix_spawnattr_t
*_Restrict_ __attr
,
377 const sigset_t
*_Restrict_ __sigdefault
)
378 __THROW
_GL_ARG_NONNULL ((1, 2)));
380 _GL_CXXALIAS_SYS (posix_spawnattr_setsigdefault
, int,
381 (posix_spawnattr_t
*_Restrict_ __attr
,
382 const sigset_t
*_Restrict_ __sigdefault
));
384 _GL_CXXALIASWARN (posix_spawnattr_setsigdefault
);
385 #elif defined GNULIB_POSIXCHECK
386 # undef posix_spawnattr_setsigdefault
387 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_SETSIGDEFAULT
388 _GL_WARN_ON_USE (posix_spawnattr_setsigdefault
,
389 "posix_spawnattr_setsigdefault is unportable - "
390 "use gnulib module posix_spawnattr_setsigdefault for portability");
394 #if @GNULIB_POSIX_SPAWNATTR_GETSIGMASK@
395 /* Store signal mask for the new process from ATTR in SIGMASK. */
396 # if @REPLACE_POSIX_SPAWN@
397 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
398 # define posix_spawnattr_getsigmask rpl_posix_spawnattr_getsigmask
400 _GL_FUNCDECL_RPL (posix_spawnattr_getsigmask
, int,
401 (const posix_spawnattr_t
*_Restrict_ __attr
,
402 sigset_t
*_Restrict_ __sigmask
)
403 __THROW
_GL_ARG_NONNULL ((1, 2)));
404 _GL_CXXALIAS_RPL (posix_spawnattr_getsigmask
, int,
405 (const posix_spawnattr_t
*_Restrict_ __attr
,
406 sigset_t
*_Restrict_ __sigmask
));
408 # if !@HAVE_POSIX_SPAWN@
409 _GL_FUNCDECL_SYS (posix_spawnattr_getsigmask
, int,
410 (const posix_spawnattr_t
*_Restrict_ __attr
,
411 sigset_t
*_Restrict_ __sigmask
)
412 __THROW
_GL_ARG_NONNULL ((1, 2)));
414 _GL_CXXALIAS_SYS (posix_spawnattr_getsigmask
, int,
415 (const posix_spawnattr_t
*_Restrict_ __attr
,
416 sigset_t
*_Restrict_ __sigmask
));
418 _GL_CXXALIASWARN (posix_spawnattr_getsigmask
);
419 #elif defined GNULIB_POSIXCHECK
420 # undef posix_spawnattr_getsigmask
421 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_GETSIGMASK
422 _GL_WARN_ON_USE (posix_spawnattr_getsigmask
,
423 "posix_spawnattr_getsigmask is unportable - "
424 "use gnulib module posix_spawnattr_getsigmask for portability");
428 #if @GNULIB_POSIX_SPAWNATTR_SETSIGMASK@
429 /* Set signal mask for the new process in ATTR to SIGMASK. */
430 # if @REPLACE_POSIX_SPAWN@
431 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
432 # define posix_spawnattr_setsigmask rpl_posix_spawnattr_setsigmask
434 _GL_FUNCDECL_RPL (posix_spawnattr_setsigmask
, int,
435 (posix_spawnattr_t
*_Restrict_ __attr
,
436 const sigset_t
*_Restrict_ __sigmask
)
437 __THROW
_GL_ARG_NONNULL ((1, 2)));
438 _GL_CXXALIAS_RPL (posix_spawnattr_setsigmask
, int,
439 (posix_spawnattr_t
*_Restrict_ __attr
,
440 const sigset_t
*_Restrict_ __sigmask
));
442 # if !@HAVE_POSIX_SPAWN@
443 _GL_FUNCDECL_SYS (posix_spawnattr_setsigmask
, int,
444 (posix_spawnattr_t
*_Restrict_ __attr
,
445 const sigset_t
*_Restrict_ __sigmask
)
446 __THROW
_GL_ARG_NONNULL ((1, 2)));
448 _GL_CXXALIAS_SYS (posix_spawnattr_setsigmask
, int,
449 (posix_spawnattr_t
*_Restrict_ __attr
,
450 const sigset_t
*_Restrict_ __sigmask
));
452 _GL_CXXALIASWARN (posix_spawnattr_setsigmask
);
453 #elif defined GNULIB_POSIXCHECK
454 # undef posix_spawnattr_setsigmask
455 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_SETSIGMASK
456 _GL_WARN_ON_USE (posix_spawnattr_setsigmask
,
457 "posix_spawnattr_setsigmask is unportable - "
458 "use gnulib module posix_spawnattr_setsigmask for portability");
462 #if @GNULIB_POSIX_SPAWNATTR_GETFLAGS@
463 /* Get flag word from the attribute structure. */
464 # if @REPLACE_POSIX_SPAWN@
465 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
466 # define posix_spawnattr_getflags rpl_posix_spawnattr_getflags
468 _GL_FUNCDECL_RPL (posix_spawnattr_getflags
, int,
469 (const posix_spawnattr_t
*_Restrict_ __attr
,
470 short int *_Restrict_ __flags
)
471 __THROW
_GL_ARG_NONNULL ((1, 2)));
472 _GL_CXXALIAS_RPL (posix_spawnattr_getflags
, int,
473 (const posix_spawnattr_t
*_Restrict_ __attr
,
474 short int *_Restrict_ __flags
));
476 # if !@HAVE_POSIX_SPAWN@
477 _GL_FUNCDECL_SYS (posix_spawnattr_getflags
, int,
478 (const posix_spawnattr_t
*_Restrict_ __attr
,
479 short int *_Restrict_ __flags
)
480 __THROW
_GL_ARG_NONNULL ((1, 2)));
482 _GL_CXXALIAS_SYS (posix_spawnattr_getflags
, int,
483 (const posix_spawnattr_t
*_Restrict_ __attr
,
484 short int *_Restrict_ __flags
));
486 _GL_CXXALIASWARN (posix_spawnattr_getflags
);
487 #elif defined GNULIB_POSIXCHECK
488 # undef posix_spawnattr_getflags
489 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_GETFLAGS
490 _GL_WARN_ON_USE (posix_spawnattr_getflags
,
491 "posix_spawnattr_getflags is unportable - "
492 "use gnulib module posix_spawnattr_getflags for portability");
496 #if @GNULIB_POSIX_SPAWNATTR_SETFLAGS@
497 /* Store flags in the attribute structure. */
498 # if @REPLACE_POSIX_SPAWN@
499 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
500 # define posix_spawnattr_setflags rpl_posix_spawnattr_setflags
502 _GL_FUNCDECL_RPL (posix_spawnattr_setflags
, int,
503 (posix_spawnattr_t
*__attr
, short int __flags
)
504 __THROW
_GL_ARG_NONNULL ((1)));
505 _GL_CXXALIAS_RPL (posix_spawnattr_setflags
, int,
506 (posix_spawnattr_t
*__attr
, short int __flags
));
508 # if !@HAVE_POSIX_SPAWN@
509 _GL_FUNCDECL_SYS (posix_spawnattr_setflags
, int,
510 (posix_spawnattr_t
*__attr
, short int __flags
)
511 __THROW
_GL_ARG_NONNULL ((1)));
513 _GL_CXXALIAS_SYS (posix_spawnattr_setflags
, int,
514 (posix_spawnattr_t
*__attr
, short int __flags
));
516 _GL_CXXALIASWARN (posix_spawnattr_setflags
);
517 #elif defined GNULIB_POSIXCHECK
518 # undef posix_spawnattr_setflags
519 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_SETFLAGS
520 _GL_WARN_ON_USE (posix_spawnattr_setflags
,
521 "posix_spawnattr_setflags is unportable - "
522 "use gnulib module posix_spawnattr_setflags for portability");
526 #if @GNULIB_POSIX_SPAWNATTR_GETPGROUP@
527 /* Get process group ID from the attribute structure. */
528 # if @REPLACE_POSIX_SPAWN@
529 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
530 # define posix_spawnattr_getpgroup rpl_posix_spawnattr_getpgroup
532 _GL_FUNCDECL_RPL (posix_spawnattr_getpgroup
, int,
533 (const posix_spawnattr_t
*_Restrict_ __attr
,
534 pid_t
*_Restrict_ __pgroup
)
535 __THROW
_GL_ARG_NONNULL ((1, 2)));
536 _GL_CXXALIAS_RPL (posix_spawnattr_getpgroup
, int,
537 (const posix_spawnattr_t
*_Restrict_ __attr
,
538 pid_t
*_Restrict_ __pgroup
));
540 # if !@HAVE_POSIX_SPAWN@
541 _GL_FUNCDECL_SYS (posix_spawnattr_getpgroup
, int,
542 (const posix_spawnattr_t
*_Restrict_ __attr
,
543 pid_t
*_Restrict_ __pgroup
)
544 __THROW
_GL_ARG_NONNULL ((1, 2)));
546 _GL_CXXALIAS_SYS (posix_spawnattr_getpgroup
, int,
547 (const posix_spawnattr_t
*_Restrict_ __attr
,
548 pid_t
*_Restrict_ __pgroup
));
550 _GL_CXXALIASWARN (posix_spawnattr_getpgroup
);
551 #elif defined GNULIB_POSIXCHECK
552 # undef posix_spawnattr_getpgroup
553 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_GETPGROUP
554 _GL_WARN_ON_USE (posix_spawnattr_getpgroup
,
555 "posix_spawnattr_getpgroup is unportable - "
556 "use gnulib module posix_spawnattr_getpgroup for portability");
560 #if @GNULIB_POSIX_SPAWNATTR_SETPGROUP@
561 /* Store process group ID in the attribute structure. */
562 # if @REPLACE_POSIX_SPAWN@
563 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
564 # define posix_spawnattr_setpgroup rpl_posix_spawnattr_setpgroup
566 _GL_FUNCDECL_RPL (posix_spawnattr_setpgroup
, int,
567 (posix_spawnattr_t
*__attr
, pid_t __pgroup
)
568 __THROW
_GL_ARG_NONNULL ((1)));
569 _GL_CXXALIAS_RPL (posix_spawnattr_setpgroup
, int,
570 (posix_spawnattr_t
*__attr
, pid_t __pgroup
));
572 # if !@HAVE_POSIX_SPAWN@
573 _GL_FUNCDECL_SYS (posix_spawnattr_setpgroup
, int,
574 (posix_spawnattr_t
*__attr
, pid_t __pgroup
)
575 __THROW
_GL_ARG_NONNULL ((1)));
577 _GL_CXXALIAS_SYS (posix_spawnattr_setpgroup
, int,
578 (posix_spawnattr_t
*__attr
, pid_t __pgroup
));
580 _GL_CXXALIASWARN (posix_spawnattr_setpgroup
);
581 #elif defined GNULIB_POSIXCHECK
582 # undef posix_spawnattr_setpgroup
583 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_SETPGROUP
584 _GL_WARN_ON_USE (posix_spawnattr_setpgroup
,
585 "posix_spawnattr_setpgroup is unportable - "
586 "use gnulib module posix_spawnattr_setpgroup for portability");
590 #if @GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY@
591 /* Get scheduling policy from the attribute structure. */
592 # if @REPLACE_POSIX_SPAWN@
593 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
594 # define posix_spawnattr_getschedpolicy rpl_posix_spawnattr_getschedpolicy
596 _GL_FUNCDECL_RPL (posix_spawnattr_getschedpolicy
, int,
597 (const posix_spawnattr_t
*_Restrict_ __attr
,
598 int *_Restrict_ __schedpolicy
)
599 __THROW
_GL_ARG_NONNULL ((1, 2)));
600 _GL_CXXALIAS_RPL (posix_spawnattr_getschedpolicy
, int,
601 (const posix_spawnattr_t
*_Restrict_ __attr
,
602 int *_Restrict_ __schedpolicy
));
604 # if !@HAVE_POSIX_SPAWN@ || POSIX_SPAWN_SETSCHEDULER == 0
605 _GL_FUNCDECL_SYS (posix_spawnattr_getschedpolicy
, int,
606 (const posix_spawnattr_t
*_Restrict_ __attr
,
607 int *_Restrict_ __schedpolicy
)
608 __THROW
_GL_ARG_NONNULL ((1, 2)));
610 _GL_CXXALIAS_SYS (posix_spawnattr_getschedpolicy
, int,
611 (const posix_spawnattr_t
*_Restrict_ __attr
,
612 int *_Restrict_ __schedpolicy
));
615 _GL_CXXALIASWARN (posix_spawnattr_getschedpolicy
);
617 #elif defined GNULIB_POSIXCHECK
618 # undef posix_spawnattr_getschedpolicy
619 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_GETSCHEDPOLICY
620 _GL_WARN_ON_USE (posix_spawnattr_getschedpolicy
,
621 "posix_spawnattr_getschedpolicy is unportable - "
622 "use gnulib module posix_spawnattr_getschedpolicy for portability");
626 #if @GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY@
627 /* Store scheduling policy in the attribute structure. */
628 # if @REPLACE_POSIX_SPAWN@
629 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
630 # define posix_spawnattr_setschedpolicy rpl_posix_spawnattr_setschedpolicy
632 _GL_FUNCDECL_RPL (posix_spawnattr_setschedpolicy
, int,
633 (posix_spawnattr_t
*__attr
, int __schedpolicy
)
634 __THROW
_GL_ARG_NONNULL ((1)));
635 _GL_CXXALIAS_RPL (posix_spawnattr_setschedpolicy
, int,
636 (posix_spawnattr_t
*__attr
, int __schedpolicy
));
638 # if !@HAVE_POSIX_SPAWN@ || POSIX_SPAWN_SETSCHEDULER == 0
639 _GL_FUNCDECL_SYS (posix_spawnattr_setschedpolicy
, int,
640 (posix_spawnattr_t
*__attr
, int __schedpolicy
)
641 __THROW
_GL_ARG_NONNULL ((1)));
643 _GL_CXXALIAS_SYS (posix_spawnattr_setschedpolicy
, int,
644 (posix_spawnattr_t
*__attr
, int __schedpolicy
));
647 _GL_CXXALIASWARN (posix_spawnattr_setschedpolicy
);
649 #elif defined GNULIB_POSIXCHECK
650 # undef posix_spawnattr_setschedpolicy
651 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_SETSCHEDPOLICY
652 _GL_WARN_ON_USE (posix_spawnattr_setschedpolicy
,
653 "posix_spawnattr_setschedpolicy is unportable - "
654 "use gnulib module posix_spawnattr_setschedpolicy for portability");
658 #if @GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM@
659 /* Get scheduling parameters from the attribute structure. */
660 # if @REPLACE_POSIX_SPAWN@
661 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
662 # define posix_spawnattr_getschedparam rpl_posix_spawnattr_getschedparam
664 _GL_FUNCDECL_RPL (posix_spawnattr_getschedparam
, int,
665 (const posix_spawnattr_t
*_Restrict_ __attr
,
666 struct sched_param
*_Restrict_ __schedparam
)
667 __THROW
_GL_ARG_NONNULL ((1, 2)));
668 _GL_CXXALIAS_RPL (posix_spawnattr_getschedparam
, int,
669 (const posix_spawnattr_t
*_Restrict_ __attr
,
670 struct sched_param
*_Restrict_ __schedparam
));
672 # if !@HAVE_POSIX_SPAWN@ || POSIX_SPAWN_SETSCHEDPARAM == 0
673 _GL_FUNCDECL_SYS (posix_spawnattr_getschedparam
, int,
674 (const posix_spawnattr_t
*_Restrict_ __attr
,
675 struct sched_param
*_Restrict_ __schedparam
)
676 __THROW
_GL_ARG_NONNULL ((1, 2)));
678 _GL_CXXALIAS_SYS (posix_spawnattr_getschedparam
, int,
679 (const posix_spawnattr_t
*_Restrict_ __attr
,
680 struct sched_param
*_Restrict_ __schedparam
));
683 _GL_CXXALIASWARN (posix_spawnattr_getschedparam
);
685 #elif defined GNULIB_POSIXCHECK
686 # undef posix_spawnattr_getschedparam
687 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_GETSCHEDPARAM
688 _GL_WARN_ON_USE (posix_spawnattr_getschedparam
,
689 "posix_spawnattr_getschedparam is unportable - "
690 "use gnulib module posix_spawnattr_getschedparam for portability");
694 #if @GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM@
695 /* Store scheduling parameters in the attribute structure. */
696 # if @REPLACE_POSIX_SPAWN@
697 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
698 # define posix_spawnattr_setschedparam rpl_posix_spawnattr_setschedparam
700 _GL_FUNCDECL_RPL (posix_spawnattr_setschedparam
, int,
701 (posix_spawnattr_t
*_Restrict_ __attr
,
702 const struct sched_param
*_Restrict_ __schedparam
)
703 __THROW
_GL_ARG_NONNULL ((1, 2)));
704 _GL_CXXALIAS_RPL (posix_spawnattr_setschedparam
, int,
705 (posix_spawnattr_t
*_Restrict_ __attr
,
706 const struct sched_param
*_Restrict_ __schedparam
));
708 # if !@HAVE_POSIX_SPAWN@ || POSIX_SPAWN_SETSCHEDPARAM == 0
709 _GL_FUNCDECL_SYS (posix_spawnattr_setschedparam
, int,
710 (posix_spawnattr_t
*_Restrict_ __attr
,
711 const struct sched_param
*_Restrict_ __schedparam
)
712 __THROW
_GL_ARG_NONNULL ((1, 2)));
714 _GL_CXXALIAS_SYS (posix_spawnattr_setschedparam
, int,
715 (posix_spawnattr_t
*_Restrict_ __attr
,
716 const struct sched_param
*_Restrict_ __schedparam
));
719 _GL_CXXALIASWARN (posix_spawnattr_setschedparam
);
721 #elif defined GNULIB_POSIXCHECK
722 # undef posix_spawnattr_setschedparam
723 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_SETSCHEDPARAM
724 _GL_WARN_ON_USE (posix_spawnattr_setschedparam
,
725 "posix_spawnattr_setschedparam is unportable - "
726 "use gnulib module posix_spawnattr_setschedparam for portability");
731 #if @GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT@
732 /* Initialize data structure for file attribute for 'spawn' call. */
733 # if @REPLACE_POSIX_SPAWN@
734 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
735 # define posix_spawn_file_actions_init rpl_posix_spawn_file_actions_init
737 _GL_FUNCDECL_RPL (posix_spawn_file_actions_init
, int,
738 (posix_spawn_file_actions_t
*__file_actions
)
739 __THROW
_GL_ARG_NONNULL ((1)));
740 _GL_CXXALIAS_RPL (posix_spawn_file_actions_init
, int,
741 (posix_spawn_file_actions_t
*__file_actions
));
743 # if !@HAVE_POSIX_SPAWN@
744 _GL_FUNCDECL_SYS (posix_spawn_file_actions_init
, int,
745 (posix_spawn_file_actions_t
*__file_actions
)
746 __THROW
_GL_ARG_NONNULL ((1)));
748 _GL_CXXALIAS_SYS (posix_spawn_file_actions_init
, int,
749 (posix_spawn_file_actions_t
*__file_actions
));
751 _GL_CXXALIASWARN (posix_spawn_file_actions_init
);
752 #elif defined GNULIB_POSIXCHECK
753 # undef posix_spawn_file_actions_init
754 # if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_INIT
755 _GL_WARN_ON_USE (posix_spawn_file_actions_init
,
756 "posix_spawn_file_actions_init is unportable - "
757 "use gnulib module posix_spawn_file_actions_init for portability");
761 #if @GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY@
762 /* Free resources associated with FILE-ACTIONS. */
763 # if @REPLACE_POSIX_SPAWN@
764 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
765 # define posix_spawn_file_actions_destroy rpl_posix_spawn_file_actions_destroy
767 _GL_FUNCDECL_RPL (posix_spawn_file_actions_destroy
, int,
768 (posix_spawn_file_actions_t
*__file_actions
)
769 __THROW
_GL_ARG_NONNULL ((1)));
770 _GL_CXXALIAS_RPL (posix_spawn_file_actions_destroy
, int,
771 (posix_spawn_file_actions_t
*__file_actions
));
773 # if !@HAVE_POSIX_SPAWN@
774 _GL_FUNCDECL_SYS (posix_spawn_file_actions_destroy
, int,
775 (posix_spawn_file_actions_t
*__file_actions
)
776 __THROW
_GL_ARG_NONNULL ((1)));
778 _GL_CXXALIAS_SYS (posix_spawn_file_actions_destroy
, int,
779 (posix_spawn_file_actions_t
*__file_actions
));
781 _GL_CXXALIASWARN (posix_spawn_file_actions_destroy
);
782 #elif defined GNULIB_POSIXCHECK
783 # undef posix_spawn_file_actions_destroy
784 # if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_DESTROY
785 _GL_WARN_ON_USE (posix_spawn_file_actions_destroy
,
786 "posix_spawn_file_actions_destroy is unportable - "
787 "use gnulib module posix_spawn_file_actions_destroy for portability");
791 #if @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN@
792 /* Add an action to FILE-ACTIONS which tells the implementation to call
793 'open' for the given file during the 'spawn' call. */
794 # if @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN@
795 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
796 # define posix_spawn_file_actions_addopen rpl_posix_spawn_file_actions_addopen
798 _GL_FUNCDECL_RPL (posix_spawn_file_actions_addopen
, int,
799 (posix_spawn_file_actions_t
*_Restrict_ __file_actions
,
801 const char *_Restrict_ __path
, int __oflag
, mode_t __mode
)
802 __THROW
_GL_ARG_NONNULL ((1, 3)));
803 _GL_CXXALIAS_RPL (posix_spawn_file_actions_addopen
, int,
804 (posix_spawn_file_actions_t
*_Restrict_ __file_actions
,
806 const char *_Restrict_ __path
, int __oflag
, mode_t __mode
));
808 # if !@HAVE_POSIX_SPAWN@
809 _GL_FUNCDECL_SYS (posix_spawn_file_actions_addopen
, int,
810 (posix_spawn_file_actions_t
*_Restrict_ __file_actions
,
812 const char *_Restrict_ __path
, int __oflag
, mode_t __mode
)
813 __THROW
_GL_ARG_NONNULL ((1, 3)));
815 _GL_CXXALIAS_SYS (posix_spawn_file_actions_addopen
, int,
816 (posix_spawn_file_actions_t
*_Restrict_ __file_actions
,
818 const char *_Restrict_ __path
, int __oflag
, mode_t __mode
));
821 _GL_CXXALIASWARN (posix_spawn_file_actions_addopen
);
823 #elif defined GNULIB_POSIXCHECK
824 # undef posix_spawn_file_actions_addopen
825 # if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN
826 _GL_WARN_ON_USE (posix_spawn_file_actions_addopen
,
827 "posix_spawn_file_actions_addopen is unportable - "
828 "use gnulib module posix_spawn_file_actions_addopen for portability");
832 #if @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE@
833 /* Add an action to FILE-ACTIONS which tells the implementation to call
834 'close' for the given file descriptor during the 'spawn' call. */
835 # if @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE@
836 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
837 # define posix_spawn_file_actions_addclose rpl_posix_spawn_file_actions_addclose
839 _GL_FUNCDECL_RPL (posix_spawn_file_actions_addclose
, int,
840 (posix_spawn_file_actions_t
*__file_actions
, int __fd
)
841 __THROW
_GL_ARG_NONNULL ((1)));
842 _GL_CXXALIAS_RPL (posix_spawn_file_actions_addclose
, int,
843 (posix_spawn_file_actions_t
*__file_actions
, int __fd
));
845 # if !@HAVE_POSIX_SPAWN@
846 _GL_FUNCDECL_SYS (posix_spawn_file_actions_addclose
, int,
847 (posix_spawn_file_actions_t
*__file_actions
, int __fd
)
848 __THROW
_GL_ARG_NONNULL ((1)));
850 _GL_CXXALIAS_SYS (posix_spawn_file_actions_addclose
, int,
851 (posix_spawn_file_actions_t
*__file_actions
, int __fd
));
854 _GL_CXXALIASWARN (posix_spawn_file_actions_addclose
);
856 #elif defined GNULIB_POSIXCHECK
857 # undef posix_spawn_file_actions_addclose
858 # if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE
859 _GL_WARN_ON_USE (posix_spawn_file_actions_addclose
,
860 "posix_spawn_file_actions_addclose is unportable - "
861 "use gnulib module posix_spawn_file_actions_addclose for portability");
865 #if @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2@
866 /* Add an action to FILE-ACTIONS which tells the implementation to call
867 'dup2' for the given file descriptors during the 'spawn' call. */
868 # if @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2@
869 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
870 # define posix_spawn_file_actions_adddup2 rpl_posix_spawn_file_actions_adddup2
872 _GL_FUNCDECL_RPL (posix_spawn_file_actions_adddup2
, int,
873 (posix_spawn_file_actions_t
*__file_actions
,
874 int __fd
, int __newfd
)
875 __THROW
_GL_ARG_NONNULL ((1)));
876 _GL_CXXALIAS_RPL (posix_spawn_file_actions_adddup2
, int,
877 (posix_spawn_file_actions_t
*__file_actions
,
878 int __fd
, int __newfd
));
880 # if !@HAVE_POSIX_SPAWN@
881 _GL_FUNCDECL_SYS (posix_spawn_file_actions_adddup2
, int,
882 (posix_spawn_file_actions_t
*__file_actions
,
883 int __fd
, int __newfd
)
884 __THROW
_GL_ARG_NONNULL ((1)));
886 _GL_CXXALIAS_SYS (posix_spawn_file_actions_adddup2
, int,
887 (posix_spawn_file_actions_t
*__file_actions
,
888 int __fd
, int __newfd
));
891 _GL_CXXALIASWARN (posix_spawn_file_actions_adddup2
);
893 #elif defined GNULIB_POSIXCHECK
894 # undef posix_spawn_file_actions_adddup2
895 # if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2
896 _GL_WARN_ON_USE (posix_spawn_file_actions_adddup2
,
897 "posix_spawn_file_actions_adddup2 is unportable - "
898 "use gnulib module posix_spawn_file_actions_adddup2 for portability");
902 #if @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR@
903 /* Add an action to FILE-ACTIONS which tells the implementation to call
904 'chdir' to the given directory during the 'spawn' call. */
905 # if @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR@
906 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
907 # define posix_spawn_file_actions_addchdir rpl_posix_spawn_file_actions_addchdir
909 _GL_FUNCDECL_RPL (posix_spawn_file_actions_addchdir
, int,
910 (posix_spawn_file_actions_t
*_Restrict_ __file_actions
,
911 const char *_Restrict_ __path
)
912 __THROW
_GL_ARG_NONNULL ((1, 2)));
913 _GL_CXXALIAS_RPL (posix_spawn_file_actions_addchdir
, int,
914 (posix_spawn_file_actions_t
*_Restrict_ __file_actions
,
915 const char *_Restrict_ __path
));
917 # if !@HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR@
918 _GL_FUNCDECL_SYS (posix_spawn_file_actions_addchdir
, int,
919 (posix_spawn_file_actions_t
*_Restrict_ __file_actions
,
920 const char *_Restrict_ __path
)
921 __THROW
_GL_ARG_NONNULL ((1, 2)));
923 _GL_CXXALIAS_SYS (posix_spawn_file_actions_addchdir
, int,
924 (posix_spawn_file_actions_t
*_Restrict_ __file_actions
,
925 const char *_Restrict_ __path
));
927 _GL_CXXALIASWARN (posix_spawn_file_actions_addchdir
);
928 #elif defined GNULIB_POSIXCHECK
929 # undef posix_spawn_file_actions_addchdir
930 # if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR
931 _GL_WARN_ON_USE (posix_spawn_file_actions_addchdir
,
932 "posix_spawn_file_actions_addchdir is unportable - "
933 "use gnulib module posix_spawn_file_actions_addchdir for portability");
937 #if @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR@
938 /* Add an action to FILE-ACTIONS which tells the implementation to call
939 'fchdir' to the given directory during the 'spawn' call. */
940 # if @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR@
941 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
942 # define posix_spawn_file_actions_addfchdir rpl_posix_spawn_file_actions_addfchdir
944 _GL_FUNCDECL_RPL (posix_spawn_file_actions_addfchdir
, int,
945 (posix_spawn_file_actions_t
*_Restrict_ __file_actions
,
947 __THROW
_GL_ARG_NONNULL ((1)));
948 _GL_CXXALIAS_RPL (posix_spawn_file_actions_addfchdir
, int,
949 (posix_spawn_file_actions_t
*_Restrict_ __file_actions
,
952 # if !@HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR@
953 _GL_FUNCDECL_SYS (posix_spawn_file_actions_addfchdir
, int,
954 (posix_spawn_file_actions_t
*_Restrict_ __file_actions
,
956 __THROW
_GL_ARG_NONNULL ((1)));
958 _GL_CXXALIAS_SYS (posix_spawn_file_actions_addfchdir
, int,
959 (posix_spawn_file_actions_t
*_Restrict_ __file_actions
,
962 _GL_CXXALIASWARN (posix_spawn_file_actions_addfchdir
);
963 #elif defined GNULIB_POSIXCHECK
964 # undef posix_spawn_file_actions_addfchdir
965 # if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR
966 _GL_WARN_ON_USE (posix_spawn_file_actions_addfchdir
,
967 "posix_spawn_file_actions_addfchdir is unportable - "
968 "use gnulib module posix_spawn_file_actions_addfchdir for portability");
973 #endif /* _@GUARD_PREFIX@_SPAWN_H */
974 #endif /* _@GUARD_PREFIX@_SPAWN_H */