Mercurial > gnulib
diff lib/sys_select.in.h @ 10591:9a7657d2031f
Add a link warning when the 'select' module is not used.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Mon, 06 Oct 2008 01:10:08 +0200 |
parents | ca7f9b88efc1 |
children | 535c41e25ab1 |
line wrap: on
line diff
--- a/lib/sys_select.in.h Sun Oct 05 17:49:55 2008 +0200 +++ b/lib/sys_select.in.h Mon Oct 06 01:10:08 2008 +0200 @@ -43,25 +43,31 @@ # include <sys/socket.h> -# if @HAVE_WINSOCK2_H@ +/* The definition of GL_LINK_WARNING is copied here. */ -# ifdef __cplusplus +# ifdef __cplusplus extern "C" { -# endif +# endif -# if @GNULIB_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 *); -# else -# undef select -# define select select_used_without_requesting_gnulib_module_select # 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 for portability"), \ + select (n, r, w, e, t)) +# endif -# ifdef __cplusplus +# ifdef __cplusplus } -# endif - # endif #endif