diff options
| author | Greg Hudson <ghudson@mit.edu> | 2011-05-02 20:45:38 +0000 |
|---|---|---|
| committer | Greg Hudson <ghudson@mit.edu> | 2011-05-02 20:45:38 +0000 |
| commit | abf4901899c198721df83b047e5d3df6f7dcb108 (patch) | |
| tree | 3f6b2021d773816fe26221772511df4e2978e921 /src/include | |
| parent | 78e9341c1f347e64944dc9e52b4278dedea2f414 (diff) | |
| download | krb5-abf4901899c198721df83b047e5d3df6f7dcb108.tar.gz krb5-abf4901899c198721df83b047e5d3df6f7dcb108.tar.xz krb5-abf4901899c198721df83b047e5d3df6f7dcb108.zip | |
Add poll support to sendto_kdc.c so that it can work in processes with
large numbers of open files. Move krb5int_cm_call_select() to a
separate file so that the poll support doesn't interfere with
net-server.c's continuing use of select.
ticket: 6905
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24908 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/cm.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/include/cm.h b/src/include/cm.h index 734f69ec74..d9c23fce1f 100644 --- a/src/include/cm.h +++ b/src/include/cm.h @@ -24,11 +24,20 @@ * or implied warranty. */ -/* Since fd_set is large on some platforms (8K on AIX 5.2), this - probably shouldn't be allocated in automatic storage. */ +/* + * Since fd_set is large on some platforms (8K on AIX 5.2), this probably + * shouldn't be allocated in automatic storage. Define USE_POLL and + * MAX_POLLFDS in the consumer of this header file to use poll state instead of + * select state. + */ struct select_state { - int max, nfds; +#ifdef USE_POLL + struct pollfd fds[MAX_POLLFDS]; +#else + int max; fd_set rfds, wfds, xfds; +#endif + int nfds; struct timeval end_time; /* magic: tv_sec==0 => never time out */ }; |
