Chinaunix首页 | 论坛 | 博客
  • 博客访问: 835234
  • 博文数量: 756
  • 博客积分: 40000
  • 博客等级: 大将
  • 技术积分: 4980
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-13 14:40
文章分类

全部博文(756)

文章存档

2011年(1)

2008年(755)

我的朋友

分类:

2008-10-13 16:11:00

1、LINUX下面
Cannot increase FD_SETSIZE on Linux, but we can increase __FD_SETSIZE
with glibc 2.2 (or later? remains to be seen). We do this by including
bits/types.h which defines __FD_SETSIZE first, then we redefine
__FD_SETSIZE. Ofcourse a user program may NEVER include bits/whatever.h
directly, so this is a dirty hack!

#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
#include
#undef __FD_SETSIZE
#define __FD_SETSIZE SQUID_MAXFD
#endif

2、FreeBsd

Cannot increase FD_SETSIZE on FreeBSD before 2.2.0, causes select(2)
to return EINVAL.

3、Mac OS X Server

Trying to redefine CHANGE_FD_SETSIZE causes a slew of warnings
on Mac OS X Server.

其他的大部分平台基本上都可以重定义FD_SETSIZE(当然包括winnt系列了)

 


--------------------next---------------------

阅读(509) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~