added EWOULDBLOCK into error code translation
This commit is contained in:
parent
043be1bcdc
commit
c1888aba6a
@ -121,6 +121,30 @@
|
||||
|
||||
#else
|
||||
|
||||
#if defined(EWOULDBLOCK) && defined(EAGAIN) && (EWOULDBLOCK != EAGAIN)
|
||||
|
||||
#define IMPLEMENT_SYSERR_TO_ERRNUM(obj1,obj2) \
|
||||
static __SYSERRTYPE__(obj1) syserr_to_errnum (int e) \
|
||||
{ \
|
||||
switch (e) \
|
||||
{ \
|
||||
case ENOMEM: return __SYSERRNUM__ (obj2, ENOMEM); \
|
||||
case EINVAL: return __SYSERRNUM__ (obj2, EINVAL); \
|
||||
case EBUSY: \
|
||||
case EACCES: return __SYSERRNUM__ (obj2, EACCES); \
|
||||
case ENOTDIR: \
|
||||
case ENOENT: return __SYSERRNUM__ (obj2, ENOENT); \
|
||||
case EEXIST: return __SYSERRNUM__ (obj2, EEXIST); \
|
||||
case EINTR: return __SYSERRNUM__ (obj2, EINTR); \
|
||||
case EPIPE: return __SYSERRNUM__ (obj2, EPIPE); \
|
||||
case EWOULDBLOCK: \
|
||||
case EAGAIN: return __SYSERRNUM__ (obj2, EAGAIN); \
|
||||
default: return __SYSERRNUM__ (obj2, ESYSERR); \
|
||||
} \
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#define IMPLEMENT_SYSERR_TO_ERRNUM(obj1,obj2) \
|
||||
static __SYSERRTYPE__(obj1) syserr_to_errnum (int e) \
|
||||
{ \
|
||||
@ -140,4 +164,6 @@
|
||||
} \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -235,7 +235,7 @@ static qse_httpd_errnum_t skerr_to_errnum (int e)
|
||||
return QSE_HTTPD_EPIPE;
|
||||
|
||||
case EAGAIN:
|
||||
#if defined(EWEOULDBLOCK) && defined(EAGAIN) && EWOULDBLOCK != EAGAIN
|
||||
#if defined(EWEOULDBLOCK) && defined(EAGAIN) && (EWOULDBLOCK != EAGAIN)
|
||||
case EWOULDBLOCK:
|
||||
#endif
|
||||
return QSE_HTTPD_EAGAIN;
|
||||
|
Loading…
x
Reference in New Issue
Block a user