Mercurial > hg > octave-kai > gnulib-hg
annotate lib/spawn.in.h @ 12905:8d1732828ada
spawn: Don't override the system defined values on FreeBSD 8.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Tue, 02 Mar 2010 11:55:34 +0100 |
parents | 2c14f1e449e5 |
children | 1aed01763cec |
rev | line source |
---|---|
10504 | 1 /* Definitions for POSIX spawn interface. |
12559
c2cbabec01dd
update nearly all FSF copyright year lists to include 2010
Jim Meyering <meyering@redhat.com>
parents:
12549
diff
changeset
|
2 Copyright (C) 2000, 2003-2004, 2008-2010 Free Software Foundation, Inc. |
10504 | 3 This file is part of the GNU C Library. |
4 | |
5 This program is free software: you can redistribute it and/or modify | |
6 it under the terms of the GNU General Public License as published by | |
7 the Free Software Foundation; either version 3 of the License, or | |
8 (at your option) any later version. | |
9 | |
10 This program is distributed in the hope that it will be useful, | |
11 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 GNU General Public License for more details. | |
14 | |
15 You should have received a copy of the GNU General Public License | |
16 along with this program. If not, see <http://www.gnu.org/licenses/>. */ | |
17 | |
18 #ifndef _GL_SPAWN_H | |
19 | |
10655
8668b19a7032
Avoid gcc warnings because of #pragma GCC system_header on older gcc.
Bruno Haible <bruno@clisp.org>
parents:
10579
diff
changeset
|
20 #if __GNUC__ >= 3 |
10504 | 21 @PRAGMA_SYSTEM_HEADER@ |
10655
8668b19a7032
Avoid gcc warnings because of #pragma GCC system_header on older gcc.
Bruno Haible <bruno@clisp.org>
parents:
10579
diff
changeset
|
22 #endif |
10504 | 23 |
24 /* The include_next requires a split double-inclusion guard. */ | |
25 #if @HAVE_SPAWN_H@ | |
26 # @INCLUDE_NEXT@ @NEXT_SPAWN_H@ | |
27 #endif | |
28 | |
29 #ifndef _GL_SPAWN_H | |
30 #define _GL_SPAWN_H | |
31 | |
12548
efe1df275da6
Avoid namespace pollution on glibc systems.
Bruno Haible <bruno@clisp.org>
parents:
12544
diff
changeset
|
32 /* Get definitions of 'struct sched_param' and 'sigset_t'. |
efe1df275da6
Avoid namespace pollution on glibc systems.
Bruno Haible <bruno@clisp.org>
parents:
12544
diff
changeset
|
33 But avoid namespace pollution on glibc systems. */ |
efe1df275da6
Avoid namespace pollution on glibc systems.
Bruno Haible <bruno@clisp.org>
parents:
12544
diff
changeset
|
34 #ifndef __GLIBC__ |
efe1df275da6
Avoid namespace pollution on glibc systems.
Bruno Haible <bruno@clisp.org>
parents:
12544
diff
changeset
|
35 # include <sched.h> |
efe1df275da6
Avoid namespace pollution on glibc systems.
Bruno Haible <bruno@clisp.org>
parents:
12544
diff
changeset
|
36 # include <signal.h> |
efe1df275da6
Avoid namespace pollution on glibc systems.
Bruno Haible <bruno@clisp.org>
parents:
12544
diff
changeset
|
37 #endif |
efe1df275da6
Avoid namespace pollution on glibc systems.
Bruno Haible <bruno@clisp.org>
parents:
12544
diff
changeset
|
38 |
10504 | 39 #include <sys/types.h> |
40 | |
41 #ifndef __THROW | |
42 # define __THROW | |
43 #endif | |
44 | |
45 /* GCC 2.95 and later have "__restrict"; C99 compilers have | |
46 "restrict", and "configure" may have defined "restrict". | |
47 Other compilers use __restrict, __restrict__, and _Restrict, and | |
48 'configure' might #define 'restrict' to those words, so pick a | |
49 different name. */ | |
50 #ifndef _Restrict_ | |
51 # if 199901L <= __STDC_VERSION__ | |
52 # define _Restrict_ restrict | |
53 # elif 2 < __GNUC__ || (2 == __GNUC__ && 95 <= __GNUC_MINOR__) | |
54 # define _Restrict_ __restrict | |
55 # else | |
56 # define _Restrict_ | |
57 # endif | |
58 #endif | |
59 /* gcc 3.1 and up support the [restrict] syntax. Don't trust | |
60 sys/cdefs.h's definition of __restrict_arr, though, as it | |
61 mishandles gcc -ansi -pedantic. */ | |
62 #ifndef _Restrict_arr_ | |
12421
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
10655
diff
changeset
|
63 # if ((199901L <= __STDC_VERSION__ \ |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
10655
diff
changeset
|
64 || ((3 < __GNUC__ || (3 == __GNUC__ && 1 <= __GNUC_MINOR__)) \ |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
10655
diff
changeset
|
65 && !__STRICT_ANSI__)) \ |
10504 | 66 && !defined __GNUG__) |
67 # define _Restrict_arr_ _Restrict_ | |
68 # else | |
69 # define _Restrict_arr_ | |
70 # endif | |
71 #endif | |
72 | |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
73 /* The definition of _GL_ARG_NONNULL is copied here. */ |
10504 | 74 |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
75 /* The definition of _GL_WARN_ON_USE is copied here. */ |
12422
f7842310a565
New module 'arg-nonnull'. Declare which arguments expect non-NULL values.
Bruno Haible <bruno@clisp.org>
parents:
12421
diff
changeset
|
76 |
10504 | 77 |
78 /* Data structure to contain attributes for thread creation. */ | |
79 #if @REPLACE_POSIX_SPAWN@ | |
80 # define posix_spawnattr_t rpl_posix_spawnattr_t | |
81 #endif | |
12534 | 82 #if @REPLACE_POSIX_SPAWN@ || !@HAVE_POSIX_SPAWNATTR_T@ |
10504 | 83 typedef struct |
84 { | |
85 short int _flags; | |
86 pid_t _pgrp; | |
87 sigset_t _sd; | |
88 sigset_t _ss; | |
89 struct sched_param _sp; | |
90 int _policy; | |
91 int __pad[16]; | |
92 } posix_spawnattr_t; | |
12534 | 93 #endif |
10504 | 94 |
95 | |
96 /* Data structure to contain information about the actions to be | |
97 performed in the new process with respect to file descriptors. */ | |
98 #if @REPLACE_POSIX_SPAWN@ | |
99 # define posix_spawn_file_actions_t rpl_posix_spawn_file_actions_t | |
100 #endif | |
12534 | 101 #if @REPLACE_POSIX_SPAWN@ || !@HAVE_POSIX_SPAWN_FILE_ACTIONS_T@ |
10504 | 102 typedef struct |
103 { | |
104 int _allocated; | |
105 int _used; | |
106 struct __spawn_action *_actions; | |
107 int __pad[16]; | |
108 } posix_spawn_file_actions_t; | |
12534 | 109 #endif |
10504 | 110 |
111 | |
112 /* Flags to be set in the `posix_spawnattr_t'. */ | |
12905
8d1732828ada
spawn: Don't override the system defined values on FreeBSD 8.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
113 #if !@HAVE_POSIX_SPAWN@ |
8d1732828ada
spawn: Don't override the system defined values on FreeBSD 8.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
114 # if @REPLACE_POSIX_SPAWN@ |
10579
f2b0bd3d9c8b
Use the system's values, rather than overriding them by ours.
Bruno Haible <bruno@clisp.org>
parents:
10575
diff
changeset
|
115 /* Use the values from the system, for better compatibility. */ |
f2b0bd3d9c8b
Use the system's values, rather than overriding them by ours.
Bruno Haible <bruno@clisp.org>
parents:
10575
diff
changeset
|
116 /* But this implementation does not support AIX extensions. */ |
12905
8d1732828ada
spawn: Don't override the system defined values on FreeBSD 8.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
117 # undef POSIX_SPAWN_FORK_HANDLERS |
8d1732828ada
spawn: Don't override the system defined values on FreeBSD 8.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
118 # else |
8d1732828ada
spawn: Don't override the system defined values on FreeBSD 8.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
119 # define POSIX_SPAWN_RESETIDS 0x01 |
8d1732828ada
spawn: Don't override the system defined values on FreeBSD 8.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
120 # define POSIX_SPAWN_SETPGROUP 0x02 |
8d1732828ada
spawn: Don't override the system defined values on FreeBSD 8.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
121 # define POSIX_SPAWN_SETSIGDEF 0x04 |
8d1732828ada
spawn: Don't override the system defined values on FreeBSD 8.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
122 # define POSIX_SPAWN_SETSIGMASK 0x08 |
8d1732828ada
spawn: Don't override the system defined values on FreeBSD 8.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
123 # define POSIX_SPAWN_SETSCHEDPARAM 0x10 |
8d1732828ada
spawn: Don't override the system defined values on FreeBSD 8.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
124 # define POSIX_SPAWN_SETSCHEDULER 0x20 |
8d1732828ada
spawn: Don't override the system defined values on FreeBSD 8.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
125 # endif |
10579
f2b0bd3d9c8b
Use the system's values, rather than overriding them by ours.
Bruno Haible <bruno@clisp.org>
parents:
10575
diff
changeset
|
126 #endif |
f2b0bd3d9c8b
Use the system's values, rather than overriding them by ours.
Bruno Haible <bruno@clisp.org>
parents:
10575
diff
changeset
|
127 /* A GNU extension. Use the next free bit position. */ |
f2b0bd3d9c8b
Use the system's values, rather than overriding them by ours.
Bruno Haible <bruno@clisp.org>
parents:
10575
diff
changeset
|
128 #define POSIX_SPAWN_USEVFORK \ |
12421
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
10655
diff
changeset
|
129 ((POSIX_SPAWN_RESETIDS | (POSIX_SPAWN_RESETIDS - 1) \ |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
10655
diff
changeset
|
130 | POSIX_SPAWN_SETPGROUP | (POSIX_SPAWN_SETPGROUP - 1) \ |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
10655
diff
changeset
|
131 | POSIX_SPAWN_SETSIGDEF | (POSIX_SPAWN_SETSIGDEF - 1) \ |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
10655
diff
changeset
|
132 | POSIX_SPAWN_SETSIGMASK | (POSIX_SPAWN_SETSIGMASK - 1) \ |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
10655
diff
changeset
|
133 | POSIX_SPAWN_SETSCHEDPARAM | (POSIX_SPAWN_SETSCHEDPARAM - 1) \ |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
10655
diff
changeset
|
134 | POSIX_SPAWN_SETSCHEDULER | (POSIX_SPAWN_SETSCHEDULER - 1)) \ |
10579
f2b0bd3d9c8b
Use the system's values, rather than overriding them by ours.
Bruno Haible <bruno@clisp.org>
parents:
10575
diff
changeset
|
135 + 1) |
f2b0bd3d9c8b
Use the system's values, rather than overriding them by ours.
Bruno Haible <bruno@clisp.org>
parents:
10575
diff
changeset
|
136 typedef int verify_POSIX_SPAWN_USEVFORK_no_overlap |
f2b0bd3d9c8b
Use the system's values, rather than overriding them by ours.
Bruno Haible <bruno@clisp.org>
parents:
10575
diff
changeset
|
137 [2 * (((POSIX_SPAWN_RESETIDS | POSIX_SPAWN_SETPGROUP |
12421
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
10655
diff
changeset
|
138 | POSIX_SPAWN_SETSIGDEF | POSIX_SPAWN_SETSIGMASK |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
10655
diff
changeset
|
139 | POSIX_SPAWN_SETSCHEDPARAM | POSIX_SPAWN_SETSCHEDULER) |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
10655
diff
changeset
|
140 & POSIX_SPAWN_USEVFORK) == 0) - 1]; |
10504 | 141 |
142 | |
143 #ifdef __cplusplus | |
144 extern "C" { | |
145 #endif | |
146 | |
147 | |
148 #if @GNULIB_POSIX_SPAWN@ | |
149 /* Spawn a new process executing PATH with the attributes describes in *ATTRP. | |
150 Before running the process perform the actions described in FILE-ACTIONS. | |
151 | |
152 This function is a possible cancellation points and therefore not | |
153 marked with __THROW. */ | |
154 # if @REPLACE_POSIX_SPAWN@ | |
155 # define posix_spawn rpl_posix_spawn | |
156 # endif | |
157 # if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@ | |
158 extern int posix_spawn (pid_t *_Restrict_ __pid, | |
12421
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
10655
diff
changeset
|
159 const char *_Restrict_ __path, |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
10655
diff
changeset
|
160 const posix_spawn_file_actions_t *_Restrict_ __file_actions, |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
10655
diff
changeset
|
161 const posix_spawnattr_t *_Restrict_ __attrp, |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
10655
diff
changeset
|
162 char *const argv[_Restrict_arr_], |
12422
f7842310a565
New module 'arg-nonnull'. Declare which arguments expect non-NULL values.
Bruno Haible <bruno@clisp.org>
parents:
12421
diff
changeset
|
163 char *const envp[_Restrict_arr_]) |
f7842310a565
New module 'arg-nonnull'. Declare which arguments expect non-NULL values.
Bruno Haible <bruno@clisp.org>
parents:
12421
diff
changeset
|
164 _GL_ARG_NONNULL ((2, 5, 6)); |
10504 | 165 # endif |
12535
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
166 #elif defined GNULIB_POSIXCHECK |
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
167 # undef posix_spawn |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
168 # if HAVE_RAW_DECL_POSIX_SPAWN |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
169 _GL_WARN_ON_USE (posix_spawn, "posix_spawn is unportable - " |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
170 "use gnulib module posix_spawn for portability"); |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
171 # endif |
10504 | 172 #endif |
173 | |
174 #if @GNULIB_POSIX_SPAWNP@ | |
175 /* Similar to `posix_spawn' but search for FILE in the PATH. | |
176 | |
177 This function is a possible cancellation points and therefore not | |
178 marked with __THROW. */ | |
179 # if @REPLACE_POSIX_SPAWN@ | |
180 # define posix_spawnp rpl_posix_spawnp | |
181 # endif | |
182 # if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@ | |
183 extern int posix_spawnp (pid_t *__pid, const char *__file, | |
12421
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
10655
diff
changeset
|
184 const posix_spawn_file_actions_t *__file_actions, |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
10655
diff
changeset
|
185 const posix_spawnattr_t *__attrp, |
12422
f7842310a565
New module 'arg-nonnull'. Declare which arguments expect non-NULL values.
Bruno Haible <bruno@clisp.org>
parents:
12421
diff
changeset
|
186 char *const argv[], char *const envp[]) |
f7842310a565
New module 'arg-nonnull'. Declare which arguments expect non-NULL values.
Bruno Haible <bruno@clisp.org>
parents:
12421
diff
changeset
|
187 _GL_ARG_NONNULL ((2, 5, 6)); |
10504 | 188 # endif |
12535
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
189 #elif defined GNULIB_POSIXCHECK |
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
190 # undef posix_spawnp |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
191 # if HAVE_RAW_DECL_POSIX_SPAWNP |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
192 _GL_WARN_ON_USE (posix_spawnp, "posix_spawnp is unportable - " |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
193 "use gnulib module posix_spawnp for portability"); |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
194 # endif |
10504 | 195 #endif |
196 | |
197 | |
198 #if @GNULIB_POSIX_SPAWNATTR_INIT@ | |
199 /* Initialize data structure with attributes for `spawn' to default values. */ | |
200 # if @REPLACE_POSIX_SPAWN@ | |
201 # define posix_spawnattr_init rpl_posix_spawnattr_init | |
202 # endif | |
203 # if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@ | |
12422
f7842310a565
New module 'arg-nonnull'. Declare which arguments expect non-NULL values.
Bruno Haible <bruno@clisp.org>
parents:
12421
diff
changeset
|
204 extern int posix_spawnattr_init (posix_spawnattr_t *__attr) |
f7842310a565
New module 'arg-nonnull'. Declare which arguments expect non-NULL values.
Bruno Haible <bruno@clisp.org>
parents:
12421
diff
changeset
|
205 __THROW _GL_ARG_NONNULL ((1)); |
10504 | 206 # endif |
12535
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
207 #elif defined GNULIB_POSIXCHECK |
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
208 # undef posix_spawnattr_init |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
209 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_INIT |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
210 _GL_WARN_ON_USE (posix_spawnattr_init, "posix_spawnattr_init is unportable - " |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
211 "use gnulib module posix_spawnattr_init for portability"); |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
212 # endif |
10504 | 213 #endif |
214 | |
215 #if @GNULIB_POSIX_SPAWNATTR_DESTROY@ | |
216 /* Free resources associated with ATTR. */ | |
217 # if @REPLACE_POSIX_SPAWN@ | |
218 # define posix_spawnattr_destroy rpl_posix_spawnattr_destroy | |
219 # endif | |
220 # if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@ | |
12422
f7842310a565
New module 'arg-nonnull'. Declare which arguments expect non-NULL values.
Bruno Haible <bruno@clisp.org>
parents:
12421
diff
changeset
|
221 extern int posix_spawnattr_destroy (posix_spawnattr_t *__attr) |
f7842310a565
New module 'arg-nonnull'. Declare which arguments expect non-NULL values.
Bruno Haible <bruno@clisp.org>
parents:
12421
diff
changeset
|
222 __THROW _GL_ARG_NONNULL ((1)); |
10504 | 223 # endif |
12535
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
224 #elif defined GNULIB_POSIXCHECK |
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
225 # undef posix_spawnattr_destroy |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
226 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_DESTROY |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
227 _GL_WARN_ON_USE (posix_spawnattr_destroy, "posix_spawnattr_destroy is unportable - " |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
228 "use gnulib module posix_spawnattr_destroy for portability"); |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
229 # endif |
10504 | 230 #endif |
231 | |
232 #if @GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT@ | |
233 /* Store signal mask for signals with default handling from ATTR in | |
234 SIGDEFAULT. */ | |
235 # if @REPLACE_POSIX_SPAWN@ | |
236 # define posix_spawnattr_getsigdefault rpl_posix_spawnattr_getsigdefault | |
237 # endif | |
238 # if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@ | |
239 extern int posix_spawnattr_getsigdefault (const posix_spawnattr_t *_Restrict_ __attr, | |
12421
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
10655
diff
changeset
|
240 sigset_t *_Restrict_ __sigdefault) |
12422
f7842310a565
New module 'arg-nonnull'. Declare which arguments expect non-NULL values.
Bruno Haible <bruno@clisp.org>
parents:
12421
diff
changeset
|
241 __THROW _GL_ARG_NONNULL ((1, 2)); |
10504 | 242 # endif |
12535
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
243 #elif defined GNULIB_POSIXCHECK |
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
244 # undef posix_spawnattr_getsigdefault |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
245 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_GETSIGDEFAULT |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
246 _GL_WARN_ON_USE (posix_spawnattr_getsigdefault, "posix_spawnattr_getsigdefault is unportable - " |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
247 "use gnulib module posix_spawnattr_getsigdefault for portability"); |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
248 # endif |
10504 | 249 #endif |
250 | |
251 #if @GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT@ | |
252 /* Set signal mask for signals with default handling in ATTR to SIGDEFAULT. */ | |
253 # if @REPLACE_POSIX_SPAWN@ | |
254 # define posix_spawnattr_setsigdefault rpl_posix_spawnattr_setsigdefault | |
255 # endif | |
256 # if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@ | |
257 extern int posix_spawnattr_setsigdefault (posix_spawnattr_t *_Restrict_ __attr, | |
12421
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
10655
diff
changeset
|
258 const sigset_t *_Restrict_ __sigdefault) |
12422
f7842310a565
New module 'arg-nonnull'. Declare which arguments expect non-NULL values.
Bruno Haible <bruno@clisp.org>
parents:
12421
diff
changeset
|
259 __THROW _GL_ARG_NONNULL ((1, 2)); |
10504 | 260 # endif |
12535
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
261 #elif defined GNULIB_POSIXCHECK |
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
262 # undef posix_spawnattr_setsigdefault |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
263 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_SETSIGDEFAULT |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
264 _GL_WARN_ON_USE (posix_spawnattr_setsigdefault, "posix_spawnattr_setsigdefault is unportable - " |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
265 "use gnulib module posix_spawnattr_setsigdefault for portability"); |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
266 # endif |
10504 | 267 #endif |
268 | |
269 #if @GNULIB_POSIX_SPAWNATTR_GETSIGMASK@ | |
270 /* Store signal mask for the new process from ATTR in SIGMASK. */ | |
271 # if @REPLACE_POSIX_SPAWN@ | |
272 # define posix_spawnattr_getsigmask rpl_posix_spawnattr_getsigmask | |
273 # endif | |
274 # if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@ | |
275 extern int posix_spawnattr_getsigmask (const posix_spawnattr_t *_Restrict_ __attr, | |
12422
f7842310a565
New module 'arg-nonnull'. Declare which arguments expect non-NULL values.
Bruno Haible <bruno@clisp.org>
parents:
12421
diff
changeset
|
276 sigset_t *_Restrict_ __sigmask) |
f7842310a565
New module 'arg-nonnull'. Declare which arguments expect non-NULL values.
Bruno Haible <bruno@clisp.org>
parents:
12421
diff
changeset
|
277 __THROW _GL_ARG_NONNULL ((1, 2)); |
10504 | 278 # endif |
12535
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
279 #elif defined GNULIB_POSIXCHECK |
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
280 # undef posix_spawnattr_getsigmask |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
281 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_GETSIGMASK |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
282 _GL_WARN_ON_USE (posix_spawnattr_getsigmask, "posix_spawnattr_getsigmask is unportable - " |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
283 "use gnulib module posix_spawnattr_getsigmask for portability"); |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
284 # endif |
10504 | 285 #endif |
286 | |
287 #if @GNULIB_POSIX_SPAWNATTR_SETSIGMASK@ | |
288 /* Set signal mask for the new process in ATTR to SIGMASK. */ | |
289 # if @REPLACE_POSIX_SPAWN@ | |
290 # define posix_spawnattr_setsigmask rpl_posix_spawnattr_setsigmask | |
291 # endif | |
292 # if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@ | |
293 extern int posix_spawnattr_setsigmask (posix_spawnattr_t *_Restrict_ __attr, | |
12421
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
10655
diff
changeset
|
294 const sigset_t *_Restrict_ __sigmask) |
12422
f7842310a565
New module 'arg-nonnull'. Declare which arguments expect non-NULL values.
Bruno Haible <bruno@clisp.org>
parents:
12421
diff
changeset
|
295 __THROW _GL_ARG_NONNULL ((1, 2)); |
10504 | 296 # endif |
12535
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
297 #elif defined GNULIB_POSIXCHECK |
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
298 # undef posix_spawnattr_setsigmask |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
299 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_SETSIGMASK |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
300 _GL_WARN_ON_USE (posix_spawnattr_setsigmask, "posix_spawnattr_setsigmask is unportable - " |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
301 "use gnulib module posix_spawnattr_setsigmask for portability"); |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
302 # endif |
10504 | 303 #endif |
304 | |
305 #if @GNULIB_POSIX_SPAWNATTR_GETFLAGS@ | |
306 /* Get flag word from the attribute structure. */ | |
307 # if @REPLACE_POSIX_SPAWN@ | |
308 # define posix_spawnattr_getflags rpl_posix_spawnattr_getflags | |
309 # endif | |
310 # if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@ | |
311 extern int posix_spawnattr_getflags (const posix_spawnattr_t *_Restrict_ __attr, | |
12422
f7842310a565
New module 'arg-nonnull'. Declare which arguments expect non-NULL values.
Bruno Haible <bruno@clisp.org>
parents:
12421
diff
changeset
|
312 short int *_Restrict_ __flags) |
f7842310a565
New module 'arg-nonnull'. Declare which arguments expect non-NULL values.
Bruno Haible <bruno@clisp.org>
parents:
12421
diff
changeset
|
313 __THROW _GL_ARG_NONNULL ((1, 2)); |
10504 | 314 # endif |
12535
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
315 #elif defined GNULIB_POSIXCHECK |
12544
3e1610fee875
spawn: Fix misapplied patch.
Bruno Haible <bruno@clisp.org>
parents:
12535
diff
changeset
|
316 # undef posix_spawnattr_getflags |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
317 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_GETFLAGS |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
318 _GL_WARN_ON_USE (posix_spawnattr_getflags, "posix_spawnattr_getflags is unportable - " |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
319 "use gnulib module posix_spawnattr_getflags for portability"); |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
320 # endif |
10504 | 321 #endif |
322 | |
323 #if @GNULIB_POSIX_SPAWNATTR_SETFLAGS@ | |
324 /* Store flags in the attribute structure. */ | |
325 # if @REPLACE_POSIX_SPAWN@ | |
326 # define posix_spawnattr_setflags rpl_posix_spawnattr_setflags | |
327 # endif | |
328 # if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@ | |
329 extern int posix_spawnattr_setflags (posix_spawnattr_t *__attr, | |
12422
f7842310a565
New module 'arg-nonnull'. Declare which arguments expect non-NULL values.
Bruno Haible <bruno@clisp.org>
parents:
12421
diff
changeset
|
330 short int __flags) |
f7842310a565
New module 'arg-nonnull'. Declare which arguments expect non-NULL values.
Bruno Haible <bruno@clisp.org>
parents:
12421
diff
changeset
|
331 __THROW _GL_ARG_NONNULL ((1)); |
10504 | 332 # endif |
12535
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
333 #elif defined GNULIB_POSIXCHECK |
12544
3e1610fee875
spawn: Fix misapplied patch.
Bruno Haible <bruno@clisp.org>
parents:
12535
diff
changeset
|
334 # undef posix_spawnattr_setflags |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
335 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_SETFLAGS |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
336 _GL_WARN_ON_USE (posix_spawnattr_setflags, "posix_spawnattr_setflags is unportable - " |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
337 "use gnulib module posix_spawnattr_setflags for portability"); |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
338 # endif |
10504 | 339 #endif |
340 | |
341 #if @GNULIB_POSIX_SPAWNATTR_GETPGROUP@ | |
342 /* Get process group ID from the attribute structure. */ | |
343 # if @REPLACE_POSIX_SPAWN@ | |
344 # define posix_spawnattr_getpgroup rpl_posix_spawnattr_getpgroup | |
345 # endif | |
346 # if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@ | |
347 extern int posix_spawnattr_getpgroup (const posix_spawnattr_t *_Restrict_ __attr, | |
12421
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
10655
diff
changeset
|
348 pid_t *_Restrict_ __pgroup) |
12422
f7842310a565
New module 'arg-nonnull'. Declare which arguments expect non-NULL values.
Bruno Haible <bruno@clisp.org>
parents:
12421
diff
changeset
|
349 __THROW _GL_ARG_NONNULL ((1, 2)); |
10504 | 350 # endif |
12535
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
351 #elif defined GNULIB_POSIXCHECK |
12544
3e1610fee875
spawn: Fix misapplied patch.
Bruno Haible <bruno@clisp.org>
parents:
12535
diff
changeset
|
352 # undef posix_spawnattr_getpgroup |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
353 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_GETPGROUP |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
354 _GL_WARN_ON_USE (posix_spawnattr_getpgroup, "posix_spawnattr_getpgroup is unportable - " |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
355 "use gnulib module posix_spawnattr_getpgroup for portability"); |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
356 # endif |
10504 | 357 #endif |
358 | |
359 #if @GNULIB_POSIX_SPAWNATTR_SETPGROUP@ | |
360 /* Store process group ID in the attribute structure. */ | |
361 # if @REPLACE_POSIX_SPAWN@ | |
362 # define posix_spawnattr_setpgroup rpl_posix_spawnattr_setpgroup | |
363 # endif | |
364 # if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@ | |
365 extern int posix_spawnattr_setpgroup (posix_spawnattr_t *__attr, | |
12422
f7842310a565
New module 'arg-nonnull'. Declare which arguments expect non-NULL values.
Bruno Haible <bruno@clisp.org>
parents:
12421
diff
changeset
|
366 pid_t __pgroup) |
f7842310a565
New module 'arg-nonnull'. Declare which arguments expect non-NULL values.
Bruno Haible <bruno@clisp.org>
parents:
12421
diff
changeset
|
367 __THROW _GL_ARG_NONNULL ((1)); |
10504 | 368 # endif |
12544
3e1610fee875
spawn: Fix misapplied patch.
Bruno Haible <bruno@clisp.org>
parents:
12535
diff
changeset
|
369 #elif defined GNULIB_POSIXCHECK |
3e1610fee875
spawn: Fix misapplied patch.
Bruno Haible <bruno@clisp.org>
parents:
12535
diff
changeset
|
370 # undef posix_spawnattr_setpgroup |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
371 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_SETPGROUP |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
372 _GL_WARN_ON_USE (posix_spawnattr_setpgroup, "posix_spawnattr_setpgroup is unportable - " |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
373 "use gnulib module posix_spawnattr_setpgroup for portability"); |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
374 # endif |
10504 | 375 #endif |
376 | |
377 #if @GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY@ | |
378 /* Get scheduling policy from the attribute structure. */ | |
379 # if @REPLACE_POSIX_SPAWN@ | |
380 # define posix_spawnattr_getschedpolicy rpl_posix_spawnattr_getschedpolicy | |
381 # endif | |
382 # if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@ | |
383 extern int posix_spawnattr_getschedpolicy (const posix_spawnattr_t *_Restrict_ __attr, | |
12421
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
10655
diff
changeset
|
384 int *_Restrict_ __schedpolicy) |
12422
f7842310a565
New module 'arg-nonnull'. Declare which arguments expect non-NULL values.
Bruno Haible <bruno@clisp.org>
parents:
12421
diff
changeset
|
385 __THROW _GL_ARG_NONNULL ((1, 2)); |
10504 | 386 # endif |
12535
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
387 #elif defined GNULIB_POSIXCHECK |
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
388 # undef posix_spawnattr_getschedpolicy |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
389 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_GETSCHEDPOLICY |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
390 _GL_WARN_ON_USE (posix_spawnattr_getschedpolicy, "posix_spawnattr_getschedpolicy is unportable - " |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
391 "use gnulib module posix_spawnattr_getschedpolicy for portability"); |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
392 # endif |
10504 | 393 #endif |
394 | |
395 #if @GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY@ | |
396 /* Store scheduling policy in the attribute structure. */ | |
397 # if @REPLACE_POSIX_SPAWN@ | |
398 # define posix_spawnattr_setschedpolicy rpl_posix_spawnattr_setschedpolicy | |
399 # endif | |
400 # if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@ | |
401 extern int posix_spawnattr_setschedpolicy (posix_spawnattr_t *__attr, | |
12422
f7842310a565
New module 'arg-nonnull'. Declare which arguments expect non-NULL values.
Bruno Haible <bruno@clisp.org>
parents:
12421
diff
changeset
|
402 int __schedpolicy) |
f7842310a565
New module 'arg-nonnull'. Declare which arguments expect non-NULL values.
Bruno Haible <bruno@clisp.org>
parents:
12421
diff
changeset
|
403 __THROW _GL_ARG_NONNULL ((1)); |
10504 | 404 # endif |
12535
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
405 #elif defined GNULIB_POSIXCHECK |
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
406 # undef posix_spawnattr_setschedpolicy |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
407 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_SETSCHEDPOLICY |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
408 _GL_WARN_ON_USE (posix_spawnattr_setschedpolicy, "posix_spawnattr_setschedpolicy is unportable - " |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
409 "use gnulib module posix_spawnattr_setschedpolicy for portability"); |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
410 # endif |
10504 | 411 #endif |
412 | |
413 #if @GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM@ | |
414 /* Get scheduling parameters from the attribute structure. */ | |
415 # if @REPLACE_POSIX_SPAWN@ | |
416 # define posix_spawnattr_getschedparam rpl_posix_spawnattr_getschedparam | |
417 # endif | |
418 # if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@ | |
419 extern int posix_spawnattr_getschedparam (const posix_spawnattr_t *_Restrict_ __attr, | |
12422
f7842310a565
New module 'arg-nonnull'. Declare which arguments expect non-NULL values.
Bruno Haible <bruno@clisp.org>
parents:
12421
diff
changeset
|
420 struct sched_param *_Restrict_ __schedparam) |
f7842310a565
New module 'arg-nonnull'. Declare which arguments expect non-NULL values.
Bruno Haible <bruno@clisp.org>
parents:
12421
diff
changeset
|
421 __THROW _GL_ARG_NONNULL ((1, 2)); |
10504 | 422 # endif |
12535
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
423 #elif defined GNULIB_POSIXCHECK |
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
424 # undef posix_spawnattr_getschedparam |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
425 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_GETSCHEDPARAM |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
426 _GL_WARN_ON_USE (posix_spawnattr_getschedparam, "posix_spawnattr_getschedparam is unportable - " |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
427 "use gnulib module posix_spawnattr_getschedparam for portability"); |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
428 # endif |
10504 | 429 #endif |
430 | |
431 #if @GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM@ | |
432 /* Store scheduling parameters in the attribute structure. */ | |
433 # if @REPLACE_POSIX_SPAWN@ | |
434 # define posix_spawnattr_setschedparam rpl_posix_spawnattr_setschedparam | |
435 # endif | |
436 # if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@ | |
437 extern int posix_spawnattr_setschedparam (posix_spawnattr_t *_Restrict_ __attr, | |
12422
f7842310a565
New module 'arg-nonnull'. Declare which arguments expect non-NULL values.
Bruno Haible <bruno@clisp.org>
parents:
12421
diff
changeset
|
438 const struct sched_param *_Restrict_ __schedparam) |
f7842310a565
New module 'arg-nonnull'. Declare which arguments expect non-NULL values.
Bruno Haible <bruno@clisp.org>
parents:
12421
diff
changeset
|
439 __THROW _GL_ARG_NONNULL ((1, 2)); |
10504 | 440 # endif |
12535
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
441 #elif defined GNULIB_POSIXCHECK |
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
442 # undef posix_spawnattr_setschedparam |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
443 # if HAVE_RAW_DECL_POSIX_SPAWNATTR_SETSCHEDPARAM |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
444 _GL_WARN_ON_USE (posix_spawnattr_setschedparam, "posix_spawnattr_setschedparam is unportable - " |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
445 "use gnulib module posix_spawnattr_setschedparam for portability"); |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
446 # endif |
10504 | 447 #endif |
448 | |
449 | |
450 #if @GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT@ | |
451 /* Initialize data structure for file attribute for `spawn' call. */ | |
452 # if @REPLACE_POSIX_SPAWN@ | |
453 # define posix_spawn_file_actions_init rpl_posix_spawn_file_actions_init | |
454 # endif | |
455 # if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@ | |
12422
f7842310a565
New module 'arg-nonnull'. Declare which arguments expect non-NULL values.
Bruno Haible <bruno@clisp.org>
parents:
12421
diff
changeset
|
456 extern int posix_spawn_file_actions_init (posix_spawn_file_actions_t *__file_actions) |
f7842310a565
New module 'arg-nonnull'. Declare which arguments expect non-NULL values.
Bruno Haible <bruno@clisp.org>
parents:
12421
diff
changeset
|
457 __THROW _GL_ARG_NONNULL ((1)); |
10504 | 458 # endif |
12535
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
459 #elif defined GNULIB_POSIXCHECK |
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
460 # undef posix_spawn_file_actions_init |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
461 # if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_INIT |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
462 _GL_WARN_ON_USE (posix_spawn_file_actions_init, "posix_spawn_file_actions_init is unportable - " |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
463 "use gnulib module posix_spawn_file_actions_init for portability"); |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
464 # endif |
10504 | 465 #endif |
466 | |
467 #if @GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY@ | |
468 /* Free resources associated with FILE-ACTIONS. */ | |
469 # if @REPLACE_POSIX_SPAWN@ | |
470 # define posix_spawn_file_actions_destroy rpl_posix_spawn_file_actions_destroy | |
471 # endif | |
472 # if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@ | |
12422
f7842310a565
New module 'arg-nonnull'. Declare which arguments expect non-NULL values.
Bruno Haible <bruno@clisp.org>
parents:
12421
diff
changeset
|
473 extern int posix_spawn_file_actions_destroy (posix_spawn_file_actions_t *__file_actions) |
f7842310a565
New module 'arg-nonnull'. Declare which arguments expect non-NULL values.
Bruno Haible <bruno@clisp.org>
parents:
12421
diff
changeset
|
474 __THROW _GL_ARG_NONNULL ((1)); |
10504 | 475 # endif |
12535
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
476 #elif defined GNULIB_POSIXCHECK |
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
477 # undef posix_spawn_file_actions_destroy |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
478 # if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_DESTROY |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
479 _GL_WARN_ON_USE (posix_spawn_file_actions_destroy, "posix_spawn_file_actions_destroy is unportable - " |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
480 "use gnulib module posix_spawn_file_actions_destroy for portability"); |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
481 # endif |
10504 | 482 #endif |
483 | |
484 #if @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN@ | |
485 /* Add an action to FILE-ACTIONS which tells the implementation to call | |
486 `open' for the given file during the `spawn' call. */ | |
487 # if @REPLACE_POSIX_SPAWN@ | |
488 # define posix_spawn_file_actions_addopen rpl_posix_spawn_file_actions_addopen | |
489 # endif | |
490 # if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@ | |
491 extern int posix_spawn_file_actions_addopen (posix_spawn_file_actions_t *_Restrict_ __file_actions, | |
12421
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
10655
diff
changeset
|
492 int __fd, |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
10655
diff
changeset
|
493 const char *_Restrict_ __path, |
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
10655
diff
changeset
|
494 int __oflag, mode_t __mode) |
12422
f7842310a565
New module 'arg-nonnull'. Declare which arguments expect non-NULL values.
Bruno Haible <bruno@clisp.org>
parents:
12421
diff
changeset
|
495 __THROW _GL_ARG_NONNULL ((1, 3)); |
10504 | 496 # endif |
12535
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
497 #elif defined GNULIB_POSIXCHECK |
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
498 # undef posix_spawn_file_actions_addopen |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
499 # if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
500 _GL_WARN_ON_USE (posix_spawn_file_actions_addopen, "posix_spawn_file_actions_addopen is unportable - " |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
501 "use gnulib module posix_spawn_file_actions_addopen for portability"); |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
502 # endif |
10504 | 503 #endif |
504 | |
505 #if @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE@ | |
506 /* Add an action to FILE-ACTIONS which tells the implementation to call | |
507 `close' for the given file descriptor during the `spawn' call. */ | |
508 # if @REPLACE_POSIX_SPAWN@ | |
509 # define posix_spawn_file_actions_addclose rpl_posix_spawn_file_actions_addclose | |
510 # endif | |
511 # if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@ | |
512 extern int posix_spawn_file_actions_addclose (posix_spawn_file_actions_t *__file_actions, | |
12421
e8d2c6fc33ad
Use spaces for indentation, not tabs.
Bruno Haible <bruno@clisp.org>
parents:
10655
diff
changeset
|
513 int __fd) |
12422
f7842310a565
New module 'arg-nonnull'. Declare which arguments expect non-NULL values.
Bruno Haible <bruno@clisp.org>
parents:
12421
diff
changeset
|
514 __THROW _GL_ARG_NONNULL ((1)); |
10504 | 515 # endif |
12535
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
516 #elif defined GNULIB_POSIXCHECK |
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
517 # undef posix_spawn_file_actions_addclose |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
518 # if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
519 _GL_WARN_ON_USE (posix_spawn_file_actions_addclose, "posix_spawn_file_actions_addclose is unportable - " |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
520 "use gnulib module posix_spawn_file_actions_addclose for portability"); |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
521 # endif |
10504 | 522 #endif |
523 | |
524 #if @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2@ | |
525 /* Add an action to FILE-ACTIONS which tells the implementation to call | |
526 `dup2' for the given file descriptors during the `spawn' call. */ | |
527 # if @REPLACE_POSIX_SPAWN@ | |
528 # define posix_spawn_file_actions_adddup2 rpl_posix_spawn_file_actions_adddup2 | |
529 # endif | |
530 # if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@ | |
531 extern int posix_spawn_file_actions_adddup2 (posix_spawn_file_actions_t *__file_actions, | |
12422
f7842310a565
New module 'arg-nonnull'. Declare which arguments expect non-NULL values.
Bruno Haible <bruno@clisp.org>
parents:
12421
diff
changeset
|
532 int __fd, int __newfd) |
f7842310a565
New module 'arg-nonnull'. Declare which arguments expect non-NULL values.
Bruno Haible <bruno@clisp.org>
parents:
12421
diff
changeset
|
533 __THROW _GL_ARG_NONNULL ((1)); |
10504 | 534 # endif |
12535
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
535 #elif defined GNULIB_POSIXCHECK |
8c827f8e5f04
signal, spawn: use link warnings
Eric Blake <ebb9@byu.net>
parents:
12534
diff
changeset
|
536 # undef posix_spawn_file_actions_adddup2 |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
537 # if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
538 _GL_WARN_ON_USE (posix_spawn_file_actions_adddup2, "posix_spawn_file_actions_adddup2 is unportable - " |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
539 "use gnulib module posix_spawn_file_actions_adddup2 for portability"); |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
540 # endif |
10504 | 541 #endif |
542 | |
543 | |
544 #ifdef __cplusplus | |
545 } | |
546 #endif | |
547 | |
548 | |
549 #endif /* _GL_SPAWN_H */ | |
550 #endif /* _GL_SPAWN_H */ |