]>
Commit | Line | Data |
---|---|---|
1 | /////////////////////////////////////////////////////////////////////////////// | |
2 | // Name: wx/private/fd.h | |
3 | // Purpose: private stuff for working with file descriptors | |
4 | // Author: Vadim Zeitlin | |
5 | // Created: 2008-11-23 (moved from wx/unix/private.h) | |
6 | // Copyright: (c) 2008 Vadim Zeitlin <vadim@wxwidgets.org> | |
7 | // Licence: wxWindows licence | |
8 | /////////////////////////////////////////////////////////////////////////////// | |
9 | ||
10 | #ifndef _WX_PRIVATE_FD_H_ | |
11 | #define _WX_PRIVATE_FD_H_ | |
12 | ||
13 | // standard Linux headers produce many warnings when used with icc so define | |
14 | // our own replacements for FD_XXX macros | |
15 | #if defined(__INTELC__) && defined(__LINUX__) | |
16 | inline void wxFD_ZERO(fd_set *fds) | |
17 | { | |
18 | #pragma warning(push) | |
19 | #pragma warning(disable:593) | |
20 | FD_ZERO(fds); | |
21 | #pragma warning(pop) | |
22 | } | |
23 | ||
24 | inline void wxFD_SET(int fd, fd_set *fds) | |
25 | { | |
26 | #pragma warning(push, 1) | |
27 | #pragma warning(disable:1469) | |
28 | FD_SET(fd, fds); | |
29 | #pragma warning(pop) | |
30 | } | |
31 | ||
32 | inline bool wxFD_ISSET(int fd, fd_set *fds) | |
33 | { | |
34 | #pragma warning(push, 1) | |
35 | #pragma warning(disable:1469) | |
36 | return FD_ISSET(fd, fds); | |
37 | #pragma warning(pop) | |
38 | } | |
39 | inline void wxFD_CLR(int fd, fd_set *fds) | |
40 | { | |
41 | #pragma warning(push, 1) | |
42 | #pragma warning(disable:1469) | |
43 | FD_CLR(fd, fds); | |
44 | #pragma warning(pop) | |
45 | } | |
46 | #else // !__INTELC__ | |
47 | #define wxFD_ZERO(fds) FD_ZERO(fds) | |
48 | #define wxFD_SET(fd, fds) FD_SET(fd, fds) | |
49 | #define wxFD_ISSET(fd, fds) FD_ISSET(fd, fds) | |
50 | #define wxFD_CLR(fd, fds) FD_CLR(fd, fds) | |
51 | #endif // __INTELC__/!__INTELC__ | |
52 | ||
53 | #endif // _WX_PRIVATE_FD_H_ |