Changeset b495a1
- Timestamp:
- 10/07/08 10:08:08 (4 years ago)
- Branches:
- master
- Children:
- 65a14e
- Parents:
- f0c0ca
- git-author:
- Tomash Brechko <tomash.brechko@…> (10/07/08 10:08:08)
- git-committer:
- Tomash Brechko <tomash.brechko@…> (10/07/08 10:08:08)
- Files:
-
- 6 edited
-
Changes (modified) (1 diff)
-
README (modified) (1 diff)
-
src/poll_select.c (modified) (1 diff)
-
src/poll_select.h (modified) (1 diff)
-
src/socket_posix.h (modified) (1 diff)
-
src/socket_win32.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
Changes
r255201 rb495a1 10 10 Add support for Win32. I personally don't have the system nor 11 11 compiler, so I can't even test the build. Win32 port is 12 expected to be supported by community. 12 expected to be supported by community. Note: on Win32 below 13 Windows Vista max number of memcached servers is 64. See 14 comment on FD_SETSIZE in src/socket_win32.h to learn how to 15 increase this value if you need to connect to more than 64 16 servers. 13 17 14 18 Use poll() system call instead of select(). The latter has -
README
r46fd4a rb495a1 21 21 The module should compile and work on any Unix-derived system. Win32 22 22 support is based on the patch by Yasuhiro Matsumoto---thanks!, and is 23 (expected to be) supported by community. 23 (expected to be) supported by community. Note: on Win32 below Windows 24 Vista max number of memcached servers is 64. See comment on 25 FD_SETSIZE in src/socket_win32.h to learn how to increase this value 26 if you need to connect to more than 64 servers. 24 27 25 28 Despite the low version number (which mainly reflects release history) -
src/poll_select.c
rc346b2 rb495a1 28 28 #include "socket_win32.h" 29 29 #endif /* WIN32 */ 30 31 32 int33 can_poll_fd(int fd)34 {35 return (fd < FD_SETSIZE);36 }37 30 38 31 -
src/poll_select.h
rc346b2 rb495a1 36 36 37 37 38 extern39 int40 can_poll_fd(int fd);41 42 43 38 struct pollfd 44 39 { -
src/socket_posix.h
rc346b2 rb495a1 49 49 #define poll(fds, nfds, timeout) poll_select(fds, nfds, timeout) 50 50 51 #define can_poll_fd(fd) ((fd) < FD_SETSIZE) 52 51 53 #endif /* ! defined(HAVE_POLL_H) && ! defined(HAVE_SYS_POLL_H) */ 52 54 -
src/socket_win32.h
rc346b2 rb495a1 36 36 #define poll(fds, nfds, timeout) WSAPoll(fds, nfds, timeout) 37 37 38 #define can_poll_fd(fd) 139 40 38 #else /* ! (_WIN32_WINNT >= 0x0600) */ 41 39 … … 45 43 46 44 #endif /* ! (_WIN32_WINNT >= 0x0600) */ 45 46 47 /* 48 On Win32 FD_SETSIZE is not the limit on the max fd value, but 49 instead the limit on the total number of fds that select() can 50 handle. So can_poll_fd() should return 1 in any case, any fd is 51 select()'able or WSAPoll()'able. By default FD_SETSIZE is 64. If 52 you plan to use more memcached servers, you may redefine it to a 53 larger value before including <winsock2.h>. 54 */ 55 #define can_poll_fd(fd) 1 47 56 48 57
Note: See TracChangeset
for help on using the changeset viewer.
