- changed select to uselect

- some fixes in tecs.c
This commit is contained in:
zolliker
2008-10-16 14:33:25 +00:00
parent 5cb057f645
commit d239d98edb
12 changed files with 50 additions and 17 deletions

View File

@@ -8,6 +8,7 @@
#include "myc_err.h"
#include "myc_str.h"
#include "coc_util.h"
#include "uselect.h"
/*-------------------------------------------------------------------------*/
/* CreateSocketAddress stolen from Tcl. Thanks to John Ousterhout */
@@ -52,7 +53,7 @@ void CocDelay(int msec) {
tmo.tv_sec=msec / 1000;
tmo.tv_usec=(msec % 1000)*1000+1;
select(1,NULL,NULL,NULL,&tmo);
uselect(1,NULL,NULL,NULL,&tmo);
}
/*-------------------------------------------------------------------------*/
@@ -79,7 +80,7 @@ int CocRecv(int fd, StrBuf *buf, int timeout, int *flag) {
FD_ZERO(&mask);
FD_SET(fd, &mask);
ERR_SI(i=select(fd+1,&mask,NULL,NULL,&tmo));
ERR_SI(i=uselect(fd+1,&mask,NULL,NULL,&tmo));
if (flag!=NULL) {
*flag=0;
if (i==0) return(0);