* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA
*
- * $Id: commio.h 24059 2007-07-24 17:25:41Z androsyn $
*/
#ifndef _COMMIO_INT_H
#define FD_DESC_SZ 128 /* hostlen + comment */
-
-#ifdef _WIN32
-#define rb_get_errno() do { errno = WSAGetLastError(); WSASetLastError(errno); } while(0)
-#else
-#define rb_get_errno()
-#endif
-
#define rb_hash_fd(x) ((x ^ (x >> RB_FD_HASH_BITS) ^ (x >> (RB_FD_HASH_BITS * 2))) & RB_FD_HASH_MASK)
-#ifdef HAVE_WRITEV
#ifndef UIO_MAXIOV
# if defined(__FreeBSD__) || defined(__APPLE__) || defined(__NetBSD__)
/* FreeBSD 4.7 defines it in sys/uio.h only if _KERNEL is specified */
#else
#define RB_UIO_MAXIOV UIO_MAXIOV
#endif
-#else
-#define RB_UIO_MAXIOV 16
-#endif
struct conndata
{
/* We don't need the host here ? */
#define SetFDOpen(F) (F->flags |= FLAG_OPEN)
#define ClearFDOpen(F) (F->flags &= ~FLAG_OPEN)
-
struct _fde
{
/* New-school stuff, again pretty much ripped from squid */
int rb_kqueue_sched_event(struct ev_entry *event, int when);
void rb_kqueue_unsched_event(struct ev_entry *event);
int rb_kqueue_supports_event(void);
-
-
-/* select versions */
-void rb_setselect_select(rb_fde_t *F, unsigned int type, PF * handler, void *client_data);
-int rb_init_netio_select(void);
-int rb_select_select(long);
-int rb_setup_fd_select(rb_fde_t *F);
-
-/* win32 versions */
-void rb_setselect_win32(rb_fde_t *F, unsigned int type, PF * handler, void *client_data);
-int rb_init_netio_win32(void);
-int rb_select_win32(long);
-int rb_setup_fd_win32(rb_fde_t *F);
#endif
-