1 /* Definitions for POSIX spawn interface.
2 Copyright (C) 2000, 2003-2004, 2008-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as
7 published by the Free Software Foundation; either version 2.1 of the
8 License, or (at your option) any later version.
10 This file 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 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public License
16 along with this program. If not, see <https://www.gnu.org/licenses/>. */
19 @PRAGMA_SYSTEM_HEADER@
23 #if defined _GL_ALREADY_INCLUDING_SPAWN_H
24 /* Special invocation convention:
25 On OS/2 kLIBC, <spawn.h> includes <signal.h>. Then <signal.h> ->
26 <pthread.h> -> <sched.h> -> <spawn.h> are included by GNULIB.
27 In this situation, struct sched_param is not yet defined. */
29 #@INCLUDE_NEXT@ @NEXT_SPAWN_H@
33 #ifndef _@GUARD_PREFIX@_SPAWN_H
34 /* Normal invocation convention. */
36 /* The include_next requires a split double-inclusion guard. */
39 # define _GL_ALREADY_INCLUDING_SPAWN_H
41 # @INCLUDE_NEXT@ @NEXT_SPAWN_H@
43 # define _GL_ALREADY_INCLUDING_SPAWN_H
47 #ifndef _@GUARD_PREFIX@_SPAWN_H
48 #define _@GUARD_PREFIX@_SPAWN_H
50 /* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */
51 #if !_GL_CONFIG_H_INCLUDED
52 #error "Please include config.h first."
55 /* Get definitions of 'struct sched_param' and 'sigset_t'.
56 But avoid namespace pollution on glibc systems. */
57 #if !(defined __GLIBC__ && !defined __UCLIBC__)
62 #include <sys/types.h>
68 /* For plain 'restrict', use glibc's __restrict if defined.
69 Otherwise, GCC 2.95 and later have "__restrict"; C99 compilers have
70 "restrict", and "configure" may have defined "restrict".
71 Other compilers use __restrict, __restrict__, and _Restrict, and
72 'configure' might #define 'restrict' to those words, so pick a
75 # if defined __restrict \
76 || 2 < __GNUC__ + (95 <= __GNUC_MINOR__) \
77 || __clang_major__ >= 3
78 # define _Restrict_ __restrict
79 # elif 199901L <= __STDC_VERSION__ || defined restrict
80 # define _Restrict_ restrict
85 /* For the ISO C99 syntax
87 use glibc's __restrict_arr if available.
88 Otherwise, GCC 3.1 and clang support this syntax (but not in C++ mode).
89 Other ISO C99 compilers support it as well. */
90 #ifndef _Restrict_arr_
91 # ifdef __restrict_arr
92 # define _Restrict_arr_ __restrict_arr
93 # elif ((199901L <= __STDC_VERSION__ \
94 || 3 < __GNUC__ + (1 <= __GNUC_MINOR__) \
95 || __clang_major__ >= 3) \
96 && !defined __cplusplus)
97 # define _Restrict_arr_ _Restrict_
99 # define _Restrict_arr_
103 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
105 /* The definition of _GL_ARG_NONNULL is copied here. */
107 /* The definition of _GL_WARN_ON_USE is copied here. */
110 /* Data structure to contain attributes for thread creation. */
111 #if @REPLACE_POSIX_SPAWN@ || (@HAVE_POSIX_SPAWNATTR_T@ && !@HAVE_POSIX_SPAWN@)
112 # define posix_spawnattr_t rpl_posix_spawnattr_t
114 #if @REPLACE_POSIX_SPAWN@ || !@HAVE_POSIX_SPAWNATTR_T@ || !@HAVE_POSIX_SPAWN@
115 # if !GNULIB_defined_posix_spawnattr_t
122 struct sched_param _sp
;
126 # define GNULIB_defined_posix_spawnattr_t 1
131 /* Data structure to contain information about the actions to be
132 performed in the new process with respect to file descriptors. */
133 #if @REPLACE_POSIX_SPAWN@ || (@HAVE_POSIX_SPAWN_FILE_ACTIONS_T@ && !@HAVE_POSIX_SPAWN@)
134 # define posix_spawn_file_actions_t rpl_posix_spawn_file_actions_t
136 #if @REPLACE_POSIX_SPAWN@ || !@HAVE_POSIX_SPAWN_FILE_ACTIONS_T@ || !@HAVE_POSIX_SPAWN@
137 # if !GNULIB_defined_posix_spawn_file_actions_t
142 struct __spawn_action
*_actions
;
144 } posix_spawn_file_actions_t
;
145 # define GNULIB_defined_posix_spawn_file_actions_t 1
150 /* Flags to be set in the 'posix_spawnattr_t'. */
151 #if @HAVE_POSIX_SPAWN@
152 # if @REPLACE_POSIX_SPAWN@
153 /* Use the values from the system, for better compatibility. */
154 /* But this implementation does not support AIX extensions. */
155 # undef POSIX_SPAWN_FORK_HANDLERS
157 /* Provide the values that the system is lacking. */
158 # ifndef POSIX_SPAWN_SETSCHEDPARAM
159 # define POSIX_SPAWN_SETSCHEDPARAM 0
161 # ifndef POSIX_SPAWN_SETSCHEDULER
162 # define POSIX_SPAWN_SETSCHEDULER 0
164 #else /* !@HAVE_POSIX_SPAWN@ */
165 # define POSIX_SPAWN_RESETIDS 0x01
166 # define POSIX_SPAWN_SETPGROUP 0x02
167 # define POSIX_SPAWN_SETSIGDEF 0x04
168 # define POSIX_SPAWN_SETSIGMASK 0x08
169 # define POSIX_SPAWN_SETSCHEDPARAM 0x10
170 # define POSIX_SPAWN_SETSCHEDULER 0x20
172 /* A GNU extension. Use the next free bit position. */
173 #ifndef POSIX_SPAWN_USEVFORK
174 # define POSIX_SPAWN_USEVFORK \
175 ((POSIX_SPAWN_RESETIDS | (POSIX_SPAWN_RESETIDS - 1) \
176 | POSIX_SPAWN_SETPGROUP | (POSIX_SPAWN_SETPGROUP - 1) \
177 | POSIX_SPAWN_SETSIGDEF | (POSIX_SPAWN_SETSIGDEF - 1) \
178 | POSIX_SPAWN_SETSIGMASK | (POSIX_SPAWN_SETSIGMASK - 1) \
179 | POSIX_SPAWN_SETSCHEDPARAM \
180 | (POSIX_SPAWN_SETSCHEDPARAM > 0 ? POSIX_SPAWN_SETSCHEDPARAM - 1 : 0) \
181 | POSIX_SPAWN_SETSCHEDULER \
182 | (POSIX_SPAWN_SETSCHEDULER > 0 ? POSIX_SPAWN_SETSCHEDULER - 1 : 0)) \
185 #if !GNULIB_defined_verify_POSIX_SPAWN_USEVFORK_no_overlap
186 typedef int verify_POSIX_SPAWN_USEVFORK_no_overlap
187 [(((POSIX_SPAWN_RESETIDS
| POSIX_SPAWN_SETPGROUP
188 | POSIX_SPAWN_SETSIGDEF
| POSIX_SPAWN_SETSIGMASK
189 | POSIX_SPAWN_SETSCHEDPARAM
| POSIX_SPAWN_SETSCHEDULER
)
190 & POSIX_SPAWN_USEVFORK
)
193 # define GNULIB_defined_verify_POSIX_SPAWN_USEVFORK_no_overlap 1
197 #if @GNULIB_POSIX_SPAWN@
198 /* Spawn a new process executing PATH with the attributes describes in *ATTRP.
199 Before running the process perform the actions described in FILE-ACTIONS.
201 This function is a possible cancellation points and therefore not
202 marked with __THROW. */
203 # if @REPLACE_POSIX_SPAWN@
204 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
205 # define posix_spawn rpl_posix_spawn
207 _GL_FUNCDECL_RPL (posix_spawn
, int,
208 (pid_t
*_Restrict_ __pid
,
209 const char *_Restrict_ __path
,
210 const posix_spawn_file_actions_t
*_Restrict_ __file_actions
,
211 const posix_spawnattr_t
*_Restrict_ __attrp
,
212 char *const argv
[_Restrict_arr_
],
213 char *const envp
[_Restrict_arr_
])
214 _GL_ARG_NONNULL ((2, 5, 6)));
215 _GL_CXXALIAS_RPL (posix_spawn
, int,
216 (pid_t
*_Restrict_ __pid
,
217 const char *_Restrict_ __path
,
218 const posix_spawn_file_actions_t
*_Restrict_ __file_actions
,
219 const posix_spawnattr_t
*_Restrict_ __attrp
,
220 char *const argv
[_Restrict_arr_
],
221 char *const envp
[_Restrict_arr_
]));
223 # if !@HAVE_POSIX_SPAWN@
224 _GL_FUNCDECL_SYS (posix_spawn
, int,
225 (pid_t
*_Restrict_ __pid
,
226 const char *_Restrict_ __path
,
227 const posix_spawn_file_actions_t
*_Restrict_ __file_actions
,
228 const posix_spawnattr_t
*_Restrict_ __attrp
,
229 char *const argv
[_Restrict_arr_
],
230 char *const envp
[_Restrict_arr_
])
231 _GL_ARG_NONNULL ((2, 5, 6)));
233 _GL_CXXALIAS_SYS (posix_spawn
, int,
234 (pid_t
*_Restrict_ __pid
,
235 const char *_Restrict_ __path
,
236 const posix_spawn_file_actions_t
*_Restrict_ __file_actions
,
237 const posix_spawnattr_t
*_Restrict_ __attrp
,
238 char *const argv
[_Restrict_arr_
],
239 char *const envp
[_Restrict_arr_
]));
242 _GL_CXXALIASWARN (posix_spawn
);
244 #elif defined GNULIB_POSIXCHECK
246 # if HAVE_RAW_DECL_POSIX_SPAWN
247 _GL_WARN_ON_USE (posix_spawn
, "posix_spawn is unportable - "
248 "use gnulib module posix_spawn for portability");
252 #if @GNULIB_POSIX_SPAWNP@
253 /* Similar to 'posix_spawn' but search for FILE in the PATH.
255 This function is a possible cancellation points and therefore not
256 marked with __THROW. */
257 # if @REPLACE_POSIX_SPAWN@
258 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
259 # define posix_spawnp rpl_posix_spawnp
261 _GL_FUNCDECL_RPL (posix_spawnp
, int,
262 (pid_t
*__pid
, const char *__file
,
263 const posix_spawn_file_actions_t
*__file_actions
,
264 const posix_spawnattr_t
*__attrp
,
265 char *const argv
[], char *const envp
[])
266 _GL_ARG_NONNULL ((2, 5, 6)));
267 _GL_CXXALIAS_RPL (posix_spawnp
, int,
268 (pid_t
*__pid
, const char *__file
,
269 const posix_spawn_file_actions_t
*__file_actions
,
270 const posix_spawnattr_t
*__attrp
,
271 char *const argv
[], char *const envp
[]));
273 # if !@HAVE_POSIX_SPAWN@
274 _GL_FUNCDECL_SYS (posix_spawnp
, int,
275 (pid_t
*__pid
, const char *__file
,
276 const posix_spawn_file_actions_t
*__file_actions
,
277 const posix_spawnattr_t
*__attrp
,
278 char *const argv
[], char *const envp
[])
279 _GL_ARG_NONNULL ((2, 5, 6)));
281 _GL_CXXALIAS_SYS (posix_spawnp
, int,
282 (pid_t
*__pid
, const char *__file
,
283 const posix_spawn_file_actions_t
*__file_actions
,
284 const posix_spawnattr_t
*__attrp
,
285 char *const argv
[], char *const envp
[]));
288 _GL_CXXALIASWARN (posix_spawnp
);
290 #elif defined GNULIB_POSIXCHECK
292 # if HAVE_RAW_DECL_POSIX_SPAWNP
293 _GL_WARN_ON_USE (posix_spawnp
, "posix_spawnp is unportable - "
294 "use gnulib module posix_spawnp for portability");
299 #if @GNULIB_POSIX_SPAWNATTR_INIT@
300 /* Initialize data structure with attributes for 'spawn' to default values. */
301 # if @REPLACE_POSIX_SPAWN@
302 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
303 # define posix_spawnattr_init rpl_posix_spawnattr_init
305 _GL_FUNCDECL_RPL (posix_spawnattr_init
, int, (posix_spawnattr_t
*__attr
)
306 __THROW
_GL_ARG_NONNULL ((1)));
307 _GL_CXXALIAS_RPL (posix_spawnattr_init
, int, (posix_spawnattr_t
*__attr
));
309 # if !@HAVE_POSIX_SPAWN@
310 _GL_FUNCDECL_SYS (posix_spawnattr_init
, int, (posix_spawnattr_t
*__attr
)
311 __THROW
_GL_ARG_NONNULL ((1)));
313 _GL_CXXALIAS_SYS (posix_spawnattr_init
, int, (posix_spawnattr_t
*__attr
));
316 _GL_CXXALIASWARN (posix_spawnattr_init
);
318 #elif defined GNULIB_POSIXCHECK
319 # undef posix_spawnattr_init
320 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_INIT
321 _GL_WARN_ON_USE (posix_spawnattr_init
, "posix_spawnattr_init is unportable - "
322 "use gnulib module posix_spawnattr_init for portability");
326 #if @GNULIB_POSIX_SPAWNATTR_DESTROY@
327 /* Free resources associated with ATTR. */
328 # if @REPLACE_POSIX_SPAWN@
329 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
330 # define posix_spawnattr_destroy rpl_posix_spawnattr_destroy
332 _GL_FUNCDECL_RPL (posix_spawnattr_destroy
, int, (posix_spawnattr_t
*__attr
)
333 __THROW
_GL_ARG_NONNULL ((1)));
334 _GL_CXXALIAS_RPL (posix_spawnattr_destroy
, int, (posix_spawnattr_t
*__attr
));
336 # if !@HAVE_POSIX_SPAWN@
337 _GL_FUNCDECL_SYS (posix_spawnattr_destroy
, int, (posix_spawnattr_t
*__attr
)
338 __THROW
_GL_ARG_NONNULL ((1)));
340 _GL_CXXALIAS_SYS (posix_spawnattr_destroy
, int, (posix_spawnattr_t
*__attr
));
343 _GL_CXXALIASWARN (posix_spawnattr_destroy
);
345 #elif defined GNULIB_POSIXCHECK
346 # undef posix_spawnattr_destroy
347 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_DESTROY
348 _GL_WARN_ON_USE (posix_spawnattr_destroy
,
349 "posix_spawnattr_destroy is unportable - "
350 "use gnulib module posix_spawnattr_destroy for portability");
354 #if @GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT@
355 /* Store signal mask for signals with default handling from ATTR in
357 # if @REPLACE_POSIX_SPAWN@
358 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
359 # define posix_spawnattr_getsigdefault rpl_posix_spawnattr_getsigdefault
361 _GL_FUNCDECL_RPL (posix_spawnattr_getsigdefault
, int,
362 (const posix_spawnattr_t
*_Restrict_ __attr
,
363 sigset_t
*_Restrict_ __sigdefault
)
364 __THROW
_GL_ARG_NONNULL ((1, 2)));
365 _GL_CXXALIAS_RPL (posix_spawnattr_getsigdefault
, int,
366 (const posix_spawnattr_t
*_Restrict_ __attr
,
367 sigset_t
*_Restrict_ __sigdefault
));
369 # if !@HAVE_POSIX_SPAWN@
370 _GL_FUNCDECL_SYS (posix_spawnattr_getsigdefault
, int,
371 (const posix_spawnattr_t
*_Restrict_ __attr
,
372 sigset_t
*_Restrict_ __sigdefault
)
373 __THROW
_GL_ARG_NONNULL ((1, 2)));
375 _GL_CXXALIAS_SYS (posix_spawnattr_getsigdefault
, int,
376 (const posix_spawnattr_t
*_Restrict_ __attr
,
377 sigset_t
*_Restrict_ __sigdefault
));
380 _GL_CXXALIASWARN (posix_spawnattr_getsigdefault
);
382 #elif defined GNULIB_POSIXCHECK
383 # undef posix_spawnattr_getsigdefault
384 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_GETSIGDEFAULT
385 _GL_WARN_ON_USE (posix_spawnattr_getsigdefault
,
386 "posix_spawnattr_getsigdefault is unportable - "
387 "use gnulib module posix_spawnattr_getsigdefault for portability");
391 #if @GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT@
392 /* Set signal mask for signals with default handling in ATTR to SIGDEFAULT. */
393 # if @REPLACE_POSIX_SPAWN@
394 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
395 # define posix_spawnattr_setsigdefault rpl_posix_spawnattr_setsigdefault
397 _GL_FUNCDECL_RPL (posix_spawnattr_setsigdefault
, int,
398 (posix_spawnattr_t
*_Restrict_ __attr
,
399 const sigset_t
*_Restrict_ __sigdefault
)
400 __THROW
_GL_ARG_NONNULL ((1, 2)));
401 _GL_CXXALIAS_RPL (posix_spawnattr_setsigdefault
, int,
402 (posix_spawnattr_t
*_Restrict_ __attr
,
403 const sigset_t
*_Restrict_ __sigdefault
));
405 # if !@HAVE_POSIX_SPAWN@
406 _GL_FUNCDECL_SYS (posix_spawnattr_setsigdefault
, int,
407 (posix_spawnattr_t
*_Restrict_ __attr
,
408 const sigset_t
*_Restrict_ __sigdefault
)
409 __THROW
_GL_ARG_NONNULL ((1, 2)));
411 _GL_CXXALIAS_SYS (posix_spawnattr_setsigdefault
, int,
412 (posix_spawnattr_t
*_Restrict_ __attr
,
413 const sigset_t
*_Restrict_ __sigdefault
));
416 _GL_CXXALIASWARN (posix_spawnattr_setsigdefault
);
418 #elif defined GNULIB_POSIXCHECK
419 # undef posix_spawnattr_setsigdefault
420 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_SETSIGDEFAULT
421 _GL_WARN_ON_USE (posix_spawnattr_setsigdefault
,
422 "posix_spawnattr_setsigdefault is unportable - "
423 "use gnulib module posix_spawnattr_setsigdefault for portability");
427 #if @GNULIB_POSIX_SPAWNATTR_GETSIGMASK@
428 /* Store signal mask for the new process from ATTR in SIGMASK. */
429 # if @REPLACE_POSIX_SPAWN@
430 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
431 # define posix_spawnattr_getsigmask rpl_posix_spawnattr_getsigmask
433 _GL_FUNCDECL_RPL (posix_spawnattr_getsigmask
, int,
434 (const posix_spawnattr_t
*_Restrict_ __attr
,
435 sigset_t
*_Restrict_ __sigmask
)
436 __THROW
_GL_ARG_NONNULL ((1, 2)));
437 _GL_CXXALIAS_RPL (posix_spawnattr_getsigmask
, int,
438 (const posix_spawnattr_t
*_Restrict_ __attr
,
439 sigset_t
*_Restrict_ __sigmask
));
441 # if !@HAVE_POSIX_SPAWN@
442 _GL_FUNCDECL_SYS (posix_spawnattr_getsigmask
, int,
443 (const posix_spawnattr_t
*_Restrict_ __attr
,
444 sigset_t
*_Restrict_ __sigmask
)
445 __THROW
_GL_ARG_NONNULL ((1, 2)));
447 _GL_CXXALIAS_SYS (posix_spawnattr_getsigmask
, int,
448 (const posix_spawnattr_t
*_Restrict_ __attr
,
449 sigset_t
*_Restrict_ __sigmask
));
452 _GL_CXXALIASWARN (posix_spawnattr_getsigmask
);
454 #elif defined GNULIB_POSIXCHECK
455 # undef posix_spawnattr_getsigmask
456 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_GETSIGMASK
457 _GL_WARN_ON_USE (posix_spawnattr_getsigmask
,
458 "posix_spawnattr_getsigmask is unportable - "
459 "use gnulib module posix_spawnattr_getsigmask for portability");
463 #if @GNULIB_POSIX_SPAWNATTR_SETSIGMASK@
464 /* Set signal mask for the new process in ATTR to SIGMASK. */
465 # if @REPLACE_POSIX_SPAWN@
466 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
467 # define posix_spawnattr_setsigmask rpl_posix_spawnattr_setsigmask
469 _GL_FUNCDECL_RPL (posix_spawnattr_setsigmask
, int,
470 (posix_spawnattr_t
*_Restrict_ __attr
,
471 const sigset_t
*_Restrict_ __sigmask
)
472 __THROW
_GL_ARG_NONNULL ((1, 2)));
473 _GL_CXXALIAS_RPL (posix_spawnattr_setsigmask
, int,
474 (posix_spawnattr_t
*_Restrict_ __attr
,
475 const sigset_t
*_Restrict_ __sigmask
));
477 # if !@HAVE_POSIX_SPAWN@
478 _GL_FUNCDECL_SYS (posix_spawnattr_setsigmask
, int,
479 (posix_spawnattr_t
*_Restrict_ __attr
,
480 const sigset_t
*_Restrict_ __sigmask
)
481 __THROW
_GL_ARG_NONNULL ((1, 2)));
483 _GL_CXXALIAS_SYS (posix_spawnattr_setsigmask
, int,
484 (posix_spawnattr_t
*_Restrict_ __attr
,
485 const sigset_t
*_Restrict_ __sigmask
));
488 _GL_CXXALIASWARN (posix_spawnattr_setsigmask
);
490 #elif defined GNULIB_POSIXCHECK
491 # undef posix_spawnattr_setsigmask
492 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_SETSIGMASK
493 _GL_WARN_ON_USE (posix_spawnattr_setsigmask
,
494 "posix_spawnattr_setsigmask is unportable - "
495 "use gnulib module posix_spawnattr_setsigmask for portability");
499 #if @GNULIB_POSIX_SPAWNATTR_GETFLAGS@
500 /* Get flag word from the attribute structure. */
501 # if @REPLACE_POSIX_SPAWN@
502 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
503 # define posix_spawnattr_getflags rpl_posix_spawnattr_getflags
505 _GL_FUNCDECL_RPL (posix_spawnattr_getflags
, int,
506 (const posix_spawnattr_t
*_Restrict_ __attr
,
507 short int *_Restrict_ __flags
)
508 __THROW
_GL_ARG_NONNULL ((1, 2)));
509 _GL_CXXALIAS_RPL (posix_spawnattr_getflags
, int,
510 (const posix_spawnattr_t
*_Restrict_ __attr
,
511 short int *_Restrict_ __flags
));
513 # if !@HAVE_POSIX_SPAWN@
514 _GL_FUNCDECL_SYS (posix_spawnattr_getflags
, int,
515 (const posix_spawnattr_t
*_Restrict_ __attr
,
516 short int *_Restrict_ __flags
)
517 __THROW
_GL_ARG_NONNULL ((1, 2)));
519 _GL_CXXALIAS_SYS (posix_spawnattr_getflags
, int,
520 (const posix_spawnattr_t
*_Restrict_ __attr
,
521 short int *_Restrict_ __flags
));
524 _GL_CXXALIASWARN (posix_spawnattr_getflags
);
526 #elif defined GNULIB_POSIXCHECK
527 # undef posix_spawnattr_getflags
528 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_GETFLAGS
529 _GL_WARN_ON_USE (posix_spawnattr_getflags
,
530 "posix_spawnattr_getflags is unportable - "
531 "use gnulib module posix_spawnattr_getflags for portability");
535 #if @GNULIB_POSIX_SPAWNATTR_SETFLAGS@
536 /* Store flags in the attribute structure. */
537 # if @REPLACE_POSIX_SPAWN@
538 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
539 # define posix_spawnattr_setflags rpl_posix_spawnattr_setflags
541 _GL_FUNCDECL_RPL (posix_spawnattr_setflags
, int,
542 (posix_spawnattr_t
*__attr
, short int __flags
)
543 __THROW
_GL_ARG_NONNULL ((1)));
544 _GL_CXXALIAS_RPL (posix_spawnattr_setflags
, int,
545 (posix_spawnattr_t
*__attr
, short int __flags
));
547 # if !@HAVE_POSIX_SPAWN@
548 _GL_FUNCDECL_SYS (posix_spawnattr_setflags
, int,
549 (posix_spawnattr_t
*__attr
, short int __flags
)
550 __THROW
_GL_ARG_NONNULL ((1)));
552 _GL_CXXALIAS_SYS (posix_spawnattr_setflags
, int,
553 (posix_spawnattr_t
*__attr
, short int __flags
));
556 _GL_CXXALIASWARN (posix_spawnattr_setflags
);
558 #elif defined GNULIB_POSIXCHECK
559 # undef posix_spawnattr_setflags
560 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_SETFLAGS
561 _GL_WARN_ON_USE (posix_spawnattr_setflags
,
562 "posix_spawnattr_setflags is unportable - "
563 "use gnulib module posix_spawnattr_setflags for portability");
567 #if @GNULIB_POSIX_SPAWNATTR_GETPGROUP@
568 /* Get process group ID from the attribute structure. */
569 # if @REPLACE_POSIX_SPAWN@
570 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
571 # define posix_spawnattr_getpgroup rpl_posix_spawnattr_getpgroup
573 _GL_FUNCDECL_RPL (posix_spawnattr_getpgroup
, int,
574 (const posix_spawnattr_t
*_Restrict_ __attr
,
575 pid_t
*_Restrict_ __pgroup
)
576 __THROW
_GL_ARG_NONNULL ((1, 2)));
577 _GL_CXXALIAS_RPL (posix_spawnattr_getpgroup
, int,
578 (const posix_spawnattr_t
*_Restrict_ __attr
,
579 pid_t
*_Restrict_ __pgroup
));
581 # if !@HAVE_POSIX_SPAWN@
582 _GL_FUNCDECL_SYS (posix_spawnattr_getpgroup
, int,
583 (const posix_spawnattr_t
*_Restrict_ __attr
,
584 pid_t
*_Restrict_ __pgroup
)
585 __THROW
_GL_ARG_NONNULL ((1, 2)));
587 _GL_CXXALIAS_SYS (posix_spawnattr_getpgroup
, int,
588 (const posix_spawnattr_t
*_Restrict_ __attr
,
589 pid_t
*_Restrict_ __pgroup
));
592 _GL_CXXALIASWARN (posix_spawnattr_getpgroup
);
594 #elif defined GNULIB_POSIXCHECK
595 # undef posix_spawnattr_getpgroup
596 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_GETPGROUP
597 _GL_WARN_ON_USE (posix_spawnattr_getpgroup
,
598 "posix_spawnattr_getpgroup is unportable - "
599 "use gnulib module posix_spawnattr_getpgroup for portability");
603 #if @GNULIB_POSIX_SPAWNATTR_SETPGROUP@
604 /* Store process group ID in the attribute structure. */
605 # if @REPLACE_POSIX_SPAWN@
606 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
607 # define posix_spawnattr_setpgroup rpl_posix_spawnattr_setpgroup
609 _GL_FUNCDECL_RPL (posix_spawnattr_setpgroup
, int,
610 (posix_spawnattr_t
*__attr
, pid_t __pgroup
)
611 __THROW
_GL_ARG_NONNULL ((1)));
612 _GL_CXXALIAS_RPL (posix_spawnattr_setpgroup
, int,
613 (posix_spawnattr_t
*__attr
, pid_t __pgroup
));
615 # if !@HAVE_POSIX_SPAWN@
616 _GL_FUNCDECL_SYS (posix_spawnattr_setpgroup
, int,
617 (posix_spawnattr_t
*__attr
, pid_t __pgroup
)
618 __THROW
_GL_ARG_NONNULL ((1)));
620 _GL_CXXALIAS_SYS (posix_spawnattr_setpgroup
, int,
621 (posix_spawnattr_t
*__attr
, pid_t __pgroup
));
624 _GL_CXXALIASWARN (posix_spawnattr_setpgroup
);
626 #elif defined GNULIB_POSIXCHECK
627 # undef posix_spawnattr_setpgroup
628 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_SETPGROUP
629 _GL_WARN_ON_USE (posix_spawnattr_setpgroup
,
630 "posix_spawnattr_setpgroup is unportable - "
631 "use gnulib module posix_spawnattr_setpgroup for portability");
635 #if @GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY@
636 /* Get scheduling policy from the attribute structure. */
637 # if @REPLACE_POSIX_SPAWN@
638 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
639 # define posix_spawnattr_getschedpolicy rpl_posix_spawnattr_getschedpolicy
641 _GL_FUNCDECL_RPL (posix_spawnattr_getschedpolicy
, int,
642 (const posix_spawnattr_t
*_Restrict_ __attr
,
643 int *_Restrict_ __schedpolicy
)
644 __THROW
_GL_ARG_NONNULL ((1, 2)));
645 _GL_CXXALIAS_RPL (posix_spawnattr_getschedpolicy
, int,
646 (const posix_spawnattr_t
*_Restrict_ __attr
,
647 int *_Restrict_ __schedpolicy
));
649 # if !@HAVE_POSIX_SPAWN@ || POSIX_SPAWN_SETSCHEDULER == 0
650 _GL_FUNCDECL_SYS (posix_spawnattr_getschedpolicy
, int,
651 (const posix_spawnattr_t
*_Restrict_ __attr
,
652 int *_Restrict_ __schedpolicy
)
653 __THROW
_GL_ARG_NONNULL ((1, 2)));
655 _GL_CXXALIAS_SYS (posix_spawnattr_getschedpolicy
, int,
656 (const posix_spawnattr_t
*_Restrict_ __attr
,
657 int *_Restrict_ __schedpolicy
));
660 _GL_CXXALIASWARN (posix_spawnattr_getschedpolicy
);
662 #elif defined GNULIB_POSIXCHECK
663 # undef posix_spawnattr_getschedpolicy
664 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_GETSCHEDPOLICY
665 _GL_WARN_ON_USE (posix_spawnattr_getschedpolicy
,
666 "posix_spawnattr_getschedpolicy is unportable - "
667 "use gnulib module posix_spawnattr_getschedpolicy for portability");
671 #if @GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY@
672 /* Store scheduling policy in the attribute structure. */
673 # if @REPLACE_POSIX_SPAWN@
674 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
675 # define posix_spawnattr_setschedpolicy rpl_posix_spawnattr_setschedpolicy
677 _GL_FUNCDECL_RPL (posix_spawnattr_setschedpolicy
, int,
678 (posix_spawnattr_t
*__attr
, int __schedpolicy
)
679 __THROW
_GL_ARG_NONNULL ((1)));
680 _GL_CXXALIAS_RPL (posix_spawnattr_setschedpolicy
, int,
681 (posix_spawnattr_t
*__attr
, int __schedpolicy
));
683 # if !@HAVE_POSIX_SPAWN@ || POSIX_SPAWN_SETSCHEDULER == 0
684 _GL_FUNCDECL_SYS (posix_spawnattr_setschedpolicy
, int,
685 (posix_spawnattr_t
*__attr
, int __schedpolicy
)
686 __THROW
_GL_ARG_NONNULL ((1)));
688 _GL_CXXALIAS_SYS (posix_spawnattr_setschedpolicy
, int,
689 (posix_spawnattr_t
*__attr
, int __schedpolicy
));
692 _GL_CXXALIASWARN (posix_spawnattr_setschedpolicy
);
694 #elif defined GNULIB_POSIXCHECK
695 # undef posix_spawnattr_setschedpolicy
696 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_SETSCHEDPOLICY
697 _GL_WARN_ON_USE (posix_spawnattr_setschedpolicy
,
698 "posix_spawnattr_setschedpolicy is unportable - "
699 "use gnulib module posix_spawnattr_setschedpolicy for portability");
703 #if @GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM@
704 /* Get scheduling parameters from the attribute structure. */
705 # if @REPLACE_POSIX_SPAWN@
706 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
707 # define posix_spawnattr_getschedparam rpl_posix_spawnattr_getschedparam
709 _GL_FUNCDECL_RPL (posix_spawnattr_getschedparam
, int,
710 (const posix_spawnattr_t
*_Restrict_ __attr
,
711 struct sched_param
*_Restrict_ __schedparam
)
712 __THROW
_GL_ARG_NONNULL ((1, 2)));
713 _GL_CXXALIAS_RPL (posix_spawnattr_getschedparam
, int,
714 (const posix_spawnattr_t
*_Restrict_ __attr
,
715 struct sched_param
*_Restrict_ __schedparam
));
717 # if !@HAVE_POSIX_SPAWN@ || POSIX_SPAWN_SETSCHEDPARAM == 0
718 _GL_FUNCDECL_SYS (posix_spawnattr_getschedparam
, int,
719 (const posix_spawnattr_t
*_Restrict_ __attr
,
720 struct sched_param
*_Restrict_ __schedparam
)
721 __THROW
_GL_ARG_NONNULL ((1, 2)));
723 _GL_CXXALIAS_SYS (posix_spawnattr_getschedparam
, int,
724 (const posix_spawnattr_t
*_Restrict_ __attr
,
725 struct sched_param
*_Restrict_ __schedparam
));
728 _GL_CXXALIASWARN (posix_spawnattr_getschedparam
);
730 #elif defined GNULIB_POSIXCHECK
731 # undef posix_spawnattr_getschedparam
732 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_GETSCHEDPARAM
733 _GL_WARN_ON_USE (posix_spawnattr_getschedparam
,
734 "posix_spawnattr_getschedparam is unportable - "
735 "use gnulib module posix_spawnattr_getschedparam for portability");
739 #if @GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM@
740 /* Store scheduling parameters in the attribute structure. */
741 # if @REPLACE_POSIX_SPAWN@
742 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
743 # define posix_spawnattr_setschedparam rpl_posix_spawnattr_setschedparam
745 _GL_FUNCDECL_RPL (posix_spawnattr_setschedparam
, int,
746 (posix_spawnattr_t
*_Restrict_ __attr
,
747 const struct sched_param
*_Restrict_ __schedparam
)
748 __THROW
_GL_ARG_NONNULL ((1, 2)));
749 _GL_CXXALIAS_RPL (posix_spawnattr_setschedparam
, int,
750 (posix_spawnattr_t
*_Restrict_ __attr
,
751 const struct sched_param
*_Restrict_ __schedparam
));
753 # if !@HAVE_POSIX_SPAWN@ || POSIX_SPAWN_SETSCHEDPARAM == 0
754 _GL_FUNCDECL_SYS (posix_spawnattr_setschedparam
, int,
755 (posix_spawnattr_t
*_Restrict_ __attr
,
756 const struct sched_param
*_Restrict_ __schedparam
)
757 __THROW
_GL_ARG_NONNULL ((1, 2)));
759 _GL_CXXALIAS_SYS (posix_spawnattr_setschedparam
, int,
760 (posix_spawnattr_t
*_Restrict_ __attr
,
761 const struct sched_param
*_Restrict_ __schedparam
));
764 _GL_CXXALIASWARN (posix_spawnattr_setschedparam
);
766 #elif defined GNULIB_POSIXCHECK
767 # undef posix_spawnattr_setschedparam
768 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_SETSCHEDPARAM
769 _GL_WARN_ON_USE (posix_spawnattr_setschedparam
,
770 "posix_spawnattr_setschedparam is unportable - "
771 "use gnulib module posix_spawnattr_setschedparam for portability");
776 #if @GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT@
777 /* Initialize data structure for file attribute for 'spawn' call. */
778 # if @REPLACE_POSIX_SPAWN@
779 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
780 # define posix_spawn_file_actions_init rpl_posix_spawn_file_actions_init
782 _GL_FUNCDECL_RPL (posix_spawn_file_actions_init
, int,
783 (posix_spawn_file_actions_t
*__file_actions
)
784 __THROW
_GL_ARG_NONNULL ((1)));
785 _GL_CXXALIAS_RPL (posix_spawn_file_actions_init
, int,
786 (posix_spawn_file_actions_t
*__file_actions
));
788 # if !@HAVE_POSIX_SPAWN@
789 _GL_FUNCDECL_SYS (posix_spawn_file_actions_init
, int,
790 (posix_spawn_file_actions_t
*__file_actions
)
791 __THROW
_GL_ARG_NONNULL ((1)));
793 _GL_CXXALIAS_SYS (posix_spawn_file_actions_init
, int,
794 (posix_spawn_file_actions_t
*__file_actions
));
797 _GL_CXXALIASWARN (posix_spawn_file_actions_init
);
799 #elif defined GNULIB_POSIXCHECK
800 # undef posix_spawn_file_actions_init
801 # if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_INIT
802 _GL_WARN_ON_USE (posix_spawn_file_actions_init
,
803 "posix_spawn_file_actions_init is unportable - "
804 "use gnulib module posix_spawn_file_actions_init for portability");
808 #if @GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY@
809 /* Free resources associated with FILE-ACTIONS. */
810 # if @REPLACE_POSIX_SPAWN@
811 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
812 # define posix_spawn_file_actions_destroy rpl_posix_spawn_file_actions_destroy
814 _GL_FUNCDECL_RPL (posix_spawn_file_actions_destroy
, int,
815 (posix_spawn_file_actions_t
*__file_actions
)
816 __THROW
_GL_ARG_NONNULL ((1)));
817 _GL_CXXALIAS_RPL (posix_spawn_file_actions_destroy
, int,
818 (posix_spawn_file_actions_t
*__file_actions
));
820 # if !@HAVE_POSIX_SPAWN@
821 _GL_FUNCDECL_SYS (posix_spawn_file_actions_destroy
, int,
822 (posix_spawn_file_actions_t
*__file_actions
)
823 __THROW
_GL_ARG_NONNULL ((1)));
825 _GL_CXXALIAS_SYS (posix_spawn_file_actions_destroy
, int,
826 (posix_spawn_file_actions_t
*__file_actions
));
829 _GL_CXXALIASWARN (posix_spawn_file_actions_destroy
);
831 #elif defined GNULIB_POSIXCHECK
832 # undef posix_spawn_file_actions_destroy
833 # if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_DESTROY
834 _GL_WARN_ON_USE (posix_spawn_file_actions_destroy
,
835 "posix_spawn_file_actions_destroy is unportable - "
836 "use gnulib module posix_spawn_file_actions_destroy for portability");
840 #if @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN@
841 /* Add an action to FILE-ACTIONS which tells the implementation to call
842 'open' for the given file during the 'spawn' call. */
843 # if @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN@
844 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
845 # define posix_spawn_file_actions_addopen rpl_posix_spawn_file_actions_addopen
847 _GL_FUNCDECL_RPL (posix_spawn_file_actions_addopen
, int,
848 (posix_spawn_file_actions_t
*_Restrict_ __file_actions
,
850 const char *_Restrict_ __path
, int __oflag
, mode_t __mode
)
851 __THROW
_GL_ARG_NONNULL ((1, 3)));
852 _GL_CXXALIAS_RPL (posix_spawn_file_actions_addopen
, int,
853 (posix_spawn_file_actions_t
*_Restrict_ __file_actions
,
855 const char *_Restrict_ __path
, int __oflag
, mode_t __mode
));
857 # if !@HAVE_POSIX_SPAWN@
858 _GL_FUNCDECL_SYS (posix_spawn_file_actions_addopen
, int,
859 (posix_spawn_file_actions_t
*_Restrict_ __file_actions
,
861 const char *_Restrict_ __path
, int __oflag
, mode_t __mode
)
862 __THROW
_GL_ARG_NONNULL ((1, 3)));
864 _GL_CXXALIAS_SYS (posix_spawn_file_actions_addopen
, int,
865 (posix_spawn_file_actions_t
*_Restrict_ __file_actions
,
867 const char *_Restrict_ __path
, int __oflag
, mode_t __mode
));
870 _GL_CXXALIASWARN (posix_spawn_file_actions_addopen
);
872 #elif defined GNULIB_POSIXCHECK
873 # undef posix_spawn_file_actions_addopen
874 # if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN
875 _GL_WARN_ON_USE (posix_spawn_file_actions_addopen
,
876 "posix_spawn_file_actions_addopen is unportable - "
877 "use gnulib module posix_spawn_file_actions_addopen for portability");
881 #if @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE@
882 /* Add an action to FILE-ACTIONS which tells the implementation to call
883 'close' for the given file descriptor during the 'spawn' call. */
884 # if @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE@
885 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
886 # define posix_spawn_file_actions_addclose rpl_posix_spawn_file_actions_addclose
888 _GL_FUNCDECL_RPL (posix_spawn_file_actions_addclose
, int,
889 (posix_spawn_file_actions_t
*__file_actions
, int __fd
)
890 __THROW
_GL_ARG_NONNULL ((1)));
891 _GL_CXXALIAS_RPL (posix_spawn_file_actions_addclose
, int,
892 (posix_spawn_file_actions_t
*__file_actions
, int __fd
));
894 # if !@HAVE_POSIX_SPAWN@
895 _GL_FUNCDECL_SYS (posix_spawn_file_actions_addclose
, int,
896 (posix_spawn_file_actions_t
*__file_actions
, int __fd
)
897 __THROW
_GL_ARG_NONNULL ((1)));
899 _GL_CXXALIAS_SYS (posix_spawn_file_actions_addclose
, int,
900 (posix_spawn_file_actions_t
*__file_actions
, int __fd
));
903 _GL_CXXALIASWARN (posix_spawn_file_actions_addclose
);
905 #elif defined GNULIB_POSIXCHECK
906 # undef posix_spawn_file_actions_addclose
907 # if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE
908 _GL_WARN_ON_USE (posix_spawn_file_actions_addclose
,
909 "posix_spawn_file_actions_addclose is unportable - "
910 "use gnulib module posix_spawn_file_actions_addclose for portability");
914 #if @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2@
915 /* Add an action to FILE-ACTIONS which tells the implementation to call
916 'dup2' for the given file descriptors during the 'spawn' call. */
917 # if @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2@
918 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
919 # define posix_spawn_file_actions_adddup2 rpl_posix_spawn_file_actions_adddup2
921 _GL_FUNCDECL_RPL (posix_spawn_file_actions_adddup2
, int,
922 (posix_spawn_file_actions_t
*__file_actions
,
923 int __fd
, int __newfd
)
924 __THROW
_GL_ARG_NONNULL ((1)));
925 _GL_CXXALIAS_RPL (posix_spawn_file_actions_adddup2
, int,
926 (posix_spawn_file_actions_t
*__file_actions
,
927 int __fd
, int __newfd
));
929 # if !@HAVE_POSIX_SPAWN@
930 _GL_FUNCDECL_SYS (posix_spawn_file_actions_adddup2
, int,
931 (posix_spawn_file_actions_t
*__file_actions
,
932 int __fd
, int __newfd
)
933 __THROW
_GL_ARG_NONNULL ((1)));
935 _GL_CXXALIAS_SYS (posix_spawn_file_actions_adddup2
, int,
936 (posix_spawn_file_actions_t
*__file_actions
,
937 int __fd
, int __newfd
));
940 _GL_CXXALIASWARN (posix_spawn_file_actions_adddup2
);
942 #elif defined GNULIB_POSIXCHECK
943 # undef posix_spawn_file_actions_adddup2
944 # if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2
945 _GL_WARN_ON_USE (posix_spawn_file_actions_adddup2
,
946 "posix_spawn_file_actions_adddup2 is unportable - "
947 "use gnulib module posix_spawn_file_actions_adddup2 for portability");
951 #if @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR@
952 /* Add an action to FILE-ACTIONS which tells the implementation to call
953 'chdir' to the given directory during the 'spawn' call. */
954 # if @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR@
955 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
956 # define posix_spawn_file_actions_addchdir rpl_posix_spawn_file_actions_addchdir
958 _GL_FUNCDECL_RPL (posix_spawn_file_actions_addchdir
, int,
959 (posix_spawn_file_actions_t
*_Restrict_ __file_actions
,
960 const char *_Restrict_ __path
)
961 __THROW
_GL_ARG_NONNULL ((1, 2)));
962 _GL_CXXALIAS_RPL (posix_spawn_file_actions_addchdir
, int,
963 (posix_spawn_file_actions_t
*_Restrict_ __file_actions
,
964 const char *_Restrict_ __path
));
966 # if !@HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR@
967 _GL_FUNCDECL_SYS (posix_spawn_file_actions_addchdir
, int,
968 (posix_spawn_file_actions_t
*_Restrict_ __file_actions
,
969 const char *_Restrict_ __path
)
970 __THROW
_GL_ARG_NONNULL ((1, 2)));
972 _GL_CXXALIAS_SYS (posix_spawn_file_actions_addchdir
, int,
973 (posix_spawn_file_actions_t
*_Restrict_ __file_actions
,
974 const char *_Restrict_ __path
));
977 _GL_CXXALIASWARN (posix_spawn_file_actions_addchdir
);
979 #elif defined GNULIB_POSIXCHECK
980 # undef posix_spawn_file_actions_addchdir
981 # if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR
982 _GL_WARN_ON_USE (posix_spawn_file_actions_addchdir
,
983 "posix_spawn_file_actions_addchdir is unportable - "
984 "use gnulib module posix_spawn_file_actions_addchdir for portability");
988 #if @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR@
989 /* Add an action to FILE-ACTIONS which tells the implementation to call
990 'fchdir' to the given directory during the 'spawn' call. */
991 # if @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR@
992 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
993 # define posix_spawn_file_actions_addfchdir rpl_posix_spawn_file_actions_addfchdir
995 _GL_FUNCDECL_RPL (posix_spawn_file_actions_addfchdir
, int,
996 (posix_spawn_file_actions_t
*_Restrict_ __file_actions
,
998 __THROW
_GL_ARG_NONNULL ((1)));
999 _GL_CXXALIAS_RPL (posix_spawn_file_actions_addfchdir
, int,
1000 (posix_spawn_file_actions_t
*_Restrict_ __file_actions
,
1003 # if !@HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR@
1004 _GL_FUNCDECL_SYS (posix_spawn_file_actions_addfchdir
, int,
1005 (posix_spawn_file_actions_t
*_Restrict_ __file_actions
,
1007 __THROW
_GL_ARG_NONNULL ((1)));
1009 _GL_CXXALIAS_SYS (posix_spawn_file_actions_addfchdir
, int,
1010 (posix_spawn_file_actions_t
*_Restrict_ __file_actions
,
1014 _GL_CXXALIASWARN (posix_spawn_file_actions_addfchdir
);
1016 #elif defined GNULIB_POSIXCHECK
1017 # undef posix_spawn_file_actions_addfchdir
1018 # if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR
1019 _GL_WARN_ON_USE (posix_spawn_file_actions_addfchdir
,
1020 "posix_spawn_file_actions_addfchdir is unportable - "
1021 "use gnulib module posix_spawn_file_actions_addfchdir for portability");
1026 #endif /* _@GUARD_PREFIX@_SPAWN_H */
1027 #endif /* _@GUARD_PREFIX@_SPAWN_H */