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