* Copyright (c) 1995-2003, Index Data
* See the file LICENSE for details.
*
- * $Id: unix.c,v 1.13 2003-09-16 20:48:28 adam Exp $
+ * $Id: unix.c,v 1.14 2003-10-08 21:47:15 adam Exp $
* UNIX socket COMSTACK. By Morten Bøgeskov.
*/
#ifndef WIN32
void *cd);
static int unix_set_blocking(COMSTACK p, int blocking);
-
static COMSTACK unix_accept(COMSTACK h);
static char *unix_addrstr(COMSTACK h);
static void *unix_straddr(COMSTACK h, const char *str);
xmalloc(sizeof(unix_state)))))
return 0;
- if (!(p->blocking = blocking))
+ if (!((p->blocking = blocking)&1))
{
if (fcntl(s, F_SETFL, O_NONBLOCK) < 0)
return 0;
}
return 0;
}
- if (!cnew->blocking &&
- (!cnew->blocking && fcntl(cnew->iofile, F_SETFL, O_NONBLOCK) < 0)
+ if (!(cnew->blocking&1) &&
+ (fcntl(cnew->iofile, F_SETFL, O_NONBLOCK) < 0)
)
{
h->cerrno = CSYSERR;