Mladen Turk wrote:

-----Original Message-----
From: Henri Gomez

Why? Think we just add the -DBSD_COMP to the JK_CFLAGS in
Makefile.in

Sure but it's not very clean and didn't take use of configure "detection" features.

BTW: we'll need to find a way to add it to jkant for those who want to use ant to build native code ;{


Agreed, but the entire purpose of the ioctl is to disable the
nonblocking socket.
We can use the fcntl for that.

int fd_flags;
fd_flags = fcntl(sd, F_GETFL, 0);
#if defined(O_NONBLOCK)
fd_flags &= ~O_NONBLOCK;
#elif defined(O_NDELAY)
fd_flags &= ~O_NDELAY;
#elif defined(FNDELAY)
fd_flags &= ~O_FNDELAY;
#else
/* XXXX: this breaks things, but an alternative isn't obvious...*/
return -1;
#endif
if (fcntl(sd, F_SETFL, fd_flags) == -1) {
return errno;
}


That's how its done in apr.
So let use it that way, APR is a reference in native code implementation  ;)




--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@;jakarta.apache.org>

Reply via email to