X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fsys_select.in.h;h=2d2042783961d3ace573f9dab366638b4908f089;hb=fe18f20f2ac58f3fda945a633eccb85acc83e3e1;hp=255c02ffd83b1decfd65f828bf504b889fe8333e;hpb=ce8789a332a21bd438de0bafebec6de3125308ff;p=gnulib.git diff --git a/lib/sys_select.in.h b/lib/sys_select.in.h index 255c02ffd..2d2042783 100644 --- a/lib/sys_select.in.h +++ b/lib/sys_select.in.h @@ -19,12 +19,18 @@ #if @HAVE_SYS_SELECT_H@ +# if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ +# endif /* On many platforms, assumes prior inclusion of . */ # include +/* On OSF/1 4.0, provides only a forward declaration + of 'struct timeval', and no definition of this type.. */ +# include + /* The include_next requires a split double-inclusion guard. */ # @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@ @@ -39,20 +45,31 @@ # include -# if @HAVE_WINSOCK2_H@ +/* The definition of GL_LINK_WARNING is copied here. */ -# ifdef __cplusplus +# ifdef __cplusplus extern "C" { -# endif +# endif -# undef select -# define select rpl_select +# if @GNULIB_SELECT@ +# if @HAVE_WINSOCK2_H@ +# undef select +# define select rpl_select extern int rpl_select (int, fd_set *, fd_set *, fd_set *, struct timeval *); - -# ifdef __cplusplus -} # endif +# elif @HAVE_WINSOCK2_H@ +# undef select +# define select select_used_without_requesting_gnulib_module_select +# elif defined GNULIB_POSIXCHECK +# undef select +# define select(n,r,w,e,t) \ + (GL_LINK_WARNING ("select is not always POSIX compliant - " \ + "use gnulib module select for portability"), \ + select (n, r, w, e, t)) +# endif +# ifdef __cplusplus +} # endif #endif