error.c: check if EWOULDBLOCK is defined
* error.c (set_syserr): EWOULDBLOCK may not be defined, check if defined first. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
bd2d094aab
commit
8d9e1f9dad
20
error.c
20
error.c
@ -1290,19 +1290,19 @@ set_syserr(int n, const char *name)
|
|||||||
|
|
||||||
/* capture nonblock errnos for WaitReadable/WaitWritable subclasses */
|
/* capture nonblock errnos for WaitReadable/WaitWritable subclasses */
|
||||||
switch (n) {
|
switch (n) {
|
||||||
case EAGAIN:
|
case EAGAIN:
|
||||||
rb_eEAGAIN = error;
|
rb_eEAGAIN = error;
|
||||||
|
|
||||||
#if EAGAIN != EWOULDBLOCK
|
#if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
|
||||||
break;
|
break;
|
||||||
case EWOULDBLOCK:
|
case EWOULDBLOCK:
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
rb_eEWOULDBLOCK = error;
|
rb_eEWOULDBLOCK = error;
|
||||||
break;
|
break;
|
||||||
case EINPROGRESS:
|
case EINPROGRESS:
|
||||||
rb_eEINPROGRESS = error;
|
rb_eEINPROGRESS = error;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
rb_define_const(error, "Errno", INT2NUM(n));
|
rb_define_const(error, "Errno", INT2NUM(n));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user