зеркало из https://github.com/github/ruby.git
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:
Родитель
bd2d094aab
Коммит
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 */
|
||||
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));
|
||||
|
|
Загрузка…
Ссылка в новой задаче