/* Definitions for POSIX spawn interface.
- Copyright (C) 2000, 2003, 2004, 2008-2009 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2003-2004, 2008-2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software: you can redistribute it and/or modify
#ifndef _GL_SPAWN_H
#define _GL_SPAWN_H
-#include <sched.h>
-#include <signal.h>
+/* Get definitions of 'struct sched_param' and 'sigset_t'.
+ But avoid namespace pollution on glibc systems. */
+#ifndef __GLIBC__
+# include <sched.h>
+# include <signal.h>
+#endif
+
#include <sys/types.h>
#ifndef __THROW
char *const envp[_Restrict_arr_])
_GL_ARG_NONNULL ((2, 5, 6));
# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawn
+# define posix_spawn(a,b,c,d,e,f) \
+ (GL_LINK_WARNING ("posix_spawn is unportable - " \
+ "use gnulib module posix_spawn for portability"), \
+ posix_spawn (a, b, c, d, e, f))
#endif
#if @GNULIB_POSIX_SPAWNP@
char *const argv[], char *const envp[])
_GL_ARG_NONNULL ((2, 5, 6));
# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawnp
+# define posix_spawnp(a,b,c,d,e,f) \
+ (GL_LINK_WARNING ("posix_spawnp is unportable - " \
+ "use gnulib module posix_spawnp for portability"), \
+ posix_spawnp (a, b, c, d, e, f))
#endif
extern int posix_spawnattr_init (posix_spawnattr_t *__attr)
__THROW _GL_ARG_NONNULL ((1));
# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawnattr_init
+# define posix_spawnattr_init(a) \
+ (GL_LINK_WARNING ("posix_spawnattr_init is unportable - " \
+ "use gnulib module posix_spawnattr_init for portability"), \
+ posix_spawnattr_init (a))
#endif
#if @GNULIB_POSIX_SPAWNATTR_DESTROY@
extern int posix_spawnattr_destroy (posix_spawnattr_t *__attr)
__THROW _GL_ARG_NONNULL ((1));
# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawnattr_destroy
+# define posix_spawnattr_destroy(a) \
+ (GL_LINK_WARNING ("posix_spawnattr_destroy is unportable - " \
+ "use gnulib module posix_spawnattr_destroy for portability"), \
+ posix_spawnattr_destroy (a))
#endif
#if @GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT@
sigset_t *_Restrict_ __sigdefault)
__THROW _GL_ARG_NONNULL ((1, 2));
# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawnattr_getsigdefault
+# define posix_spawnattr_getsigdefault(a, b) \
+ (GL_LINK_WARNING ("posix_spawnattr_getsigdefault is unportable - " \
+ "use gnulib module posix_spawnattr_getsigdefault for portability"), \
+ posix_spawnattr_getsigdefault (a, b))
#endif
#if @GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT@
const sigset_t *_Restrict_ __sigdefault)
__THROW _GL_ARG_NONNULL ((1, 2));
# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawnattr_setsigdefault
+# define posix_spawnattr_setsigdefault(a, b) \
+ (GL_LINK_WARNING ("posix_spawnattr_setsigdefault is unportable - " \
+ "use gnulib module posix_spawnattr_setsigdefault for portability"), \
+ posix_spawnattr_setsigdefault (a, b))
#endif
#if @GNULIB_POSIX_SPAWNATTR_GETSIGMASK@
sigset_t *_Restrict_ __sigmask)
__THROW _GL_ARG_NONNULL ((1, 2));
# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawnattr_getsigmask
+# define posix_spawnattr_getsigmask(a, b) \
+ (GL_LINK_WARNING ("posix_spawnattr_getsigmask is unportable - " \
+ "use gnulib module posix_spawnattr_getsigmask for portability"), \
+ posix_spawnattr_getsigmask (a, b))
#endif
#if @GNULIB_POSIX_SPAWNATTR_SETSIGMASK@
const sigset_t *_Restrict_ __sigmask)
__THROW _GL_ARG_NONNULL ((1, 2));
# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawnattr_setsigmask
+# define posix_spawnattr_setsigmask(a, b) \
+ (GL_LINK_WARNING ("posix_spawnattr_setsigmask is unportable - " \
+ "use gnulib module posix_spawnattr_setsigmask for portability"), \
+ posix_spawnattr_setsigmask (a, b))
#endif
#if @GNULIB_POSIX_SPAWNATTR_GETFLAGS@
short int *_Restrict_ __flags)
__THROW _GL_ARG_NONNULL ((1, 2));
# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawnattr_getflags
+# define posix_spawnattr_getflags(a, b) \
+ (GL_LINK_WARNING ("posix_spawnattr_getflags is unportable - " \
+ "use gnulib module posix_spawnattr_getflags for portability"), \
+ posix_spawnattr_getflags (a, b))
#endif
#if @GNULIB_POSIX_SPAWNATTR_SETFLAGS@
short int __flags)
__THROW _GL_ARG_NONNULL ((1));
# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawnattr_setflags
+# define posix_spawnattr_setflags(a, b) \
+ (GL_LINK_WARNING ("posix_spawnattr_setflags is unportable - " \
+ "use gnulib module posix_spawnattr_setflags for portability"), \
+ posix_spawnattr_setflags (a, b))
#endif
#if @GNULIB_POSIX_SPAWNATTR_GETPGROUP@
pid_t *_Restrict_ __pgroup)
__THROW _GL_ARG_NONNULL ((1, 2));
# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawnattr_getpgroup
+# define posix_spawnattr_getpgroup(a, b) \
+ (GL_LINK_WARNING ("posix_spawnattr_getpgroup is unportable - " \
+ "use gnulib module posix_spawnattr_getpgroup for portability"), \
+ posix_spawnattr_getpgroup (a, b))
#endif
#if @GNULIB_POSIX_SPAWNATTR_SETPGROUP@
pid_t __pgroup)
__THROW _GL_ARG_NONNULL ((1));
# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawnattr_setpgroup
+# define posix_spawnattr_setpgroup(a, b) \
+ (GL_LINK_WARNING ("posix_spawnattr_setpgroup is unportable - " \
+ "use gnulib module posix_spawnattr_setpgroup for portability"), \
+ posix_spawnattr_setpgroup (a, b))
#endif
#if @GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY@
int *_Restrict_ __schedpolicy)
__THROW _GL_ARG_NONNULL ((1, 2));
# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawnattr_getschedpolicy
+# define posix_spawnattr_getschedpolicy(a, b) \
+ (GL_LINK_WARNING ("posix_spawnattr_getschedpolicy is unportable - " \
+ "use gnulib module posix_spawnattr_getschedpolicy for portability"), \
+ posix_spawnattr_getschedpolicy (a, b))
#endif
#if @GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY@
int __schedpolicy)
__THROW _GL_ARG_NONNULL ((1));
# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawnattr_setschedpolicy
+# define posix_spawnattr_setschedpolicy(a, b) \
+ (GL_LINK_WARNING ("posix_spawnattr_setschedpolicy is unportable - " \
+ "use gnulib module posix_spawnattr_setschedpolicy for portability"), \
+ posix_spawnattr_setschedpolicy (a, b))
#endif
#if @GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM@
struct sched_param *_Restrict_ __schedparam)
__THROW _GL_ARG_NONNULL ((1, 2));
# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawnattr_getschedparam
+# define posix_spawnattr_getschedparam(a, b) \
+ (GL_LINK_WARNING ("posix_spawnattr_getschedparam is unportable - " \
+ "use gnulib module posix_spawnattr_getschedparam for portability"), \
+ posix_spawnattr_getschedparam (a, b))
#endif
#if @GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM@
const struct sched_param *_Restrict_ __schedparam)
__THROW _GL_ARG_NONNULL ((1, 2));
# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawnattr_setschedparam
+# define posix_spawnattr_setschedparam(a, b) \
+ (GL_LINK_WARNING ("posix_spawnattr_setschedparam is unportable - " \
+ "use gnulib module posix_spawnattr_setschedparam for portability"), \
+ posix_spawnattr_setschedparam (a, b))
#endif
extern int posix_spawn_file_actions_init (posix_spawn_file_actions_t *__file_actions)
__THROW _GL_ARG_NONNULL ((1));
# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawn_file_actions_init
+# define posix_spawn_file_actions_init(a) \
+ (GL_LINK_WARNING ("posix_spawn_file_actions_init is unportable - " \
+ "use gnulib module posix_spawn_file_actions_init for portability"), \
+ posix_spawn_file_actions_init (a))
#endif
#if @GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY@
extern int posix_spawn_file_actions_destroy (posix_spawn_file_actions_t *__file_actions)
__THROW _GL_ARG_NONNULL ((1));
# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawn_file_actions_destroy
+# define posix_spawn_file_actions_destroy(a) \
+ (GL_LINK_WARNING ("posix_spawn_file_actions_destroy is unportable - " \
+ "use gnulib module posix_spawn_file_actions_destroy for portability"), \
+ posix_spawn_file_actions_destroy (a))
#endif
#if @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN@
int __oflag, mode_t __mode)
__THROW _GL_ARG_NONNULL ((1, 3));
# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawn_file_actions_addopen
+# define posix_spawn_file_actions_addopen(a, b, c, d, e) \
+ (GL_LINK_WARNING ("posix_spawn_file_actions_addopen is unportable - " \
+ "use gnulib module posix_spawn_file_actions_addopen for portability"), \
+ posix_spawn_file_actions_addopen (a, b, c, d, e))
#endif
#if @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE@
int __fd)
__THROW _GL_ARG_NONNULL ((1));
# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawn_file_actions_addclose
+# define posix_spawn_file_actions_addclose(a,b) \
+ (GL_LINK_WARNING ("posix_spawn_file_actions_addclose is unportable - " \
+ "use gnulib module posix_spawn_file_actions_addclose for portability"), \
+ posix_spawn_file_actions_addclose (a, b))
#endif
#if @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2@
int __fd, int __newfd)
__THROW _GL_ARG_NONNULL ((1));
# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawn_file_actions_adddup2
+# define posix_spawn_file_actions_adddup2(a,b,c) \
+ (GL_LINK_WARNING ("posix_spawn_file_actions_adddup2 is unportable - " \
+ "use gnulib module posix_spawn_file_actions_adddup2 for portability"), \
+ posix_spawn_file_actions_adddup2 (a, b, c))
#endif