Mercurial > gnulib
comparison 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 |
comparison
equal
deleted
inserted
replaced
10590:666da211ee85 | 10591:9a7657d2031f |
---|---|
41 | 41 |
42 /* A platform that lacks <sys/select.h>. */ | 42 /* A platform that lacks <sys/select.h>. */ |
43 | 43 |
44 # include <sys/socket.h> | 44 # include <sys/socket.h> |
45 | 45 |
46 # if @HAVE_WINSOCK2_H@ | 46 /* The definition of GL_LINK_WARNING is copied here. */ |
47 | 47 |
48 # ifdef __cplusplus | 48 # ifdef __cplusplus |
49 extern "C" { | 49 extern "C" { |
50 # endif | 50 # endif |
51 | 51 |
52 # if @GNULIB_SELECT@ | 52 # if @GNULIB_SELECT@ |
53 # if @HAVE_WINSOCK2_H@ | |
53 # undef select | 54 # undef select |
54 # define select rpl_select | 55 # define select rpl_select |
55 extern int rpl_select (int, fd_set *, fd_set *, fd_set *, struct timeval *); | 56 extern int rpl_select (int, fd_set *, fd_set *, fd_set *, struct timeval *); |
56 # else | |
57 # undef select | |
58 # define select select_used_without_requesting_gnulib_module_select | |
59 # endif | 57 # endif |
58 # elif @HAVE_WINSOCK2_H@ | |
59 # undef select | |
60 # define select select_used_without_requesting_gnulib_module_select | |
61 # elif defined GNULIB_POSIXCHECK | |
62 # undef select | |
63 # define select(n,r,w,e,t) \ | |
64 (GL_LINK_WARNING ("select is not always POSIX compliant - " \ | |
65 "use gnulib module for portability"), \ | |
66 select (n, r, w, e, t)) | |
67 # endif | |
60 | 68 |
61 # ifdef __cplusplus | 69 # ifdef __cplusplus |
62 } | 70 } |
63 # endif | |
64 | |
65 # endif | 71 # endif |
66 | 72 |
67 #endif | 73 #endif |
68 | 74 |
69 #endif /* _GL_SYS_SELECT_H */ | 75 #endif /* _GL_SYS_SELECT_H */ |