mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
1 changed files with 10 additions and 10 deletions
20
error.c
20
error.c
|
@ -1290,19 +1290,19 @@ set_syserr(int n, const char *name)
|
|||
|
||||
/* capture nonblock errnos for WaitReadable/WaitWritable subclasses */
|
||||
switch (n) {
|
||||
case EAGAIN:
|
||||
rb_eEAGAIN = error;
|
||||
case EAGAIN:
|
||||
rb_eEAGAIN = error;
|
||||
|
||||
#if EAGAIN != EWOULDBLOCK
|
||||
break;
|
||||
case EWOULDBLOCK:
|
||||
#if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
|
||||
break;
|
||||
case EWOULDBLOCK:
|
||||
#endif
|
||||
|
||||
rb_eEWOULDBLOCK = error;
|
||||
break;
|
||||
case EINPROGRESS:
|
||||
rb_eEINPROGRESS = error;
|
||||
break;
|
||||
rb_eEWOULDBLOCK = error;
|
||||
break;
|
||||
case EINPROGRESS:
|
||||
rb_eEINPROGRESS = error;
|
||||
break;
|
||||
}
|
||||
|
||||
rb_define_const(error, "Errno", INT2NUM(n));
|
||||
|
|
Loading…
Reference in a new issue