1 /* Test of <spawn.h> substitute in C++ mode.
2 Copyright (C) 2010-2024 Free Software Foundation, Inc.
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <https://www.gnu.org/licenses/>. */
17 /* Written by Bruno Haible <bruno@clisp.org>, 2010. */
19 #define GNULIB_NAMESPACE gnulib
24 #include "signature.h"
27 #if GNULIB_TEST_POSIX_SPAWN
28 SIGNATURE_CHECK (GNULIB_NAMESPACE::posix_spawn
, int,
29 (pid_t
*, const char *, const posix_spawn_file_actions_t
*,
30 const posix_spawnattr_t
*, char *const[], char *const[]));
33 #if GNULIB_TEST_POSIX_SPAWNP
34 SIGNATURE_CHECK (GNULIB_NAMESPACE::posix_spawnp
, int,
35 (pid_t
*, const char *, const posix_spawn_file_actions_t
*,
36 const posix_spawnattr_t
*, char *const[], char *const[]));
39 #if GNULIB_TEST_POSIX_SPAWNATTR_INIT
40 SIGNATURE_CHECK (GNULIB_NAMESPACE::posix_spawnattr_init
, int,
41 (posix_spawnattr_t
*));
44 #if GNULIB_TEST_POSIX_SPAWNATTR_DESTROY
45 SIGNATURE_CHECK (GNULIB_NAMESPACE::posix_spawnattr_destroy
, int,
46 (posix_spawnattr_t
*));
49 #if GNULIB_TEST_POSIX_SPAWNATTR_GETSIGDEFAULT
50 SIGNATURE_CHECK (GNULIB_NAMESPACE::posix_spawnattr_getsigdefault
, int,
51 (const posix_spawnattr_t
*, sigset_t
*));
54 #if GNULIB_TEST_POSIX_SPAWNATTR_SETSIGDEFAULT
55 SIGNATURE_CHECK (GNULIB_NAMESPACE::posix_spawnattr_setsigdefault
, int,
56 (posix_spawnattr_t
*, const sigset_t
*));
59 #if GNULIB_TEST_POSIX_SPAWNATTR_GETSIGMASK
60 SIGNATURE_CHECK (GNULIB_NAMESPACE::posix_spawnattr_getsigmask
, int,
61 (const posix_spawnattr_t
*, sigset_t
*));
64 #if GNULIB_TEST_POSIX_SPAWNATTR_SETSIGMASK
65 SIGNATURE_CHECK (GNULIB_NAMESPACE::posix_spawnattr_setsigmask
, int,
66 (posix_spawnattr_t
*, const sigset_t
*));
69 #if GNULIB_TEST_POSIX_SPAWNATTR_GETFLAGS
70 SIGNATURE_CHECK (GNULIB_NAMESPACE::posix_spawnattr_getflags
, int,
71 (const posix_spawnattr_t
*, short int *));
74 #if GNULIB_TEST_POSIX_SPAWNATTR_SETFLAGS
75 SIGNATURE_CHECK (GNULIB_NAMESPACE::posix_spawnattr_setflags
, int,
76 (posix_spawnattr_t
*, short int));
79 #if GNULIB_TEST_POSIX_SPAWNATTR_GETPGROUP
80 SIGNATURE_CHECK (GNULIB_NAMESPACE::posix_spawnattr_getpgroup
, int,
81 (const posix_spawnattr_t
*, pid_t
*));
84 #if GNULIB_TEST_POSIX_SPAWNATTR_SETPGROUP
85 SIGNATURE_CHECK (GNULIB_NAMESPACE::posix_spawnattr_setpgroup
, int,
86 (posix_spawnattr_t
*, pid_t
));
89 #if GNULIB_TEST_POSIX_SPAWNATTR_GETSCHEDPOLICY
90 SIGNATURE_CHECK (GNULIB_NAMESPACE::posix_spawnattr_getschedpolicy
, int,
91 (const posix_spawnattr_t
*, int *));
94 #if GNULIB_TEST_POSIX_SPAWNATTR_SETSCHEDPOLICY
95 SIGNATURE_CHECK (GNULIB_NAMESPACE::posix_spawnattr_setschedpolicy
, int,
96 (posix_spawnattr_t
*, int));
99 #if GNULIB_TEST_POSIX_SPAWNATTR_GETSCHEDPARAM
100 SIGNATURE_CHECK (GNULIB_NAMESPACE::posix_spawnattr_getschedparam
, int,
101 (const posix_spawnattr_t
*, struct sched_param
*));
104 #if GNULIB_TEST_POSIX_SPAWNATTR_SETSCHEDPARAM
105 SIGNATURE_CHECK (GNULIB_NAMESPACE::posix_spawnattr_setschedparam
, int,
106 (posix_spawnattr_t
*, const struct sched_param
*));
109 #if GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_INIT
110 SIGNATURE_CHECK (GNULIB_NAMESPACE::posix_spawn_file_actions_init
, int,
111 (posix_spawn_file_actions_t
*));
114 #if GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_DESTROY
115 SIGNATURE_CHECK (GNULIB_NAMESPACE::posix_spawn_file_actions_destroy
, int,
116 (posix_spawn_file_actions_t
*));
119 #if GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN
120 SIGNATURE_CHECK (GNULIB_NAMESPACE::posix_spawn_file_actions_addopen
, int,
121 (posix_spawn_file_actions_t
*, int, const char *, int,
125 #if GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE
126 SIGNATURE_CHECK (GNULIB_NAMESPACE::posix_spawn_file_actions_addclose
, int,
127 (posix_spawn_file_actions_t
*, int));
130 #if GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2
131 SIGNATURE_CHECK (GNULIB_NAMESPACE::posix_spawn_file_actions_adddup2
, int,
132 (posix_spawn_file_actions_t
*, int, int));
135 #if GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR
136 SIGNATURE_CHECK (GNULIB_NAMESPACE::posix_spawn_file_actions_addchdir
, int,
137 (posix_spawn_file_actions_t
*, const char *));
140 #if GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR
141 SIGNATURE_CHECK (GNULIB_NAMESPACE::posix_spawn_file_actions_addfchdir
, int,
142 (posix_spawn_file_actions_t
*, int));