From abf4901899c198721df83b047e5d3df6f7dcb108 Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Mon, 2 May 2011 20:45:38 +0000 Subject: 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 --- src/include/cm.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'src/include') diff --git a/src/include/cm.h b/src/include/cm.h index 734f69ec7..d9c23fce1 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 */ }; -- cgit