-#endif /* LDAP_REFERRALS */
-
-
-
-#if defined( LDAP_CONNECTIONLESS ) || !defined( LDAP_REFERRALS )
-#if !defined( MACOS ) && !defined( DOS ) && !defined( _WIN32 )
-static int
-ldap_select1( LDAP *ld, struct timeval *timeout )
-{
- fd_set readfds;
- static int tblsize;
-
- if ( tblsize == 0 ) {
-#ifdef HAVE_SYSCONF
- tblsize = sysconf( _SC_OPEN_MAX );
-#elif HAVE_GETDTABLESIZE
- tblsize = getdtablesize();
-#else
- tblsize = FD_SETSIZE;
-#endif
-#ifdef FD_SETSIZE
- if ( tblsize > FD_SETSIZE ) {
- tblsize = FD_SETSIZE;
- }
-#endif /* FD_SETSIZE */
- }
-
- FD_ZERO( &readfds );
- FD_SET( ld->ld_sb.sb_sd, &readfds );
-
- return( select( tblsize, &readfds, 0, 0, timeout ) );
-}
-#endif /* !MACOS */
-