diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2011-06-30 14:57:39 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2011-06-30 14:59:13 -0700 |
commit | 1b1ea5a514b6c42fd527d88261cb434122e9f1a1 (patch) | |
tree | 1531ab56f6782d27e5374b7552b3ea84a13764fb /lib/sys_select.in.h | |
parent | 18c7880d06e42284d765ef2cb7be4019fdcd9281 (diff) | |
download | gnulib-1b1ea5a514b6c42fd527d88261cb434122e9f1a1.tar.gz |
pselect: new module
* lib/sys_select.in.h: Include <signal.h>, for 'sigset_t'.
(pselect): New decls.
* m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Require AC_C_RESTRICT,
since the standard pselect decl uses 'restrict'.
(gl_SYS_SELECT_H_DEFAULTS): Add defaults for GNULIB_PSELECT,
HAVE_PSELECT, REPLACE_PSELECT.
* modules/sys_select (sys/select.h): Substitute GNULIB_PSELECT,
HAVE_PSELECT, REPLACE_PSELECT.
* lib/pselect.c, m4/pselect.m4, modules/pselect: New files.
Diffstat (limited to 'lib/sys_select.in.h')
-rw-r--r-- | lib/sys_select.in.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/lib/sys_select.in.h b/lib/sys_select.in.h index ef4c6f3cf6..ada0311016 100644 --- a/lib/sys_select.in.h +++ b/lib/sys_select.in.h @@ -85,11 +85,48 @@ # endif #endif +/* Get definition of 'sigset_t'. + But avoid namespace pollution on glibc systems. */ +#if !(defined __GLIBC__ && !defined __UCLIBC__) +# include <signal.h> +#endif + /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ /* The definition of _GL_WARN_ON_USE is copied here. */ +#if @GNULIB_PSELECT@ +# if @REPLACE_PSELECT@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef pselect +# define pselect rpl_pselect +# endif +_GL_FUNCDECL_RPL (pselect, int, + (int, fd_set *restrict, fd_set *restrict, fd_set *restrict, + struct timespec const *restrict, const sigset_t *restrict)); +_GL_CXXALIAS_RPL (pselect, int, + (int, fd_set *restrict, fd_set *restrict, fd_set *restrict, + struct timespec const *restrict, const sigset_t *restrict)); +# else +# if !@HAVE_PSELECT@ +_GL_FUNCDECL_SYS (pselect, int, + (int, fd_set *restrict, fd_set *restrict, fd_set *restrict, + struct timespec const *restrict, const sigset_t *restrict)); +# endif +_GL_CXXALIAS_SYS (pselect, int, + (int, fd_set *restrict, fd_set *restrict, fd_set *restrict, + struct timespec const *restrict, const sigset_t *restrict)); +# endif +_GL_CXXALIASWARN (pselect); +#elif defined GNULIB_POSIXCHECK +# undef pselect +# if HAVE_RAW_DECL_PSELECT +_GL_WARN_ON_USE (pselect, "pselect is not portable - " + "use gnulib module pselect for portability"); +# endif +#endif + #if @GNULIB_SELECT@ # if @REPLACE_SELECT@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |