Split _enonfatal() for Windows

This commit is contained in:
Lassi Kortela 2019-08-19 01:18:36 +03:00
parent 35acc782d9
commit d12fd5cea7
1 changed files with 10 additions and 0 deletions

10
c/ios.c
View File

@ -62,11 +62,21 @@ static void _fd_poll(long fd, int forwrite)
} }
#endif #endif
#ifdef _WIN32
static int _enonfatal(int err)
{
(void)err;
return 0;
}
#endif
#ifndef _WIN32
static int _enonfatal(int err) static int _enonfatal(int err)
{ {
return (err == EAGAIN || err == EINPROGRESS || err == EINTR || return (err == EAGAIN || err == EINPROGRESS || err == EINTR ||
err == EWOULDBLOCK); err == EWOULDBLOCK);
} }
#endif
#define SLEEP_TIME 5 // ms #define SLEEP_TIME 5 // ms