On Thu, 28 Apr 2005 02:46:46 +0400
 Andrey Shorin <[EMAIL PROTECTED]> wrote:
Hello Serassio,

Tuesday, April 26, 2005, 13:08:09, Serassio Guido wrote:

Now I plan to port diskd filesystem to Windows.
SG> They are currently some Squid aspect that needs more work in the Windows
SG> port. some of they could be integrated in Squid 3.0, in priority order they
SG> are:


SG> - Integration of Windows and Unix IPC models (partially done from Robert, a
SG> blocker for complete Squid 3.0 integration)
Could you please be more specific on this?


SG> - Override the 2048 FD limit
Unmortunately, I forgot already what is the case of this limit...

SG> and native socket handling (could go in 3.1)
Do you mean getting rid of such macros:
#define read(fd,buf,siz) \
   (_so_err_siz = sizeof(_so_err), \
   getsockopt((fd),SOL_SOCKET,SO_ERROR,&_so_err,&_so_err_siz) \
   == 0 ? recv((fd),(buf),(siz),0) : _read((fd),(buf),(siz)))

I see there is already 'type' member in struct _fde and FD_SOCKET
enum constant. We could do something like this:
#define read _w32_read
int _w32_read(int fd, char* buf, int siz)
{
   switch (fd_table[fd].type) {
   case FD_FILE:
       return _read(fd, buf, siz);
   case FD_SOCKET:
       return recv(fd, buf, siz, 0);
   ...
   }
}

This is right what I do in my OS/2 port of squid


SY, Evgeny Kotsuba

Reply via email to