1 | /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ |
2 | /* Definitions for POSIX spawn interface. |
3 | Copyright (C) 2000, 2003-2004, 2008-2019 Free Software Foundation, Inc. |
4 | This file is part of the GNU C Library. |
5 | |
6 | This program is free software: you can redistribute it and/or modify |
7 | it under the terms of the GNU General Public License as published by |
8 | the Free Software Foundation; either version 3 of the License, or |
9 | (at your option) any later version. |
10 | |
11 | This program is distributed in the hope that it will be useful, |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | GNU General Public License for more details. |
15 | |
16 | You should have received a copy of the GNU General Public License |
17 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
18 | |
19 | #ifndef _GL_SPAWN_H |
20 | |
21 | #if __GNUC__ >= 3 |
22 | #pragma GCC system_header |
23 | #endif |
24 | |
25 | |
26 | /* The include_next requires a split double-inclusion guard. */ |
27 | #if 1 |
28 | # include_next <spawn.h> |
29 | #endif |
30 | |
31 | #ifndef _GL_SPAWN_H |
32 | #define _GL_SPAWN_H |
33 | |
34 | /* Get definitions of 'struct sched_param' and 'sigset_t'. |
35 | But avoid namespace pollution on glibc systems. */ |
36 | #if !(defined __GLIBC__ && !defined __UCLIBC__) |
37 | # include <sched.h> |
38 | # include <signal.h> |
39 | #endif |
40 | |
41 | #include <sys/types.h> |
42 | |
43 | #ifndef __THROW |
44 | # define __THROW |
45 | #endif |
46 | |
47 | /* 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 |
51 | different name. */ |
52 | #ifndef _Restrict_ |
53 | # if 199901L <= __STDC_VERSION__ |
54 | # define _Restrict_ restrict |
55 | # elif 2 < __GNUC__ || (2 == __GNUC__ && 95 <= __GNUC_MINOR__) |
56 | # define _Restrict_ __restrict |
57 | # else |
58 | # define _Restrict_ |
59 | # endif |
60 | #endif |
61 | /* gcc 3.1 and up support the [restrict] syntax. Don't trust |
62 | sys/cdefs.h's definition of __restrict_arr, though, as it |
63 | mishandles gcc -ansi -pedantic. */ |
64 | #ifndef _Restrict_arr_ |
65 | # if ((199901L <= __STDC_VERSION__ \ |
66 | || ((3 < __GNUC__ || (3 == __GNUC__ && 1 <= __GNUC_MINOR__)) \ |
67 | && !defined __STRICT_ANSI__)) \ |
68 | && !defined __GNUG__) |
69 | # define _Restrict_arr_ _Restrict_ |
70 | # else |
71 | # define _Restrict_arr_ |
72 | # endif |
73 | #endif |
74 | |
75 | /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ |
76 | /* C++ compatible function declaration macros. |
77 | Copyright (C) 2010-2019 Free Software Foundation, Inc. |
78 | |
79 | This program is free software: you can redistribute it and/or modify it |
80 | under the terms of the GNU General Public License as published |
81 | by the Free Software Foundation; either version 3 of the License, or |
82 | (at your option) any later version. |
83 | |
84 | This program is distributed in the hope that it will be useful, |
85 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
86 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
87 | General Public License for more details. |
88 | |
89 | You should have received a copy of the GNU General Public License |
90 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
91 | |
92 | #ifndef _GL_CXXDEFS_H |
93 | #define _GL_CXXDEFS_H |
94 | |
95 | /* Begin/end the GNULIB_NAMESPACE namespace. */ |
96 | #if defined __cplusplus && defined GNULIB_NAMESPACE |
97 | # define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE { |
98 | # define _GL_END_NAMESPACE } |
99 | #else |
100 | # define _GL_BEGIN_NAMESPACE |
101 | # define _GL_END_NAMESPACE |
102 | #endif |
103 | |
104 | /* The three most frequent use cases of these macros are: |
105 | |
106 | * For providing a substitute for a function that is missing on some |
107 | platforms, but is declared and works fine on the platforms on which |
108 | it exists: |
109 | |
110 | #if @GNULIB_FOO@ |
111 | # if !@HAVE_FOO@ |
112 | _GL_FUNCDECL_SYS (foo, ...); |
113 | # endif |
114 | _GL_CXXALIAS_SYS (foo, ...); |
115 | _GL_CXXALIASWARN (foo); |
116 | #elif defined GNULIB_POSIXCHECK |
117 | ... |
118 | #endif |
119 | |
120 | * For providing a replacement for a function that exists on all platforms, |
121 | but is broken/insufficient and needs to be replaced on some platforms: |
122 | |
123 | #if @GNULIB_FOO@ |
124 | # if @REPLACE_FOO@ |
125 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
126 | # undef foo |
127 | # define foo rpl_foo |
128 | # endif |
129 | _GL_FUNCDECL_RPL (foo, ...); |
130 | _GL_CXXALIAS_RPL (foo, ...); |
131 | # else |
132 | _GL_CXXALIAS_SYS (foo, ...); |
133 | # endif |
134 | _GL_CXXALIASWARN (foo); |
135 | #elif defined GNULIB_POSIXCHECK |
136 | ... |
137 | #endif |
138 | |
139 | * For providing a replacement for a function that exists on some platforms |
140 | but is broken/insufficient and needs to be replaced on some of them and |
141 | is additionally either missing or undeclared on some other platforms: |
142 | |
143 | #if @GNULIB_FOO@ |
144 | # if @REPLACE_FOO@ |
145 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
146 | # undef foo |
147 | # define foo rpl_foo |
148 | # endif |
149 | _GL_FUNCDECL_RPL (foo, ...); |
150 | _GL_CXXALIAS_RPL (foo, ...); |
151 | # else |
152 | # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ |
153 | _GL_FUNCDECL_SYS (foo, ...); |
154 | # endif |
155 | _GL_CXXALIAS_SYS (foo, ...); |
156 | # endif |
157 | _GL_CXXALIASWARN (foo); |
158 | #elif defined GNULIB_POSIXCHECK |
159 | ... |
160 | #endif |
161 | */ |
162 | |
163 | /* _GL_EXTERN_C declaration; |
164 | performs the declaration with C linkage. */ |
165 | #if defined __cplusplus |
166 | # define _GL_EXTERN_C extern "C" |
167 | #else |
168 | # define _GL_EXTERN_C extern |
169 | #endif |
170 | |
171 | /* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); |
172 | declares a replacement function, named rpl_func, with the given prototype, |
173 | consisting of return type, parameters, and attributes. |
174 | Example: |
175 | _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) |
176 | _GL_ARG_NONNULL ((1))); |
177 | */ |
178 | #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ |
179 | _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) |
180 | #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ |
181 | _GL_EXTERN_C rettype rpl_func parameters_and_attributes |
182 | |
183 | /* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); |
184 | declares the system function, named func, with the given prototype, |
185 | consisting of return type, parameters, and attributes. |
186 | Example: |
187 | _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) |
188 | _GL_ARG_NONNULL ((1))); |
189 | */ |
190 | #define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ |
191 | _GL_EXTERN_C rettype func parameters_and_attributes |
192 | |
193 | /* _GL_CXXALIAS_RPL (func, rettype, parameters); |
194 | declares a C++ alias called GNULIB_NAMESPACE::func |
195 | that redirects to rpl_func, if GNULIB_NAMESPACE is defined. |
196 | Example: |
197 | _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); |
198 | |
199 | Wrapping rpl_func in an object with an inline conversion operator |
200 | avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is |
201 | actually used in the program. */ |
202 | #define _GL_CXXALIAS_RPL(func,rettype,parameters) \ |
203 | _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) |
204 | #if defined __cplusplus && defined GNULIB_NAMESPACE |
205 | # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ |
206 | namespace GNULIB_NAMESPACE \ |
207 | { \ |
208 | static const struct _gl_ ## func ## _wrapper \ |
209 | { \ |
210 | typedef rettype (*type) parameters; \ |
211 | \ |
212 | inline operator type () const \ |
213 | { \ |
214 | return ::rpl_func; \ |
215 | } \ |
216 | } func = {}; \ |
217 | } \ |
218 | _GL_EXTERN_C int _gl_cxxalias_dummy |
219 | #else |
220 | # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ |
221 | _GL_EXTERN_C int _gl_cxxalias_dummy |
222 | #endif |
223 | |
224 | /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); |
225 | is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); |
226 | except that the C function rpl_func may have a slightly different |
227 | declaration. A cast is used to silence the "invalid conversion" error |
228 | that would otherwise occur. */ |
229 | #if defined __cplusplus && defined GNULIB_NAMESPACE |
230 | # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ |
231 | namespace GNULIB_NAMESPACE \ |
232 | { \ |
233 | static const struct _gl_ ## func ## _wrapper \ |
234 | { \ |
235 | typedef rettype (*type) parameters; \ |
236 | \ |
237 | inline operator type () const \ |
238 | { \ |
239 | return reinterpret_cast<type>(::rpl_func); \ |
240 | } \ |
241 | } func = {}; \ |
242 | } \ |
243 | _GL_EXTERN_C int _gl_cxxalias_dummy |
244 | #else |
245 | # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ |
246 | _GL_EXTERN_C int _gl_cxxalias_dummy |
247 | #endif |
248 | |
249 | /* _GL_CXXALIAS_SYS (func, rettype, parameters); |
250 | declares a C++ alias called GNULIB_NAMESPACE::func |
251 | that redirects to the system provided function func, if GNULIB_NAMESPACE |
252 | is defined. |
253 | Example: |
254 | _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); |
255 | |
256 | Wrapping func in an object with an inline conversion operator |
257 | avoids a reference to func unless GNULIB_NAMESPACE::func is |
258 | actually used in the program. */ |
259 | #if defined __cplusplus && defined GNULIB_NAMESPACE |
260 | # define _GL_CXXALIAS_SYS(func,rettype,parameters) \ |
261 | namespace GNULIB_NAMESPACE \ |
262 | { \ |
263 | static const struct _gl_ ## func ## _wrapper \ |
264 | { \ |
265 | typedef rettype (*type) parameters; \ |
266 | \ |
267 | inline operator type () const \ |
268 | { \ |
269 | return ::func; \ |
270 | } \ |
271 | } func = {}; \ |
272 | } \ |
273 | _GL_EXTERN_C int _gl_cxxalias_dummy |
274 | #else |
275 | # define _GL_CXXALIAS_SYS(func,rettype,parameters) \ |
276 | _GL_EXTERN_C int _gl_cxxalias_dummy |
277 | #endif |
278 | |
279 | /* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); |
280 | is like _GL_CXXALIAS_SYS (func, rettype, parameters); |
281 | except that the C function func may have a slightly different declaration. |
282 | A cast is used to silence the "invalid conversion" error that would |
283 | otherwise occur. */ |
284 | #if defined __cplusplus && defined GNULIB_NAMESPACE |
285 | # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ |
286 | namespace GNULIB_NAMESPACE \ |
287 | { \ |
288 | static const struct _gl_ ## func ## _wrapper \ |
289 | { \ |
290 | typedef rettype (*type) parameters; \ |
291 | \ |
292 | inline operator type () const \ |
293 | { \ |
294 | return reinterpret_cast<type>(::func); \ |
295 | } \ |
296 | } func = {}; \ |
297 | } \ |
298 | _GL_EXTERN_C int _gl_cxxalias_dummy |
299 | #else |
300 | # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ |
301 | _GL_EXTERN_C int _gl_cxxalias_dummy |
302 | #endif |
303 | |
304 | /* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); |
305 | is like _GL_CXXALIAS_SYS (func, rettype, parameters); |
306 | except that the C function is picked among a set of overloaded functions, |
307 | namely the one with rettype2 and parameters2. Two consecutive casts |
308 | are used to silence the "cannot find a match" and "invalid conversion" |
309 | errors that would otherwise occur. */ |
310 | #if defined __cplusplus && defined GNULIB_NAMESPACE |
311 | /* The outer cast must be a reinterpret_cast. |
312 | The inner cast: When the function is defined as a set of overloaded |
313 | functions, it works as a static_cast<>, choosing the designated variant. |
314 | When the function is defined as a single variant, it works as a |
315 | reinterpret_cast<>. The parenthesized cast syntax works both ways. */ |
316 | # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ |
317 | namespace GNULIB_NAMESPACE \ |
318 | { \ |
319 | static const struct _gl_ ## func ## _wrapper \ |
320 | { \ |
321 | typedef rettype (*type) parameters; \ |
322 | \ |
323 | inline operator type () const \ |
324 | { \ |
325 | return reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); \ |
326 | } \ |
327 | } func = {}; \ |
328 | } \ |
329 | _GL_EXTERN_C int _gl_cxxalias_dummy |
330 | #else |
331 | # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ |
332 | _GL_EXTERN_C int _gl_cxxalias_dummy |
333 | #endif |
334 | |
335 | /* _GL_CXXALIASWARN (func); |
336 | causes a warning to be emitted when ::func is used but not when |
337 | GNULIB_NAMESPACE::func is used. func must be defined without overloaded |
338 | variants. */ |
339 | #if defined __cplusplus && defined GNULIB_NAMESPACE |
340 | # define _GL_CXXALIASWARN(func) \ |
341 | _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) |
342 | # define _GL_CXXALIASWARN_1(func,namespace) \ |
343 | _GL_CXXALIASWARN_2 (func, namespace) |
344 | /* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>, |
345 | we enable the warning only when not optimizing. */ |
346 | # if !__OPTIMIZE__ |
347 | # define _GL_CXXALIASWARN_2(func,namespace) \ |
348 | _GL_WARN_ON_USE (func, \ |
349 | "The symbol ::" #func " refers to the system function. " \ |
350 | "Use " #namespace "::" #func " instead.") |
351 | # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING |
352 | # define _GL_CXXALIASWARN_2(func,namespace) \ |
353 | extern __typeof__ (func) func |
354 | # else |
355 | # define _GL_CXXALIASWARN_2(func,namespace) \ |
356 | _GL_EXTERN_C int _gl_cxxalias_dummy |
357 | # endif |
358 | #else |
359 | # define _GL_CXXALIASWARN(func) \ |
360 | _GL_EXTERN_C int _gl_cxxalias_dummy |
361 | #endif |
362 | |
363 | /* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); |
364 | causes a warning to be emitted when the given overloaded variant of ::func |
365 | is used but not when GNULIB_NAMESPACE::func is used. */ |
366 | #if defined __cplusplus && defined GNULIB_NAMESPACE |
367 | # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ |
368 | _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ |
369 | GNULIB_NAMESPACE) |
370 | # define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ |
371 | _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) |
372 | /* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>, |
373 | we enable the warning only when not optimizing. */ |
374 | # if !__OPTIMIZE__ |
375 | # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ |
376 | _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ |
377 | "The symbol ::" #func " refers to the system function. " \ |
378 | "Use " #namespace "::" #func " instead.") |
379 | # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING |
380 | # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ |
381 | extern __typeof__ (func) func |
382 | # else |
383 | # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ |
384 | _GL_EXTERN_C int _gl_cxxalias_dummy |
385 | # endif |
386 | #else |
387 | # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ |
388 | _GL_EXTERN_C int _gl_cxxalias_dummy |
389 | #endif |
390 | |
391 | #endif /* _GL_CXXDEFS_H */ |
392 | |
393 | /* The definition of _GL_ARG_NONNULL is copied here. */ |
394 | /* A C macro for declaring that specific arguments must not be NULL. |
395 | Copyright (C) 2009-2019 Free Software Foundation, Inc. |
396 | |
397 | This program is free software: you can redistribute it and/or modify it |
398 | under the terms of the GNU General Public License as published |
399 | by the Free Software Foundation; either version 3 of the License, or |
400 | (at your option) any later version. |
401 | |
402 | This program is distributed in the hope that it will be useful, |
403 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
404 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
405 | General Public License for more details. |
406 | |
407 | You should have received a copy of the GNU General Public License |
408 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
409 | |
410 | /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools |
411 | that the values passed as arguments n, ..., m must be non-NULL pointers. |
412 | n = 1 stands for the first argument, n = 2 for the second argument etc. */ |
413 | #ifndef _GL_ARG_NONNULL |
414 | # if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 |
415 | # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) |
416 | # else |
417 | # define _GL_ARG_NONNULL(params) |
418 | # endif |
419 | #endif |
420 | |
421 | /* The definition of _GL_WARN_ON_USE is copied here. */ |
422 | /* A C macro for emitting warnings if a function is used. |
423 | Copyright (C) 2010-2019 Free Software Foundation, Inc. |
424 | |
425 | This program is free software: you can redistribute it and/or modify it |
426 | under the terms of the GNU General Public License as published |
427 | by the Free Software Foundation; either version 3 of the License, or |
428 | (at your option) any later version. |
429 | |
430 | This program is distributed in the hope that it will be useful, |
431 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
432 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
433 | General Public License for more details. |
434 | |
435 | You should have received a copy of the GNU General Public License |
436 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
437 | |
438 | /* _GL_WARN_ON_USE (function, "literal string") issues a declaration |
439 | for FUNCTION which will then trigger a compiler warning containing |
440 | the text of "literal string" anywhere that function is called, if |
441 | supported by the compiler. If the compiler does not support this |
442 | feature, the macro expands to an unused extern declaration. |
443 | |
444 | _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the |
445 | attribute used in _GL_WARN_ON_USE. If the compiler does not support |
446 | this feature, it expands to empty. |
447 | |
448 | These macros are useful for marking a function as a potential |
449 | portability trap, with the intent that "literal string" include |
450 | instructions on the replacement function that should be used |
451 | instead. |
452 | _GL_WARN_ON_USE is for functions with 'extern' linkage. |
453 | _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' |
454 | linkage. |
455 | |
456 | However, one of the reasons that a function is a portability trap is |
457 | if it has the wrong signature. Declaring FUNCTION with a different |
458 | signature in C is a compilation error, so this macro must use the |
459 | same type as any existing declaration so that programs that avoid |
460 | the problematic FUNCTION do not fail to compile merely because they |
461 | included a header that poisoned the function. But this implies that |
462 | _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already |
463 | have a declaration. Use of this macro implies that there must not |
464 | be any other macro hiding the declaration of FUNCTION; but |
465 | undefining FUNCTION first is part of the poisoning process anyway |
466 | (although for symbols that are provided only via a macro, the result |
467 | is a compilation error rather than a warning containing |
468 | "literal string"). Also note that in C++, it is only safe to use if |
469 | FUNCTION has no overloads. |
470 | |
471 | For an example, it is possible to poison 'getline' by: |
472 | - adding a call to gl_WARN_ON_USE_PREPARE([[#include <stdio.h>]], |
473 | [getline]) in configure.ac, which potentially defines |
474 | HAVE_RAW_DECL_GETLINE |
475 | - adding this code to a header that wraps the system <stdio.h>: |
476 | #undef getline |
477 | #if HAVE_RAW_DECL_GETLINE |
478 | _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" |
479 | "not universally present; use the gnulib module getline"); |
480 | #endif |
481 | |
482 | It is not possible to directly poison global variables. But it is |
483 | possible to write a wrapper accessor function, and poison that |
484 | (less common usage, like &environ, will cause a compilation error |
485 | rather than issue the nice warning, but the end result of informing |
486 | the developer about their portability problem is still achieved): |
487 | #if HAVE_RAW_DECL_ENVIRON |
488 | static char *** |
489 | rpl_environ (void) { return &environ; } |
490 | _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); |
491 | # undef environ |
492 | # define environ (*rpl_environ ()) |
493 | #endif |
494 | or better (avoiding contradictory use of 'static' and 'extern'): |
495 | #if HAVE_RAW_DECL_ENVIRON |
496 | static char *** |
497 | _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") |
498 | rpl_environ (void) { return &environ; } |
499 | # undef environ |
500 | # define environ (*rpl_environ ()) |
501 | #endif |
502 | */ |
503 | #ifndef _GL_WARN_ON_USE |
504 | |
505 | # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) |
506 | /* A compiler attribute is available in gcc versions 4.3.0 and later. */ |
507 | # define _GL_WARN_ON_USE(function, message) \ |
508 | extern __typeof__ (function) function __attribute__ ((__warning__ (message))) |
509 | # define _GL_WARN_ON_USE_ATTRIBUTE(message) \ |
510 | __attribute__ ((__warning__ (message))) |
511 | # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING |
512 | /* Verify the existence of the function. */ |
513 | # define _GL_WARN_ON_USE(function, message) \ |
514 | extern __typeof__ (function) function |
515 | # define _GL_WARN_ON_USE_ATTRIBUTE(message) |
516 | # else /* Unsupported. */ |
517 | # define _GL_WARN_ON_USE(function, message) \ |
518 | _GL_WARN_EXTERN_C int _gl_warn_on_use |
519 | # define _GL_WARN_ON_USE_ATTRIBUTE(message) |
520 | # endif |
521 | #endif |
522 | |
523 | /* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") |
524 | is like _GL_WARN_ON_USE (function, "string"), except that the function is |
525 | declared with the given prototype, consisting of return type, parameters, |
526 | and attributes. |
527 | This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does |
528 | not work in this case. */ |
529 | #ifndef _GL_WARN_ON_USE_CXX |
530 | # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) |
531 | # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ |
532 | extern rettype function parameters_and_attributes \ |
533 | __attribute__ ((__warning__ (msg))) |
534 | # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING |
535 | /* Verify the existence of the function. */ |
536 | # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ |
537 | extern rettype function parameters_and_attributes |
538 | # else /* Unsupported. */ |
539 | # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ |
540 | _GL_WARN_EXTERN_C int _gl_warn_on_use |
541 | # endif |
542 | #endif |
543 | |
544 | /* _GL_WARN_EXTERN_C declaration; |
545 | performs the declaration with C linkage. */ |
546 | #ifndef _GL_WARN_EXTERN_C |
547 | # if defined __cplusplus |
548 | # define _GL_WARN_EXTERN_C extern "C" |
549 | # else |
550 | # define _GL_WARN_EXTERN_C extern |
551 | # endif |
552 | #endif |
553 | |
554 | |
555 | /* Data structure to contain attributes for thread creation. */ |
556 | #if 0 || (1 && !1) |
557 | # define posix_spawnattr_t rpl_posix_spawnattr_t |
558 | #endif |
559 | #if 0 || !1 || !1 |
560 | # if !GNULIB_defined_posix_spawnattr_t |
561 | typedef struct |
562 | { |
563 | short int _flags; |
564 | pid_t _pgrp; |
565 | sigset_t _sd; |
566 | sigset_t _ss; |
567 | struct sched_param _sp; |
568 | int _policy; |
569 | int __pad[16]; |
570 | } posix_spawnattr_t; |
571 | # define GNULIB_defined_posix_spawnattr_t 1 |
572 | # endif |
573 | #endif |
574 | |
575 | |
576 | /* Data structure to contain information about the actions to be |
577 | performed in the new process with respect to file descriptors. */ |
578 | #if 0 || (1 && !1) |
579 | # define posix_spawn_file_actions_t rpl_posix_spawn_file_actions_t |
580 | #endif |
581 | #if 0 || !1 || !1 |
582 | # if !GNULIB_defined_posix_spawn_file_actions_t |
583 | typedef struct |
584 | { |
585 | int _allocated; |
586 | int _used; |
587 | struct __spawn_action *_actions; |
588 | int __pad[16]; |
589 | } posix_spawn_file_actions_t; |
590 | # define GNULIB_defined_posix_spawn_file_actions_t 1 |
591 | # endif |
592 | #endif |
593 | |
594 | |
595 | /* Flags to be set in the 'posix_spawnattr_t'. */ |
596 | #if 1 |
597 | /* Use the values from the system, but provide the missing ones. */ |
598 | # ifndef POSIX_SPAWN_SETSCHEDPARAM |
599 | # define POSIX_SPAWN_SETSCHEDPARAM 0 |
600 | # endif |
601 | # ifndef POSIX_SPAWN_SETSCHEDULER |
602 | # define POSIX_SPAWN_SETSCHEDULER 0 |
603 | # endif |
604 | #else |
605 | # if 0 |
606 | /* Use the values from the system, for better compatibility. */ |
607 | /* But this implementation does not support AIX extensions. */ |
608 | # undef POSIX_SPAWN_FORK_HANDLERS |
609 | # else |
610 | # define POSIX_SPAWN_RESETIDS 0x01 |
611 | # define POSIX_SPAWN_SETPGROUP 0x02 |
612 | # define POSIX_SPAWN_SETSIGDEF 0x04 |
613 | # define POSIX_SPAWN_SETSIGMASK 0x08 |
614 | # define POSIX_SPAWN_SETSCHEDPARAM 0x10 |
615 | # define POSIX_SPAWN_SETSCHEDULER 0x20 |
616 | # endif |
617 | #endif |
618 | /* A GNU extension. Use the next free bit position. */ |
619 | #ifndef POSIX_SPAWN_USEVFORK |
620 | # define POSIX_SPAWN_USEVFORK \ |
621 | ((POSIX_SPAWN_RESETIDS | (POSIX_SPAWN_RESETIDS - 1) \ |
622 | | POSIX_SPAWN_SETPGROUP | (POSIX_SPAWN_SETPGROUP - 1) \ |
623 | | POSIX_SPAWN_SETSIGDEF | (POSIX_SPAWN_SETSIGDEF - 1) \ |
624 | | POSIX_SPAWN_SETSIGMASK | (POSIX_SPAWN_SETSIGMASK - 1) \ |
625 | | POSIX_SPAWN_SETSCHEDPARAM \ |
626 | | (POSIX_SPAWN_SETSCHEDPARAM > 0 ? POSIX_SPAWN_SETSCHEDPARAM - 1 : 0) \ |
627 | | POSIX_SPAWN_SETSCHEDULER \ |
628 | | (POSIX_SPAWN_SETSCHEDULER > 0 ? POSIX_SPAWN_SETSCHEDULER - 1 : 0)) \ |
629 | + 1) |
630 | #endif |
631 | #if !GNULIB_defined_verify_POSIX_SPAWN_USEVFORK_no_overlap |
632 | typedef int verify_POSIX_SPAWN_USEVFORK_no_overlap |
633 | [(((POSIX_SPAWN_RESETIDS | POSIX_SPAWN_SETPGROUP |
634 | | POSIX_SPAWN_SETSIGDEF | POSIX_SPAWN_SETSIGMASK |
635 | | POSIX_SPAWN_SETSCHEDPARAM | POSIX_SPAWN_SETSCHEDULER) |
636 | & POSIX_SPAWN_USEVFORK) |
637 | == 0) |
638 | ? 1 : -1]; |
639 | # define GNULIB_defined_verify_POSIX_SPAWN_USEVFORK_no_overlap 1 |
640 | #endif |
641 | |
642 | |
643 | #if 0 |
644 | /* Spawn a new process executing PATH with the attributes describes in *ATTRP. |
645 | Before running the process perform the actions described in FILE-ACTIONS. |
646 | |
647 | This function is a possible cancellation points and therefore not |
648 | marked with __THROW. */ |
649 | # if 0 |
650 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
651 | # define posix_spawn rpl_posix_spawn |
652 | # endif |
653 | _GL_FUNCDECL_RPL (posix_spawn, int, |
654 | (pid_t *_Restrict_ __pid, |
655 | const char *_Restrict_ __path, |
656 | const posix_spawn_file_actions_t *_Restrict_ __file_actions, |
657 | const posix_spawnattr_t *_Restrict_ __attrp, |
658 | char *const argv[_Restrict_arr_], |
659 | char *const envp[_Restrict_arr_]) |
660 | _GL_ARG_NONNULL ((2, 5, 6))); |
661 | _GL_CXXALIAS_RPL (posix_spawn, int, |
662 | (pid_t *_Restrict_ __pid, |
663 | const char *_Restrict_ __path, |
664 | const posix_spawn_file_actions_t *_Restrict_ __file_actions, |
665 | const posix_spawnattr_t *_Restrict_ __attrp, |
666 | char *const argv[_Restrict_arr_], |
667 | char *const envp[_Restrict_arr_])); |
668 | # else |
669 | # if !1 |
670 | _GL_FUNCDECL_SYS (posix_spawn, int, |
671 | (pid_t *_Restrict_ __pid, |
672 | const char *_Restrict_ __path, |
673 | const posix_spawn_file_actions_t *_Restrict_ __file_actions, |
674 | const posix_spawnattr_t *_Restrict_ __attrp, |
675 | char *const argv[_Restrict_arr_], |
676 | char *const envp[_Restrict_arr_]) |
677 | _GL_ARG_NONNULL ((2, 5, 6))); |
678 | # endif |
679 | _GL_CXXALIAS_SYS (posix_spawn, int, |
680 | (pid_t *_Restrict_ __pid, |
681 | const char *_Restrict_ __path, |
682 | const posix_spawn_file_actions_t *_Restrict_ __file_actions, |
683 | const posix_spawnattr_t *_Restrict_ __attrp, |
684 | char *const argv[_Restrict_arr_], |
685 | char *const envp[_Restrict_arr_])); |
686 | # endif |
687 | _GL_CXXALIASWARN (posix_spawn); |
688 | #elif defined GNULIB_POSIXCHECK |
689 | # undef posix_spawn |
690 | # if HAVE_RAW_DECL_POSIX_SPAWN |
691 | _GL_WARN_ON_USE (posix_spawn, "posix_spawn is unportable - " |
692 | "use gnulib module posix_spawn for portability" ); |
693 | # endif |
694 | #endif |
695 | |
696 | #if 1 |
697 | /* Similar to 'posix_spawn' but search for FILE in the PATH. |
698 | |
699 | This function is a possible cancellation points and therefore not |
700 | marked with __THROW. */ |
701 | # if 0 |
702 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
703 | # define posix_spawnp rpl_posix_spawnp |
704 | # endif |
705 | _GL_FUNCDECL_RPL (posix_spawnp, int, |
706 | (pid_t *__pid, const char *__file, |
707 | const posix_spawn_file_actions_t *__file_actions, |
708 | const posix_spawnattr_t *__attrp, |
709 | char *const argv[], char *const envp[]) |
710 | _GL_ARG_NONNULL ((2, 5, 6))); |
711 | _GL_CXXALIAS_RPL (posix_spawnp, int, |
712 | (pid_t *__pid, const char *__file, |
713 | const posix_spawn_file_actions_t *__file_actions, |
714 | const posix_spawnattr_t *__attrp, |
715 | char *const argv[], char *const envp[])); |
716 | # else |
717 | # if !1 |
718 | _GL_FUNCDECL_SYS (posix_spawnp, int, |
719 | (pid_t *__pid, const char *__file, |
720 | const posix_spawn_file_actions_t *__file_actions, |
721 | const posix_spawnattr_t *__attrp, |
722 | char *const argv[], char *const envp[]) |
723 | _GL_ARG_NONNULL ((2, 5, 6))); |
724 | # endif |
725 | _GL_CXXALIAS_SYS (posix_spawnp, int, |
726 | (pid_t *__pid, const char *__file, |
727 | const posix_spawn_file_actions_t *__file_actions, |
728 | const posix_spawnattr_t *__attrp, |
729 | char *const argv[], char *const envp[])); |
730 | # endif |
731 | _GL_CXXALIASWARN (posix_spawnp); |
732 | #elif defined GNULIB_POSIXCHECK |
733 | # undef posix_spawnp |
734 | # if HAVE_RAW_DECL_POSIX_SPAWNP |
735 | _GL_WARN_ON_USE (posix_spawnp, "posix_spawnp is unportable - " |
736 | "use gnulib module posix_spawnp for portability" ); |
737 | # endif |
738 | #endif |
739 | |
740 | |
741 | #if 1 |
742 | /* Initialize data structure with attributes for 'spawn' to default values. */ |
743 | # if 0 |
744 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
745 | # define posix_spawnattr_init rpl_posix_spawnattr_init |
746 | # endif |
747 | _GL_FUNCDECL_RPL (posix_spawnattr_init, int, (posix_spawnattr_t *__attr) |
748 | __THROW _GL_ARG_NONNULL ((1))); |
749 | _GL_CXXALIAS_RPL (posix_spawnattr_init, int, (posix_spawnattr_t *__attr)); |
750 | # else |
751 | # if !1 |
752 | _GL_FUNCDECL_SYS (posix_spawnattr_init, int, (posix_spawnattr_t *__attr) |
753 | __THROW _GL_ARG_NONNULL ((1))); |
754 | # endif |
755 | _GL_CXXALIAS_SYS (posix_spawnattr_init, int, (posix_spawnattr_t *__attr)); |
756 | # endif |
757 | _GL_CXXALIASWARN (posix_spawnattr_init); |
758 | #elif defined GNULIB_POSIXCHECK |
759 | # undef posix_spawnattr_init |
760 | # if HAVE_RAW_DECL_POSIX_SPAWNATTR_INIT |
761 | _GL_WARN_ON_USE (posix_spawnattr_init, "posix_spawnattr_init is unportable - " |
762 | "use gnulib module posix_spawnattr_init for portability" ); |
763 | # endif |
764 | #endif |
765 | |
766 | #if 1 |
767 | /* Free resources associated with ATTR. */ |
768 | # if 0 |
769 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
770 | # define posix_spawnattr_destroy rpl_posix_spawnattr_destroy |
771 | # endif |
772 | _GL_FUNCDECL_RPL (posix_spawnattr_destroy, int, (posix_spawnattr_t *__attr) |
773 | __THROW _GL_ARG_NONNULL ((1))); |
774 | _GL_CXXALIAS_RPL (posix_spawnattr_destroy, int, (posix_spawnattr_t *__attr)); |
775 | # else |
776 | # if !1 |
777 | _GL_FUNCDECL_SYS (posix_spawnattr_destroy, int, (posix_spawnattr_t *__attr) |
778 | __THROW _GL_ARG_NONNULL ((1))); |
779 | # endif |
780 | _GL_CXXALIAS_SYS (posix_spawnattr_destroy, int, (posix_spawnattr_t *__attr)); |
781 | # endif |
782 | _GL_CXXALIASWARN (posix_spawnattr_destroy); |
783 | #elif defined GNULIB_POSIXCHECK |
784 | # undef posix_spawnattr_destroy |
785 | # if HAVE_RAW_DECL_POSIX_SPAWNATTR_DESTROY |
786 | _GL_WARN_ON_USE (posix_spawnattr_destroy, |
787 | "posix_spawnattr_destroy is unportable - " |
788 | "use gnulib module posix_spawnattr_destroy for portability" ); |
789 | # endif |
790 | #endif |
791 | |
792 | #if 0 |
793 | /* Store signal mask for signals with default handling from ATTR in |
794 | SIGDEFAULT. */ |
795 | # if 0 |
796 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
797 | # define posix_spawnattr_getsigdefault rpl_posix_spawnattr_getsigdefault |
798 | # endif |
799 | _GL_FUNCDECL_RPL (posix_spawnattr_getsigdefault, int, |
800 | (const posix_spawnattr_t *_Restrict_ __attr, |
801 | sigset_t *_Restrict_ __sigdefault) |
802 | __THROW _GL_ARG_NONNULL ((1, 2))); |
803 | _GL_CXXALIAS_RPL (posix_spawnattr_getsigdefault, int, |
804 | (const posix_spawnattr_t *_Restrict_ __attr, |
805 | sigset_t *_Restrict_ __sigdefault)); |
806 | # else |
807 | # if !1 |
808 | _GL_FUNCDECL_SYS (posix_spawnattr_getsigdefault, int, |
809 | (const posix_spawnattr_t *_Restrict_ __attr, |
810 | sigset_t *_Restrict_ __sigdefault) |
811 | __THROW _GL_ARG_NONNULL ((1, 2))); |
812 | # endif |
813 | _GL_CXXALIAS_SYS (posix_spawnattr_getsigdefault, int, |
814 | (const posix_spawnattr_t *_Restrict_ __attr, |
815 | sigset_t *_Restrict_ __sigdefault)); |
816 | # endif |
817 | _GL_CXXALIASWARN (posix_spawnattr_getsigdefault); |
818 | #elif defined GNULIB_POSIXCHECK |
819 | # undef posix_spawnattr_getsigdefault |
820 | # if HAVE_RAW_DECL_POSIX_SPAWNATTR_GETSIGDEFAULT |
821 | _GL_WARN_ON_USE (posix_spawnattr_getsigdefault, |
822 | "posix_spawnattr_getsigdefault is unportable - " |
823 | "use gnulib module posix_spawnattr_getsigdefault for portability" ); |
824 | # endif |
825 | #endif |
826 | |
827 | #if 0 |
828 | /* Set signal mask for signals with default handling in ATTR to SIGDEFAULT. */ |
829 | # if 0 |
830 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
831 | # define posix_spawnattr_setsigdefault rpl_posix_spawnattr_setsigdefault |
832 | # endif |
833 | _GL_FUNCDECL_RPL (posix_spawnattr_setsigdefault, int, |
834 | (posix_spawnattr_t *_Restrict_ __attr, |
835 | const sigset_t *_Restrict_ __sigdefault) |
836 | __THROW _GL_ARG_NONNULL ((1, 2))); |
837 | _GL_CXXALIAS_RPL (posix_spawnattr_setsigdefault, int, |
838 | (posix_spawnattr_t *_Restrict_ __attr, |
839 | const sigset_t *_Restrict_ __sigdefault)); |
840 | # else |
841 | # if !1 |
842 | _GL_FUNCDECL_SYS (posix_spawnattr_setsigdefault, int, |
843 | (posix_spawnattr_t *_Restrict_ __attr, |
844 | const sigset_t *_Restrict_ __sigdefault) |
845 | __THROW _GL_ARG_NONNULL ((1, 2))); |
846 | # endif |
847 | _GL_CXXALIAS_SYS (posix_spawnattr_setsigdefault, int, |
848 | (posix_spawnattr_t *_Restrict_ __attr, |
849 | const sigset_t *_Restrict_ __sigdefault)); |
850 | # endif |
851 | _GL_CXXALIASWARN (posix_spawnattr_setsigdefault); |
852 | #elif defined GNULIB_POSIXCHECK |
853 | # undef posix_spawnattr_setsigdefault |
854 | # if HAVE_RAW_DECL_POSIX_SPAWNATTR_SETSIGDEFAULT |
855 | _GL_WARN_ON_USE (posix_spawnattr_setsigdefault, |
856 | "posix_spawnattr_setsigdefault is unportable - " |
857 | "use gnulib module posix_spawnattr_setsigdefault for portability" ); |
858 | # endif |
859 | #endif |
860 | |
861 | #if 0 |
862 | /* Store signal mask for the new process from ATTR in SIGMASK. */ |
863 | # if 0 |
864 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
865 | # define posix_spawnattr_getsigmask rpl_posix_spawnattr_getsigmask |
866 | # endif |
867 | _GL_FUNCDECL_RPL (posix_spawnattr_getsigmask, int, |
868 | (const posix_spawnattr_t *_Restrict_ __attr, |
869 | sigset_t *_Restrict_ __sigmask) |
870 | __THROW _GL_ARG_NONNULL ((1, 2))); |
871 | _GL_CXXALIAS_RPL (posix_spawnattr_getsigmask, int, |
872 | (const posix_spawnattr_t *_Restrict_ __attr, |
873 | sigset_t *_Restrict_ __sigmask)); |
874 | # else |
875 | # if !1 |
876 | _GL_FUNCDECL_SYS (posix_spawnattr_getsigmask, int, |
877 | (const posix_spawnattr_t *_Restrict_ __attr, |
878 | sigset_t *_Restrict_ __sigmask) |
879 | __THROW _GL_ARG_NONNULL ((1, 2))); |
880 | # endif |
881 | _GL_CXXALIAS_SYS (posix_spawnattr_getsigmask, int, |
882 | (const posix_spawnattr_t *_Restrict_ __attr, |
883 | sigset_t *_Restrict_ __sigmask)); |
884 | # endif |
885 | _GL_CXXALIASWARN (posix_spawnattr_getsigmask); |
886 | #elif defined GNULIB_POSIXCHECK |
887 | # undef posix_spawnattr_getsigmask |
888 | # if HAVE_RAW_DECL_POSIX_SPAWNATTR_GETSIGMASK |
889 | _GL_WARN_ON_USE (posix_spawnattr_getsigmask, |
890 | "posix_spawnattr_getsigmask is unportable - " |
891 | "use gnulib module posix_spawnattr_getsigmask for portability" ); |
892 | # endif |
893 | #endif |
894 | |
895 | #if 1 |
896 | /* Set signal mask for the new process in ATTR to SIGMASK. */ |
897 | # if 0 |
898 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
899 | # define posix_spawnattr_setsigmask rpl_posix_spawnattr_setsigmask |
900 | # endif |
901 | _GL_FUNCDECL_RPL (posix_spawnattr_setsigmask, int, |
902 | (posix_spawnattr_t *_Restrict_ __attr, |
903 | const sigset_t *_Restrict_ __sigmask) |
904 | __THROW _GL_ARG_NONNULL ((1, 2))); |
905 | _GL_CXXALIAS_RPL (posix_spawnattr_setsigmask, int, |
906 | (posix_spawnattr_t *_Restrict_ __attr, |
907 | const sigset_t *_Restrict_ __sigmask)); |
908 | # else |
909 | # if !1 |
910 | _GL_FUNCDECL_SYS (posix_spawnattr_setsigmask, int, |
911 | (posix_spawnattr_t *_Restrict_ __attr, |
912 | const sigset_t *_Restrict_ __sigmask) |
913 | __THROW _GL_ARG_NONNULL ((1, 2))); |
914 | # endif |
915 | _GL_CXXALIAS_SYS (posix_spawnattr_setsigmask, int, |
916 | (posix_spawnattr_t *_Restrict_ __attr, |
917 | const sigset_t *_Restrict_ __sigmask)); |
918 | # endif |
919 | _GL_CXXALIASWARN (posix_spawnattr_setsigmask); |
920 | #elif defined GNULIB_POSIXCHECK |
921 | # undef posix_spawnattr_setsigmask |
922 | # if HAVE_RAW_DECL_POSIX_SPAWNATTR_SETSIGMASK |
923 | _GL_WARN_ON_USE (posix_spawnattr_setsigmask, |
924 | "posix_spawnattr_setsigmask is unportable - " |
925 | "use gnulib module posix_spawnattr_setsigmask for portability" ); |
926 | # endif |
927 | #endif |
928 | |
929 | #if 0 |
930 | /* Get flag word from the attribute structure. */ |
931 | # if 0 |
932 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
933 | # define posix_spawnattr_getflags rpl_posix_spawnattr_getflags |
934 | # endif |
935 | _GL_FUNCDECL_RPL (posix_spawnattr_getflags, int, |
936 | (const posix_spawnattr_t *_Restrict_ __attr, |
937 | short int *_Restrict_ __flags) |
938 | __THROW _GL_ARG_NONNULL ((1, 2))); |
939 | _GL_CXXALIAS_RPL (posix_spawnattr_getflags, int, |
940 | (const posix_spawnattr_t *_Restrict_ __attr, |
941 | short int *_Restrict_ __flags)); |
942 | # else |
943 | # if !1 |
944 | _GL_FUNCDECL_SYS (posix_spawnattr_getflags, int, |
945 | (const posix_spawnattr_t *_Restrict_ __attr, |
946 | short int *_Restrict_ __flags) |
947 | __THROW _GL_ARG_NONNULL ((1, 2))); |
948 | # endif |
949 | _GL_CXXALIAS_SYS (posix_spawnattr_getflags, int, |
950 | (const posix_spawnattr_t *_Restrict_ __attr, |
951 | short int *_Restrict_ __flags)); |
952 | # endif |
953 | _GL_CXXALIASWARN (posix_spawnattr_getflags); |
954 | #elif defined GNULIB_POSIXCHECK |
955 | # undef posix_spawnattr_getflags |
956 | # if HAVE_RAW_DECL_POSIX_SPAWNATTR_GETFLAGS |
957 | _GL_WARN_ON_USE (posix_spawnattr_getflags, |
958 | "posix_spawnattr_getflags is unportable - " |
959 | "use gnulib module posix_spawnattr_getflags for portability" ); |
960 | # endif |
961 | #endif |
962 | |
963 | #if 1 |
964 | /* Store flags in the attribute structure. */ |
965 | # if 0 |
966 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
967 | # define posix_spawnattr_setflags rpl_posix_spawnattr_setflags |
968 | # endif |
969 | _GL_FUNCDECL_RPL (posix_spawnattr_setflags, int, |
970 | (posix_spawnattr_t *__attr, short int __flags) |
971 | __THROW _GL_ARG_NONNULL ((1))); |
972 | _GL_CXXALIAS_RPL (posix_spawnattr_setflags, int, |
973 | (posix_spawnattr_t *__attr, short int __flags)); |
974 | # else |
975 | # if !1 |
976 | _GL_FUNCDECL_SYS (posix_spawnattr_setflags, int, |
977 | (posix_spawnattr_t *__attr, short int __flags) |
978 | __THROW _GL_ARG_NONNULL ((1))); |
979 | # endif |
980 | _GL_CXXALIAS_SYS (posix_spawnattr_setflags, int, |
981 | (posix_spawnattr_t *__attr, short int __flags)); |
982 | # endif |
983 | _GL_CXXALIASWARN (posix_spawnattr_setflags); |
984 | #elif defined GNULIB_POSIXCHECK |
985 | # undef posix_spawnattr_setflags |
986 | # if HAVE_RAW_DECL_POSIX_SPAWNATTR_SETFLAGS |
987 | _GL_WARN_ON_USE (posix_spawnattr_setflags, |
988 | "posix_spawnattr_setflags is unportable - " |
989 | "use gnulib module posix_spawnattr_setflags for portability" ); |
990 | # endif |
991 | #endif |
992 | |
993 | #if 0 |
994 | /* Get process group ID from the attribute structure. */ |
995 | # if 0 |
996 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
997 | # define posix_spawnattr_getpgroup rpl_posix_spawnattr_getpgroup |
998 | # endif |
999 | _GL_FUNCDECL_RPL (posix_spawnattr_getpgroup, int, |
1000 | (const posix_spawnattr_t *_Restrict_ __attr, |
1001 | pid_t *_Restrict_ __pgroup) |
1002 | __THROW _GL_ARG_NONNULL ((1, 2))); |
1003 | _GL_CXXALIAS_RPL (posix_spawnattr_getpgroup, int, |
1004 | (const posix_spawnattr_t *_Restrict_ __attr, |
1005 | pid_t *_Restrict_ __pgroup)); |
1006 | # else |
1007 | # if !1 |
1008 | _GL_FUNCDECL_SYS (posix_spawnattr_getpgroup, int, |
1009 | (const posix_spawnattr_t *_Restrict_ __attr, |
1010 | pid_t *_Restrict_ __pgroup) |
1011 | __THROW _GL_ARG_NONNULL ((1, 2))); |
1012 | # endif |
1013 | _GL_CXXALIAS_SYS (posix_spawnattr_getpgroup, int, |
1014 | (const posix_spawnattr_t *_Restrict_ __attr, |
1015 | pid_t *_Restrict_ __pgroup)); |
1016 | # endif |
1017 | _GL_CXXALIASWARN (posix_spawnattr_getpgroup); |
1018 | #elif defined GNULIB_POSIXCHECK |
1019 | # undef posix_spawnattr_getpgroup |
1020 | # if HAVE_RAW_DECL_POSIX_SPAWNATTR_GETPGROUP |
1021 | _GL_WARN_ON_USE (posix_spawnattr_getpgroup, |
1022 | "posix_spawnattr_getpgroup is unportable - " |
1023 | "use gnulib module posix_spawnattr_getpgroup for portability" ); |
1024 | # endif |
1025 | #endif |
1026 | |
1027 | #if 0 |
1028 | /* Store process group ID in the attribute structure. */ |
1029 | # if 0 |
1030 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
1031 | # define posix_spawnattr_setpgroup rpl_posix_spawnattr_setpgroup |
1032 | # endif |
1033 | _GL_FUNCDECL_RPL (posix_spawnattr_setpgroup, int, |
1034 | (posix_spawnattr_t *__attr, pid_t __pgroup) |
1035 | __THROW _GL_ARG_NONNULL ((1))); |
1036 | _GL_CXXALIAS_RPL (posix_spawnattr_setpgroup, int, |
1037 | (posix_spawnattr_t *__attr, pid_t __pgroup)); |
1038 | # else |
1039 | # if !1 |
1040 | _GL_FUNCDECL_SYS (posix_spawnattr_setpgroup, int, |
1041 | (posix_spawnattr_t *__attr, pid_t __pgroup) |
1042 | __THROW _GL_ARG_NONNULL ((1))); |
1043 | # endif |
1044 | _GL_CXXALIAS_SYS (posix_spawnattr_setpgroup, int, |
1045 | (posix_spawnattr_t *__attr, pid_t __pgroup)); |
1046 | # endif |
1047 | _GL_CXXALIASWARN (posix_spawnattr_setpgroup); |
1048 | #elif defined GNULIB_POSIXCHECK |
1049 | # undef posix_spawnattr_setpgroup |
1050 | # if HAVE_RAW_DECL_POSIX_SPAWNATTR_SETPGROUP |
1051 | _GL_WARN_ON_USE (posix_spawnattr_setpgroup, |
1052 | "posix_spawnattr_setpgroup is unportable - " |
1053 | "use gnulib module posix_spawnattr_setpgroup for portability" ); |
1054 | # endif |
1055 | #endif |
1056 | |
1057 | #if 0 |
1058 | /* Get scheduling policy from the attribute structure. */ |
1059 | # if 0 |
1060 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
1061 | # define posix_spawnattr_getschedpolicy rpl_posix_spawnattr_getschedpolicy |
1062 | # endif |
1063 | _GL_FUNCDECL_RPL (posix_spawnattr_getschedpolicy, int, |
1064 | (const posix_spawnattr_t *_Restrict_ __attr, |
1065 | int *_Restrict_ __schedpolicy) |
1066 | __THROW _GL_ARG_NONNULL ((1, 2))); |
1067 | _GL_CXXALIAS_RPL (posix_spawnattr_getschedpolicy, int, |
1068 | (const posix_spawnattr_t *_Restrict_ __attr, |
1069 | int *_Restrict_ __schedpolicy)); |
1070 | # else |
1071 | # if !1 || POSIX_SPAWN_SETSCHEDULER == 0 |
1072 | _GL_FUNCDECL_SYS (posix_spawnattr_getschedpolicy, int, |
1073 | (const posix_spawnattr_t *_Restrict_ __attr, |
1074 | int *_Restrict_ __schedpolicy) |
1075 | __THROW _GL_ARG_NONNULL ((1, 2))); |
1076 | # endif |
1077 | _GL_CXXALIAS_SYS (posix_spawnattr_getschedpolicy, int, |
1078 | (const posix_spawnattr_t *_Restrict_ __attr, |
1079 | int *_Restrict_ __schedpolicy)); |
1080 | # endif |
1081 | _GL_CXXALIASWARN (posix_spawnattr_getschedpolicy); |
1082 | #elif defined GNULIB_POSIXCHECK |
1083 | # undef posix_spawnattr_getschedpolicy |
1084 | # if HAVE_RAW_DECL_POSIX_SPAWNATTR_GETSCHEDPOLICY |
1085 | _GL_WARN_ON_USE (posix_spawnattr_getschedpolicy, |
1086 | "posix_spawnattr_getschedpolicy is unportable - " |
1087 | "use gnulib module posix_spawnattr_getschedpolicy for portability" ); |
1088 | # endif |
1089 | #endif |
1090 | |
1091 | #if 0 |
1092 | /* Store scheduling policy in the attribute structure. */ |
1093 | # if 0 |
1094 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
1095 | # define posix_spawnattr_setschedpolicy rpl_posix_spawnattr_setschedpolicy |
1096 | # endif |
1097 | _GL_FUNCDECL_RPL (posix_spawnattr_setschedpolicy, int, |
1098 | (posix_spawnattr_t *__attr, int __schedpolicy) |
1099 | __THROW _GL_ARG_NONNULL ((1))); |
1100 | _GL_CXXALIAS_RPL (posix_spawnattr_setschedpolicy, int, |
1101 | (posix_spawnattr_t *__attr, int __schedpolicy)); |
1102 | # else |
1103 | # if !1 || POSIX_SPAWN_SETSCHEDULER == 0 |
1104 | _GL_FUNCDECL_SYS (posix_spawnattr_setschedpolicy, int, |
1105 | (posix_spawnattr_t *__attr, int __schedpolicy) |
1106 | __THROW _GL_ARG_NONNULL ((1))); |
1107 | # endif |
1108 | _GL_CXXALIAS_SYS (posix_spawnattr_setschedpolicy, int, |
1109 | (posix_spawnattr_t *__attr, int __schedpolicy)); |
1110 | # endif |
1111 | _GL_CXXALIASWARN (posix_spawnattr_setschedpolicy); |
1112 | #elif defined GNULIB_POSIXCHECK |
1113 | # undef posix_spawnattr_setschedpolicy |
1114 | # if HAVE_RAW_DECL_POSIX_SPAWNATTR_SETSCHEDPOLICY |
1115 | _GL_WARN_ON_USE (posix_spawnattr_setschedpolicy, |
1116 | "posix_spawnattr_setschedpolicy is unportable - " |
1117 | "use gnulib module posix_spawnattr_setschedpolicy for portability" ); |
1118 | # endif |
1119 | #endif |
1120 | |
1121 | #if 0 |
1122 | /* Get scheduling parameters from the attribute structure. */ |
1123 | # if 0 |
1124 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
1125 | # define posix_spawnattr_getschedparam rpl_posix_spawnattr_getschedparam |
1126 | # endif |
1127 | _GL_FUNCDECL_RPL (posix_spawnattr_getschedparam, int, |
1128 | (const posix_spawnattr_t *_Restrict_ __attr, |
1129 | struct sched_param *_Restrict_ __schedparam) |
1130 | __THROW _GL_ARG_NONNULL ((1, 2))); |
1131 | _GL_CXXALIAS_RPL (posix_spawnattr_getschedparam, int, |
1132 | (const posix_spawnattr_t *_Restrict_ __attr, |
1133 | struct sched_param *_Restrict_ __schedparam)); |
1134 | # else |
1135 | # if !1 || POSIX_SPAWN_SETSCHEDPARAM == 0 |
1136 | _GL_FUNCDECL_SYS (posix_spawnattr_getschedparam, int, |
1137 | (const posix_spawnattr_t *_Restrict_ __attr, |
1138 | struct sched_param *_Restrict_ __schedparam) |
1139 | __THROW _GL_ARG_NONNULL ((1, 2))); |
1140 | # endif |
1141 | _GL_CXXALIAS_SYS (posix_spawnattr_getschedparam, int, |
1142 | (const posix_spawnattr_t *_Restrict_ __attr, |
1143 | struct sched_param *_Restrict_ __schedparam)); |
1144 | # endif |
1145 | _GL_CXXALIASWARN (posix_spawnattr_getschedparam); |
1146 | #elif defined GNULIB_POSIXCHECK |
1147 | # undef posix_spawnattr_getschedparam |
1148 | # if HAVE_RAW_DECL_POSIX_SPAWNATTR_GETSCHEDPARAM |
1149 | _GL_WARN_ON_USE (posix_spawnattr_getschedparam, |
1150 | "posix_spawnattr_getschedparam is unportable - " |
1151 | "use gnulib module posix_spawnattr_getschedparam for portability" ); |
1152 | # endif |
1153 | #endif |
1154 | |
1155 | #if 0 |
1156 | /* Store scheduling parameters in the attribute structure. */ |
1157 | # if 0 |
1158 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
1159 | # define posix_spawnattr_setschedparam rpl_posix_spawnattr_setschedparam |
1160 | # endif |
1161 | _GL_FUNCDECL_RPL (posix_spawnattr_setschedparam, int, |
1162 | (posix_spawnattr_t *_Restrict_ __attr, |
1163 | const struct sched_param *_Restrict_ __schedparam) |
1164 | __THROW _GL_ARG_NONNULL ((1, 2))); |
1165 | _GL_CXXALIAS_RPL (posix_spawnattr_setschedparam, int, |
1166 | (posix_spawnattr_t *_Restrict_ __attr, |
1167 | const struct sched_param *_Restrict_ __schedparam)); |
1168 | # else |
1169 | # if !1 || POSIX_SPAWN_SETSCHEDPARAM == 0 |
1170 | _GL_FUNCDECL_SYS (posix_spawnattr_setschedparam, int, |
1171 | (posix_spawnattr_t *_Restrict_ __attr, |
1172 | const struct sched_param *_Restrict_ __schedparam) |
1173 | __THROW _GL_ARG_NONNULL ((1, 2))); |
1174 | # endif |
1175 | _GL_CXXALIAS_SYS (posix_spawnattr_setschedparam, int, |
1176 | (posix_spawnattr_t *_Restrict_ __attr, |
1177 | const struct sched_param *_Restrict_ __schedparam)); |
1178 | # endif |
1179 | _GL_CXXALIASWARN (posix_spawnattr_setschedparam); |
1180 | #elif defined GNULIB_POSIXCHECK |
1181 | # undef posix_spawnattr_setschedparam |
1182 | # if HAVE_RAW_DECL_POSIX_SPAWNATTR_SETSCHEDPARAM |
1183 | _GL_WARN_ON_USE (posix_spawnattr_setschedparam, |
1184 | "posix_spawnattr_setschedparam is unportable - " |
1185 | "use gnulib module posix_spawnattr_setschedparam for portability" ); |
1186 | # endif |
1187 | #endif |
1188 | |
1189 | |
1190 | #if 1 |
1191 | /* Initialize data structure for file attribute for 'spawn' call. */ |
1192 | # if 0 |
1193 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
1194 | # define posix_spawn_file_actions_init rpl_posix_spawn_file_actions_init |
1195 | # endif |
1196 | _GL_FUNCDECL_RPL (posix_spawn_file_actions_init, int, |
1197 | (posix_spawn_file_actions_t *__file_actions) |
1198 | __THROW _GL_ARG_NONNULL ((1))); |
1199 | _GL_CXXALIAS_RPL (posix_spawn_file_actions_init, int, |
1200 | (posix_spawn_file_actions_t *__file_actions)); |
1201 | # else |
1202 | # if !1 |
1203 | _GL_FUNCDECL_SYS (posix_spawn_file_actions_init, int, |
1204 | (posix_spawn_file_actions_t *__file_actions) |
1205 | __THROW _GL_ARG_NONNULL ((1))); |
1206 | # endif |
1207 | _GL_CXXALIAS_SYS (posix_spawn_file_actions_init, int, |
1208 | (posix_spawn_file_actions_t *__file_actions)); |
1209 | # endif |
1210 | _GL_CXXALIASWARN (posix_spawn_file_actions_init); |
1211 | #elif defined GNULIB_POSIXCHECK |
1212 | # undef posix_spawn_file_actions_init |
1213 | # if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_INIT |
1214 | _GL_WARN_ON_USE (posix_spawn_file_actions_init, |
1215 | "posix_spawn_file_actions_init is unportable - " |
1216 | "use gnulib module posix_spawn_file_actions_init for portability" ); |
1217 | # endif |
1218 | #endif |
1219 | |
1220 | #if 1 |
1221 | /* Free resources associated with FILE-ACTIONS. */ |
1222 | # if 0 |
1223 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
1224 | # define posix_spawn_file_actions_destroy rpl_posix_spawn_file_actions_destroy |
1225 | # endif |
1226 | _GL_FUNCDECL_RPL (posix_spawn_file_actions_destroy, int, |
1227 | (posix_spawn_file_actions_t *__file_actions) |
1228 | __THROW _GL_ARG_NONNULL ((1))); |
1229 | _GL_CXXALIAS_RPL (posix_spawn_file_actions_destroy, int, |
1230 | (posix_spawn_file_actions_t *__file_actions)); |
1231 | # else |
1232 | # if !1 |
1233 | _GL_FUNCDECL_SYS (posix_spawn_file_actions_destroy, int, |
1234 | (posix_spawn_file_actions_t *__file_actions) |
1235 | __THROW _GL_ARG_NONNULL ((1))); |
1236 | # endif |
1237 | _GL_CXXALIAS_SYS (posix_spawn_file_actions_destroy, int, |
1238 | (posix_spawn_file_actions_t *__file_actions)); |
1239 | # endif |
1240 | _GL_CXXALIASWARN (posix_spawn_file_actions_destroy); |
1241 | #elif defined GNULIB_POSIXCHECK |
1242 | # undef posix_spawn_file_actions_destroy |
1243 | # if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_DESTROY |
1244 | _GL_WARN_ON_USE (posix_spawn_file_actions_destroy, |
1245 | "posix_spawn_file_actions_destroy is unportable - " |
1246 | "use gnulib module posix_spawn_file_actions_destroy for portability" ); |
1247 | # endif |
1248 | #endif |
1249 | |
1250 | #if 1 |
1251 | /* Add an action to FILE-ACTIONS which tells the implementation to call |
1252 | 'open' for the given file during the 'spawn' call. */ |
1253 | # if 0 |
1254 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
1255 | # define posix_spawn_file_actions_addopen rpl_posix_spawn_file_actions_addopen |
1256 | # endif |
1257 | _GL_FUNCDECL_RPL (posix_spawn_file_actions_addopen, int, |
1258 | (posix_spawn_file_actions_t *_Restrict_ __file_actions, |
1259 | int __fd, |
1260 | const char *_Restrict_ __path, int __oflag, mode_t __mode) |
1261 | __THROW _GL_ARG_NONNULL ((1, 3))); |
1262 | _GL_CXXALIAS_RPL (posix_spawn_file_actions_addopen, int, |
1263 | (posix_spawn_file_actions_t *_Restrict_ __file_actions, |
1264 | int __fd, |
1265 | const char *_Restrict_ __path, int __oflag, mode_t __mode)); |
1266 | # else |
1267 | # if !1 |
1268 | _GL_FUNCDECL_SYS (posix_spawn_file_actions_addopen, int, |
1269 | (posix_spawn_file_actions_t *_Restrict_ __file_actions, |
1270 | int __fd, |
1271 | const char *_Restrict_ __path, int __oflag, mode_t __mode) |
1272 | __THROW _GL_ARG_NONNULL ((1, 3))); |
1273 | # endif |
1274 | _GL_CXXALIAS_SYS (posix_spawn_file_actions_addopen, int, |
1275 | (posix_spawn_file_actions_t *_Restrict_ __file_actions, |
1276 | int __fd, |
1277 | const char *_Restrict_ __path, int __oflag, mode_t __mode)); |
1278 | # endif |
1279 | _GL_CXXALIASWARN (posix_spawn_file_actions_addopen); |
1280 | #elif defined GNULIB_POSIXCHECK |
1281 | # undef posix_spawn_file_actions_addopen |
1282 | # if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN |
1283 | _GL_WARN_ON_USE (posix_spawn_file_actions_addopen, |
1284 | "posix_spawn_file_actions_addopen is unportable - " |
1285 | "use gnulib module posix_spawn_file_actions_addopen for portability" ); |
1286 | # endif |
1287 | #endif |
1288 | |
1289 | #if 1 |
1290 | /* Add an action to FILE-ACTIONS which tells the implementation to call |
1291 | 'close' for the given file descriptor during the 'spawn' call. */ |
1292 | # if 0 |
1293 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
1294 | # define posix_spawn_file_actions_addclose rpl_posix_spawn_file_actions_addclose |
1295 | # endif |
1296 | _GL_FUNCDECL_RPL (posix_spawn_file_actions_addclose, int, |
1297 | (posix_spawn_file_actions_t *__file_actions, int __fd) |
1298 | __THROW _GL_ARG_NONNULL ((1))); |
1299 | _GL_CXXALIAS_RPL (posix_spawn_file_actions_addclose, int, |
1300 | (posix_spawn_file_actions_t *__file_actions, int __fd)); |
1301 | # else |
1302 | # if !1 |
1303 | _GL_FUNCDECL_SYS (posix_spawn_file_actions_addclose, int, |
1304 | (posix_spawn_file_actions_t *__file_actions, int __fd) |
1305 | __THROW _GL_ARG_NONNULL ((1))); |
1306 | # endif |
1307 | _GL_CXXALIAS_SYS (posix_spawn_file_actions_addclose, int, |
1308 | (posix_spawn_file_actions_t *__file_actions, int __fd)); |
1309 | # endif |
1310 | _GL_CXXALIASWARN (posix_spawn_file_actions_addclose); |
1311 | #elif defined GNULIB_POSIXCHECK |
1312 | # undef posix_spawn_file_actions_addclose |
1313 | # if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE |
1314 | _GL_WARN_ON_USE (posix_spawn_file_actions_addclose, |
1315 | "posix_spawn_file_actions_addclose is unportable - " |
1316 | "use gnulib module posix_spawn_file_actions_addclose for portability" ); |
1317 | # endif |
1318 | #endif |
1319 | |
1320 | #if 1 |
1321 | /* Add an action to FILE-ACTIONS which tells the implementation to call |
1322 | 'dup2' for the given file descriptors during the 'spawn' call. */ |
1323 | # if 0 |
1324 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
1325 | # define posix_spawn_file_actions_adddup2 rpl_posix_spawn_file_actions_adddup2 |
1326 | # endif |
1327 | _GL_FUNCDECL_RPL (posix_spawn_file_actions_adddup2, int, |
1328 | (posix_spawn_file_actions_t *__file_actions, |
1329 | int __fd, int __newfd) |
1330 | __THROW _GL_ARG_NONNULL ((1))); |
1331 | _GL_CXXALIAS_RPL (posix_spawn_file_actions_adddup2, int, |
1332 | (posix_spawn_file_actions_t *__file_actions, |
1333 | int __fd, int __newfd)); |
1334 | # else |
1335 | # if !1 |
1336 | _GL_FUNCDECL_SYS (posix_spawn_file_actions_adddup2, int, |
1337 | (posix_spawn_file_actions_t *__file_actions, |
1338 | int __fd, int __newfd) |
1339 | __THROW _GL_ARG_NONNULL ((1))); |
1340 | # endif |
1341 | _GL_CXXALIAS_SYS (posix_spawn_file_actions_adddup2, int, |
1342 | (posix_spawn_file_actions_t *__file_actions, |
1343 | int __fd, int __newfd)); |
1344 | # endif |
1345 | _GL_CXXALIASWARN (posix_spawn_file_actions_adddup2); |
1346 | #elif defined GNULIB_POSIXCHECK |
1347 | # undef posix_spawn_file_actions_adddup2 |
1348 | # if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 |
1349 | _GL_WARN_ON_USE (posix_spawn_file_actions_adddup2, |
1350 | "posix_spawn_file_actions_adddup2 is unportable - " |
1351 | "use gnulib module posix_spawn_file_actions_adddup2 for portability" ); |
1352 | # endif |
1353 | #endif |
1354 | |
1355 | #if 0 |
1356 | /* Add an action to FILE-ACTIONS which tells the implementation to call |
1357 | 'chdir' to the given directory during the 'spawn' call. */ |
1358 | # if 0 |
1359 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
1360 | # define posix_spawn_file_actions_addchdir rpl_posix_spawn_file_actions_addchdir |
1361 | # endif |
1362 | _GL_FUNCDECL_RPL (posix_spawn_file_actions_addchdir, int, |
1363 | (posix_spawn_file_actions_t *_Restrict_ __file_actions, |
1364 | const char *_Restrict_ __path) |
1365 | __THROW _GL_ARG_NONNULL ((1, 2))); |
1366 | _GL_CXXALIAS_RPL (posix_spawn_file_actions_addchdir, int, |
1367 | (posix_spawn_file_actions_t *_Restrict_ __file_actions, |
1368 | const char *_Restrict_ __path)); |
1369 | # else |
1370 | # if !1 |
1371 | _GL_FUNCDECL_SYS (posix_spawn_file_actions_addchdir, int, |
1372 | (posix_spawn_file_actions_t *_Restrict_ __file_actions, |
1373 | const char *_Restrict_ __path) |
1374 | __THROW _GL_ARG_NONNULL ((1, 2))); |
1375 | # endif |
1376 | _GL_CXXALIAS_SYS (posix_spawn_file_actions_addchdir, int, |
1377 | (posix_spawn_file_actions_t *_Restrict_ __file_actions, |
1378 | const char *_Restrict_ __path)); |
1379 | # endif |
1380 | _GL_CXXALIASWARN (posix_spawn_file_actions_addchdir); |
1381 | #elif defined GNULIB_POSIXCHECK |
1382 | # undef posix_spawn_file_actions_addchdir |
1383 | # if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR |
1384 | _GL_WARN_ON_USE (posix_spawn_file_actions_addchdir, |
1385 | "posix_spawn_file_actions_addchdir is unportable - " |
1386 | "use gnulib module posix_spawn_file_actions_addchdir for portability" ); |
1387 | # endif |
1388 | #endif |
1389 | |
1390 | #if 0 |
1391 | /* Add an action to FILE-ACTIONS which tells the implementation to call |
1392 | 'fchdir' to the given directory during the 'spawn' call. */ |
1393 | # if 0 |
1394 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
1395 | # define posix_spawn_file_actions_addfchdir rpl_posix_spawn_file_actions_addfchdir |
1396 | # endif |
1397 | _GL_FUNCDECL_RPL (posix_spawn_file_actions_addfchdir, int, |
1398 | (posix_spawn_file_actions_t *_Restrict_ __file_actions, |
1399 | int __fd) |
1400 | __THROW _GL_ARG_NONNULL ((1))); |
1401 | _GL_CXXALIAS_RPL (posix_spawn_file_actions_addfchdir, int, |
1402 | (posix_spawn_file_actions_t *_Restrict_ __file_actions, |
1403 | int __fd)); |
1404 | # else |
1405 | # if !1 |
1406 | _GL_FUNCDECL_SYS (posix_spawn_file_actions_addfchdir, int, |
1407 | (posix_spawn_file_actions_t *_Restrict_ __file_actions, |
1408 | int __fd) |
1409 | __THROW _GL_ARG_NONNULL ((1))); |
1410 | # endif |
1411 | _GL_CXXALIAS_SYS (posix_spawn_file_actions_addfchdir, int, |
1412 | (posix_spawn_file_actions_t *_Restrict_ __file_actions, |
1413 | int __fd)); |
1414 | # endif |
1415 | _GL_CXXALIASWARN (posix_spawn_file_actions_addfchdir); |
1416 | #elif defined GNULIB_POSIXCHECK |
1417 | # undef posix_spawn_file_actions_addfchdir |
1418 | # if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR |
1419 | _GL_WARN_ON_USE (posix_spawn_file_actions_addfchdir, |
1420 | "posix_spawn_file_actions_addfchdir is unportable - " |
1421 | "use gnulib module posix_spawn_file_actions_addfchdir for portability" ); |
1422 | # endif |
1423 | #endif |
1424 | |
1425 | |
1426 | #endif /* _GL_SPAWN_H */ |
1427 | #endif /* _GL_SPAWN_H */ |
1428 | |