(root)/
bison-3.8.2/
lib/
spawn.in.h
       1  /* Definitions for POSIX spawn interface.
       2     Copyright (C) 2000, 2003-2004, 2008-2021 Free Software Foundation, Inc.
       3     This file is part of the GNU C Library.
       4  
       5     This file is free software: you can redistribute it and/or modify
       6     it under the terms of the GNU Lesser General Public License as
       7     published by the Free Software Foundation; either version 2.1 of the
       8     License, or (at your option) any later version.
       9  
      10     This file is distributed in the hope that it will be useful,
      11     but WITHOUT ANY WARRANTY; without even the implied warranty of
      12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      13     GNU Lesser General Public License for more details.
      14  
      15     You should have received a copy of the GNU Lesser General Public License
      16     along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
      17  
      18  #if __GNUC__ >= 3
      19  @PRAGMA_SYSTEM_HEADER@
      20  #endif
      21  @PRAGMA_COLUMNS@
      22  
      23  #if defined _GL_ALREADY_INCLUDING_SPAWN_H
      24  /* Special invocation convention:
      25     On OS/2 kLIBC, <spawn.h> includes <signal.h>. Then <signal.h> ->
      26     <pthread.h> -> <sched.h> -> <spawn.h> are included by GNULIB.
      27     In this situation, struct sched_param is not yet defined.  */
      28  
      29  #@INCLUDE_NEXT@ @NEXT_SPAWN_H@
      30  
      31  #else
      32  
      33  #ifndef _@GUARD_PREFIX@_SPAWN_H
      34  /* Normal invocation convention.  */
      35  
      36  /* The include_next requires a split double-inclusion guard.  */
      37  #if @HAVE_SPAWN_H@
      38  
      39  # define _GL_ALREADY_INCLUDING_SPAWN_H
      40  
      41  # @INCLUDE_NEXT@ @NEXT_SPAWN_H@
      42  
      43  # define _GL_ALREADY_INCLUDING_SPAWN_H
      44  
      45  #endif
      46  
      47  #ifndef _@GUARD_PREFIX@_SPAWN_H
      48  #define _@GUARD_PREFIX@_SPAWN_H
      49  
      50  /* Get definitions of 'struct sched_param' and 'sigset_t'.
      51     But avoid namespace pollution on glibc systems.  */
      52  #if !(defined __GLIBC__ && !defined __UCLIBC__)
      53  # include <sched.h>
      54  # include <signal.h>
      55  #endif
      56  
      57  #include <sys/types.h>
      58  
      59  #ifndef __THROW
      60  # define __THROW
      61  #endif
      62  
      63  /* For plain 'restrict', use glibc's __restrict if defined.
      64     Otherwise, GCC 2.95 and later have "__restrict"; C99 compilers have
      65     "restrict", and "configure" may have defined "restrict".
      66     Other compilers use __restrict, __restrict__, and _Restrict, and
      67     'configure' might #define 'restrict' to those words, so pick a
      68     different name.  */
      69  #ifndef _Restrict_
      70  # if defined __restrict \
      71       || 2 < __GNUC__ + (95 <= __GNUC_MINOR__) \
      72       || __clang_major__ >= 3
      73  #  define _Restrict_ __restrict
      74  # elif 199901L <= __STDC_VERSION__ || defined restrict
      75  #  define _Restrict_ restrict
      76  # else
      77  #  define _Restrict_
      78  # endif
      79  #endif
      80  /* For the ISO C99 syntax
      81       array_name[restrict]
      82     use glibc's __restrict_arr if available.
      83     Otherwise, GCC 3.1 and clang support this syntax (but not in C++ mode).
      84     Other ISO C99 compilers support it as well.  */
      85  #ifndef _Restrict_arr_
      86  # ifdef __restrict_arr
      87  #  define _Restrict_arr_ __restrict_arr
      88  # elif ((199901L <= __STDC_VERSION__ \
      89           || 3 < __GNUC__ + (1 <= __GNUC_MINOR__) \
      90           || __clang_major__ >= 3) \
      91          && !defined __cplusplus)
      92  #  define _Restrict_arr_ _Restrict_
      93  # else
      94  #  define _Restrict_arr_
      95  # endif
      96  #endif
      97  
      98  /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
      99  
     100  /* The definition of _GL_ARG_NONNULL is copied here.  */
     101  
     102  /* The definition of _GL_WARN_ON_USE is copied here.  */
     103  
     104  
     105  /* Data structure to contain attributes for thread creation.  */
     106  #if @REPLACE_POSIX_SPAWN@ || (@HAVE_POSIX_SPAWNATTR_T@ && !@HAVE_POSIX_SPAWN@)
     107  # define posix_spawnattr_t rpl_posix_spawnattr_t
     108  #endif
     109  #if @REPLACE_POSIX_SPAWN@ || !@HAVE_POSIX_SPAWNATTR_T@ || !@HAVE_POSIX_SPAWN@
     110  # if !GNULIB_defined_posix_spawnattr_t
     111  typedef struct
     112  {
     113    short int _flags;
     114    pid_t _pgrp;
     115    sigset_t _sd;
     116    sigset_t _ss;
     117    struct sched_param _sp;
     118    int _policy;
     119    int __pad[16];
     120  } posix_spawnattr_t;
     121  #  define GNULIB_defined_posix_spawnattr_t 1
     122  # endif
     123  #endif
     124  
     125  
     126  /* Data structure to contain information about the actions to be
     127     performed in the new process with respect to file descriptors.  */
     128  #if @REPLACE_POSIX_SPAWN@ || (@HAVE_POSIX_SPAWN_FILE_ACTIONS_T@ && !@HAVE_POSIX_SPAWN@)
     129  # define posix_spawn_file_actions_t rpl_posix_spawn_file_actions_t
     130  #endif
     131  #if @REPLACE_POSIX_SPAWN@ || !@HAVE_POSIX_SPAWN_FILE_ACTIONS_T@ || !@HAVE_POSIX_SPAWN@
     132  # if !GNULIB_defined_posix_spawn_file_actions_t
     133  typedef struct
     134  {
     135    int _allocated;
     136    int _used;
     137    struct __spawn_action *_actions;
     138    int __pad[16];
     139  } posix_spawn_file_actions_t;
     140  #  define GNULIB_defined_posix_spawn_file_actions_t 1
     141  # endif
     142  #endif
     143  
     144  
     145  /* Flags to be set in the 'posix_spawnattr_t'.  */
     146  #if @HAVE_POSIX_SPAWN@
     147  /* Use the values from the system, but provide the missing ones.  */
     148  # ifndef POSIX_SPAWN_SETSCHEDPARAM
     149  #  define POSIX_SPAWN_SETSCHEDPARAM 0
     150  # endif
     151  # ifndef POSIX_SPAWN_SETSCHEDULER
     152  #  define POSIX_SPAWN_SETSCHEDULER 0
     153  # endif
     154  #else
     155  # if @REPLACE_POSIX_SPAWN@
     156  /* Use the values from the system, for better compatibility.  */
     157  /* But this implementation does not support AIX extensions.  */
     158  #  undef POSIX_SPAWN_FORK_HANDLERS
     159  # else
     160  #  define POSIX_SPAWN_RESETIDS           0x01
     161  #  define POSIX_SPAWN_SETPGROUP          0x02
     162  #  define POSIX_SPAWN_SETSIGDEF          0x04
     163  #  define POSIX_SPAWN_SETSIGMASK         0x08
     164  #  define POSIX_SPAWN_SETSCHEDPARAM      0x10
     165  #  define POSIX_SPAWN_SETSCHEDULER       0x20
     166  # endif
     167  #endif
     168  /* A GNU extension.  Use the next free bit position.  */
     169  #ifndef POSIX_SPAWN_USEVFORK
     170  # define POSIX_SPAWN_USEVFORK \
     171    ((POSIX_SPAWN_RESETIDS | (POSIX_SPAWN_RESETIDS - 1)                     \
     172      | POSIX_SPAWN_SETPGROUP | (POSIX_SPAWN_SETPGROUP - 1)                 \
     173      | POSIX_SPAWN_SETSIGDEF | (POSIX_SPAWN_SETSIGDEF - 1)                 \
     174      | POSIX_SPAWN_SETSIGMASK | (POSIX_SPAWN_SETSIGMASK - 1)               \
     175      | POSIX_SPAWN_SETSCHEDPARAM                                           \
     176      | (POSIX_SPAWN_SETSCHEDPARAM > 0 ? POSIX_SPAWN_SETSCHEDPARAM - 1 : 0) \
     177      | POSIX_SPAWN_SETSCHEDULER                                            \
     178      | (POSIX_SPAWN_SETSCHEDULER > 0 ? POSIX_SPAWN_SETSCHEDULER - 1 : 0))  \
     179     + 1)
     180  #endif
     181  #if !GNULIB_defined_verify_POSIX_SPAWN_USEVFORK_no_overlap
     182  typedef int verify_POSIX_SPAWN_USEVFORK_no_overlap
     183              [(((POSIX_SPAWN_RESETIDS | POSIX_SPAWN_SETPGROUP
     184                  | POSIX_SPAWN_SETSIGDEF | POSIX_SPAWN_SETSIGMASK
     185                  | POSIX_SPAWN_SETSCHEDPARAM | POSIX_SPAWN_SETSCHEDULER)
     186                 & POSIX_SPAWN_USEVFORK)
     187                == 0)
     188               ? 1 : -1];
     189  # define GNULIB_defined_verify_POSIX_SPAWN_USEVFORK_no_overlap 1
     190  #endif
     191  
     192  
     193  #if @GNULIB_POSIX_SPAWN@
     194  /* Spawn a new process executing PATH with the attributes describes in *ATTRP.
     195     Before running the process perform the actions described in FILE-ACTIONS.
     196  
     197     This function is a possible cancellation points and therefore not
     198     marked with __THROW. */
     199  # if @REPLACE_POSIX_SPAWN@
     200  #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
     201  #   define posix_spawn rpl_posix_spawn
     202  #  endif
     203  _GL_FUNCDECL_RPL (posix_spawn, int,
     204                    (pid_t *_Restrict_ __pid,
     205                     const char *_Restrict_ __path,
     206                     const posix_spawn_file_actions_t *_Restrict_ __file_actions,
     207                     const posix_spawnattr_t *_Restrict_ __attrp,
     208                     char *const argv[_Restrict_arr_],
     209                     char *const envp[_Restrict_arr_])
     210                    _GL_ARG_NONNULL ((2, 5, 6)));
     211  _GL_CXXALIAS_RPL (posix_spawn, int,
     212                    (pid_t *_Restrict_ __pid,
     213                     const char *_Restrict_ __path,
     214                     const posix_spawn_file_actions_t *_Restrict_ __file_actions,
     215                     const posix_spawnattr_t *_Restrict_ __attrp,
     216                     char *const argv[_Restrict_arr_],
     217                     char *const envp[_Restrict_arr_]));
     218  # else
     219  #  if !@HAVE_POSIX_SPAWN@
     220  _GL_FUNCDECL_SYS (posix_spawn, int,
     221                    (pid_t *_Restrict_ __pid,
     222                     const char *_Restrict_ __path,
     223                     const posix_spawn_file_actions_t *_Restrict_ __file_actions,
     224                     const posix_spawnattr_t *_Restrict_ __attrp,
     225                     char *const argv[_Restrict_arr_],
     226                     char *const envp[_Restrict_arr_])
     227                    _GL_ARG_NONNULL ((2, 5, 6)));
     228  #  endif
     229  _GL_CXXALIAS_SYS (posix_spawn, int,
     230                    (pid_t *_Restrict_ __pid,
     231                     const char *_Restrict_ __path,
     232                     const posix_spawn_file_actions_t *_Restrict_ __file_actions,
     233                     const posix_spawnattr_t *_Restrict_ __attrp,
     234                     char *const argv[_Restrict_arr_],
     235                     char *const envp[_Restrict_arr_]));
     236  # endif
     237  _GL_CXXALIASWARN (posix_spawn);
     238  #elif defined GNULIB_POSIXCHECK
     239  # undef posix_spawn
     240  # if HAVE_RAW_DECL_POSIX_SPAWN
     241  _GL_WARN_ON_USE (posix_spawn, "posix_spawn is unportable - "
     242                   "use gnulib module posix_spawn for portability");
     243  # endif
     244  #endif
     245  
     246  #if @GNULIB_POSIX_SPAWNP@
     247  /* Similar to 'posix_spawn' but search for FILE in the PATH.
     248  
     249     This function is a possible cancellation points and therefore not
     250     marked with __THROW.  */
     251  # if @REPLACE_POSIX_SPAWN@
     252  #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
     253  #   define posix_spawnp rpl_posix_spawnp
     254  #  endif
     255  _GL_FUNCDECL_RPL (posix_spawnp, int,
     256                    (pid_t *__pid, const char *__file,
     257                     const posix_spawn_file_actions_t *__file_actions,
     258                     const posix_spawnattr_t *__attrp,
     259                     char *const argv[], char *const envp[])
     260                    _GL_ARG_NONNULL ((2, 5, 6)));
     261  _GL_CXXALIAS_RPL (posix_spawnp, int,
     262                    (pid_t *__pid, const char *__file,
     263                     const posix_spawn_file_actions_t *__file_actions,
     264                     const posix_spawnattr_t *__attrp,
     265                     char *const argv[], char *const envp[]));
     266  # else
     267  #  if !@HAVE_POSIX_SPAWN@
     268  _GL_FUNCDECL_SYS (posix_spawnp, int,
     269                    (pid_t *__pid, const char *__file,
     270                     const posix_spawn_file_actions_t *__file_actions,
     271                     const posix_spawnattr_t *__attrp,
     272                     char *const argv[], char *const envp[])
     273                    _GL_ARG_NONNULL ((2, 5, 6)));
     274  #  endif
     275  _GL_CXXALIAS_SYS (posix_spawnp, int,
     276                    (pid_t *__pid, const char *__file,
     277                     const posix_spawn_file_actions_t *__file_actions,
     278                     const posix_spawnattr_t *__attrp,
     279                     char *const argv[], char *const envp[]));
     280  # endif
     281  _GL_CXXALIASWARN (posix_spawnp);
     282  #elif defined GNULIB_POSIXCHECK
     283  # undef posix_spawnp
     284  # if HAVE_RAW_DECL_POSIX_SPAWNP
     285  _GL_WARN_ON_USE (posix_spawnp, "posix_spawnp is unportable - "
     286                   "use gnulib module posix_spawnp for portability");
     287  # endif
     288  #endif
     289  
     290  
     291  #if @GNULIB_POSIX_SPAWNATTR_INIT@
     292  /* Initialize data structure with attributes for 'spawn' to default values.  */
     293  # if @REPLACE_POSIX_SPAWN@
     294  #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
     295  #   define posix_spawnattr_init rpl_posix_spawnattr_init
     296  #  endif
     297  _GL_FUNCDECL_RPL (posix_spawnattr_init, int, (posix_spawnattr_t *__attr)
     298                                               __THROW _GL_ARG_NONNULL ((1)));
     299  _GL_CXXALIAS_RPL (posix_spawnattr_init, int, (posix_spawnattr_t *__attr));
     300  # else
     301  #  if !@HAVE_POSIX_SPAWN@
     302  _GL_FUNCDECL_SYS (posix_spawnattr_init, int, (posix_spawnattr_t *__attr)
     303                                               __THROW _GL_ARG_NONNULL ((1)));
     304  #  endif
     305  _GL_CXXALIAS_SYS (posix_spawnattr_init, int, (posix_spawnattr_t *__attr));
     306  # endif
     307  _GL_CXXALIASWARN (posix_spawnattr_init);
     308  #elif defined GNULIB_POSIXCHECK
     309  # undef posix_spawnattr_init
     310  # if HAVE_RAW_DECL_POSIX_SPAWNATTR_INIT
     311  _GL_WARN_ON_USE (posix_spawnattr_init, "posix_spawnattr_init is unportable - "
     312                   "use gnulib module posix_spawnattr_init for portability");
     313  # endif
     314  #endif
     315  
     316  #if @GNULIB_POSIX_SPAWNATTR_DESTROY@
     317  /* Free resources associated with ATTR.  */
     318  # if @REPLACE_POSIX_SPAWN@
     319  #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
     320  #   define posix_spawnattr_destroy rpl_posix_spawnattr_destroy
     321  #  endif
     322  _GL_FUNCDECL_RPL (posix_spawnattr_destroy, int, (posix_spawnattr_t *__attr)
     323                                                  __THROW _GL_ARG_NONNULL ((1)));
     324  _GL_CXXALIAS_RPL (posix_spawnattr_destroy, int, (posix_spawnattr_t *__attr));
     325  # else
     326  #  if !@HAVE_POSIX_SPAWN@
     327  _GL_FUNCDECL_SYS (posix_spawnattr_destroy, int, (posix_spawnattr_t *__attr)
     328                                                  __THROW _GL_ARG_NONNULL ((1)));
     329  #  endif
     330  _GL_CXXALIAS_SYS (posix_spawnattr_destroy, int, (posix_spawnattr_t *__attr));
     331  # endif
     332  _GL_CXXALIASWARN (posix_spawnattr_destroy);
     333  #elif defined GNULIB_POSIXCHECK
     334  # undef posix_spawnattr_destroy
     335  # if HAVE_RAW_DECL_POSIX_SPAWNATTR_DESTROY
     336  _GL_WARN_ON_USE (posix_spawnattr_destroy,
     337                   "posix_spawnattr_destroy is unportable - "
     338                   "use gnulib module posix_spawnattr_destroy for portability");
     339  # endif
     340  #endif
     341  
     342  #if @GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT@
     343  /* Store signal mask for signals with default handling from ATTR in
     344     SIGDEFAULT.  */
     345  # if @REPLACE_POSIX_SPAWN@
     346  #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
     347  #   define posix_spawnattr_getsigdefault rpl_posix_spawnattr_getsigdefault
     348  #  endif
     349  _GL_FUNCDECL_RPL (posix_spawnattr_getsigdefault, int,
     350                    (const posix_spawnattr_t *_Restrict_ __attr,
     351                     sigset_t *_Restrict_ __sigdefault)
     352                    __THROW _GL_ARG_NONNULL ((1, 2)));
     353  _GL_CXXALIAS_RPL (posix_spawnattr_getsigdefault, int,
     354                    (const posix_spawnattr_t *_Restrict_ __attr,
     355                     sigset_t *_Restrict_ __sigdefault));
     356  # else
     357  #  if !@HAVE_POSIX_SPAWN@
     358  _GL_FUNCDECL_SYS (posix_spawnattr_getsigdefault, int,
     359                    (const posix_spawnattr_t *_Restrict_ __attr,
     360                     sigset_t *_Restrict_ __sigdefault)
     361                    __THROW _GL_ARG_NONNULL ((1, 2)));
     362  #  endif
     363  _GL_CXXALIAS_SYS (posix_spawnattr_getsigdefault, int,
     364                    (const posix_spawnattr_t *_Restrict_ __attr,
     365                     sigset_t *_Restrict_ __sigdefault));
     366  # endif
     367  _GL_CXXALIASWARN (posix_spawnattr_getsigdefault);
     368  #elif defined GNULIB_POSIXCHECK
     369  # undef posix_spawnattr_getsigdefault
     370  # if HAVE_RAW_DECL_POSIX_SPAWNATTR_GETSIGDEFAULT
     371  _GL_WARN_ON_USE (posix_spawnattr_getsigdefault,
     372                   "posix_spawnattr_getsigdefault is unportable - "
     373                   "use gnulib module posix_spawnattr_getsigdefault for portability");
     374  # endif
     375  #endif
     376  
     377  #if @GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT@
     378  /* Set signal mask for signals with default handling in ATTR to SIGDEFAULT.  */
     379  # if @REPLACE_POSIX_SPAWN@
     380  #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
     381  #   define posix_spawnattr_setsigdefault rpl_posix_spawnattr_setsigdefault
     382  #  endif
     383  _GL_FUNCDECL_RPL (posix_spawnattr_setsigdefault, int,
     384                    (posix_spawnattr_t *_Restrict_ __attr,
     385                     const sigset_t *_Restrict_ __sigdefault)
     386                    __THROW _GL_ARG_NONNULL ((1, 2)));
     387  _GL_CXXALIAS_RPL (posix_spawnattr_setsigdefault, int,
     388                    (posix_spawnattr_t *_Restrict_ __attr,
     389                     const sigset_t *_Restrict_ __sigdefault));
     390  # else
     391  #  if !@HAVE_POSIX_SPAWN@
     392  _GL_FUNCDECL_SYS (posix_spawnattr_setsigdefault, int,
     393                    (posix_spawnattr_t *_Restrict_ __attr,
     394                     const sigset_t *_Restrict_ __sigdefault)
     395                    __THROW _GL_ARG_NONNULL ((1, 2)));
     396  #  endif
     397  _GL_CXXALIAS_SYS (posix_spawnattr_setsigdefault, int,
     398                    (posix_spawnattr_t *_Restrict_ __attr,
     399                     const sigset_t *_Restrict_ __sigdefault));
     400  # endif
     401  _GL_CXXALIASWARN (posix_spawnattr_setsigdefault);
     402  #elif defined GNULIB_POSIXCHECK
     403  # undef posix_spawnattr_setsigdefault
     404  # if HAVE_RAW_DECL_POSIX_SPAWNATTR_SETSIGDEFAULT
     405  _GL_WARN_ON_USE (posix_spawnattr_setsigdefault,
     406                   "posix_spawnattr_setsigdefault is unportable - "
     407                   "use gnulib module posix_spawnattr_setsigdefault for portability");
     408  # endif
     409  #endif
     410  
     411  #if @GNULIB_POSIX_SPAWNATTR_GETSIGMASK@
     412  /* Store signal mask for the new process from ATTR in SIGMASK.  */
     413  # if @REPLACE_POSIX_SPAWN@
     414  #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
     415  #   define posix_spawnattr_getsigmask rpl_posix_spawnattr_getsigmask
     416  #  endif
     417  _GL_FUNCDECL_RPL (posix_spawnattr_getsigmask, int,
     418                    (const posix_spawnattr_t *_Restrict_ __attr,
     419                     sigset_t *_Restrict_ __sigmask)
     420                    __THROW _GL_ARG_NONNULL ((1, 2)));
     421  _GL_CXXALIAS_RPL (posix_spawnattr_getsigmask, int,
     422                    (const posix_spawnattr_t *_Restrict_ __attr,
     423                     sigset_t *_Restrict_ __sigmask));
     424  # else
     425  #  if !@HAVE_POSIX_SPAWN@
     426  _GL_FUNCDECL_SYS (posix_spawnattr_getsigmask, int,
     427                    (const posix_spawnattr_t *_Restrict_ __attr,
     428                     sigset_t *_Restrict_ __sigmask)
     429                    __THROW _GL_ARG_NONNULL ((1, 2)));
     430  #  endif
     431  _GL_CXXALIAS_SYS (posix_spawnattr_getsigmask, int,
     432                    (const posix_spawnattr_t *_Restrict_ __attr,
     433                     sigset_t *_Restrict_ __sigmask));
     434  # endif
     435  _GL_CXXALIASWARN (posix_spawnattr_getsigmask);
     436  #elif defined GNULIB_POSIXCHECK
     437  # undef posix_spawnattr_getsigmask
     438  # if HAVE_RAW_DECL_POSIX_SPAWNATTR_GETSIGMASK
     439  _GL_WARN_ON_USE (posix_spawnattr_getsigmask,
     440                   "posix_spawnattr_getsigmask is unportable - "
     441                   "use gnulib module posix_spawnattr_getsigmask for portability");
     442  # endif
     443  #endif
     444  
     445  #if @GNULIB_POSIX_SPAWNATTR_SETSIGMASK@
     446  /* Set signal mask for the new process in ATTR to SIGMASK.  */
     447  # if @REPLACE_POSIX_SPAWN@
     448  #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
     449  #   define posix_spawnattr_setsigmask rpl_posix_spawnattr_setsigmask
     450  #  endif
     451  _GL_FUNCDECL_RPL (posix_spawnattr_setsigmask, int,
     452                    (posix_spawnattr_t *_Restrict_ __attr,
     453                     const sigset_t *_Restrict_ __sigmask)
     454                    __THROW _GL_ARG_NONNULL ((1, 2)));
     455  _GL_CXXALIAS_RPL (posix_spawnattr_setsigmask, int,
     456                    (posix_spawnattr_t *_Restrict_ __attr,
     457                     const sigset_t *_Restrict_ __sigmask));
     458  # else
     459  #  if !@HAVE_POSIX_SPAWN@
     460  _GL_FUNCDECL_SYS (posix_spawnattr_setsigmask, int,
     461                    (posix_spawnattr_t *_Restrict_ __attr,
     462                     const sigset_t *_Restrict_ __sigmask)
     463                    __THROW _GL_ARG_NONNULL ((1, 2)));
     464  #  endif
     465  _GL_CXXALIAS_SYS (posix_spawnattr_setsigmask, int,
     466                    (posix_spawnattr_t *_Restrict_ __attr,
     467                     const sigset_t *_Restrict_ __sigmask));
     468  # endif
     469  _GL_CXXALIASWARN (posix_spawnattr_setsigmask);
     470  #elif defined GNULIB_POSIXCHECK
     471  # undef posix_spawnattr_setsigmask
     472  # if HAVE_RAW_DECL_POSIX_SPAWNATTR_SETSIGMASK
     473  _GL_WARN_ON_USE (posix_spawnattr_setsigmask,
     474                   "posix_spawnattr_setsigmask is unportable - "
     475                   "use gnulib module posix_spawnattr_setsigmask for portability");
     476  # endif
     477  #endif
     478  
     479  #if @GNULIB_POSIX_SPAWNATTR_GETFLAGS@
     480  /* Get flag word from the attribute structure.  */
     481  # if @REPLACE_POSIX_SPAWN@
     482  #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
     483  #   define posix_spawnattr_getflags rpl_posix_spawnattr_getflags
     484  #  endif
     485  _GL_FUNCDECL_RPL (posix_spawnattr_getflags, int,
     486                    (const posix_spawnattr_t *_Restrict_ __attr,
     487                     short int *_Restrict_ __flags)
     488                    __THROW _GL_ARG_NONNULL ((1, 2)));
     489  _GL_CXXALIAS_RPL (posix_spawnattr_getflags, int,
     490                    (const posix_spawnattr_t *_Restrict_ __attr,
     491                     short int *_Restrict_ __flags));
     492  # else
     493  #  if !@HAVE_POSIX_SPAWN@
     494  _GL_FUNCDECL_SYS (posix_spawnattr_getflags, int,
     495                    (const posix_spawnattr_t *_Restrict_ __attr,
     496                     short int *_Restrict_ __flags)
     497                    __THROW _GL_ARG_NONNULL ((1, 2)));
     498  #  endif
     499  _GL_CXXALIAS_SYS (posix_spawnattr_getflags, int,
     500                    (const posix_spawnattr_t *_Restrict_ __attr,
     501                     short int *_Restrict_ __flags));
     502  # endif
     503  _GL_CXXALIASWARN (posix_spawnattr_getflags);
     504  #elif defined GNULIB_POSIXCHECK
     505  # undef posix_spawnattr_getflags
     506  # if HAVE_RAW_DECL_POSIX_SPAWNATTR_GETFLAGS
     507  _GL_WARN_ON_USE (posix_spawnattr_getflags,
     508                   "posix_spawnattr_getflags is unportable - "
     509                   "use gnulib module posix_spawnattr_getflags for portability");
     510  # endif
     511  #endif
     512  
     513  #if @GNULIB_POSIX_SPAWNATTR_SETFLAGS@
     514  /* Store flags in the attribute structure.  */
     515  # if @REPLACE_POSIX_SPAWN@
     516  #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
     517  #   define posix_spawnattr_setflags rpl_posix_spawnattr_setflags
     518  #  endif
     519  _GL_FUNCDECL_RPL (posix_spawnattr_setflags, int,
     520                    (posix_spawnattr_t *__attr, short int __flags)
     521                    __THROW _GL_ARG_NONNULL ((1)));
     522  _GL_CXXALIAS_RPL (posix_spawnattr_setflags, int,
     523                    (posix_spawnattr_t *__attr, short int __flags));
     524  # else
     525  #  if !@HAVE_POSIX_SPAWN@
     526  _GL_FUNCDECL_SYS (posix_spawnattr_setflags, int,
     527                    (posix_spawnattr_t *__attr, short int __flags)
     528                    __THROW _GL_ARG_NONNULL ((1)));
     529  #  endif
     530  _GL_CXXALIAS_SYS (posix_spawnattr_setflags, int,
     531                    (posix_spawnattr_t *__attr, short int __flags));
     532  # endif
     533  _GL_CXXALIASWARN (posix_spawnattr_setflags);
     534  #elif defined GNULIB_POSIXCHECK
     535  # undef posix_spawnattr_setflags
     536  # if HAVE_RAW_DECL_POSIX_SPAWNATTR_SETFLAGS
     537  _GL_WARN_ON_USE (posix_spawnattr_setflags,
     538                   "posix_spawnattr_setflags is unportable - "
     539                   "use gnulib module posix_spawnattr_setflags for portability");
     540  # endif
     541  #endif
     542  
     543  #if @GNULIB_POSIX_SPAWNATTR_GETPGROUP@
     544  /* Get process group ID from the attribute structure.  */
     545  # if @REPLACE_POSIX_SPAWN@
     546  #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
     547  #   define posix_spawnattr_getpgroup rpl_posix_spawnattr_getpgroup
     548  #  endif
     549  _GL_FUNCDECL_RPL (posix_spawnattr_getpgroup, int,
     550                    (const posix_spawnattr_t *_Restrict_ __attr,
     551                     pid_t *_Restrict_ __pgroup)
     552                    __THROW _GL_ARG_NONNULL ((1, 2)));
     553  _GL_CXXALIAS_RPL (posix_spawnattr_getpgroup, int,
     554                    (const posix_spawnattr_t *_Restrict_ __attr,
     555                     pid_t *_Restrict_ __pgroup));
     556  # else
     557  #  if !@HAVE_POSIX_SPAWN@
     558  _GL_FUNCDECL_SYS (posix_spawnattr_getpgroup, int,
     559                    (const posix_spawnattr_t *_Restrict_ __attr,
     560                     pid_t *_Restrict_ __pgroup)
     561                    __THROW _GL_ARG_NONNULL ((1, 2)));
     562  #  endif
     563  _GL_CXXALIAS_SYS (posix_spawnattr_getpgroup, int,
     564                    (const posix_spawnattr_t *_Restrict_ __attr,
     565                     pid_t *_Restrict_ __pgroup));
     566  # endif
     567  _GL_CXXALIASWARN (posix_spawnattr_getpgroup);
     568  #elif defined GNULIB_POSIXCHECK
     569  # undef posix_spawnattr_getpgroup
     570  # if HAVE_RAW_DECL_POSIX_SPAWNATTR_GETPGROUP
     571  _GL_WARN_ON_USE (posix_spawnattr_getpgroup,
     572                   "posix_spawnattr_getpgroup is unportable - "
     573                   "use gnulib module posix_spawnattr_getpgroup for portability");
     574  # endif
     575  #endif
     576  
     577  #if @GNULIB_POSIX_SPAWNATTR_SETPGROUP@
     578  /* Store process group ID in the attribute structure.  */
     579  # if @REPLACE_POSIX_SPAWN@
     580  #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
     581  #   define posix_spawnattr_setpgroup rpl_posix_spawnattr_setpgroup
     582  #  endif
     583  _GL_FUNCDECL_RPL (posix_spawnattr_setpgroup, int,
     584                    (posix_spawnattr_t *__attr, pid_t __pgroup)
     585                    __THROW _GL_ARG_NONNULL ((1)));
     586  _GL_CXXALIAS_RPL (posix_spawnattr_setpgroup, int,
     587                    (posix_spawnattr_t *__attr, pid_t __pgroup));
     588  # else
     589  #  if !@HAVE_POSIX_SPAWN@
     590  _GL_FUNCDECL_SYS (posix_spawnattr_setpgroup, int,
     591                    (posix_spawnattr_t *__attr, pid_t __pgroup)
     592                    __THROW _GL_ARG_NONNULL ((1)));
     593  #  endif
     594  _GL_CXXALIAS_SYS (posix_spawnattr_setpgroup, int,
     595                    (posix_spawnattr_t *__attr, pid_t __pgroup));
     596  # endif
     597  _GL_CXXALIASWARN (posix_spawnattr_setpgroup);
     598  #elif defined GNULIB_POSIXCHECK
     599  # undef posix_spawnattr_setpgroup
     600  # if HAVE_RAW_DECL_POSIX_SPAWNATTR_SETPGROUP
     601  _GL_WARN_ON_USE (posix_spawnattr_setpgroup,
     602                   "posix_spawnattr_setpgroup is unportable - "
     603                   "use gnulib module posix_spawnattr_setpgroup for portability");
     604  # endif
     605  #endif
     606  
     607  #if @GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY@
     608  /* Get scheduling policy from the attribute structure.  */
     609  # if @REPLACE_POSIX_SPAWN@
     610  #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
     611  #   define posix_spawnattr_getschedpolicy rpl_posix_spawnattr_getschedpolicy
     612  #  endif
     613  _GL_FUNCDECL_RPL (posix_spawnattr_getschedpolicy, int,
     614                    (const posix_spawnattr_t *_Restrict_ __attr,
     615                     int *_Restrict_ __schedpolicy)
     616                    __THROW _GL_ARG_NONNULL ((1, 2)));
     617  _GL_CXXALIAS_RPL (posix_spawnattr_getschedpolicy, int,
     618                    (const posix_spawnattr_t *_Restrict_ __attr,
     619                     int *_Restrict_ __schedpolicy));
     620  # else
     621  #  if !@HAVE_POSIX_SPAWN@ || POSIX_SPAWN_SETSCHEDULER == 0
     622  _GL_FUNCDECL_SYS (posix_spawnattr_getschedpolicy, int,
     623                    (const posix_spawnattr_t *_Restrict_ __attr,
     624                     int *_Restrict_ __schedpolicy)
     625                    __THROW _GL_ARG_NONNULL ((1, 2)));
     626  #  endif
     627  _GL_CXXALIAS_SYS (posix_spawnattr_getschedpolicy, int,
     628                    (const posix_spawnattr_t *_Restrict_ __attr,
     629                     int *_Restrict_ __schedpolicy));
     630  # endif
     631  # if __GLIBC__ >= 2
     632  _GL_CXXALIASWARN (posix_spawnattr_getschedpolicy);
     633  # endif
     634  #elif defined GNULIB_POSIXCHECK
     635  # undef posix_spawnattr_getschedpolicy
     636  # if HAVE_RAW_DECL_POSIX_SPAWNATTR_GETSCHEDPOLICY
     637  _GL_WARN_ON_USE (posix_spawnattr_getschedpolicy,
     638                   "posix_spawnattr_getschedpolicy is unportable - "
     639                   "use gnulib module posix_spawnattr_getschedpolicy for portability");
     640  # endif
     641  #endif
     642  
     643  #if @GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY@
     644  /* Store scheduling policy in the attribute structure.  */
     645  # if @REPLACE_POSIX_SPAWN@
     646  #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
     647  #   define posix_spawnattr_setschedpolicy rpl_posix_spawnattr_setschedpolicy
     648  #  endif
     649  _GL_FUNCDECL_RPL (posix_spawnattr_setschedpolicy, int,
     650                    (posix_spawnattr_t *__attr, int __schedpolicy)
     651                    __THROW _GL_ARG_NONNULL ((1)));
     652  _GL_CXXALIAS_RPL (posix_spawnattr_setschedpolicy, int,
     653                    (posix_spawnattr_t *__attr, int __schedpolicy));
     654  # else
     655  #  if !@HAVE_POSIX_SPAWN@ || POSIX_SPAWN_SETSCHEDULER == 0
     656  _GL_FUNCDECL_SYS (posix_spawnattr_setschedpolicy, int,
     657                    (posix_spawnattr_t *__attr, int __schedpolicy)
     658                    __THROW _GL_ARG_NONNULL ((1)));
     659  #  endif
     660  _GL_CXXALIAS_SYS (posix_spawnattr_setschedpolicy, int,
     661                    (posix_spawnattr_t *__attr, int __schedpolicy));
     662  # endif
     663  # if __GLIBC__ >= 2
     664  _GL_CXXALIASWARN (posix_spawnattr_setschedpolicy);
     665  # endif
     666  #elif defined GNULIB_POSIXCHECK
     667  # undef posix_spawnattr_setschedpolicy
     668  # if HAVE_RAW_DECL_POSIX_SPAWNATTR_SETSCHEDPOLICY
     669  _GL_WARN_ON_USE (posix_spawnattr_setschedpolicy,
     670                   "posix_spawnattr_setschedpolicy is unportable - "
     671                   "use gnulib module posix_spawnattr_setschedpolicy for portability");
     672  # endif
     673  #endif
     674  
     675  #if @GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM@
     676  /* Get scheduling parameters from the attribute structure.  */
     677  # if @REPLACE_POSIX_SPAWN@
     678  #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
     679  #   define posix_spawnattr_getschedparam rpl_posix_spawnattr_getschedparam
     680  #  endif
     681  _GL_FUNCDECL_RPL (posix_spawnattr_getschedparam, int,
     682                    (const posix_spawnattr_t *_Restrict_ __attr,
     683                     struct sched_param *_Restrict_ __schedparam)
     684                    __THROW _GL_ARG_NONNULL ((1, 2)));
     685  _GL_CXXALIAS_RPL (posix_spawnattr_getschedparam, int,
     686                    (const posix_spawnattr_t *_Restrict_ __attr,
     687                     struct sched_param *_Restrict_ __schedparam));
     688  # else
     689  #  if !@HAVE_POSIX_SPAWN@ || POSIX_SPAWN_SETSCHEDPARAM == 0
     690  _GL_FUNCDECL_SYS (posix_spawnattr_getschedparam, int,
     691                    (const posix_spawnattr_t *_Restrict_ __attr,
     692                     struct sched_param *_Restrict_ __schedparam)
     693                    __THROW _GL_ARG_NONNULL ((1, 2)));
     694  #  endif
     695  _GL_CXXALIAS_SYS (posix_spawnattr_getschedparam, int,
     696                    (const posix_spawnattr_t *_Restrict_ __attr,
     697                     struct sched_param *_Restrict_ __schedparam));
     698  # endif
     699  # if __GLIBC__ >= 2
     700  _GL_CXXALIASWARN (posix_spawnattr_getschedparam);
     701  # endif
     702  #elif defined GNULIB_POSIXCHECK
     703  # undef posix_spawnattr_getschedparam
     704  # if HAVE_RAW_DECL_POSIX_SPAWNATTR_GETSCHEDPARAM
     705  _GL_WARN_ON_USE (posix_spawnattr_getschedparam,
     706                   "posix_spawnattr_getschedparam is unportable - "
     707                   "use gnulib module posix_spawnattr_getschedparam for portability");
     708  # endif
     709  #endif
     710  
     711  #if @GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM@
     712  /* Store scheduling parameters in the attribute structure.  */
     713  # if @REPLACE_POSIX_SPAWN@
     714  #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
     715  #   define posix_spawnattr_setschedparam rpl_posix_spawnattr_setschedparam
     716  #  endif
     717  _GL_FUNCDECL_RPL (posix_spawnattr_setschedparam, int,
     718                    (posix_spawnattr_t *_Restrict_ __attr,
     719                     const struct sched_param *_Restrict_ __schedparam)
     720                    __THROW _GL_ARG_NONNULL ((1, 2)));
     721  _GL_CXXALIAS_RPL (posix_spawnattr_setschedparam, int,
     722                    (posix_spawnattr_t *_Restrict_ __attr,
     723                     const struct sched_param *_Restrict_ __schedparam));
     724  # else
     725  #  if !@HAVE_POSIX_SPAWN@ || POSIX_SPAWN_SETSCHEDPARAM == 0
     726  _GL_FUNCDECL_SYS (posix_spawnattr_setschedparam, int,
     727                    (posix_spawnattr_t *_Restrict_ __attr,
     728                     const struct sched_param *_Restrict_ __schedparam)
     729                    __THROW _GL_ARG_NONNULL ((1, 2)));
     730  #  endif
     731  _GL_CXXALIAS_SYS (posix_spawnattr_setschedparam, int,
     732                    (posix_spawnattr_t *_Restrict_ __attr,
     733                     const struct sched_param *_Restrict_ __schedparam));
     734  # endif
     735  # if __GLIBC__ >= 2
     736  _GL_CXXALIASWARN (posix_spawnattr_setschedparam);
     737  # endif
     738  #elif defined GNULIB_POSIXCHECK
     739  # undef posix_spawnattr_setschedparam
     740  # if HAVE_RAW_DECL_POSIX_SPAWNATTR_SETSCHEDPARAM
     741  _GL_WARN_ON_USE (posix_spawnattr_setschedparam,
     742                   "posix_spawnattr_setschedparam is unportable - "
     743                   "use gnulib module posix_spawnattr_setschedparam for portability");
     744  # endif
     745  #endif
     746  
     747  
     748  #if @GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT@
     749  /* Initialize data structure for file attribute for 'spawn' call.  */
     750  # if @REPLACE_POSIX_SPAWN@
     751  #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
     752  #   define posix_spawn_file_actions_init rpl_posix_spawn_file_actions_init
     753  #  endif
     754  _GL_FUNCDECL_RPL (posix_spawn_file_actions_init, int,
     755                    (posix_spawn_file_actions_t *__file_actions)
     756                    __THROW _GL_ARG_NONNULL ((1)));
     757  _GL_CXXALIAS_RPL (posix_spawn_file_actions_init, int,
     758                    (posix_spawn_file_actions_t *__file_actions));
     759  # else
     760  #  if !@HAVE_POSIX_SPAWN@
     761  _GL_FUNCDECL_SYS (posix_spawn_file_actions_init, int,
     762                    (posix_spawn_file_actions_t *__file_actions)
     763                    __THROW _GL_ARG_NONNULL ((1)));
     764  #  endif
     765  _GL_CXXALIAS_SYS (posix_spawn_file_actions_init, int,
     766                    (posix_spawn_file_actions_t *__file_actions));
     767  # endif
     768  _GL_CXXALIASWARN (posix_spawn_file_actions_init);
     769  #elif defined GNULIB_POSIXCHECK
     770  # undef posix_spawn_file_actions_init
     771  # if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_INIT
     772  _GL_WARN_ON_USE (posix_spawn_file_actions_init,
     773                   "posix_spawn_file_actions_init is unportable - "
     774                   "use gnulib module posix_spawn_file_actions_init for portability");
     775  # endif
     776  #endif
     777  
     778  #if @GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY@
     779  /* Free resources associated with FILE-ACTIONS.  */
     780  # if @REPLACE_POSIX_SPAWN@
     781  #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
     782  #   define posix_spawn_file_actions_destroy rpl_posix_spawn_file_actions_destroy
     783  #  endif
     784  _GL_FUNCDECL_RPL (posix_spawn_file_actions_destroy, int,
     785                    (posix_spawn_file_actions_t *__file_actions)
     786                    __THROW _GL_ARG_NONNULL ((1)));
     787  _GL_CXXALIAS_RPL (posix_spawn_file_actions_destroy, int,
     788                    (posix_spawn_file_actions_t *__file_actions));
     789  # else
     790  #  if !@HAVE_POSIX_SPAWN@
     791  _GL_FUNCDECL_SYS (posix_spawn_file_actions_destroy, int,
     792                    (posix_spawn_file_actions_t *__file_actions)
     793                    __THROW _GL_ARG_NONNULL ((1)));
     794  #  endif
     795  _GL_CXXALIAS_SYS (posix_spawn_file_actions_destroy, int,
     796                    (posix_spawn_file_actions_t *__file_actions));
     797  # endif
     798  _GL_CXXALIASWARN (posix_spawn_file_actions_destroy);
     799  #elif defined GNULIB_POSIXCHECK
     800  # undef posix_spawn_file_actions_destroy
     801  # if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_DESTROY
     802  _GL_WARN_ON_USE (posix_spawn_file_actions_destroy,
     803                   "posix_spawn_file_actions_destroy is unportable - "
     804                   "use gnulib module posix_spawn_file_actions_destroy for portability");
     805  # endif
     806  #endif
     807  
     808  #if @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN@
     809  /* Add an action to FILE-ACTIONS which tells the implementation to call
     810     'open' for the given file during the 'spawn' call.  */
     811  # if @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN@
     812  #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
     813  #   define posix_spawn_file_actions_addopen rpl_posix_spawn_file_actions_addopen
     814  #  endif
     815  _GL_FUNCDECL_RPL (posix_spawn_file_actions_addopen, int,
     816                    (posix_spawn_file_actions_t *_Restrict_ __file_actions,
     817                     int __fd,
     818                     const char *_Restrict_ __path, int __oflag, mode_t __mode)
     819                    __THROW _GL_ARG_NONNULL ((1, 3)));
     820  _GL_CXXALIAS_RPL (posix_spawn_file_actions_addopen, int,
     821                    (posix_spawn_file_actions_t *_Restrict_ __file_actions,
     822                     int __fd,
     823                     const char *_Restrict_ __path, int __oflag, mode_t __mode));
     824  # else
     825  #  if !@HAVE_POSIX_SPAWN@
     826  _GL_FUNCDECL_SYS (posix_spawn_file_actions_addopen, int,
     827                    (posix_spawn_file_actions_t *_Restrict_ __file_actions,
     828                     int __fd,
     829                     const char *_Restrict_ __path, int __oflag, mode_t __mode)
     830                    __THROW _GL_ARG_NONNULL ((1, 3)));
     831  #  endif
     832  _GL_CXXALIAS_SYS (posix_spawn_file_actions_addopen, int,
     833                    (posix_spawn_file_actions_t *_Restrict_ __file_actions,
     834                     int __fd,
     835                     const char *_Restrict_ __path, int __oflag, mode_t __mode));
     836  # endif
     837  # if __GLIBC__ >= 2
     838  _GL_CXXALIASWARN (posix_spawn_file_actions_addopen);
     839  # endif
     840  #elif defined GNULIB_POSIXCHECK
     841  # undef posix_spawn_file_actions_addopen
     842  # if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN
     843  _GL_WARN_ON_USE (posix_spawn_file_actions_addopen,
     844                   "posix_spawn_file_actions_addopen is unportable - "
     845                   "use gnulib module posix_spawn_file_actions_addopen for portability");
     846  # endif
     847  #endif
     848  
     849  #if @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE@
     850  /* Add an action to FILE-ACTIONS which tells the implementation to call
     851     'close' for the given file descriptor during the 'spawn' call.  */
     852  # if @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE@
     853  #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
     854  #   define posix_spawn_file_actions_addclose rpl_posix_spawn_file_actions_addclose
     855  #  endif
     856  _GL_FUNCDECL_RPL (posix_spawn_file_actions_addclose, int,
     857                    (posix_spawn_file_actions_t *__file_actions, int __fd)
     858                    __THROW _GL_ARG_NONNULL ((1)));
     859  _GL_CXXALIAS_RPL (posix_spawn_file_actions_addclose, int,
     860                    (posix_spawn_file_actions_t *__file_actions, int __fd));
     861  # else
     862  #  if !@HAVE_POSIX_SPAWN@
     863  _GL_FUNCDECL_SYS (posix_spawn_file_actions_addclose, int,
     864                    (posix_spawn_file_actions_t *__file_actions, int __fd)
     865                    __THROW _GL_ARG_NONNULL ((1)));
     866  #  endif
     867  _GL_CXXALIAS_SYS (posix_spawn_file_actions_addclose, int,
     868                    (posix_spawn_file_actions_t *__file_actions, int __fd));
     869  # endif
     870  # if __GLIBC__ >= 2
     871  _GL_CXXALIASWARN (posix_spawn_file_actions_addclose);
     872  # endif
     873  #elif defined GNULIB_POSIXCHECK
     874  # undef posix_spawn_file_actions_addclose
     875  # if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE
     876  _GL_WARN_ON_USE (posix_spawn_file_actions_addclose,
     877                   "posix_spawn_file_actions_addclose is unportable - "
     878                   "use gnulib module posix_spawn_file_actions_addclose for portability");
     879  # endif
     880  #endif
     881  
     882  #if @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2@
     883  /* Add an action to FILE-ACTIONS which tells the implementation to call
     884     'dup2' for the given file descriptors during the 'spawn' call.  */
     885  # if @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2@
     886  #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
     887  #   define posix_spawn_file_actions_adddup2 rpl_posix_spawn_file_actions_adddup2
     888  #  endif
     889  _GL_FUNCDECL_RPL (posix_spawn_file_actions_adddup2, int,
     890                    (posix_spawn_file_actions_t *__file_actions,
     891                     int __fd, int __newfd)
     892                    __THROW _GL_ARG_NONNULL ((1)));
     893  _GL_CXXALIAS_RPL (posix_spawn_file_actions_adddup2, int,
     894                    (posix_spawn_file_actions_t *__file_actions,
     895                     int __fd, int __newfd));
     896  # else
     897  #  if !@HAVE_POSIX_SPAWN@
     898  _GL_FUNCDECL_SYS (posix_spawn_file_actions_adddup2, int,
     899                    (posix_spawn_file_actions_t *__file_actions,
     900                     int __fd, int __newfd)
     901                    __THROW _GL_ARG_NONNULL ((1)));
     902  #  endif
     903  _GL_CXXALIAS_SYS (posix_spawn_file_actions_adddup2, int,
     904                    (posix_spawn_file_actions_t *__file_actions,
     905                     int __fd, int __newfd));
     906  # endif
     907  # if __GLIBC__ >= 2
     908  _GL_CXXALIASWARN (posix_spawn_file_actions_adddup2);
     909  # endif
     910  #elif defined GNULIB_POSIXCHECK
     911  # undef posix_spawn_file_actions_adddup2
     912  # if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2
     913  _GL_WARN_ON_USE (posix_spawn_file_actions_adddup2,
     914                   "posix_spawn_file_actions_adddup2 is unportable - "
     915                   "use gnulib module posix_spawn_file_actions_adddup2 for portability");
     916  # endif
     917  #endif
     918  
     919  #if @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR@
     920  /* Add an action to FILE-ACTIONS which tells the implementation to call
     921     'chdir' to the given directory during the 'spawn' call.  */
     922  # if @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR@
     923  #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
     924  #   define posix_spawn_file_actions_addchdir rpl_posix_spawn_file_actions_addchdir
     925  #  endif
     926  _GL_FUNCDECL_RPL (posix_spawn_file_actions_addchdir, int,
     927                    (posix_spawn_file_actions_t *_Restrict_ __file_actions,
     928                     const char *_Restrict_ __path)
     929                    __THROW _GL_ARG_NONNULL ((1, 2)));
     930  _GL_CXXALIAS_RPL (posix_spawn_file_actions_addchdir, int,
     931                    (posix_spawn_file_actions_t *_Restrict_ __file_actions,
     932                     const char *_Restrict_ __path));
     933  # else
     934  #  if !@HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR@
     935  _GL_FUNCDECL_SYS (posix_spawn_file_actions_addchdir, int,
     936                    (posix_spawn_file_actions_t *_Restrict_ __file_actions,
     937                     const char *_Restrict_ __path)
     938                    __THROW _GL_ARG_NONNULL ((1, 2)));
     939  #  endif
     940  _GL_CXXALIAS_SYS (posix_spawn_file_actions_addchdir, int,
     941                    (posix_spawn_file_actions_t *_Restrict_ __file_actions,
     942                     const char *_Restrict_ __path));
     943  # endif
     944  _GL_CXXALIASWARN (posix_spawn_file_actions_addchdir);
     945  #elif defined GNULIB_POSIXCHECK
     946  # undef posix_spawn_file_actions_addchdir
     947  # if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR
     948  _GL_WARN_ON_USE (posix_spawn_file_actions_addchdir,
     949                   "posix_spawn_file_actions_addchdir is unportable - "
     950                   "use gnulib module posix_spawn_file_actions_addchdir for portability");
     951  # endif
     952  #endif
     953  
     954  #if @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR@
     955  /* Add an action to FILE-ACTIONS which tells the implementation to call
     956     'fchdir' to the given directory during the 'spawn' call.  */
     957  # if @REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR@
     958  #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
     959  #   define posix_spawn_file_actions_addfchdir rpl_posix_spawn_file_actions_addfchdir
     960  #  endif
     961  _GL_FUNCDECL_RPL (posix_spawn_file_actions_addfchdir, int,
     962                    (posix_spawn_file_actions_t *_Restrict_ __file_actions,
     963                     int __fd)
     964                    __THROW _GL_ARG_NONNULL ((1)));
     965  _GL_CXXALIAS_RPL (posix_spawn_file_actions_addfchdir, int,
     966                    (posix_spawn_file_actions_t *_Restrict_ __file_actions,
     967                     int __fd));
     968  # else
     969  #  if !@HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR@
     970  _GL_FUNCDECL_SYS (posix_spawn_file_actions_addfchdir, int,
     971                    (posix_spawn_file_actions_t *_Restrict_ __file_actions,
     972                     int __fd)
     973                    __THROW _GL_ARG_NONNULL ((1)));
     974  #  endif
     975  _GL_CXXALIAS_SYS (posix_spawn_file_actions_addfchdir, int,
     976                    (posix_spawn_file_actions_t *_Restrict_ __file_actions,
     977                     int __fd));
     978  # endif
     979  _GL_CXXALIASWARN (posix_spawn_file_actions_addfchdir);
     980  #elif defined GNULIB_POSIXCHECK
     981  # undef posix_spawn_file_actions_addfchdir
     982  # if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_ADDFCHDIR
     983  _GL_WARN_ON_USE (posix_spawn_file_actions_addfchdir,
     984                   "posix_spawn_file_actions_addfchdir is unportable - "
     985                   "use gnulib module posix_spawn_file_actions_addfchdir for portability");
     986  # endif
     987  #endif
     988  
     989  
     990  #endif /* _@GUARD_PREFIX@_SPAWN_H */
     991  #endif /* _@GUARD_PREFIX@_SPAWN_H */
     992  #endif